[][src]Struct anpp::Decoder

pub struct Decoder { /* fields omitted */ }

Decoder for the Advanced Navigation Packet Protocol.


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.


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 PartialEq<Decoder> for Decoder[src]

impl Debug for Decoder[src]

impl Clone for Decoder[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Decoder[src]

Auto Trait Implementations

impl Send for Decoder

impl Sync for Decoder

impl Unpin for Decoder

impl UnwindSafe for Decoder

impl RefUnwindSafe for Decoder

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.