pub struct MbapCodec;Expand description
MBAP codec for Modbus/TCP framing.
Handles the 7-byte MBAP header (transaction ID, protocol ID, length, unit ID)
followed by the PDU (function code + data). The decoder validates the protocol
identifier and length field before yielding a Frame.
Trait Implementations§
Source§impl Decoder for MbapCodec
impl Decoder for MbapCodec
Source§type Error = FrameError
type Error = FrameError
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
Auto Trait Implementations§
impl Freeze for MbapCodec
impl RefUnwindSafe for MbapCodec
impl Send for MbapCodec
impl Sync for MbapCodec
impl Unpin for MbapCodec
impl UnsafeUnpin for MbapCodec
impl UnwindSafe for MbapCodec
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