[][src]Struct scale_info::PortableRegistry

pub struct PortableRegistry<S = &'static str> where
    S: FormString
{ /* fields omitted */ }

A read-only registry containing types in their portable form for serialization.

Implementations

impl<S> PortableRegistry<S> where
    S: FormString
[src]

pub fn resolve(&self, id: NonZeroU32) -> Option<&Type<PortableForm<S>>>[src]

Returns the type definition for the given identifier, None if no type found for that ID.

pub fn enumerate(
    &self
) -> impl Iterator<Item = (NonZeroU32, &Type<PortableForm<S>>)>
[src]

Returns an iterator for all types paired with their associated NonZeroU32 identifier.

Trait Implementations

impl<S: Clone> Clone for PortableRegistry<S> where
    S: FormString
[src]

impl<S: Debug> Debug for PortableRegistry<S> where
    S: FormString
[src]

impl<S> Decode for PortableRegistry<S> where
    S: FormString,
    Vec<Type<PortableForm<S>>>: Decode,
    Vec<Type<PortableForm<S>>>: Decode
[src]

impl<S> Encode for PortableRegistry<S> where
    S: FormString,
    Vec<Type<PortableForm<S>>>: Encode,
    Vec<Type<PortableForm<S>>>: Encode
[src]

impl<S> EncodeLike<PortableRegistry<S>> for PortableRegistry<S> where
    S: FormString,
    Vec<Type<PortableForm<S>>>: Encode,
    Vec<Type<PortableForm<S>>>: Encode
[src]

impl<S: Eq> Eq for PortableRegistry<S> where
    S: FormString
[src]

impl From<Registry> for PortableRegistry[src]

impl<S: PartialEq> PartialEq<PortableRegistry<S>> for PortableRegistry<S> where
    S: FormString
[src]

impl<S> StructuralEq for PortableRegistry<S> where
    S: FormString
[src]

impl<S> StructuralPartialEq for PortableRegistry<S> where
    S: FormString
[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for PortableRegistry<S> where
    S: RefUnwindSafe
[src]

impl<S> Send for PortableRegistry<S> where
    S: Send
[src]

impl<S> Sync for PortableRegistry<S> where
    S: Sync
[src]

impl<S> Unpin for PortableRegistry<S> where
    S: Unpin
[src]

impl<S> UnwindSafe for PortableRegistry<S> where
    S: UnwindSafe
[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<S> Codec for S where
    S: Encode + Decode
[src]

impl<T> DecodeAll for T where
    T: Decode
[src]

impl<T> DecodeLimit for T where
    T: Decode
[src]

impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ T> for T where
    T: Encode
[src]

impl<'_, T> EncodeLike<&'_ mut T> for T where
    T: Encode
[src]

impl<T> EncodeLike<Arc<T>> for T where
    T: Encode
[src]

impl<T> EncodeLike<Box<T, Global>> for T where
    T: Encode
[src]

impl<'a, T> EncodeLike<Cow<'a, T>> for T where
    T: Encode + ToOwned
[src]

impl<T> EncodeLike<Rc<T>> for T where
    T: Encode
[src]

impl<T> From<T> for T[src]

impl<S> FullCodec for S where
    S: Decode + FullEncode
[src]

impl<S> FullEncode for S where
    S: Encode + EncodeLike<S>, 
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> KeyedVec for T where
    T: Codec
[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.