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§
Source§impl<'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> Freeze for Program<'a>
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§
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