Trait nom8::input::Slice

source ·
pub trait Slice<R> {
    // Required method
    fn slice(&self, range: R) -> Self;
}
Expand description

Slicing operations using ranges.

This trait is loosely based on Index, but can actually return something else than a &[T] or &str

Required Methods§

source

fn slice(&self, range: R) -> Self

Slices self according to the range argument

Implementations on Foreign Types§

source§

impl<'a> Slice<Range<usize>> for &'a str

source§

fn slice(&self, range: Range<usize>) -> Self

source§

impl<'a, T> Slice<RangeFull> for &'a [T]

source§

fn slice(&self, range: RangeFull) -> Self

source§

impl<'a, T> Slice<Range<usize>> for &'a [T]

source§

fn slice(&self, range: Range<usize>) -> Self

source§

impl<'a> Slice<RangeFrom<usize>> for &'a str

source§

fn slice(&self, range: RangeFrom<usize>) -> Self

source§

impl<'a> Slice<RangeTo<usize>> for &'a str

source§

fn slice(&self, range: RangeTo<usize>) -> Self

source§

impl<'a, T> Slice<RangeFrom<usize>> for &'a [T]

source§

fn slice(&self, range: RangeFrom<usize>) -> Self

source§

impl<'a> Slice<RangeFull> for &'a str

source§

fn slice(&self, range: RangeFull) -> Self

source§

impl<'a, T> Slice<RangeTo<usize>> for &'a [T]

source§

fn slice(&self, range: RangeTo<usize>) -> Self

Implementors§

source§

impl<I, R> Slice<R> for Located<I>where I: Slice<R> + Clone,

source§

impl<I, R> Slice<R> for Streaming<I>where I: Slice<R>,

source§

impl<I, S, R> Slice<R> for Stateful<I, S>where I: Slice<R>, S: Clone,