Struct parity_scale_codec::Compact[][src]

pub struct Compact<T>(pub T);

Compact-encoded variant of T. This is more space-efficient but less compute-efficient.

Trait Implementations

impl<T: Clone> Clone for Compact<T>[src]

impl CompactLen<u128> for Compact<u128>[src]

impl CompactLen<u16> for Compact<u16>[src]

impl CompactLen<u32> for Compact<u32>[src]

impl CompactLen<u64> for Compact<u64>[src]

impl CompactLen<u8> for Compact<u8>[src]

impl<T: Copy> Copy for Compact<T>[src]

impl<T> Debug for Compact<T> where
    T: Debug
[src]

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

impl Decode for Compact<()>[src]

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<'de, T> Deserialize<'de> for Compact<T> where
    T: Deserialize<'de>, 
[src]

impl<T> Encode for Compact<T> where
    CompactRef<'a, T>: Encode
[src]

impl<'a, T: 'a> EncodeAsRef<'a, T> for Compact<T> where
    CompactRef<'a, T>: Encode + From<&'a T>, 
[src]

type RefType = CompactRef<'a, T>

The reference type that is used for encoding.

impl<T> EncodeLike<Compact<T>> for Compact<T> where
    CompactRef<'a, T>: Encode
[src]

impl<T: Eq> Eq for Compact<T>[src]

impl<'a, T: Copy> From<&'a T> for Compact<T>[src]

impl From<Compact<()>> for ()[src]

impl From<Compact<u128>> for u128[src]

impl From<Compact<u16>> for u16[src]

impl From<Compact<u32>> for u32[src]

impl From<Compact<u64>> for u64[src]

impl From<Compact<u8>> for u8[src]

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

impl<T: Ord> Ord for Compact<T>[src]

impl<T: PartialEq> PartialEq<Compact<T>> for Compact<T>[src]

impl<T: PartialOrd> PartialOrd<Compact<T>> for Compact<T>[src]

impl<T> Serialize for Compact<T> where
    T: Serialize
[src]

impl<T> StructuralEq for Compact<T>[src]

impl<T> StructuralPartialEq for Compact<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for Compact<T> where
    T: RefUnwindSafe

impl<T> Send for Compact<T> where
    T: Send

impl<T> Sync for Compact<T> where
    T: Sync

impl<T> Unpin for Compact<T> where
    T: Unpin

impl<T> UnwindSafe for Compact<T> where
    T: UnwindSafe

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<!> for T[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.