pub struct Header<'a> { /* private fields */ }
Expand description
Structure that represents the main Mach-O header (at the beginning of the file)
Implementations§
§impl Header<'_>
impl Header<'_>
pub fn magic(&self) -> u32
pub fn magic(&self) -> u32
The Mach-O magic bytes. These bytes determine whether it is a 32 bits Mach-O, a 64 bits Mach-O files etc.
pub fn cpu_subtype(&self) -> u32
pub fn cpu_subtype(&self) -> u32
Return the CPU subtype supported by the Mach-O binary. For ARM architectures, this value could represent the minimum version for which the Mach-O binary has been compiled for.
pub fn file_type(&self) -> FileType
pub fn file_type(&self) -> FileType
Return the type of the Mach-O file (executable, object, shared library, …)
pub fn nb_cmds(&self) -> u32
pub fn nb_cmds(&self) -> u32
Number of crate::macho::Commands
present in the Mach-O binary
pub fn sizeof_cmds(&self) -> u32
pub fn sizeof_cmds(&self) -> u32
The raw size of all the load commands (LC_xxx
)
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Header<'a>
impl<'a> !Send for Header<'a>
impl<'a> !Sync for Header<'a>
impl<'a> Unpin for Header<'a>
impl<'a> UnwindSafe for Header<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more