[][src]Struct goblin::mach::header::Header

#[repr(C)]
pub struct Header {
    pub magic: u32,
    pub cputype: u32,
    pub cpusubtype: u32,
    pub filetype: u32,
    pub ncmds: usize,
    pub sizeofcmds: u32,
    pub flags: u32,
    pub reserved: u32,
}

Generic sized header

Fields

magic: u32cputype: u32cpusubtype: u32filetype: u32

type of file

ncmds: usize

number of load commands

sizeofcmds: u32

the size of all the load commands

flags: u32

flags

reserved: u32

Methods

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 Copy for Header[src]

impl Default for Header[src]

impl From<Header32> for Header[src]

impl From<Header> for Header32[src]

impl From<Header64> for Header[src]

impl From<Header> for Header64[src]

impl Clone for Header[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Header[src]

impl<'a> TryFromCtx<'a, Ctx, [u8]> for Header[src]

type Error = Error

type Size = usize

impl IntoCtx<Ctx, [u8]> for Header[src]

impl TryIntoCtx<Ctx, [u8]> for Header[src]

type Error = Error

type Size = usize

impl SizeWith<Ctx> for Header[src]

type Units = usize

impl SizeWith<Container> for Header[src]

type Units = usize

Auto Trait Implementations

impl Send for Header

impl Unpin for Header

impl Sync for Header

impl UnwindSafe for Header

impl RefUnwindSafe for Header

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]