pub struct RtuCodec;Expand description
RTU codec for serial Modbus framing.
Frame boundaries are determined by inter-character silence (handled by the transport layer). This codec validates CRC and extracts the PDU.
Trait Implementations§
Source§impl Decoder for RtuCodec
impl Decoder for RtuCodec
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 RtuCodec
impl RefUnwindSafe for RtuCodec
impl Send for RtuCodec
impl Sync for RtuCodec
impl Unpin for RtuCodec
impl UnsafeUnpin for RtuCodec
impl UnwindSafe for RtuCodec
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