Struct runefs::SectorHeader
source · [−]pub struct SectorHeader {
pub archive_id: u32,
pub chunk: usize,
pub next: usize,
pub index_id: u8,
}Expand description
A section header containing validation and its next sector.
Fields
archive_id: u32chunk: usizenext: usizeindex_id: u8Implementations
Constructs a sector header from the given buffer.
Each sector is guaranteed to have a length of 520 bytes. The header size
will be either 8 or 10 bytes, making the data size either 512 or 510 bytes
respectively. Only when the archive id exceeds u16::MAX will the header size
be expanded (meaning a 10 byte header).
Errors
The header buffer needs to be exactly SectorHeaderSize, otherwise you will
get a parser error.
Trait Implementations
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for SectorHeader
impl Send for SectorHeader
impl Sync for SectorHeader
impl Unpin for SectorHeader
impl UnwindSafe for SectorHeader
Blanket Implementations
Mutably borrows from an owned value. Read more