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§
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>
Implementations§
Source§impl dyn INodeInterface
impl dyn INodeInterface
Sourcepub fn is<__T: INodeInterface>(&self) -> bool
pub fn is<__T: INodeInterface>(&self) -> bool
Returns true if the trait object wraps an object of type __T
.
Sourcepub fn downcast<__T: INodeInterface>(
self: Box<Self>,
) -> Result<Box<__T>, Box<Self>>
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.
Sourcepub fn downcast_rc<__T: INodeInterface>(
self: Rc<Self>,
) -> Result<Rc<__T>, Rc<Self>>
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.
Sourcepub fn downcast_ref<__T: INodeInterface>(&self) -> Option<&__T>
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.
Sourcepub fn downcast_mut<__T: INodeInterface>(&mut self) -> Option<&mut __T>
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.
Sourcepub fn downcast_arc<__T: INodeInterface + Any + Send + Sync>(
self: Arc<Self>,
) -> Result<Arc<__T>, Arc<Self>>
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.