[][src]Struct symbolic_debuginfo::Symbol

pub struct Symbol<'data> {
    pub name: Option<Cow<'data, str>>,
    pub address: u64,
    pub size: u64,
}

A symbol from a symbol table.

Fields

name: Option<Cow<'data, str>>

The name of the symbol.

This name is generally mangled. It can be demangled by constructing a Name instance and calling demangle on it. Certain object files might only store demangled symbol names.

address: u64

The relative address of this symbol.

size: u64

The size of this symbol, if known.

When loading symbols from an object file, the size will generally not be known. Instead, construct a SymbolMap from the object, which also fills in sizes.

Methods

impl<'data> Symbol<'data>[src]

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

Returns the name of this symbol as string.

pub fn contains(&self, address: u64) -> bool[src]

Determines whether the given address is covered by this symbol.

If the symbol size has not been computed, the address is assumed to be covered if it is greated than the symbol address. Otherwise, the address must be in the half-open interval [address, address + size).

Trait Implementations

impl<'data> Clone for Symbol<'data>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'data> Default for Symbol<'data>[src]

impl<'data> PartialEq<Symbol<'data>> for Symbol<'data>[src]

impl<'data> Eq for Symbol<'data>[src]

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

impl<'d> FromIterator<Symbol<'d>> for SymbolMap<'d>[src]

Auto Trait Implementations

impl<'data> Send for Symbol<'data>

impl<'data> Sync for Symbol<'data>

impl<'data> Unpin for Symbol<'data>

impl<'data> RefUnwindSafe for Symbol<'data>

impl<'data> UnwindSafe for Symbol<'data>

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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