Struct foca::PostcardCodec
source · pub struct PostcardCodec;
Expand description
PostcardCodec
encodes/decodes packets using postcard
.
Trait Implementations§
source§impl Clone for PostcardCodec
impl Clone for PostcardCodec
source§fn clone(&self) -> PostcardCodec
fn clone(&self) -> PostcardCodec
Returns a copy 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<T> Codec<T> for PostcardCodecwhere
T: Serialize + for<'de> Deserialize<'de>,
impl<T> Codec<T> for PostcardCodecwhere
T: Serialize + for<'de> Deserialize<'de>,
§type Error = Error
type Error = Error
The codec error type. Will be wrapped by
crate::Error
.source§fn encode_header(
&mut self,
payload: &Header<T>,
buf: impl BufMut
) -> Result<(), Self::Error>
fn encode_header( &mut self, payload: &Header<T>, buf: impl BufMut ) -> Result<(), Self::Error>
Encodes a
foca::Header
into the given buffer.source§impl Debug for PostcardCodec
impl Debug for PostcardCodec
impl Copy for PostcardCodec
Auto Trait Implementations§
impl Freeze for PostcardCodec
impl RefUnwindSafe for PostcardCodec
impl Send for PostcardCodec
impl Sync for PostcardCodec
impl Unpin for PostcardCodec
impl UnwindSafe for PostcardCodec
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