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: Eq> Eq for Compact<T>impl<T: PartialEq> PartialEq for Compact<T>[src]
impl<T: PartialEq> PartialEq for Compact<T>fn eq(&self, other: &Compact<T>) -> bool[src]
fn eq(&self, other: &Compact<T>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Compact<T>) -> bool[src]
fn ne(&self, other: &Compact<T>) -> boolThis method tests for !=.
impl<T: Clone> Clone for Compact<T>[src]
impl<T: Clone> Clone for Compact<T>fn clone(&self) -> Compact<T>[src]
fn clone(&self) -> Compact<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<T: Copy> Copy for Compact<T>[src]
impl<T: Copy> Copy for Compact<T>impl<T> From<T> for Compact<T>[src]
impl<T> From<T> for Compact<T>impl<'a, T: Copy> From<&'a T> for Compact<T>[src]
impl<'a, T: Copy> From<&'a T> for Compact<T>impl<T> Debug for Compact<T> where
T: Debug, [src]
impl<T> Debug for Compact<T> where
T: Debug, fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T> Serialize for Compact<T> where
T: Serialize, [src]
impl<T> Serialize for Compact<T> where
T: Serialize, fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer, [src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer, Serialize this value into the given Serde serializer. Read more
impl<'de, T> Deserialize<'de> for Compact<T> where
T: Deserialize<'de>, [src]
impl<'de, T> Deserialize<'de> for Compact<T> where
T: Deserialize<'de>, fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, [src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>, Deserialize this value from the given Serde deserializer. Read more
impl From<Compact<u8>> for u8[src]
impl From<Compact<u8>> for u8impl From<Compact<u16>> for u16[src]
impl From<Compact<u16>> for u16impl From<Compact<u32>> for u32[src]
impl From<Compact<u32>> for u32impl From<Compact<u64>> for u64[src]
impl From<Compact<u64>> for u64impl From<Compact<u128>> for u128[src]
impl From<Compact<u128>> for u128impl Encode for Compact<u8>[src]
impl Encode for Compact<u8>fn encode_to<W: Output>(&self, dest: &mut W)[src]
fn encode_to<W: Output>(&self, dest: &mut W)Convert self to a slice and append it to the destination.
fn encode(&self) -> Vec<u8>[src]
fn encode(&self) -> Vec<u8>Convert self to an owned vector.
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> RConvert self to a slice and then invoke the given closure with it.
impl Encode for Compact<u16>[src]
impl Encode for Compact<u16>fn encode_to<W: Output>(&self, dest: &mut W)[src]
fn encode_to<W: Output>(&self, dest: &mut W)Convert self to a slice and append it to the destination.
fn encode(&self) -> Vec<u8>[src]
fn encode(&self) -> Vec<u8>Convert self to an owned vector.
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> RConvert self to a slice and then invoke the given closure with it.
impl Encode for Compact<u32>[src]
impl Encode for Compact<u32>fn encode_to<W: Output>(&self, dest: &mut W)[src]
fn encode_to<W: Output>(&self, dest: &mut W)Convert self to a slice and append it to the destination.
fn encode(&self) -> Vec<u8>[src]
fn encode(&self) -> Vec<u8>Convert self to an owned vector.
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> RConvert self to a slice and then invoke the given closure with it.
impl Encode for Compact<u64>[src]
impl Encode for Compact<u64>fn encode_to<W: Output>(&self, dest: &mut W)[src]
fn encode_to<W: Output>(&self, dest: &mut W)Convert self to a slice and append it to the destination.
fn encode(&self) -> Vec<u8>[src]
fn encode(&self) -> Vec<u8>Convert self to an owned vector.
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> RConvert self to a slice and then invoke the given closure with it.
impl Encode for Compact<u128>[src]
impl Encode for Compact<u128>fn encode_to<W: Output>(&self, dest: &mut W)[src]
fn encode_to<W: Output>(&self, dest: &mut W)Convert self to a slice and append it to the destination.
fn encode(&self) -> Vec<u8>[src]
fn encode(&self) -> Vec<u8>Convert self to an owned vector.
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> RConvert self to a slice and then invoke the given closure with it.
impl Decode for Compact<u8>[src]
impl Decode for Compact<u8>impl Decode for Compact<u16>[src]
impl Decode for Compact<u16>impl Decode for Compact<u32>[src]
impl Decode for Compact<u32>impl Decode for Compact<u64>[src]
impl Decode for Compact<u64>impl Decode for Compact<u128>[src]
impl Decode for Compact<u128>