#[non_exhaustive]pub struct ProgramBinary<'a> {
pub header: ProgramBinaryHeader,
pub user_elf: &'a [u8],
pub kernel_elf: &'a [u8],
}
Expand description
A container to hold a user ELF and a kernel ELF together.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.header: ProgramBinaryHeader
The header.
user_elf: &'a [u8]
The user ELF.
kernel_elf: &'a [u8]
The kernel ELF.
Implementations§
Source§impl<'a> ProgramBinary<'a>
impl<'a> ProgramBinary<'a>
Sourcepub fn to_image(&self) -> Result<MemoryImage>
pub fn to_image(&self) -> Result<MemoryImage>
Convert this binary into a MemoryImage
.
Sourcepub fn compute_image_id(&self) -> Result<Digest>
pub fn compute_image_id(&self) -> Result<Digest>
Compute and return the ImageID of this binary.
Trait Implementations§
Source§impl<'a> Debug for ProgramBinary<'a>
impl<'a> Debug for ProgramBinary<'a>
Source§impl<'a> PartialEq for ProgramBinary<'a>
impl<'a> PartialEq for ProgramBinary<'a>
impl<'a> Eq for ProgramBinary<'a>
impl<'a> StructuralPartialEq for ProgramBinary<'a>
Auto Trait Implementations§
impl<'a> Freeze for ProgramBinary<'a>
impl<'a> RefUnwindSafe for ProgramBinary<'a>
impl<'a> Send for ProgramBinary<'a>
impl<'a> Sync for ProgramBinary<'a>
impl<'a> Unpin for ProgramBinary<'a>
impl<'a> UnwindSafe for ProgramBinary<'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