Struct parity_scale_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 CompactLen<u128> for Compact<u128>
[src]
impl CompactLen<u128> for Compact<u128>
[src]fn compact_len(val: &u128) -> usize
[src]
impl CompactLen<u16> for Compact<u16>
[src]
impl CompactLen<u16> for Compact<u16>
[src]fn compact_len(val: &u16) -> usize
[src]
impl CompactLen<u32> for Compact<u32>
[src]
impl CompactLen<u32> for Compact<u32>
[src]fn compact_len(val: &u32) -> usize
[src]
impl CompactLen<u64> for Compact<u64>
[src]
impl CompactLen<u64> for Compact<u64>
[src]fn compact_len(val: &u64) -> usize
[src]
impl CompactLen<u8> for Compact<u8>
[src]
impl CompactLen<u8> for Compact<u8>
[src]fn compact_len(val: &u8) -> usize
[src]
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>,
[src]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]
impl<T> Encode for Compact<T> where
CompactRef<'a, T>: Encode,
[src]impl<'a, T: 'a> EncodeAsRef<'a, T> for Compact<T> where
CompactRef<'a, T>: Encode + From<&'a T>,
[src]
impl<'a, T: 'a> EncodeAsRef<'a, T> for Compact<T> where
CompactRef<'a, T>: Encode + From<&'a T>,
[src]type RefType = CompactRef<'a, T>
The reference type that is used for encoding.
impl<T: PartialOrd> PartialOrd<Compact<T>> for Compact<T>
[src]
impl<T: PartialOrd> PartialOrd<Compact<T>> for Compact<T>
[src]impl<T: Copy> Copy for Compact<T>
[src]
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<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,