pub struct SectionHeader {
pub pointer: u64,
pub csize: u32,
pub size: u32,
pub chksum: u32,
pub btype: u8,
pub flags: u8,
}Expand description
The BPX Section Header.
Fields§
§pointer: u64Data pointer.
Offset: +0
csize: u32Size in bytes after compression.
Offset: +8
size: u32Size in bytes before compression.
Offset: +12
chksum: u32Data checksum.
Offset: +16
btype: u8Type byte.
Offset: +20
flags: u8Flags (see FLAG_* constants).
Offset: +21
Implementations§
Source§impl SectionHeader
impl SectionHeader
Sourcepub fn read<TReader: Read>(reader: &mut TReader) -> Result<(u32, SectionHeader)>
pub fn read<TReader: Read>(reader: &mut TReader) -> Result<(u32, SectionHeader)>
Sourcepub fn new() -> SectionHeader
pub fn new() -> SectionHeader
Creates a new empty BPX Section Header.
Sourcepub fn is_huge_section(&self) -> bool
pub fn is_huge_section(&self) -> bool
Checks if this section is huge (greater than 100Mb).
Sourcepub fn get_checksum(&self) -> u32
pub fn get_checksum(&self) -> u32
Computes the checksum for this header.
Trait Implementations§
Source§impl Clone for SectionHeader
impl Clone for SectionHeader
Source§fn clone(&self) -> SectionHeader
fn clone(&self) -> SectionHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SectionHeader
Auto Trait Implementations§
impl Freeze for SectionHeader
impl RefUnwindSafe for SectionHeader
impl Send for SectionHeader
impl Sync for SectionHeader
impl Unpin for SectionHeader
impl UnsafeUnpin for SectionHeader
impl UnwindSafe for SectionHeader
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