Struct goblin::mach::header::Header32
[−]
[src]
#[repr(C)]pub struct Header32 { pub magic: u32, pub cputype: u32, pub padding1: u8, pub padding2: u8, pub caps: u8, pub cpusubtype: u8, pub filetype: u32, pub ncmds: u32, pub sizeofcmds: u32, pub flags: u32, }
A 32-bit Mach-o header
Fields
magic: u32
mach magic number identifier
cputype: u32
cpu specifier
padding1: u8
padding2: u8
caps: u8
cpusubtype: u8
machine specifier
filetype: u32
type of file
ncmds: u32
number of load commands
sizeofcmds: u32
the size of all the load commands
flags: u32
flags
Methods
impl Header32
[src]
fn from_bytes(bytes: &[u8; 28]) -> &Self
Transmutes the given byte array into the corresponding 32-bit Mach-o header
fn size(&self) -> usize
Trait Implementations
impl Clone for Header32
[src]
fn clone(&self) -> Header32
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 Header32
[src]
impl Default for Header32
[src]
impl<'a> TryFromCtx<'a> for Header32 where
Header32: 'a,
[src]
Header32: '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 Header32
[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>