pub struct DoipCodec<const N: usize> {}Expand description
A simple Decoder and Encoder implementation for Diagnostics over Internet Protocol.
Can be used independently via encode and decode methods, however is best
utilised during.
Trait Implementations§
Source§impl<const N: usize> Decoder<N> for DoipCodec<N>
impl<const N: usize> Decoder<N> for DoipCodec<N>
Source§type Item = DoipMessage<N>
type Item = DoipMessage<N>
The type of decoded frames
Source§type Error = DecodeError
type Error = DecodeError
The type of unrecoverable frame decoding errors. Read more
Source§impl<const N: usize> Decoder for DoipCodec<N>
impl<const N: usize> Decoder for DoipCodec<N>
Source§type Item = DoipMessage<N>
type Item = DoipMessage<N>
The type of decoded frames.
Source§type Error = DecodeError
type Error = DecodeError
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<const N: usize> Freeze for DoipCodec<N>
impl<const N: usize> RefUnwindSafe for DoipCodec<N>
impl<const N: usize> Send for DoipCodec<N>
impl<const N: usize> Sync for DoipCodec<N>
impl<const N: usize> Unpin for DoipCodec<N>
impl<const N: usize> UnwindSafe for DoipCodec<N>
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