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§
Sourcefn add(
&mut self,
inode_num: ino_t,
offset: off_t,
entry_type: DirectoryEntryType,
name: &FsStr,
) -> Result<(), Errno>
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.
Provided Methods§
Sourcefn user_capacity(&self) -> Option<usize>
fn user_capacity(&self) -> Option<usize>
Optional information about the max number of bytes to send to the user.