Struct encode_unicode::iterator::Utf16CharIndices[][src]

pub struct Utf16CharIndices<'a> { /* fields omitted */ }

An iterator over the codepoints in a str represented as Utf16Char.

Implementations

impl<'a> Utf16CharIndices<'a>[src]

pub fn as_str(&self) -> &'a str[src]

Extract the remainder of the source str.

Examples

use encode_unicode::{StrExt, Utf16Char};
let mut iter = "abc".utf16char_indices();
assert_eq!(iter.next_back(), Some((2, Utf16Char::from('c'))));
assert_eq!(iter.next(), Some((0, Utf16Char::from('a'))));
assert_eq!(iter.as_str(), "b");

Trait Implementations

impl<'a> Clone for Utf16CharIndices<'a>[src]

impl<'a> Debug for Utf16CharIndices<'a>[src]

impl<'a> DoubleEndedIterator for Utf16CharIndices<'a>[src]

impl<'a> From<&'a str> for Utf16CharIndices<'a>[src]

impl<'a> Iterator for Utf16CharIndices<'a>[src]

type Item = (usize, Utf16Char)

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Utf16CharIndices<'a>

impl<'a> Send for Utf16CharIndices<'a>

impl<'a> Sync for Utf16CharIndices<'a>

impl<'a> Unpin for Utf16CharIndices<'a>

impl<'a> UnwindSafe for Utf16CharIndices<'a>

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<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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.