SrcIndex

Trait SrcIndex 

Source
pub trait SrcIndex<T: SrcSlice + ?Sized> {
    type Output: SrcTarget + ?Sized;

    // Required method
    fn get(self, slice: Src<T>) -> Src<Self::Output>;
}
Expand description

A helper trait for Src::slice. Analagous to SliceIndex.

Required Associated Types§

Source

type Output: SrcTarget + ?Sized

The output type returned by methods.

Required Methods§

Source

fn get(self, slice: Src<T>) -> Src<Self::Output>

Returns an Src pointer to the output at this location, panicking if out of bounds.

Implementations on Foreign Types§

Source§

impl SrcIndex<str> for (Bound<usize>, Bound<usize>)

Source§

type Output = str

Source§

fn get(self, slice: Src<str>) -> Src<Self::Output>

Source§

impl SrcIndex<str> for Range<usize>

Source§

type Output = str

Source§

fn get(self, slice: Src<str>) -> Src<Self::Output>

Source§

impl SrcIndex<str> for RangeFrom<usize>

Source§

type Output = str

Source§

fn get(self, slice: Src<str>) -> Src<Self::Output>

Source§

impl SrcIndex<str> for RangeFull

Source§

type Output = str

Source§

fn get(self, slice: Src<str>) -> Src<Self::Output>

Source§

impl SrcIndex<str> for RangeInclusive<usize>

Source§

type Output = str

Source§

fn get(self, slice: Src<str>) -> Src<Self::Output>

Source§

impl SrcIndex<str> for RangeTo<usize>

Source§

type Output = str

Source§

fn get(self, slice: Src<str>) -> Src<Self::Output>

Source§

impl SrcIndex<str> for RangeToInclusive<usize>

Source§

type Output = str

Source§

fn get(self, slice: Src<str>) -> Src<Self::Output>

Source§

impl<T> SrcIndex<[T]> for (Bound<usize>, Bound<usize>)

Source§

type Output = [T]

Source§

fn get(self, slice: Src<[T]>) -> Src<Self::Output>

Source§

impl<T> SrcIndex<[T]> for usize

Source§

type Output = T

Source§

fn get(self, slice: Src<[T]>) -> Src<Self::Output>

Source§

impl<T> SrcIndex<[T]> for Range<usize>

Source§

type Output = [T]

Source§

fn get(self, slice: Src<[T]>) -> Src<Self::Output>

Source§

impl<T> SrcIndex<[T]> for RangeFrom<usize>

Source§

type Output = [T]

Source§

fn get(self, slice: Src<[T]>) -> Src<Self::Output>

Source§

impl<T> SrcIndex<[T]> for RangeFull

Source§

type Output = [T]

Source§

fn get(self, slice: Src<[T]>) -> Src<Self::Output>

Source§

impl<T> SrcIndex<[T]> for RangeInclusive<usize>

Source§

type Output = [T]

Source§

fn get(self, slice: Src<[T]>) -> Src<Self::Output>

Source§

impl<T> SrcIndex<[T]> for RangeTo<usize>

Source§

type Output = [T]

Source§

fn get(self, slice: Src<[T]>) -> Src<Self::Output>

Source§

impl<T> SrcIndex<[T]> for RangeToInclusive<usize>

Source§

type Output = [T]

Source§

fn get(self, slice: Src<[T]>) -> Src<Self::Output>

Implementors§