Skip to main content

Input

Trait Input 

Source
pub trait Input {
    // Required methods
    fn ws(&self, index: &mut usize);
    fn take_byte(&self, index: &mut usize, want: u8) -> Taken;
    fn expect_byte(&self, index: &mut usize, want: u8) -> Result<(), Error>;
    fn expect_prop(
        &self,
        index: &mut usize,
        first: bool,
        want: &[u8],
    ) -> Result<(), Error>;
    fn finish(&self, index: &mut usize) -> Result<(), Error>;
    fn name(&self, index: &mut usize) -> Result<Name<'_>, Error>;
    fn take_null(&self, index: &mut usize) -> Taken;
    fn skip_value(&self, index: &mut usize) -> Result<(), Error>;
    fn parse_u64(&self, index: &mut usize) -> Result<u64, Error>;
    fn parse_bool(&self, index: &mut usize) -> Result<bool, Error>;
}

Required Methods§

Source

fn ws(&self, index: &mut usize)

Source

fn take_byte(&self, index: &mut usize, want: u8) -> Taken

Source

fn expect_byte(&self, index: &mut usize, want: u8) -> Result<(), Error>

Source

fn expect_prop( &self, index: &mut usize, first: bool, want: &[u8], ) -> Result<(), Error>

Source

fn finish(&self, index: &mut usize) -> Result<(), Error>

Source

fn name(&self, index: &mut usize) -> Result<Name<'_>, Error>

Source

fn take_null(&self, index: &mut usize) -> Taken

Source

fn skip_value(&self, index: &mut usize) -> Result<(), Error>

Source

fn parse_u64(&self, index: &mut usize) -> Result<u64, Error>

Source

fn parse_bool(&self, index: &mut usize) -> Result<bool, Error>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Input for [u8]

Source§

fn ws(&self, index: &mut usize)

Source§

fn take_byte(&self, index: &mut usize, want: u8) -> Taken

Source§

fn expect_byte(&self, index: &mut usize, want: u8) -> Result<(), Error>

Source§

fn expect_prop( &self, index: &mut usize, first: bool, want: &[u8], ) -> Result<(), Error>

Source§

fn finish(&self, index: &mut usize) -> Result<(), Error>

Source§

fn name(&self, index: &mut usize) -> Result<Name<'_>, Error>

Source§

fn take_null(&self, index: &mut usize) -> Taken

Source§

fn skip_value(&self, index: &mut usize) -> Result<(), Error>

Source§

fn parse_u64(&self, index: &mut usize) -> Result<u64, Error>

Source§

fn parse_bool(&self, index: &mut usize) -> Result<bool, Error>

Implementors§