unicode_bidi

Trait TextSource

source
pub trait TextSource<'text>: Sealed {
    type CharIter: Iterator<Item = char>;
    type CharIndexIter: Iterator<Item = (usize, char)>;
    type IndexLenIter: Iterator<Item = (usize, usize)>;
}
Expand description

Trait that abstracts over a text source for use by the bidi algorithms. We implement this for str (UTF-8) and for u16 (UTF-16, native-endian). (For internal unicode-bidi use; API may be unstable.) This trait is sealed and cannot be implemented for types outside this crate.

Required Associated Types§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'text> TextSource<'text> for str

Implementation of TextSource for UTF-8 text (a string slice).

source§

impl<'text> TextSource<'text> for [u16]

Implementors§