Struct symbolic::debuginfo::Archive[][src]

pub struct Archive<'d>(_);

A generic archive that can contain one or more object files.

Effectively, this will only contain a single object for all file types other than MachO. Mach objects can either be single object files or so-called fat files that contain multiple objects per architecture.

Implementations

impl<'d> Archive<'d>[src]

pub fn test(data: &[u8]) -> bool[src]

Tests whether this buffer contains a valid object archive.

pub fn peek(data: &[u8]) -> FileFormat[src]

Tries to infer the object archive type from the start of the given buffer.

pub fn parse(data: &'d [u8]) -> Result<Archive<'d>, ObjectError>[src]

Tries to parse a generic archive from the given slice.

pub fn file_format(&self) -> FileFormat[src]

The container format of this file.

pub fn objects(&self) -> ObjectIterator<'d, '_>

Notable traits for ObjectIterator<'d, 'a>

impl<'d, 'a> Iterator for ObjectIterator<'d, 'a> type Item = Result<Object<'d>, ObjectError>;
[src]

Returns an iterator over all objects contained in this archive.

pub fn object_count(&self) -> usize[src]

Returns the number of objects in this archive.

pub fn object_by_index(
    &self,
    index: usize
) -> Result<Option<Object<'d>>, ObjectError>
[src]

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.

pub fn is_multi(&self) -> bool[src]

Returns whether this is a multi-object archive.

This may also return true if there is only a single object inside the archive.

Trait Implementations

impl<'slf, 'd> AsSelf<'slf> for Archive<'d> where
    'd: 'slf, 
[src]

type Ref = Archive<'slf>

The Self type with 'slf lifetimes, returned by as_self.

impl<'d> Debug for Archive<'d>[src]

Auto Trait Implementations

impl<'d> !RefUnwindSafe for Archive<'d>

impl<'d> Send for Archive<'d>

impl<'d> Sync for Archive<'d>

impl<'d> Unpin for Archive<'d>

impl<'d> !UnwindSafe for Archive<'d>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.