Struct parity_scale_codec::Compact [−][src]
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]
fn compact_len(val: &u128) -> usize
[src]
impl CompactLen<u16> for Compact<u16>
[src]
fn compact_len(val: &u16) -> usize
[src]
impl CompactLen<u32> for Compact<u32>
[src]
fn compact_len(val: &u32) -> usize
[src]
impl CompactLen<u64> for Compact<u64>
[src]
fn compact_len(val: &u64) -> usize
[src]
impl CompactLen<u8> for Compact<u8>
[src]
fn compact_len(val: &u8) -> usize
[src]
impl<T: Copy> Copy for Compact<T>
[src]
impl<T> Debug for Compact<T> where
T: Debug,
[src]
T: Debug,
impl<T> Decode for Compact<T> where
T: CompactAs,
Compact<T::As>: Decode,
[src]
T: CompactAs,
Compact<T::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<'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>,
impl<T> Encode for Compact<T> where
CompactRef<'a, T>: Encode,
[src]
CompactRef<'a, T>: Encode,
fn size_hint(&self) -> usize
[src]
fn encode_to<W: Output>(&self, dest: &mut W)
[src]
fn encode(&self) -> Vec<u8>ⓘ
[src]
fn using_encoded<R, F: FnOnce(&[u8]) -> R>(&self, f: F) -> R
[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> EncodeLike<Compact<T>> for Compact<T> where
CompactRef<'a, T>: Encode,
[src]
CompactRef<'a, T>: Encode,
impl<T: Eq> Eq for Compact<T>
[src]
impl<'a, T: Copy> From<&'a T> for Compact<T>
[src]
impl<T> From<T> for Compact<T>
[src]
impl<T: Ord> Ord for Compact<T>
[src]
fn cmp(&self, other: &Compact<T>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<T: PartialEq> PartialEq<Compact<T>> for Compact<T>
[src]
impl<T: PartialOrd> PartialOrd<Compact<T>> for Compact<T>
[src]
fn partial_cmp(&self, other: &Compact<T>) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T> Serialize for Compact<T> where
T: Serialize,
[src]
T: Serialize,
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,
T: RefUnwindSafe,
impl<T> Send for Compact<T> where
T: Send,
T: Send,
impl<T> Sync for Compact<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Compact<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Compact<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,