Trait INodeInterface

Source
pub trait INodeInterface:
    DowncastSync
    + Send
    + Sync {
Show 21 methods // Provided methods fn readat(&self, _offset: usize, _buffer: &mut [u8]) -> VfsResult<usize> { ... } fn writeat(&self, _offset: usize, _buffer: &[u8]) -> VfsResult<usize> { ... } fn create(&self, _name: &str, _ty: FileType) -> VfsResult<()> { ... } fn mkdir(&self, _name: &str) -> VfsResult<()> { ... } fn rmdir(&self, _name: &str) -> VfsResult<()> { ... } fn remove(&self, _name: &str) -> VfsResult<()> { ... } fn read_dir(&self) -> VfsResult<Vec<DirEntry>> { ... } fn lookup(&self, _name: &str) -> VfsResult<Arc<dyn INodeInterface>> { ... } fn ioctl(&self, _command: usize, _arg: usize) -> VfsResult<usize> { ... } fn truncate(&self, _size: usize) -> VfsResult<()> { ... } fn flush(&self) -> VfsResult<()> { ... } fn resolve_link(&self) -> VfsResult<String> { ... } fn link(&self, _name: &str, _src: Arc<dyn INodeInterface>) -> VfsResult<()> { ... } fn symlink(&self, _name: &str, _src: &str) -> VfsResult<()> { ... } fn unlink(&self, _name: &str) -> VfsResult<()> { ... } fn stat(&self, _stat: &mut Stat) -> VfsResult<()> { ... } fn mount(&self, _path: &str) -> VfsResult<()> { ... } fn umount(&self) -> VfsResult<()> { ... } fn statfs(&self, _statfs: &mut StatFS) -> VfsResult<()> { ... } fn utimes(&self, _times: &mut [TimeSpec]) -> VfsResult<()> { ... } fn poll(&self, _events: PollEvent) -> VfsResult<PollEvent> { ... }
}

Provided Methods§

Source

fn readat(&self, _offset: usize, _buffer: &mut [u8]) -> VfsResult<usize>

Source

fn writeat(&self, _offset: usize, _buffer: &[u8]) -> VfsResult<usize>

Source

fn create(&self, _name: &str, _ty: FileType) -> VfsResult<()>

Source

fn mkdir(&self, _name: &str) -> VfsResult<()>

Source

fn rmdir(&self, _name: &str) -> VfsResult<()>

Source

fn remove(&self, _name: &str) -> VfsResult<()>

Source

fn read_dir(&self) -> VfsResult<Vec<DirEntry>>

Source

fn lookup(&self, _name: &str) -> VfsResult<Arc<dyn INodeInterface>>

Source

fn ioctl(&self, _command: usize, _arg: usize) -> VfsResult<usize>

Source

fn truncate(&self, _size: usize) -> VfsResult<()>

Source

fn flush(&self) -> VfsResult<()>

Source

fn stat(&self, _stat: &mut Stat) -> VfsResult<()>

Source

fn mount(&self, _path: &str) -> VfsResult<()>

Source

fn umount(&self) -> VfsResult<()>

Source

fn statfs(&self, _statfs: &mut StatFS) -> VfsResult<()>

Source

fn utimes(&self, _times: &mut [TimeSpec]) -> VfsResult<()>

Source

fn poll(&self, _events: PollEvent) -> VfsResult<PollEvent>

Implementations§

Source§

impl dyn INodeInterface

Source

pub fn is<__T: INodeInterface>(&self) -> bool

Returns true if the trait object wraps an object of type __T.

Source

pub fn downcast<__T: INodeInterface>( self: Box<Self>, ) -> Result<Box<__T>, Box<Self>>

Returns a boxed object from a boxed trait object if the underlying object is of type __T. Returns the original boxed trait if it isn’t.

Source

pub fn downcast_rc<__T: INodeInterface>( self: Rc<Self>, ) -> Result<Rc<__T>, Rc<Self>>

Returns an Rc-ed object from an Rc-ed trait object if the underlying object is of type __T. Returns the original Rc-ed trait if it isn’t.

Source

pub fn downcast_ref<__T: INodeInterface>(&self) -> Option<&__T>

Returns a reference to the object within the trait object if it is of type __T, or None if it isn’t.

Source

pub fn downcast_mut<__T: INodeInterface>(&mut self) -> Option<&mut __T>

Returns a mutable reference to the object within the trait object if it is of type __T, or None if it isn’t.

Source

pub fn downcast_arc<__T: INodeInterface + Any + Send + Sync>( self: Arc<Self>, ) -> Result<Arc<__T>, Arc<Self>>

Returns an Arc-ed object from an Arc-ed trait object if the underlying object is of type __T. Returns the original Arc-ed trait if it isn’t.

Implementors§