Trait DirectoryEntry

Source
pub trait DirectoryEntry:
    GetEntryInfo
    + IntoAny
    + Sync
    + Send
    + 'static {
    // Required method
    fn open_entry(
        self: Arc<Self>,
        request: OpenRequest<'_>,
    ) -> Result<(), Status>;

    // Provided method
    fn scope(&self) -> Option<ExecutionScope> { ... }
}
Expand description

Pseudo directories contain items that implement this trait. Pseudo directories refer to the items they contain as Arc<dyn DirectoryEntry>.

NOTE: This trait only needs to be implemented if you want to add your nodes to a pseudo directory.

Required Methods§

Source

fn open_entry(self: Arc<Self>, request: OpenRequest<'_>) -> Result<(), Status>

Opens this entry.

Provided Methods§

Source

fn scope(&self) -> Option<ExecutionScope>

The scope that should own connections to this directory entry, or None if parent scope should be used (the default).

NOTE: This method will be called by Simple (the VFS implementation of a pseudo directory), but might not be respected by other implementors that call open_entry.

Implementors§