Struct elf_riscv32::Section
source · [−]pub struct Section<'a> {
pub header: &'a SectionHeader,
pub data: &'a [u8],
}
Expand description
A section header and its associated data.
Fields
header: &'a SectionHeader
data: &'a [u8]
Implementations
sourceimpl<'a> Section<'a>
impl<'a> Section<'a>
pub fn new(header: &'a SectionHeader, data: &'a [u8]) -> Self
sourcepub fn check_type(&self, ty: SectionType) -> Result<()>
pub fn check_type(&self, ty: SectionType) -> Result<()>
Ensure that the type of the section matches that expected, returning an Err
otherwise.
pub fn check_flag(&self, flags: SectionFlags) -> Result<()>
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Section<'a>
impl<'a> Send for Section<'a>
impl<'a> Sync for Section<'a>
impl<'a> Unpin for Section<'a>
impl<'a> UnwindSafe for Section<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more