Struct snarkos_node_messages::helpers::MessageCodec
source · pub struct MessageCodec<N: Network> { /* private fields */ }
Expand description
The codec used to decode and encode network Message
s.
Implementations§
source§impl<N: Network> MessageCodec<N>
impl<N: Network> MessageCodec<N>
Trait Implementations§
source§impl<N: Network> Decoder for MessageCodec<N>
impl<N: Network> Decoder for MessageCodec<N>
source§fn decode(
&mut self,
source: &mut BytesMut
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, source: &mut BytesMut ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
source§impl<N: Network> Default for MessageCodec<N>
impl<N: Network> Default for MessageCodec<N>
Auto Trait Implementations§
impl<N> RefUnwindSafe for MessageCodec<N>where N: RefUnwindSafe,
impl<N> Send for MessageCodec<N>
impl<N> Sync for MessageCodec<N>
impl<N> Unpin for MessageCodec<N>where N: Unpin,
impl<N> UnwindSafe for MessageCodec<N>where N: 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