pub struct FutuCodec;Expand description
FutuOpenD 协议帧编解码器
实现 tokio_util 的 Decoder/Encoder trait, 用于在 TCP 流上进行帧边界识别和编解码。
Trait Implementations§
Source§impl Decoder for FutuCodec
impl Decoder for FutuCodec
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
§fn decode_eof(
&mut self,
buf: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode_eof( &mut self, buf: &mut BytesMut, ) -> Result<Option<Self::Item>, Self::Error>
A default method available to be called when there are no more bytes
available to be read from the underlying I/O. Read more
Auto Trait Implementations§
impl Freeze for FutuCodec
impl RefUnwindSafe for FutuCodec
impl Send for FutuCodec
impl Sync for FutuCodec
impl Unpin for FutuCodec
impl UnwindSafe for FutuCodec
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