Struct scale_info::interner::Symbol
source · pub struct Symbol<'a, T: 'a> { /* private fields */ }
Expand description
A symbol from an interner.
Can be used to resolve to the associated instance.
Implementations§
source§impl<T> Symbol<'_, T>
impl<T> Symbol<'_, T>
sourcepub fn into_untracked(self) -> UntrackedSymbol<T>
pub fn into_untracked(self) -> UntrackedSymbol<T>
Removes the lifetime tracking for this symbol.
Note
- This can be useful in situations where a data structure owns all symbols and interners and can verify accesses by itself.
- For further safety reasons an untracked symbol can no longer be used to resolve from an interner. It is still useful for serialization purposes.
Safety
Although removing lifetime constraints this operation can be considered to be safe since untracked symbols can no longer be used to resolve their associated instance from the interner.
Trait Implementations§
source§impl<'a, T: Ord + 'a> Ord for Symbol<'a, T>
impl<'a, T: Ord + 'a> Ord for Symbol<'a, T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<'a, T: PartialEq + 'a> PartialEq<Symbol<'a, T>> for Symbol<'a, T>
impl<'a, T: PartialEq + 'a> PartialEq<Symbol<'a, T>> for Symbol<'a, T>
source§impl<'a, T: PartialOrd + 'a> PartialOrd<Symbol<'a, T>> for Symbol<'a, T>
impl<'a, T: PartialOrd + 'a> PartialOrd<Symbol<'a, T>> for Symbol<'a, T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more