pub struct Compact<T>(pub T);Expand description
Compact-encoded variant of T. This is more space-efficient but less compute-efficient.
Tuple Fields§
§0: TTrait Implementations§
Source§impl<'de, T> Deserialize<'de> for Compact<T>where
T: Deserialize<'de>,
Available on crate feature std only.
impl<'de, T> Deserialize<'de> for Compact<T>where
T: Deserialize<'de>,
Available on crate feature
std only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for Compact<()>
impl Encode for Compact<()>
Source§impl<T> Encode for Compact<T>
impl<T> Encode for Compact<T>
Source§impl Encode for Compact<u128>
impl Encode for Compact<u128>
Source§impl Encode for Compact<u16>
impl Encode for Compact<u16>
Source§impl Encode for Compact<u32>
impl Encode for Compact<u32>
Source§impl Encode for Compact<u64>
impl Encode for Compact<u64>
Source§impl Encode for Compact<u8>
impl Encode for Compact<u8>
Source§impl<'a, T: 'a> EncodeAsRef<'a, T> for Compact<T>
impl<'a, T: 'a> EncodeAsRef<'a, T> for Compact<T>
Source§impl<T: Ord> Ord for Compact<T>
impl<T: Ord> Ord for Compact<T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for Compact<T>
impl<T: PartialOrd> PartialOrd for Compact<T>
impl<T: Copy> Copy for Compact<T>
impl<T: Eq> Eq for Compact<T>
impl<T> StructuralPartialEq for Compact<T>
Auto Trait Implementations§
impl<T> Freeze for Compact<T>where
T: Freeze,
impl<T> RefUnwindSafe for Compact<T>where
T: RefUnwindSafe,
impl<T> Send for Compact<T>where
T: Send,
impl<T> Sync for Compact<T>where
T: Sync,
impl<T> Unpin for Compact<T>where
T: Unpin,
impl<T> UnwindSafe for Compact<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more