DirentSink

Trait DirentSink 

Source
pub trait DirentSink {
    // Required methods
    fn add(
        &mut self,
        inode_num: ino_t,
        offset: off_t,
        entry_type: DirectoryEntryType,
        name: &FsStr,
    ) -> Result<(), Errno>;
    fn offset(&self) -> off_t;

    // Provided method
    fn user_capacity(&self) -> Option<usize> { ... }
}

Required Methods§

Source

fn add( &mut self, inode_num: ino_t, offset: off_t, entry_type: DirectoryEntryType, name: &FsStr, ) -> Result<(), Errno>

Add the given directory entry to this buffer.

In case of success, this will update the offset from the FileObject. Any other bookkeeping must be done by the caller after this method returns successfully.

Returns error!(ENOSPC) if the entry does not fit.

Source

fn offset(&self) -> off_t

The current offset to return.

Provided Methods§

Source

fn user_capacity(&self) -> Option<usize>

Optional information about the max number of bytes to send to the user.

Implementors§