Trait INodeInterface

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

Provided Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn read_dir(&self) -> Result<Vec<DirEntry>, Errno>

Source

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

Source

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

Source

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

Source

fn flush(&self) -> Result<(), Errno>

Source

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

Source

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

Source

fn umount(&self) -> Result<(), Errno>

Source

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

Source

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

Source

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

Implementations§

Source§

impl dyn INodeInterface

Source

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

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

Source

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

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>( self: Rc<dyn INodeInterface>, ) -> Result<Rc<__T>, Rc<dyn INodeInterface>>
where __T: INodeInterface,

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>(&self) -> Option<&__T>
where __T: INodeInterface,

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>(&mut self) -> Option<&mut __T>
where __T: INodeInterface,

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>( self: Arc<dyn INodeInterface>, ) -> Result<Arc<__T>, Arc<dyn INodeInterface>>
where __T: INodeInterface + Any + Send + Sync,

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§