[][src]Struct anpp::Decoder

pub struct Decoder { /* fields omitted */ }

Decoder for the Advanced Navigation Packet Protocol.

Methods

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

impl PartialEq<Decoder> 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

Blanket Implementations

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> From for T
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T