pub struct Encoded(pub Vec<u8>);
Expand description
Encoded
is used to avoid encoding an extra length that isn’t needed.
Tuple Fields§
§0: Vec<u8>
Trait Implementations§
Source§impl Encode for Encoded
impl Encode for Encoded
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 encode_to<O: Output + ?Sized>(&self, out: &mut O)
fn encode_to<O: Output + ?Sized>(&self, out: &mut O)
Convert self to a slice and append it to the destination.
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 Freeze for Encoded
impl RefUnwindSafe for Encoded
impl Send for Encoded
impl Sync for Encoded
impl Unpin for Encoded
impl UnwindSafe for Encoded
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