Trait peg_runtime::ParseSlice

source ·
pub trait ParseSlice<'input>: Parse {
    type Slice;

    // Required method
    fn parse_slice(&'input self, p1: usize, p2: usize) -> Self::Slice;
}
Expand description

A parser input type supporting the $() syntax.

Required Associated Types§

source

type Slice

Type of a slice of the input.

Required Methods§

source

fn parse_slice(&'input self, p1: usize, p2: usize) -> Self::Slice

Get a slice of input.

Implementations on Foreign Types§

source§

impl<'input> ParseSlice<'input> for str

§

type Slice = &'input str

source§

fn parse_slice(&'input self, p1: usize, p2: usize) -> &'input str

source§

impl<'input, T: 'input> ParseSlice<'input> for [T]

§

type Slice = &'input [T]

source§

fn parse_slice(&'input self, p1: usize, p2: usize) -> &'input [T]

Implementors§