[][src]Struct scale_info::interner::Symbol

pub struct Symbol<'a, T> { /* fields omitted */ }

A symbol from an interner.

Can be used to resolve to the associated instance.

Implementations

impl<T> Symbol<'_, T>[src]

pub fn into_untracked(self) -> UntrackedSymbol<T>[src]

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

impl<'a, T: Clone> Clone for Symbol<'a, T>[src]

impl<'a, T: Copy> Copy for Symbol<'a, T>[src]

impl<'a, T: Debug> Debug for Symbol<'a, T>[src]

impl<'a, T: Eq> Eq for Symbol<'a, T>[src]

impl<'a, T: Ord> Ord for Symbol<'a, T>[src]

impl<'a, T: PartialEq> PartialEq<Symbol<'a, T>> for Symbol<'a, T>[src]

impl<'a, T: PartialOrd> PartialOrd<Symbol<'a, T>> for Symbol<'a, T>[src]

impl<'a, T> StructuralEq for Symbol<'a, T>[src]

impl<'a, T> StructuralPartialEq for Symbol<'a, T>[src]

Auto Trait Implementations

impl<'a, T> RefUnwindSafe for Symbol<'a, T>[src]

impl<'a, T> Send for Symbol<'a, T>[src]

impl<'a, T> Sync for Symbol<'a, T>[src]

impl<'a, T> Unpin for Symbol<'a, T>[src]

impl<'a, T> UnwindSafe for Symbol<'a, T>[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.