[][src]Struct ssz::Compact

pub struct Compact<T>(pub T);

Indicate that the current value should be serialized and deserialized in Compact format. Value form.

Trait Implementations

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

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

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

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

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T, L> FromTree for Compact<VecArray<T, L>> where
    L: Unsigned,
    T: Default,
    ElementalFixedVec<T>: FromCompactVectorTree
[src]

impl<T, ML> FromTree for Compact<MaxVec<T, ML>> where
    ML: Unsigned,
    ElementalVariableVec<T>: FromCompactListTree
[src]

impl<T, L> FromTree for Compact<GenericArray<T, L>> where
    L: ArrayLength<T>,
    T: Default,
    ElementalFixedVec<T>: FromCompactVectorTree
[src]

impl<T, L> IntoTree for Compact<VecArray<T, L>> where
    L: Unsigned,
    ElementalFixedVecRef<'a, T>: IntoCompactVectorTree
[src]

impl<T, L> IntoTree for Compact<GenericArray<T, L>> where
    L: ArrayLength<T>,
    ElementalFixedVecRef<'a, T>: IntoCompactVectorTree
[src]

impl<T, ML> IntoTree for Compact<MaxVec<T, ML>> where
    ML: Unsigned,
    ElementalVariableVecRef<'b, T>: IntoCompactListTree
[src]

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

impl<L: ArrayLength<u8> + Unsigned> Codec for Compact<GenericArray<u8, L>>[src]

type Size = Mul<<u8 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: Unsigned> Codec for Compact<VecArray<u8, L>>[src]

type Size = Mul<<u8 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: ArrayLength<u16> + Unsigned> Codec for Compact<GenericArray<u16, L>>[src]

type Size = Mul<<u16 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: Unsigned> Codec for Compact<VecArray<u16, L>>[src]

type Size = Mul<<u16 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: ArrayLength<u32> + Unsigned> Codec for Compact<GenericArray<u32, L>>[src]

type Size = Mul<<u32 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: Unsigned> Codec for Compact<VecArray<u32, L>>[src]

type Size = Mul<<u32 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: ArrayLength<u64> + Unsigned> Codec for Compact<GenericArray<u64, L>>[src]

type Size = Mul<<u64 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: Unsigned> Codec for Compact<VecArray<u64, L>>[src]

type Size = Mul<<u64 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: ArrayLength<u128> + Unsigned> Codec for Compact<GenericArray<u128, L>>[src]

type Size = Mul<<u128 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: Unsigned> Codec for Compact<VecArray<u128, L>>[src]

type Size = Mul<<u128 as Codec>::Size, L>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: ArrayLength<bool> + Unsigned> Codec for Compact<GenericArray<bool, L>>[src]

type Size = Div<Add<L, U7>, U8>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: Unsigned> Codec for Compact<VecArray<bool, L>>[src]

type Size = Div<Add<L, U7>, U8>

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<T, ML> Codec for Compact<MaxVec<T, ML>>[src]

type Size = VariableSize

Size of the current type, also indicates whether it is fixed-sized or variable-sized. Read more

