Struct symbolic::debuginfo::macho::MachArchive [−][src]
pub struct MachArchive<'d>(_);
Expand description
An archive that can consist of a single MachObject
or a FatMachO
container.
Executables and dSYM files on macOS can be a so-called Fat Mach Object: It contains multiple objects for several architectures. When loading this object, the operating system determines the object corresponding to the host’s architecture. This allows to distribute a single binary with optimizations for specific CPUs, which is frequently done on iOS.
To abstract over the differences, MachArchive
simulates the archive interface also for single
Mach objects. This allows uniform access to both file types.
Implementations
Tests whether the buffer contains either a Mach Object or a Fat Mach Object.
Tries to parse a Mach archive from the given slice.
pub fn objects(&self) -> MachObjectIterator<'d, '_>ⓘNotable traits for MachObjectIterator<'d, 'a>impl<'d, 'a> Iterator for MachObjectIterator<'d, 'a> type Item = Result<MachObject<'d>, MachError>;
pub fn objects(&self) -> MachObjectIterator<'d, '_>ⓘNotable traits for MachObjectIterator<'d, 'a>impl<'d, 'a> Iterator for MachObjectIterator<'d, 'a> type Item = Result<MachObject<'d>, MachError>;
impl<'d, 'a> Iterator for MachObjectIterator<'d, 'a> type Item = Result<MachObject<'d>, MachError>;
Returns an iterator over all objects contained in this archive.
Returns the number of objects in this archive.
Resolves the object at the given index.
Returns Ok(None)
if the index is out of bounds, or Err
if the object exists but cannot
be parsed.
Trait Implementations
type Ref = MachArchive<'slf>
type Ref = MachArchive<'slf>
The Self
type with 'slf
lifetimes, returned by as_self
.
Returns a reference to self
with downcasted lifetime.
Auto Trait Implementations
impl<'d> RefUnwindSafe for MachArchive<'d>
impl<'d> Send for MachArchive<'d>
impl<'d> Sync for MachArchive<'d>
impl<'d> Unpin for MachArchive<'d>
impl<'d> UnwindSafe for MachArchive<'d>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
pub fn extract_context(self, _original_input: I)
pub fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original input to the nom parser, extract more the useful context information. Read more
pub fn recreate_context(_original_input: I, tail: I) -> I
pub fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom, recreate a context in the original string where the error occurred. Read more