Struct ktest::fs::MemDisk[][src]

pub struct MemDisk { /* fields omitted */ }

Implementations

impl MemDisk[src]

pub fn new(size: usize) -> Self[src]

Trait Implementations

impl Device for MemDisk[src]

fn shutdown<'async_trait>(
    self
) -> Result<Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>, AllocError> where
    Self: Sized,
    Self: 'async_trait, 
[src]

The async destructor of the device. Read more

fn attach<'life0, 'life1, 'async_trait>(
    &'life0 self,
    aname: &'life1 [u8]
) -> Result<Pin<Box<dyn Future<Output = Result<ChanId>> + Send + 'async_trait>>, AllocError> where
    Self: Sized,
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Return the root channel. aname is a user-specified hint.

fn open<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    dir: &'life1 ChanId,
    name: &'life2 [u8],
    create_dir: Option<bool>
) -> Result<Pin<Box<dyn Future<Output = Result<Option<ChanId>>> + Send + 'async_trait>>, AllocError> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Open a file in the directory or reopen a file. Read more

fn close<'life0, 'async_trait>(
    &'life0 self,
    c: ChanId
) -> Result<Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>, AllocError> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Close a file. The drop of channel is done by Chan::close Read more

fn remove<'life0, 'life1, 'async_trait>(
    &'life0 self,
    c: &'life1 ChanId
) -> Result<Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>, AllocError> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Remove a file by hint such that the server won’t remove the file until all clients have closed it. Can only remove normal file or empty directory. May not atomic since having to truncate the file first. Read more

fn stat<'life0, 'life1, 'async_trait>(
    &'life0 self,
    c: &'life1 ChanId
) -> Result<Pin<Box<dyn Future<Output = Result<Dirent>> + Send + 'async_trait>>, AllocError> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Inquires about the file attribute identified by a channel.

fn wstat<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    c: &'life1 ChanId,
    dirent: &'life2 Dirent
) -> Result<Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>, AllocError> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Change the file attribute identified by a channel. Should be atomic.

fn read<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    c: &'life1 ChanId,
    buf: &'life2 mut [u8],
    off: usize
) -> Result<Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>, AllocError> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Read data from a channel by offset and store to buffer. Read more

fn write<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    c: &'life1 ChanId,
    buf: &'life2 [u8],
    off: usize
) -> Result<Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>, AllocError> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Write the data in buffer to a channel starting by specific offset. Directories are not allowed to be written. Read more

fn truncate<'life0, 'life1, 'async_trait>(
    &'life0 self,
    c: &'life1 ChanId,
    size: usize
) -> Result<Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>, AllocError> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Reduce the size of a file. Read more

Auto Trait Implementations

impl !RefUnwindSafe for MemDisk

impl Send for MemDisk

impl Sync for MemDisk

impl Unpin for MemDisk

impl UnwindSafe for MemDisk

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V