Struct elf_riscv32::Program
source · [−]pub struct Program<'a> {
pub header: &'a ProgramHeader,
pub data: &'a [u8],
}
Expand description
A program header and its associated data.
Fields
header: &'a ProgramHeader
data: &'a [u8]
Implementations
sourceimpl<'a> Program<'a>
impl<'a> Program<'a>
pub fn new(header: &'a ProgramHeader, data: &'a [u8]) -> Self
sourcepub fn check_type(&self, ty: ProgramType) -> Result<()>
pub fn check_type(&self, ty: ProgramType) -> Result<()>
Ensure that the type of the program header matches that expected, returning an Err
otherwise.
pub fn check_flag(&self, flags: ProgramFlags) -> Result<()>
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Program<'a>
impl<'a> Send for Program<'a>
impl<'a> Sync for Program<'a>
impl<'a> Unpin for Program<'a>
impl<'a> UnwindSafe for Program<'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