Trait peg::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> ParseSlice<'input> for [T]
where T: 'input,

§

type Slice = &'input [T]

source§

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

Implementors§