Struct goblin::mach::fat::FatArch [−][src]
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
Implementations
impl FatArch
[src]
pub fn slice<'a>(&self, bytes: &'a [u8]) -> &'a [u8]
[src]
Get the slice of bytes this header describes from bytes
pub fn cputype(&self) -> CpuType
[src]
Returns the cpu type
pub fn cpusubtype(&self) -> CpuSubType
[src]
Returns the cpu subtype with the capabilities removed
pub fn cpu_caps(&self) -> u32
[src]
Returns the capabilities of the CPU
pub fn is_64(&self) -> bool
[src]
Whether this fat architecture header describes a 64-bit binary
pub fn parse(bytes: &[u8], offset: usize) -> Result<Self>
[src]
Parse a FatArch
header from bytes
at offset
Trait Implementations
impl Clone for FatArch
[src]
impl Copy for FatArch
[src]
impl Debug for FatArch
[src]
impl Default for FatArch
[src]
impl SizeWith<Endian> for FatArch
[src]
impl<'a> TryFromCtx<'a, Endian, [u8]> for FatArch where
FatArch: 'a,
[src]
FatArch: 'a,
type Error = Error
fn try_from_ctx(
src: &'a [u8],
ctx: Endian
) -> Result<(Self, usize), Self::Error>
[src]
src: &'a [u8],
ctx: Endian
) -> Result<(Self, usize), Self::Error>
impl<'a> TryIntoCtx<Endian, [u8]> for &'a FatArch
[src]
type Error = Error
fn try_into_ctx(self, dst: &mut [u8], ctx: Endian) -> Result<usize, Self::Error>
[src]
impl TryIntoCtx<Endian, [u8]> for FatArch
[src]
Auto Trait Implementations
impl RefUnwindSafe for FatArch
impl Send for FatArch
impl Sync for FatArch
impl Unpin for FatArch
impl UnwindSafe for FatArch
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,