[][src]Struct ddbug_parser::Variable

pub struct Variable<'input> { /* fields omitted */ }

A global variable.

Implementations

impl<'input> Variable<'input>[src]

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

The user defined id for this variable.

pub fn set_id(&self, id: usize)[src]

Set a user defined id for this variable.

pub fn namespace(&self) -> Option<&Namespace<'_>>[src]

The namespace of the variable.

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

The name of the variable.

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

The linkage name of the variable.

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

The symbol name of the variable.

This is determined from a symbol table entry with a matching address.

pub fn ty<'a>(
    &self,
    hash: &'a FileHash<'input>
) -> Option<Cow<'a, Type<'input>>>
[src]

The type of the variable.

Returns None if the type is invalid.

pub fn source(&self) -> &Source<'input>[src]

The source information for the variable.

pub fn address(&self) -> Option<u64>[src]

The address of the variable.

pub fn byte_size(&self, hash: &FileHash<'_>) -> Option<u64>[src]

The size in bytes of the variable.

pub fn range(&self, hash: &FileHash<'_>) -> Option<Range>[src]

The address range of the variable.

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

Return true if this is a declaration.

pub fn cmp_id(
    _hash_a: &FileHash<'_>,
    a: &Variable<'_>,
    _hash_b: &FileHash<'_>,
    b: &Variable<'_>
) -> Ordering
[src]

Compare the identifying information of two variables.

Variables are equal if they have the same namespace and name.

This can be used to sort, and to determine if two variables refer to the same definition (even if there are differences in the definitions).

Trait Implementations

impl<'input> Debug for Variable<'input>[src]

impl<'input> Default for Variable<'input>[src]

Auto Trait Implementations

impl<'input> !RefUnwindSafe for Variable<'input>[src]

impl<'input> !Send for Variable<'input>[src]

impl<'input> !Sync for Variable<'input>[src]

impl<'input> Unpin for Variable<'input>[src]

impl<'input> !UnwindSafe for Variable<'input>[src]

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.