[−][src]Struct anpp::Decoder
Decoder for the Advanced Navigation Packet Protocol.
Implementations
impl Decoder[src]
pub const DEFAULT_DECODER_BUFFER_SIZE: usize[src]
The buffer size used when not compiled with the std feature flag.
pub fn new() -> Decoder[src]
Create a new Decoder.
pub fn bytes_in_buffer(&self) -> usize[src]
How many bytes are in the Decoder's internal buffer?
pub fn remaining_capacity(&self) -> usize[src]
The amount of data that can be added to the Decoder's internal buffer
before it will become full.
Note
When compiled with the std feature the buffer is considered
effectively infinite.
pub fn clear(&mut self)[src]
Clear the Decoder's internal buffer.
pub fn push_data(&mut self, data: &[u8]) -> Result<(), InsufficientCapacity>[src]
Try to add some more raw data to the Decoder's internal buffer.
pub fn decode(&mut self) -> Result<Packet, DecodeError>[src]
Retrieve the next Packet from the Decoder's internal buffer.
Trait Implementations
impl Clone for Decoder[src]
impl Debug for Decoder[src]
impl Default for Decoder[src]
impl PartialEq<Decoder> for Decoder[src]
impl StructuralPartialEq for Decoder[src]
Auto Trait Implementations
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl Sync for Decoder
impl Unpin for Decoder
impl UnwindSafe for Decoder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,