[−][src]Struct anpp::Decoder
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 PartialEq<Decoder> for Decoder
[src]
impl Debug for Decoder
[src]
impl Clone for Decoder
[src]
fn clone(&self) -> 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 Unpin for Decoder
impl Send for Decoder
impl Sync for Decoder
impl UnwindSafe for Decoder
impl RefUnwindSafe for Decoder
Blanket Implementations
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> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,