pub struct Image<'i> {
pub image: &'i [u8],
pub header: &'i ComposefsHeader,
pub blkszbits: u8,
pub block_size: usize,
pub sb: &'i Superblock,
pub inodes: &'i [u8],
pub xattrs: &'i [u8],
}Expand description
Parsed EROFS image with references to key structures
Fields§
§image: &'i [u8]Raw image bytes
header: &'i ComposefsHeaderComposefs header
blkszbits: u8Block size in bits
block_size: usizeBlock size in bytes
sb: &'i SuperblockSuperblock
inodes: &'i [u8]Inode metadata region
xattrs: &'i [u8]Extended attributes region
Implementations§
Source§impl<'img> Image<'img>
impl<'img> Image<'img>
Returns a shared extended attribute by its ID
Sourcepub fn data_block(&self, id: u64) -> &DataBlock
pub fn data_block(&self, id: u64) -> &DataBlock
Returns a data block by its ID as a DataBlock reference
Sourcepub fn directory_block(&self, id: u64) -> &DirectoryBlock
pub fn directory_block(&self, id: u64) -> &DirectoryBlock
Returns a directory block by its ID
Trait Implementations§
Auto Trait Implementations§
impl<'i> Freeze for Image<'i>
impl<'i> RefUnwindSafe for Image<'i>
impl<'i> Send for Image<'i>
impl<'i> Sync for Image<'i>
impl<'i> Unpin for Image<'i>
impl<'i> UnwindSafe for Image<'i>
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