Trait Node

Source
pub trait Node:
    'static
    + Any
    + Send
    + Sync {
    // Required methods
    fn to_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>;
    fn parent(&self) -> Option<Arc<dyn Node>>;
    fn filetype(&self) -> FileType;
    fn id(&self) -> Arc<InodeId>;
    fn open_dir<'async_trait>(
        self: Arc<Self>,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn WasiDir>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn open_file<'life0, 'async_trait>(
        self: Arc<Self>,
        path: &'life0 str,
        dir: bool,
        read: bool,
        write: bool,
        flags: FdFlags,
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn WasiFile>, Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn root(self: &Arc<Self>) -> Arc<dyn Node>
       where Self: Sized { ... }
}

Required Methods§

Source

fn to_any(self: Arc<Self>) -> Arc<dyn Any + Send + Sync>

Source

fn parent(&self) -> Option<Arc<dyn Node>>

Source

fn filetype(&self) -> FileType

Source

fn id(&self) -> Arc<InodeId>

Source

fn open_dir<'async_trait>( self: Arc<Self>, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn WasiDir>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn open_file<'life0, 'async_trait>( self: Arc<Self>, path: &'life0 str, dir: bool, read: bool, write: bool, flags: FdFlags, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn WasiFile>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn root(self: &Arc<Self>) -> Arc<dyn Node>
where Self: Sized,

Implementors§