Struct goblin::mach::fat::FatArch
[−]
[src]
#[repr(C)]pub struct FatArch { pub cputype: u32, pub cpusubtype: u32, pub offset: u32, pub size: u32, pub align: u32, }
The Mach-o FatArch
always has its data bigendian
Fields
cputype: u32
What kind of CPU this binary is
cpusubtype: u32
offset: u32
Where in the fat binary it starts
size: u32
How big the binary is
align: u32
Methods
impl FatArch
[src]
fn slice<'a>(&self, bytes: &'a [u8]) -> &'a [u8]
Get the slice of bytes this header describes from bytes
fn is_64(&self) -> bool
Whether this fat architecture header describes a 64-bit binary
fn parse(bytes: &[u8], offset: usize) -> Result<Self>
Parse a FatArch
header from bytes
at offset
Trait Implementations
impl Clone for FatArch
[src]
fn clone(&self) -> FatArch
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for FatArch
[src]
impl Default for FatArch
[src]
impl<'a> TryFromCtx<'a> for FatArch where
FatArch: 'a,
[src]
FatArch: 'a,
type Error = Error
fn try_from_ctx(
src: &'a [u8],
(offset, ctx): (usize, Endian)
) -> Result<Self, Self::Error>
src: &'a [u8],
(offset, ctx): (usize, Endian)
) -> Result<Self, Self::Error>
impl TryIntoCtx for FatArch
[src]
type Error = Error
fn try_into_ctx(
self,
dst: &mut [u8],
(offset, ctx): (usize, Endian)
) -> Result<(), Self::Error>
self,
dst: &mut [u8],
(offset, ctx): (usize, Endian)
) -> Result<(), Self::Error>