pub struct LoadCommandData<'data, E: Endian> { /* private fields */ }
Expand description
The data for a LoadCommand
.
Implementations
sourceimpl<'data, E: Endian> LoadCommandData<'data, E>
impl<'data, E: Endian> LoadCommandData<'data, E>
sourcepub fn cmd(&self) -> u32
pub fn cmd(&self) -> u32
Return the cmd
field of the LoadCommand
.
This is one of the LC_
constants.
sourcepub fn string(&self, endian: E, s: LcStr<E>) -> Result<&'data [u8]>
pub fn string(&self, endian: E, s: LcStr<E>) -> Result<&'data [u8]>
Parse a load command string value.
Strings used by load commands are specified by offsets that are relative to the load command header.
sourcepub fn variant(&self) -> Result<LoadCommandVariant<'data, E>>
pub fn variant(&self) -> Result<LoadCommandVariant<'data, E>>
Parse the command data according to the cmd
field.
sourcepub fn segment_32(
self
) -> Result<Option<(&'data SegmentCommand32<E>, &'data [u8])>>
pub fn segment_32(
self
) -> Result<Option<(&'data SegmentCommand32<E>, &'data [u8])>>
Try to parse this command as a SegmentCommand32
.
Returns the segment command and the data containing the sections.
sourcepub fn symtab(self) -> Result<Option<&'data SymtabCommand<E>>>
pub fn symtab(self) -> Result<Option<&'data SymtabCommand<E>>>
Try to parse this command as a SymtabCommand
.
Returns the segment command and the data containing the sections.
sourcepub fn dysymtab(self) -> Result<Option<&'data DysymtabCommand<E>>>
pub fn dysymtab(self) -> Result<Option<&'data DysymtabCommand<E>>>
Try to parse this command as a DysymtabCommand
.
sourcepub fn dylib(self) -> Result<Option<&'data DylibCommand<E>>>
pub fn dylib(self) -> Result<Option<&'data DylibCommand<E>>>
Try to parse this command as a DylibCommand
.
sourcepub fn uuid(self) -> Result<Option<&'data UuidCommand<E>>>
pub fn uuid(self) -> Result<Option<&'data UuidCommand<E>>>
Try to parse this command as a UuidCommand
.
sourcepub fn segment_64(
self
) -> Result<Option<(&'data SegmentCommand64<E>, &'data [u8])>>
pub fn segment_64(
self
) -> Result<Option<(&'data SegmentCommand64<E>, &'data [u8])>>
Try to parse this command as a SegmentCommand64
.
sourcepub fn dyld_info(self) -> Result<Option<&'data DyldInfoCommand<E>>>
pub fn dyld_info(self) -> Result<Option<&'data DyldInfoCommand<E>>>
Try to parse this command as a DyldInfoCommand
.
sourcepub fn entry_point(self) -> Result<Option<&'data EntryPointCommand<E>>>
pub fn entry_point(self) -> Result<Option<&'data EntryPointCommand<E>>>
Try to parse this command as an EntryPointCommand
.
Trait Implementations
sourceimpl<'data, E: Clone + Endian> Clone for LoadCommandData<'data, E>
impl<'data, E: Clone + Endian> Clone for LoadCommandData<'data, E>
sourcefn clone(&self) -> LoadCommandData<'data, E>
fn clone(&self) -> LoadCommandData<'data, E>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'data, E: Debug + Endian> Debug for LoadCommandData<'data, E>
impl<'data, E: Debug + Endian> Debug for LoadCommandData<'data, E>
impl<'data, E: Copy + Endian> Copy for LoadCommandData<'data, E>
Auto Trait Implementations
impl<'data, E> RefUnwindSafe for LoadCommandData<'data, E> where
E: RefUnwindSafe,
impl<'data, E> Send for LoadCommandData<'data, E> where
E: Send,
impl<'data, E> Sync for LoadCommandData<'data, E> where
E: Sync,
impl<'data, E> Unpin for LoadCommandData<'data, E> where
E: Unpin,
impl<'data, E> UnwindSafe for LoadCommandData<'data, E> where
E: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more