pub struct BlkInode { /* private fields */ }Expand description
BlkInode wraps an on-disk inode entry with block-device I/O.
Implementations§
Source§impl BlkInode
impl BlkInode
Sourcepub fn read_at(&self, offset: usize, buf: &mut [u8]) -> Result<usize, FileError>
pub fn read_at(&self, offset: usize, buf: &mut [u8]) -> Result<usize, FileError>
Read from this inode at the given offset.
Sourcepub fn write_at(
&mut self,
offset: usize,
buf: &[u8],
) -> Result<usize, FileError>
pub fn write_at( &mut self, offset: usize, buf: &[u8], ) -> Result<usize, FileError>
Write to this inode at the given offset.
Sourcepub fn add_entry(
&mut self,
name: &str,
child_ino: usize,
) -> Result<(), FileError>
pub fn add_entry( &mut self, name: &str, child_ino: usize, ) -> Result<(), FileError>
Add a directory entry: “name\0ino_le_u32”
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BlkInode
impl !UnwindSafe for BlkInode
impl Forget for BlkInode
impl Freeze for BlkInode
impl Send for BlkInode
impl Sync for BlkInode
impl Unpin for BlkInode
impl UnsafeUnpin for BlkInode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more