StringIndex

Trait StringIndex 

Source
pub trait StringIndex {
    // Required methods
    fn start(&self) -> usize;
    fn len(&self) -> Option<usize>;
}
Expand description

A usize or a range representing a slice of chars in a string.

This is similar to SliceIndex.

Required Methods§

Source

fn start(&self) -> usize

Source

fn len(&self) -> Option<usize>

Implementations on Foreign Types§

Source§

impl StringIndex for usize

Source§

fn start(&self) -> usize

Source§

fn len(&self) -> Option<usize>

Source§

impl StringIndex for Range<usize>

Source§

fn start(&self) -> usize

Source§

fn len(&self) -> Option<usize>

Source§

impl StringIndex for RangeFrom<usize>

Source§

fn start(&self) -> usize

Source§

fn len(&self) -> Option<usize>

Source§

impl StringIndex for RangeFull

Source§

fn start(&self) -> usize

Source§

fn len(&self) -> Option<usize>

Source§

impl StringIndex for RangeInclusive<usize>

Source§

fn start(&self) -> usize

Source§

fn len(&self) -> Option<usize>

Source§

impl StringIndex for RangeTo<usize>

Source§

fn start(&self) -> usize

Source§

fn len(&self) -> Option<usize>

Source§

impl StringIndex for RangeToInclusive<usize>

Source§

fn start(&self) -> usize

Source§

fn len(&self) -> Option<usize>

Implementors§