impl<L: ArrayLength<u8>> Encode for Compact<GenericArray<u8, L>> where
    Compact<GenericArray<u8, L>>: Codec,
    CompactRef<'a, GenericArray<u8, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: Unsigned> Encode for Compact<VecArray<u8, L>> where
    Compact<VecArray<u8, L>>: Codec,
    CompactRef<'a, GenericArray<u8, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: ArrayLength<u16>> Encode for Compact<GenericArray<u16, L>> where
    Compact<GenericArray<u16, L>>: Codec,
    CompactRef<'a, GenericArray<u16, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: Unsigned> Encode for Compact<VecArray<u16, L>> where
    Compact<VecArray<u16, L>>: Codec,
    CompactRef<'a, GenericArray<u16, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: ArrayLength<u32>> Encode for Compact<GenericArray<u32, L>> where
    Compact<GenericArray<u32, L>>: Codec,
    CompactRef<'a, GenericArray<u32, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: Unsigned> Encode for Compact<VecArray<u32, L>> where
    Compact<VecArray<u32, L>>: Codec,
    CompactRef<'a, GenericArray<u32, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: ArrayLength<u64>> Encode for Compact<GenericArray<u64, L>> where
    Compact<GenericArray<u64, L>>: Codec,
    CompactRef<'a, GenericArray<u64, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: Unsigned> Encode for Compact<VecArray<u64, L>> where
    Compact<VecArray<u64, L>>: Codec,
    CompactRef<'a, GenericArray<u64, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: ArrayLength<u128>> Encode for Compact<GenericArray<u128, L>> where
    Compact<GenericArray<u128, L>>: Codec,
    CompactRef<'a, GenericArray<u128, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: Unsigned> Encode for Compact<VecArray<u128, L>> where
    Compact<VecArray<u128, L>>: Codec,
    CompactRef<'a, GenericArray<u128, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: ArrayLength<bool>> Encode for Compact<GenericArray<bool, L>> where
    Compact<GenericArray<bool, L>>: Codec,
    CompactRef<'a, GenericArray<bool, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: Unsigned> Encode for Compact<VecArray<bool, L>> where
    Compact<VecArray<bool, L>>: Codec,
    CompactRef<'a, VecArray<bool, L>>: Encode
[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<ML> Encode for Compact<MaxVec<u8, ML>>[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<ML> Encode for Compact<MaxVec<u16, ML>>[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<ML> Encode for Compact<MaxVec<u32, ML>>[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<ML> Encode for Compact<MaxVec<u64, ML>>[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<ML> Encode for Compact<MaxVec<u128, ML>>[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<ML> Encode for Compact<MaxVec<bool, ML>>[src]

fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]

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

impl<L: ArrayLength<u8>> Decode for Compact<GenericArray<u8, L>> where
    Compact<GenericArray<u8, L>>: Codec
[src]

impl<L: Unsigned> Decode for Compact<VecArray<u8, L>> where
    Compact<VecArray<u8, L>>: Codec
[src]

impl<L: ArrayLength<u16>> Decode for Compact<GenericArray<u16, L>> where
    Compact<GenericArray<u16, L>>: Codec
[src]

impl<L: Unsigned> Decode for Compact<VecArray<u16, L>> where
    Compact<VecArray<u16, L>>: Codec
[src]

impl<L: ArrayLength<u32>> Decode for Compact<GenericArray<u32, L>> where
    Compact<GenericArray<u32, L>>: Codec
[src]

impl<L: Unsigned> Decode for Compact<VecArray<u32, L>> where
    Compact<VecArray<u32, L>>: Codec
[src]

impl<L: ArrayLength<u64>> Decode for Compact<GenericArray<u64, L>> where
    Compact<GenericArray<u64, L>>: Codec
[src]

impl<L: Unsigned> Decode for Compact<VecArray<u64, L>> where
    Compact<VecArray<u64, L>>: Codec
[src]

impl<L: ArrayLength<u128>> Decode for Compact<GenericArray<u128, L>> where
    Compact<GenericArray<u128, L>>: Codec
[src]

impl<L: Unsigned> Decode for Compact<VecArray<u128, L>> where
    Compact<VecArray<u128, L>>: Codec
[src]

impl<L: ArrayLength<bool>> Decode for Compact<GenericArray<bool, L>> where
    Compact<GenericArray<bool, L>>: Codec
[src]

impl<L: Unsigned> Decode for Compact<VecArray<bool, L>> where
    Compact<VecArray<bool, L>>: Codec
[src]

impl<ML: Unsigned> Decode for Compact<MaxVec<u8, ML>>[src]

impl<ML: Unsigned> Decode for Compact<MaxVec<u16, ML>>[src]

impl<ML: Unsigned> Decode for Compact<MaxVec<u32, ML>>[src]

impl<ML: Unsigned> Decode for Compact<MaxVec<u64, ML>>[src]

impl<ML: Unsigned> Decode for Compact<MaxVec<u128, ML>>[src]

impl<ML: Unsigned> Decode for Compact<MaxVec<bool, ML>>[src]

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

type Output = T

Should always be Self