Struct lief::objc::metadata::Metadata

pub struct Metadata<'a> { /* private fields */ }
Expand description

This structure is the main interface to inspect Objective-C metadata

It can be access using the function crate::macho::Binary::objc_metadata

Implementations§

§

impl Metadata<'_>

pub fn classes(&self) -> Classes<'_>

Return an iterator over the different Objective-C classes (@interface)

pub fn protocols(&self) -> Protocols<'_>

Return an iterator over the Objective-C protocols declared in this binary (@protocol).

pub fn class_by_name(&self, name: &str) -> Option<Class<'_>>

Try to find the Objective-C class with the given mangled name

pub fn protocol_by_name(&self, name: &str) -> Option<Protocol<'_>>

Try to find the Objective-C protocol with the given mangled name

pub fn to_decl(&self) -> String

Generate a header-like of all the Objective-C metadata identified in the binary.

pub fn to_decl_with_opt(&self, opt: &DeclOpt) -> String

Same behavior as Metadata::to_decl but with an additional DeclOpt parameter to customize the output

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for Metadata<'a>

§

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

§

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

§

impl<'a> Unpin for Metadata<'a>

§

impl<'a> UnwindSafe for Metadata<'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.