[][src]Struct ddbug_parser::LocalVariable

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

A local variable.

Implementations

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

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

The name of the variable.

pub fn type_offset(&self) -> TypeOffset[src]

The type offset of the variable.

A type offset is unique for all types in a file.

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.

This will only be known for static variables.

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

The size in bytes of the variable.

pub fn registers<'a>(&'a self) -> impl Iterator<Item = (Range, Register)> + 'a[src]

The registers in which this variable is stored.

pub fn register_offsets<'a>(
    &'a self
) -> impl Iterator<Item = (Range, Register, i64)> + 'a
[src]

The registers pointing to where this variable is stored.

pub fn frame_locations<'a>(&'a self) -> impl Iterator<Item = FrameLocation> + 'a[src]

The stack frame locations at which this variable is stored.

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

Compare the identifying information of two variables.

Variables are considered equal if their names are equal.

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> Clone for LocalVariable<'input>[src]

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

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

Auto Trait Implementations

impl<'input> RefUnwindSafe for LocalVariable<'input>[src]

impl<'input> Send for LocalVariable<'input>[src]

impl<'input> Sync for LocalVariable<'input>[src]

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

impl<'input> UnwindSafe for LocalVariable<'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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.