pub enum RawPostcard<'a> {
Borrowed(&'a [u8]),
Owned(Vec<u8>),
}Expand description
Postcard-encoded opaque payload bytes.
This represents bytes that are already encoded using postcard’s opaque payload encoding. It can be borrowed or owned.
Variants§
Implementations§
Source§impl<'a> RawPostcard<'a>
impl<'a> RawPostcard<'a>
Sourcepub fn to_opaque_serialize(&self) -> OpaqueSerialize
pub fn to_opaque_serialize(&self) -> OpaqueSerialize
Converts this payload into opaque adapter serialization inputs.
Trait Implementations§
Source§impl<'a> Clone for RawPostcard<'a>
impl<'a> Clone for RawPostcard<'a>
Source§fn clone(&self) -> RawPostcard<'a>
fn clone(&self) -> RawPostcard<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for RawPostcard<'a>
impl<'a> Debug for RawPostcard<'a>
Source§impl<'a> From<&'a [u8]> for RawPostcard<'a>
impl<'a> From<&'a [u8]> for RawPostcard<'a>
Auto Trait Implementations§
impl<'a> Freeze for RawPostcard<'a>
impl<'a> RefUnwindSafe for RawPostcard<'a>
impl<'a> Send for RawPostcard<'a>
impl<'a> Sync for RawPostcard<'a>
impl<'a> Unpin for RawPostcard<'a>
impl<'a> UnsafeUnpin for RawPostcard<'a>
impl<'a> UnwindSafe for RawPostcard<'a>
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