pub struct LocalVariable<'input> { /* private fields */ }
Expand description
A local variable.
Implementations§
Source§impl<'input> LocalVariable<'input>
impl<'input> LocalVariable<'input>
Sourcepub fn type_offset(&self) -> TypeOffset
pub fn type_offset(&self) -> TypeOffset
The type offset of the variable.
A type offset is unique for all types in a file.
Sourcepub fn ty<'a>(
&self,
hash: &'a FileHash<'input>,
) -> Option<Cow<'a, Type<'input>>>
pub fn ty<'a>( &self, hash: &'a FileHash<'input>, ) -> Option<Cow<'a, Type<'input>>>
The type of the variable.
Returns None
if the type is invalid.
Sourcepub fn address(&self) -> Option<u64>
pub fn address(&self) -> Option<u64>
The address of the variable.
This will only be known for static variables.
Sourcepub fn registers(&self) -> impl Iterator<Item = (Range, Register)> + '_
pub fn registers(&self) -> impl Iterator<Item = (Range, Register)> + '_
The registers in which this variable is stored.
Sourcepub fn register_offsets(
&self,
) -> impl Iterator<Item = (Range, Register, i64)> + '_
pub fn register_offsets( &self, ) -> impl Iterator<Item = (Range, Register, i64)> + '_
The registers pointing to where this variable is stored.
Sourcepub fn frame_locations(&self) -> impl Iterator<Item = FrameLocation> + '_
pub fn frame_locations(&self) -> impl Iterator<Item = FrameLocation> + '_
The stack frame locations at which this variable is stored.
Sourcepub fn cmp_id(
_hash_a: &FileHash<'_>,
a: &Self,
_hash_b: &FileHash<'_>,
b: &Self,
) -> Ordering
pub fn cmp_id( _hash_a: &FileHash<'_>, a: &Self, _hash_b: &FileHash<'_>, b: &Self, ) -> Ordering
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§
Source§impl<'input> Clone for LocalVariable<'input>
impl<'input> Clone for LocalVariable<'input>
Source§fn clone(&self) -> LocalVariable<'input>
fn clone(&self) -> LocalVariable<'input>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'input> Debug for LocalVariable<'input>
impl<'input> Debug for LocalVariable<'input>
Source§impl<'input> Default for LocalVariable<'input>
impl<'input> Default for LocalVariable<'input>
Source§fn default() -> LocalVariable<'input>
fn default() -> LocalVariable<'input>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'input> Freeze for LocalVariable<'input>
impl<'input> RefUnwindSafe for LocalVariable<'input>
impl<'input> Send for LocalVariable<'input>
impl<'input> Sync for LocalVariable<'input>
impl<'input> Unpin for LocalVariable<'input>
impl<'input> UnwindSafe for LocalVariable<'input>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more