Trait andiskaz::string::Index

source ·
pub trait Index {
    type Output;

    // Required methods
    fn get(self, tstring: &TermString) -> Option<Self::Output>;
    fn index(self, tstring: &TermString) -> Self::Output;
}
Expand description

Specifies usable indices for a TermString.

Required Associated Types§

source

type Output

Output of the indexing operation.

Required Methods§

source

fn get(self, tstring: &TermString) -> Option<Self::Output>

Tries to index the TermString and returns None if out of bounds.

source

fn index(self, tstring: &TermString) -> Self::Output

Indexes the TermString or panics if out of bounds.

Panics

Panics if out of bounds.

Implementations on Foreign Types§

source§

impl Index for RangeFull

§

type Output = TermString

source§

fn get(self, tstring: &TermString) -> Option<Self::Output>

source§

fn index(self, tstring: &TermString) -> Self::Output

source§

impl Index for RangeTo<usize>

§

type Output = TermString

source§

fn get(self, tstring: &TermString) -> Option<Self::Output>

source§

fn index(self, tstring: &TermString) -> Self::Output

source§

impl Index for RangeFrom<usize>

§

type Output = TermString

source§

fn get(self, tstring: &TermString) -> Option<Self::Output>

source§

fn index(self, tstring: &TermString) -> Self::Output

source§

impl Index for usize

§

type Output = TermGrapheme

source§

fn get(self, tstring: &TermString) -> Option<Self::Output>

source§

fn index(self, tstring: &TermString) -> Self::Output

source§

impl Index for Range<usize>

§

type Output = TermString

source§

fn get(self, tstring: &TermString) -> Option<Self::Output>

source§

fn index(self, tstring: &TermString) -> Self::Output

Implementors§