[][src]Struct symbolic_debuginfo::Archive

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.


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<Self, 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.

Important traits for ObjectIterator<'d, 'a>
pub fn objects(&self) -> ObjectIterator<'d, '_>[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(
    index: usize
) -> Result<Option<Object<'d>>, ObjectError>

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<'d> Debug for Archive<'d>[src]

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

type Ref = Archive<'slf>

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

Auto Trait Implementations

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

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

Blanket Implementations

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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