#[repr(C, packed(1))]pub struct Ext2DirectoryEntryRaw {
pub inode: u32,
pub rec_len: u16,
pub name_len: u8,
pub file_type: u8,
}Expand description
ext2 Directory Entry
Directory entries are stored as variable-length records within directory data blocks.
Fields§
§inode: u32Inode number
rec_len: u16Record length
name_len: u8Name length
file_type: u8File type (ext2 revision 1.0 and later)
Implementations§
Source§impl Ext2DirectoryEntryRaw
impl Ext2DirectoryEntryRaw
Sourcepub fn from_bytes(data: &[u8]) -> Result<Self, FileSystemError>
pub fn from_bytes(data: &[u8]) -> Result<Self, FileSystemError>
Parse directory entry from raw bytes using unsafe type conversion
Sourcepub fn get_rec_len(&self) -> u16
pub fn get_rec_len(&self) -> u16
Get record length
Sourcepub fn get_name_len(&self) -> u8
pub fn get_name_len(&self) -> u8
Get name length
Sourcepub fn get_file_type(&self) -> u8
pub fn get_file_type(&self) -> u8
Get file type
Trait Implementations§
Source§impl Clone for Ext2DirectoryEntryRaw
impl Clone for Ext2DirectoryEntryRaw
Source§fn clone(&self) -> Ext2DirectoryEntryRaw
fn clone(&self) -> Ext2DirectoryEntryRaw
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Ext2DirectoryEntryRaw
impl Debug for Ext2DirectoryEntryRaw
impl Copy for Ext2DirectoryEntryRaw
Auto Trait Implementations§
impl Freeze for Ext2DirectoryEntryRaw
impl RefUnwindSafe for Ext2DirectoryEntryRaw
impl Send for Ext2DirectoryEntryRaw
impl Sync for Ext2DirectoryEntryRaw
impl Unpin for Ext2DirectoryEntryRaw
impl UnwindSafe for Ext2DirectoryEntryRaw
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)