[][src]Struct dynstr::IndexedString

pub struct IndexedString { /* fields omitted */ }

The IndexedString provides an efficient random access over DynamicStrings it should be used when there are frequent random accesses on the same string.

Implementations

impl IndexedString[src]

pub fn new(string: DynamicString) -> Self[src]

Creates a new IndexedString from a DynamicString.

pub fn len(&self) -> usize[src]

Return length of the string.

pub fn at(&self, index: usize) -> u16[src]

Return the character at the given index.

Panics

If the index is greater than or equal to the length.

Trait Implementations

impl Clone for IndexedString[src]

impl Debug for IndexedString[src]

impl<'_> From<&'_ DynamicString> for IndexedString[src]

impl From<DynamicString> for IndexedString[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.