Struct goblin::mach::header::Header [−][src]
Generic sized header
Fields
magic: u32
cputype: u32
cpusubtype: u32
filetype: u32
type of file
ncmds: usize
number of load commands
sizeofcmds: u32
the size of all the load commands
flags: u32
flags
reserved: u32
Implementations
impl Header
[src]
pub fn new(ctx: Ctx) -> Self
[src]
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
Trait Implementations
impl Clone for Header
[src]
impl Copy for Header
[src]
impl Debug for Header
[src]
impl Default for Header
[src]
impl From<Header> for Header32
[src]
impl From<Header> for Header64
[src]
impl From<Header32> for Header
[src]
impl From<Header64> for Header
[src]
impl IntoCtx<Ctx, [u8]> for Header
[src]
impl SizeWith<Container> for Header
[src]
impl SizeWith<Ctx> for Header
[src]
impl<'a> TryFromCtx<'a, Ctx, [u8]> for Header
[src]
type Error = Error
fn try_from_ctx(
bytes: &'a [u8],
container::Ctx { le: le, container: container }: Ctx
) -> Result<(Self, usize)>
[src]
bytes: &'a [u8],
container::Ctx { le: le, container: container }: Ctx
) -> Result<(Self, usize)>
impl TryIntoCtx<Ctx, [u8]> for Header
[src]
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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>,