pub struct Codec {
pub max_incoming_size: usize,
pub max_outgoing_size: usize,
}
Expand description
MQTT v4 codec
Fields§
§max_incoming_size: usize
Maximum packet size allowed by client
max_outgoing_size: usize
Maximum packet size allowed by broker
Trait Implementations§
Source§impl Decoder for Codec
impl Decoder for Codec
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
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