pub struct ScaleCompressed<T>(pub T);
Expand description
Wrap a struct to be compressed for encoding.
Tuple Fields§
§0: T
Implementations§
Source§impl<T> ScaleCompressed<T>
impl<T> ScaleCompressed<T>
Trait Implementations§
Source§impl<T: Decode> Decode for ScaleCompressed<T>
impl<T: Decode> Decode for ScaleCompressed<T>
Source§fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
fn decode<I: Input>(input: &mut I) -> Result<Self, Error>
Attempt to deserialise the value from input.
Source§fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
fn decode_into<I>(
input: &mut I,
dst: &mut MaybeUninit<Self>,
) -> Result<DecodeFinished, Error>where
I: Input,
Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§impl<T: Encode> Encode for ScaleCompressed<T>
impl<T: Encode> Encode for ScaleCompressed<T>
Source§fn encode_to<O: Output + ?Sized>(&self, output: &mut O)
fn encode_to<O: Output + ?Sized>(&self, output: &mut O)
Convert self to a slice and append it to the destination.
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Auto Trait Implementations§
impl<T> Freeze for ScaleCompressed<T>where
T: Freeze,
impl<T> RefUnwindSafe for ScaleCompressed<T>where
T: RefUnwindSafe,
impl<T> Send for ScaleCompressed<T>where
T: Send,
impl<T> Sync for ScaleCompressed<T>where
T: Sync,
impl<T> Unpin for ScaleCompressed<T>where
T: Unpin,
impl<T> UnwindSafe for ScaleCompressed<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