pub struct CapnWebCodec { /* private fields */ }Expand description
Codec for Cap’n Web protocol messages Handles serialization/deserialization of protocol messages
Implementations§
Source§impl CapnWebCodec
impl CapnWebCodec
Sourcepub fn with_max_frame_size(max_frame_size: usize) -> Self
pub fn with_max_frame_size(max_frame_size: usize) -> Self
Create a new codec with custom max frame size
Trait Implementations§
Source§impl Decoder for CapnWebCodec
Decoder for length-prefixed frames
impl Decoder for CapnWebCodec
Decoder for length-prefixed frames
Source§type Error = CodecError
type Error = CodecError
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
Attempts to decode a frame from the provided buffer of bytes. Read more
Source§impl Default for CapnWebCodec
impl Default for CapnWebCodec
Auto Trait Implementations§
impl Freeze for CapnWebCodec
impl RefUnwindSafe for CapnWebCodec
impl Send for CapnWebCodec
impl Sync for CapnWebCodec
impl Unpin for CapnWebCodec
impl UnwindSafe for CapnWebCodec
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