Enum lief::macho::Commands

pub enum Commands<'a> {
Show 27 variants Generic(Generic<'a>), BuildVersion(BuildVersion<'a>), CodeSignature(CodeSignature<'a>), CodeSignatureDir(CodeSignatureDir<'a>), DataInCode(DataInCode<'a>), DyldChainedFixups(DyldChainedFixups<'a>), DyldEnvironment(DyldEnvironment<'a>), DyldExportsTrie(DyldExportsTrie<'a>), DyldInfo(DyldInfo<'a>), Dylib(Dylib<'a>), Dylinker(Dylinker<'a>), DynamicSymbolCommand(DynamicSymbolCommand<'a>), EncryptionInfo(EncryptionInfo<'a>), FunctionStarts(FunctionStarts<'a>), LinkerOptHint(LinkerOptHint<'a>), Main(Main<'a>), RPath(RPath<'a>), Segment(Segment<'a>), SegmentSplitInfo(SegmentSplitInfo<'a>), SourceVersion(SourceVersion<'a>), SubFramework(SubFramework<'a>), SymbolCommand(SymbolCommand<'a>), ThreadCommand(ThreadCommand<'a>), TwoLevelHints(TwoLevelHints<'a>), UUID(UUID<'a>), VersionMin(VersionMin<'a>), Unknown(Unknown<'a>),
}
Expand description

Enum that wraps all the different Mach-O load commands (LC_xxx). Note that all these commands implements the trait: Command

Variants§

§

Generic(Generic<'a>)

§

BuildVersion(BuildVersion<'a>)

§

CodeSignature(CodeSignature<'a>)

§

CodeSignatureDir(CodeSignatureDir<'a>)

§

DataInCode(DataInCode<'a>)

§

DyldChainedFixups(DyldChainedFixups<'a>)

§

DyldEnvironment(DyldEnvironment<'a>)

§

DyldExportsTrie(DyldExportsTrie<'a>)

§

DyldInfo(DyldInfo<'a>)

§

Dylib(Dylib<'a>)

§

Dylinker(Dylinker<'a>)

§

DynamicSymbolCommand(DynamicSymbolCommand<'a>)

§

EncryptionInfo(EncryptionInfo<'a>)

§

FunctionStarts(FunctionStarts<'a>)

§

LinkerOptHint(LinkerOptHint<'a>)

§

Main(Main<'a>)

§

RPath(RPath<'a>)

§

Segment(Segment<'a>)

§

SegmentSplitInfo(SegmentSplitInfo<'a>)

§

SourceVersion(SourceVersion<'a>)

§

SubFramework(SubFramework<'a>)

§

SymbolCommand(SymbolCommand<'a>)

§

ThreadCommand(ThreadCommand<'a>)

§

TwoLevelHints(TwoLevelHints<'a>)

§

UUID(UUID<'a>)

§

VersionMin(VersionMin<'a>)

§

Unknown(Unknown<'a>)

Trait Implementations§

§

impl Command for Commands<'_>

§

fn size(&self) -> u32

Size of the command (should be greather than sizeof(load_command))
§

fn offset(&self) -> u64

Offset of the command within the Load Command Table
§

fn command_type(&self) -> LoadCommandTypes

The command’s type
§

fn data(&self) -> &[u8]

The raw command as a slice of bytes
§

impl<'a> Debug for Commands<'a>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Commands<'a>

§

impl<'a> !Send for Commands<'a>

§

impl<'a> !Sync for Commands<'a>

§

impl<'a> Unpin for Commands<'a>

§

impl<'a> UnwindSafe for Commands<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.