pub trait ParseToStruct: FromBytes + NoCell + Unaligned + Sized {
    // Provided methods
    fn from_reader_with_offset(
        reader: &dyn Reader,
        offset: u64
    ) -> Result<Self, ParsingError> { ... }
    fn to_struct_ref(
        data: &[u8],
        error_type: ParsingError
    ) -> Result<&Self, ParsingError> { ... }
}
Expand description

All functions to help parse data into respective structs.

Provided Methods§

source

fn from_reader_with_offset( reader: &dyn Reader, offset: u64 ) -> Result<Self, ParsingError>

source

fn to_struct_ref( data: &[u8], error_type: ParsingError ) -> Result<&Self, ParsingError>

Casts the &u8 data to &Self.

Self is the ext4 struct that represents the given data.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: FromBytes + NoCell + Unaligned> ParseToStruct for T

Apply to all EXT4 structs as seen above.