pub struct SectionTable {
pub sections: Vec<SectionDescriptor>,
}Expand description
Validated variable-length section table following the header.
Fields§
§sections: Vec<SectionDescriptor>Descriptors in file order.
Implementations§
Source§impl SectionTable
impl SectionTable
Sourcepub fn parse(data: &[u8]) -> Result<Self, IrError>
pub fn parse(data: &[u8]) -> Result<Self, IrError>
Parse the body prefix; the caller has already checked header integrity.
Sourcepub fn validate(&self, file_len: usize) -> Result<(), IrError>
pub fn validate(&self, file_len: usize) -> Result<(), IrError>
Require exact tiling, including unknown optional payloads.
Sourcepub fn get(&self, id: u16) -> Option<&SectionDescriptor>
pub fn get(&self, id: u16) -> Option<&SectionDescriptor>
Find a descriptor by id.
Trait Implementations§
Source§impl Clone for SectionTable
impl Clone for SectionTable
Source§impl Debug for SectionTable
impl Debug for SectionTable
impl Eq for SectionTable
Source§impl PartialEq for SectionTable
impl PartialEq for SectionTable
impl StructuralPartialEq for SectionTable
Auto Trait Implementations§
impl Freeze for SectionTable
impl RefUnwindSafe for SectionTable
impl Send for SectionTable
impl Sync for SectionTable
impl Unpin for SectionTable
impl UnsafeUnpin for SectionTable
impl UnwindSafe for SectionTable
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