Skip to main content

Symbol

Struct Symbol 

Source
pub struct Symbol<'data> {
    pub name: &'data str,
    pub sym_type: SymbolType,
    pub external: bool,
    pub private_external: bool,
    pub section_index: u8,
    pub desc: u16,
    pub value: u64,
    pub index: usize,
}
Expand description

The Symbol type.

Fields§

§name: &'data str

The name field.

§sym_type: SymbolType

The sym_type field.

§external: bool

The external field.

§private_external: bool

The private_external field.

§section_index: u8

The section_index field.

§desc: u16

The desc field.

§value: u64

The value field.

§index: usize

Original index in the symbol table.

Implementations§

Source§

impl Symbol<'_>

Source

pub fn is_stab(&self) -> bool

Performs is_stab.

Source

pub fn is_defined(&self) -> bool

Performs is_defined.

Source

pub fn is_undefined(&self) -> bool

Performs is_undefined.

Source

pub fn is_weak_def(&self) -> bool

Performs is_weak_def.

Source

pub fn is_weak_ref(&self) -> bool

Performs is_weak_ref.

Source

pub fn is_no_dead_strip(&self) -> bool

Performs is_no_dead_strip.

Source

pub fn is_alt_entry(&self) -> bool

Performs is_alt_entry.

Source

pub fn library_ordinal(&self) -> u8

Extract the library ordinal from bits 8-15 of n_desc.

Trait Implementations§

Source§

impl<'data> Clone for Symbol<'data>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'data> Debug for Symbol<'data>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Symbol<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'data> Freeze for Symbol<'data>

§

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

§

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

§

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

§

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

§

impl<'data> UnsafeUnpin for Symbol<'data>

§

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

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.