pub struct Dir {
pub flags: u16,
/* private fields */
}Expand description
A validated container: header fields and section ranges.
Fields§
§flags: u16Header flags.
Implementations§
Source§impl Dir
impl Dir
Sourcepub fn parse(bytes: &[u8], format: Format) -> Result<Self>
pub fn parse(bytes: &[u8], format: Format) -> Result<Self>
Validate bytes as a container of format: header, directory and
every section checksummed once, bounds and alignment checked. Any
input yields Ok, Error::Format or Error::Version, never a
panic.
Sourcepub fn span(&self, kind: u16) -> Range<usize> ⓘ
pub fn span(&self, kind: u16) -> Range<usize> ⓘ
Byte range of section kind (empty when absent), for owners that
keep offsets instead of slices.
Sourcepub fn section_flags(&self, kind: u16) -> u16
pub fn section_flags(&self, kind: u16) -> u16
The per-section flags of kind (0 when absent).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Dir
impl RefUnwindSafe for Dir
impl Send for Dir
impl Sync for Dir
impl Unpin for Dir
impl UnsafeUnpin for Dir
impl UnwindSafe for Dir
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