Trait vfs::directory::dirents_sink::Sink

source ·
pub trait Sink: Send {
    // Required methods
    fn append(self: Box<Self>, entry: &EntryInfo, name: &str) -> AppendResult;
    fn seal(self: Box<Self>) -> Box<dyn Sealed>;
}
Expand description

Every sink that can consume directory entry information implements this trait.

Required Methods§

source

fn append(self: Box<Self>, entry: &EntryInfo, name: &str) -> AppendResult

Try to append an entry with the specified entry name and attributes into this sink. If the entry was successfully added the result is AppendResult::Ok. If the sink could could not consume this entry an AppendResult::Sealed value is returned.

entry is the EntryInfo attributes of the next entry. name is the name of the next entry.

source

fn seal(self: Box<Self>) -> Box<dyn Sealed>

If the producer has reached the end of the list of entries, it should call this method to produce a “sealed” sink.

Implementors§