pub struct ClientCodec;Expand description
Codec for encoding/decoding STOMP protocol frames for client usage
This codec handles the conversion between STOMP protocol frames and Rust types, implementing the tokio_util::codec::Encoder and Decoder traits.
Trait Implementations§
Source§impl Decoder for ClientCodec
impl Decoder for ClientCodec
Source§fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>, Error>
fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>, Error>
Decodes bytes from the server into STOMP messages
This method attempts to parse a complete STOMP frame from the input buffer. If a complete frame is available, it returns the parsed Message. If more data is needed, it returns None. If parsing fails, it returns an error.
Source§type Item = Message<FromServer>
type Item = Message<FromServer>
The type of decoded frames.
Auto Trait Implementations§
impl Freeze for ClientCodec
impl RefUnwindSafe for ClientCodec
impl Send for ClientCodec
impl Sync for ClientCodec
impl Unpin for ClientCodec
impl UnwindSafe for ClientCodec
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