Struct simple_parse::SpCtx[][src]

pub struct SpCtx {
    pub cursor: usize,
    pub is_reading: bool,
    pub is_little_endian: bool,
    pub count: Option<usize>,
}

A context passed around SpRead and SpWrite functions

Fields

cursor: usize

How many bytes have been read/written so far

is_reading: bool

This value should only be checked inside custom validators (which get called for both Read & Write) Its contents are considered invalid otherwise

is_little_endian: bool

If the abitrary input/output bytes should be treated as little endian

count: Option<usize>

If a dynamically sized Self uses an external count field, and what its contents are

Trait Implementations

impl Default for SpCtx[src]

Auto Trait Implementations

impl RefUnwindSafe for SpCtx

impl Send for SpCtx

impl Sync for SpCtx

impl Unpin for SpCtx

impl UnwindSafe for SpCtx

Blanket Implementations

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

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

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

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.