[−][src]Struct ddbug_parser::Variable
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]
&self,
hash: &'a FileHash<'input>
) -> Option<Cow<'a, Type<'input>>>
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]
_hash_a: &FileHash<'_>,
a: &Variable<'_>,
_hash_b: &FileHash<'_>,
b: &Variable<'_>
) -> Ordering
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,