Trait parity_scale_codec::Decode[][src]

pub trait Decode: Sized {
    fn decode<I: Input>(input: &mut I) -> Result<Self, Error>;

    fn skip<I: Input>(input: &mut I) -> Result<(), Error> { ... }
fn encoded_fixed_size() -> Option<usize> { ... } }

Trait that allows zero-copy read of value-references from slices in LE format.

Required methods

fn decode<I: Input>(input: &mut I) -> Result<Self, Error>[src]

Attempt to deserialise the value from input.

Loading content...

Provided methods

fn skip<I: Input>(input: &mut I) -> Result<(), Error>[src]

Attempt to skip the encoded value from input.

The default implementation of this function is just calling Decode::decode. When possible, an implementation should provided a specialized implementation.

fn encoded_fixed_size() -> Option<usize>[src]

Returns the fixed encoded size of the type.

If it returns Some(size) then all possible values of this type have the given size (in bytes) when encoded.

NOTE: A type with a fixed encoded size may return None.

Loading content...

Implementations on Foreign Types

impl<T: Decode, E: Decode> Decode for Result<T, E>[src]

impl<T: Decode> Decode for Option<T>[src]

impl Decode for NonZeroI8[src]

impl Decode for NonZeroI16[src]

impl Decode for NonZeroI32[src]

impl Decode for NonZeroI64[src]

impl Decode for NonZeroI128[src]

impl Decode for NonZeroU8[src]

impl Decode for NonZeroU16[src]

impl Decode for NonZeroU32[src]

impl Decode for NonZeroU64[src]

impl Decode for NonZeroU128[src]

impl<T: Decode, const N: usize> Decode for [T; N][src]

impl<'a, T: ToOwned + ?Sized> Decode for Cow<'a, T> where
    <T as ToOwned>::Owned: Decode
[src]

impl<T> Decode for PhantomData<T>[src]

impl Decode for String[src]

impl<T: Decode> Decode for Vec<T>[src]

impl<K: Decode + Ord, V: Decode> Decode for BTreeMap<K, V>[src]

impl<T: Decode + Ord> Decode for BTreeSet<T>[src]

impl<T: Decode> Decode for LinkedList<T>[src]

impl<T: Decode + Ord> Decode for BinaryHeap<T>[src]

impl<T: Decode> Decode for VecDeque<T>[src]

impl Decode for ()[src]

impl<A0: Decode, B0: Decode, C0: Decode, D0: Decode, E0: Decode, F0: Decode, G0: Decode, H0: Decode, I0: Decode, J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (A0, B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<B0: Decode, C0: Decode, D0: Decode, E0: Decode, F0: Decode, G0: Decode, H0: Decode, I0: Decode, J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (B0, C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<C0: Decode, D0: Decode, E0: Decode, F0: Decode, G0: Decode, H0: Decode, I0: Decode, J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (C0, D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<D0: Decode, E0: Decode, F0: Decode, G0: Decode, H0: Decode, I0: Decode, J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (D0, E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<E0: Decode, F0: Decode, G0: Decode, H0: Decode, I0: Decode, J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (E0, F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<F0: Decode, G0: Decode, H0: Decode, I0: Decode, J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (F0, G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<G0: Decode, H0: Decode, I0: Decode, J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (G0, H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<H0: Decode, I0: Decode, J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (H0, I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<I0: Decode, J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (I0, J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<J0: Decode, K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (J0, K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<K0: Decode, L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (K0, L0, M0, N0, O0, P0, Q0, R0)[src]

impl<L0: Decode, M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (L0, M0, N0, O0, P0, Q0, R0)[src]

impl<M0: Decode, N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (M0, N0, O0, P0, Q0, R0)[src]

impl<N0: Decode, O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (N0, O0, P0, Q0, R0)[src]

impl<O0: Decode, P0: Decode, Q0: Decode, R0: Decode> Decode for (O0, P0, Q0, R0)[src]

impl<P0: Decode, Q0: Decode, R0: Decode> Decode for (P0, Q0, R0)[src]

impl<Q0: Decode, R0: Decode> Decode for (Q0, R0)[src]

impl<R0: Decode> Decode for (R0,)[src]

impl Decode for u16[src]

impl Decode for u32[src]

impl Decode for u64[src]

impl Decode for u128[src]

impl Decode for i16[src]

impl Decode for i32[src]

impl Decode for i64[src]

impl Decode for i128[src]

impl Decode for u8[src]

impl Decode for i8[src]

impl Decode for bool[src]

impl Decode for Duration[src]

Loading content...

Implementors

impl Decode for Compact<u8>[src]

impl Decode for Compact<u16>[src]

impl Decode for Compact<u32>[src]

impl Decode for Compact<u64>[src]

impl Decode for Compact<u128>[src]

impl Decode for Compact<()>[src]

impl Decode for OptionBool[src]

impl<T> Decode for Compact<T> where
    T: CompactAs,
    Compact<T::As>: Decode
[src]

impl<T, X> Decode for X where
    T: Decode + Into<X>,
    X: WrapperTypeDecode<Wrapped = T>, 
[src]

Loading content...