Trait nom::InputTake

source ·
pub trait InputTake: Sized {
    // Required methods
    fn take(&self, count: usize) -> Self;
    fn take_split(&self, count: usize) -> (Self, Self);
}
Expand description

Abstracts slicing operations

Required Methods§

source

fn take(&self, count: usize) -> Self

Returns a slice of count bytes. panics if count > length

source

fn take_split(&self, count: usize) -> (Self, Self)

Split the stream at the count byte offset. panics if count > length

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a> InputTake for &'a str

source§

fn take(&self, count: usize) -> Self

source§

fn take_split(&self, count: usize) -> (Self, Self)

source§

impl<'a> InputTake for &'a [u8]

source§

fn take(&self, count: usize) -> Self

source§

fn take_split(&self, count: usize) -> (Self, Self)

Implementors§