Struct goblin::mach::fat::FatHeader [−][src]
The Mach-o FatHeader
always has its data bigendian
Fields
magic: u32
The magic number, cafebabe
nfat_arch: u32
How many fat architecture headers there are
Implementations
impl FatHeader
[src]
pub fn from_bytes(bytes: [u8; 8]) -> FatHeader
[src]
Reinterpret a FatHeader
from bytes
pub fn from_fd(fd: &mut File) -> Result<FatHeader>
[src]
Reads a FatHeader
from a File
on disk
pub fn parse(bytes: &[u8]) -> Result<FatHeader>
[src]
Parse a mach-o fat header from the bytes
Trait Implementations
impl Clone for FatHeader
[src]
impl Copy for FatHeader
[src]
impl Debug for FatHeader
[src]
impl Default for FatHeader
[src]
impl SizeWith<Endian> for FatHeader
[src]
impl<'a> TryFromCtx<'a, Endian, [u8]> for FatHeader where
FatHeader: 'a,
[src]
FatHeader: '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 FatHeader
[src]
type Error = Error
fn try_into_ctx(self, dst: &mut [u8], ctx: Endian) -> Result<usize, Self::Error>
[src]
impl TryIntoCtx<Endian, [u8]> for FatHeader
[src]
Auto Trait Implementations
impl RefUnwindSafe for FatHeader
impl Send for FatHeader
impl Sync for FatHeader
impl Unpin for FatHeader
impl UnwindSafe for FatHeader
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>,