[][src]Struct symbolic::debuginfo::sourcebundle::SourceBundle

pub struct SourceBundle<'d> { /* fields omitted */ }

A bundle of source code files.

To create a source bundle, see SourceBundleWriter. For more information, see the module level documentation.

Implementations

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

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

Tests whether the buffer could contain a SourceBundle.

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

Tries to parse a SourceBundle from the given slice.

pub fn version(&self) -> SourceBundleVersion[src]

Returns the version of this source bundle format.

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

The container file format, which is always FileFormat::SourceBundle.

pub fn code_id(&self) -> Option<CodeId>[src]

The code identifier of this object.

This is only set if the source bundle was created from an ObjectLike. It can also be set in the SourceBundleWriter by setting the "code_id" attribute.

pub fn debug_id(&self) -> DebugId[src]

The code identifier of this object.

This is only set if the source bundle was created from an ObjectLike. It can also be set in the SourceBundleWriter by setting the "debug_id" attribute.

pub fn name(&self) -> Option<&str>[src]

The debug file name of this object.

This is only set if the source bundle was created from an ObjectLike. It can also be set in the SourceBundleWriter by setting the "object_name" attribute.

pub fn arch(&self) -> Arch[src]

The CPU architecture of this object.

This is only set if the source bundle was created from an ObjectLike. It can also be set in the SourceBundleWriter by setting the "arch" attribute.

pub fn load_address(&self) -> u64[src]

The address at which the image prefers to be loaded into memory.

Because source bundles do not contain this information is always 0.

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

Determines whether this object exposes a public symbol table.

Source bundles never have symbols.

pub fn symbols(&self) -> SourceBundleSymbolIterator<'d>[src]

Returns an iterator over symbols in the public symbol table.

pub fn symbol_map(&self) -> SymbolMap<'d>[src]

Returns an ordered map of symbols in the symbol table.

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

Determines whether this object contains debug information.

Source bundles never have debug info.

pub fn debug_session(
    &self
) -> Result<SourceBundleDebugSession<'d>, SourceBundleError>
[src]

Constructs a debugging session.

A debugging session loads certain information from the object file and creates caches for efficient access to various records in the debug information. Since this can be quite a costly process, try to reuse the debugging session as long as possible.

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

Determines whether this object contains stack unwinding information.

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

Determines whether this object contains embedded source.

pub fn data(&self) -> &'d [u8][src]

Returns the raw data of the source bundle.

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

Returns true if this source bundle contains no source code.

Trait Implementations

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

type Ref = SourceBundle<'slf>

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

impl<'_> Debug for SourceBundle<'_>[src]

impl<'d> ObjectLike for SourceBundle<'d>[src]

type Error = SourceBundleError

Errors thrown when reading information from this object.

type Session = SourceBundleDebugSession<'d>

A session that allows optimized access to debugging information.

Auto Trait Implementations

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

impl<'d> Send for SourceBundle<'d>

impl<'d> Sync for SourceBundle<'d>

impl<'d> Unpin for SourceBundle<'d>

impl<'d> !UnwindSafe for SourceBundle<'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.