[−][src]Struct susy_codec::Compact
Compact-encoded variant of T. This is more space-efficient but less compute-efficient.
Trait Implementations
impl<T> Encode for Compact<T> where
T: CompactAs,
CompactRef<'a, <T as CompactAs>::As>: Encode,
[src]
T: CompactAs,
CompactRef<'a, <T as CompactAs>::As>: Encode,
fn encode_to<W: Output>(&self, dest: &mut W)
[src]
fn encode(&self) -> Vec<u8>
[src]
Convert self to an owned vector.
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 Encode for Compact<()>
[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
[src]
fn encode_to<T: Output>(&self, dest: &mut T)
[src]
Convert self to a slice and append it to the destination.
fn encode(&self) -> Vec<u8>
[src]
Convert self to an owned vector.
impl Encode for Compact<u8>
[src]
fn encode_to<W: Output>(&self, dest: &mut W)
[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
[src]
fn encode(&self) -> Vec<u8>
[src]
Convert self to an owned vector.
impl Encode for Compact<u16>
[src]
fn encode_to<W: Output>(&self, dest: &mut W)
[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
[src]
fn encode(&self) -> Vec<u8>
[src]
Convert self to an owned vector.
impl Encode for Compact<u32>
[src]
fn encode_to<W: Output>(&self, dest: &mut W)
[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
[src]
fn encode(&self) -> Vec<u8>
[src]
Convert self to an owned vector.
impl Encode for Compact<u64>
[src]
fn encode_to<W: Output>(&self, dest: &mut W)
[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
[src]
fn encode(&self) -> Vec<u8>
[src]
Convert self to an owned vector.
impl Encode for Compact<u128>
[src]
fn encode_to<W: Output>(&self, dest: &mut W)
[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
[src]
fn encode(&self) -> Vec<u8>
[src]
Convert self to an owned vector.
impl<T> Decode for Compact<T> where
T: CompactAs,
Compact<<T as CompactAs>::As>: Decode,
[src]
T: CompactAs,
Compact<<T as CompactAs>::As>: Decode,
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<'a, T: 'a> EncodeAsRef<'a, T> for Compact<T> where
CompactRef<'a, T>: Encode + From<&'a T>,
[src]
CompactRef<'a, T>: Encode + From<&'a T>,
type RefType = CompactRef<'a, T>
The reference type that is used for encoding.
impl<T: PartialOrd> PartialOrd<Compact<T>> for Compact<T>
[src]
fn partial_cmp(&self, other: &Compact<T>) -> Option<Ordering>
[src]
fn lt(&self, other: &Compact<T>) -> bool
[src]
fn le(&self, other: &Compact<T>) -> bool
[src]
fn gt(&self, other: &Compact<T>) -> bool
[src]
fn ge(&self, other: &Compact<T>) -> bool
[src]
impl<T: Copy> Copy for Compact<T>
[src]
impl<T: PartialEq> PartialEq<Compact<T>> for Compact<T>
[src]
impl<T> From<T> for Compact<T>
[src]
impl<'a, T: Copy> From<&'a T> for Compact<T>
[src]
impl From<Compact<()>> for ()
[src]
impl From<Compact<u8>> for u8
[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<u128>> for u128
[src]
impl<T: Clone> Clone for Compact<T>
[src]
fn clone(&self) -> Compact<T>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Ord> Ord for Compact<T>
[src]
fn cmp(&self, other: &Compact<T>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl<T: Eq> Eq for Compact<T>
[src]
impl<T> Debug for Compact<T> where
T: Debug,
[src]
T: Debug,
impl<T> Serialize for Compact<T> where
T: Serialize,
[src]
T: Serialize,
impl<'de, T> Deserialize<'de> for Compact<T> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,