Struct ObjectCodec
pub struct ObjectCodec {
is_discarding: bool,
next_index: usize,
}Expand description
Codec for encoding gpsd commands and decoding gpsd objects.
Fields§
§is_discarding: bool§next_index: usizeImplementations§
§impl ObjectCodec
impl ObjectCodec
pub const fn new() -> Self
Trait Implementations§
§impl Decoder for ObjectCodec
impl Decoder for ObjectCodec
§fn decode(
&mut self,
buf: &mut BytesMut,
) -> Result<Option<Self::Item>, Self::Error>
fn decode( &mut self, buf: &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 ObjectCodec
impl RefUnwindSafe for ObjectCodec
impl Send for ObjectCodec
impl Sync for ObjectCodec
impl Unpin for ObjectCodec
impl UnsafeUnpin for ObjectCodec
impl UnwindSafe for ObjectCodec
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