Trait rocket::mtls::oid::asn1_rs::nom::Slice

pub trait Slice<R> {
    // Required method
    fn slice(&self, range: R) -> Self;
}
Available on crate feature mtls only.
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§

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

Slices self according to the range argument

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

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

§

fn slice(&self, range: Range<usize>) -> &'a str

§

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

§

fn slice(&self, range: RangeFrom<usize>) -> &'a str

§

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

§

fn slice(&self, range: RangeFull) -> &'a str

§

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

§

fn slice(&self, range: RangeTo<usize>) -> &'a str

§

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

§

fn slice(&self, range: Range<usize>) -> &'a [T]

§

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

§

fn slice(&self, range: RangeFrom<usize>) -> &'a [T]

§

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

§

fn slice(&self, range: RangeFull) -> &'a [T]

§

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

§

fn slice(&self, range: RangeTo<usize>) -> &'a [T]

Implementors§