pub struct Codec { /* private fields */ }
Implementations§
Source§impl Codec
impl Codec
Sourcepub fn max_inbound_size(&self) -> u32
pub fn max_inbound_size(&self) -> u32
Set max inbound frame size.
If max size is set to 0
, size is unlimited.
By default max size is set to 0
Sourcepub fn max_outbound_size(&self) -> u32
pub fn max_outbound_size(&self) -> u32
Set max outbound frame size.
If max size is set to 0
, size is unlimited.
By default max size is set to 0
Sourcepub fn set_max_inbound_size(&mut self, size: u32)
pub fn set_max_inbound_size(&mut self, size: u32)
Set max inbound frame size.
If max size is set to 0
, size is unlimited.
By default max size is set to 0
Sourcepub fn set_max_outbound_size(&mut self, size: u32)
pub fn set_max_outbound_size(&mut self, size: u32)
Set max outbound frame size.
If max size is set to 0
, size is unlimited.
By default max size is set to 0
Trait Implementations§
Source§impl Decoder for Codec
impl Decoder for Codec
Source§type Error = DecodeError
type Error = DecodeError
The type of unrecoverable frame decoding errors. Read more
Source§fn decode(
&mut self,
src: &mut BytesMut,
) -> Result<Option<Self::Item>, DecodeError>
fn decode( &mut self, src: &mut BytesMut, ) -> Result<Option<Self::Item>, DecodeError>
Attempts to decode a frame from the provided buffer of bytes. Read more
Auto Trait Implementations§
impl !Freeze for Codec
impl !RefUnwindSafe for Codec
impl Send for Codec
impl !Sync for Codec
impl Unpin for Codec
impl UnwindSafe for Codec
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