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