Struct parity_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: Eq> Eq for Compact<T>
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

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

Performs the conversion.

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

Performs the conversion.

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

Formats the value using the given formatter. Read more

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

Serialize this value into the given Serde serializer. Read more

impl<'de, T> Deserialize<'de> for Compact<T> where
    T: Deserialize<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

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

Performs the conversion.

impl Encode for Compact<u8>
[src]

Convert self to a slice and append it to the destination.

Important traits for Vec<u8>

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

impl Encode for Compact<u16>
[src]

Convert self to a slice and append it to the destination.

Important traits for Vec<u8>

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

impl Encode for Compact<u32>
[src]

Convert self to a slice and append it to the destination.

Important traits for Vec<u8>

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

impl Encode for Compact<u64>
[src]

Convert self to a slice and append it to the destination.

Important traits for Vec<u8>

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

impl Encode for Compact<u128>
[src]

Convert self to a slice and append it to the destination.

Important traits for Vec<u8>

Convert self to an owned vector.

Convert self to a slice and then invoke the given closure with it.

impl Decode for Compact<u8>
[src]

Attempt to deserialise the value from input.

impl Decode for Compact<u16>
[src]

Attempt to deserialise the value from input.

impl Decode for Compact<u32>
[src]

Attempt to deserialise the value from input.

impl Decode for Compact<u64>
[src]

Attempt to deserialise the value from input.

impl Decode for Compact<u128>
[src]

Attempt to deserialise the value from input.

Auto Trait Implementations

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

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