[][src]Struct azul_text_layout::text_layout::ClusterIterator

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

Iterator over glyphs that returns information about the cluster that this glyph belongs to. Returned by the ScaledWord::cluster_iter() function.

For each glyph, returns information about what cluster this glyph belongs to. Useful for doing operations per-cluster instead of per-glyph. Note: The iterator returns once-per-glyph, not once-per-cluster, however you can merge the clusters into groups by using the ClusterInfo.cluster_idx.

Trait Implementations

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

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

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

type Item = ClusterInfo

The type of the elements being iterated over.

fn next(&mut self) -> Option<ClusterInfo>[src]

Returns an iterator over the clusters in this word.

Note: This will return one ClusterInfo per glyph, so you can't just use .cluster_iter().count() to count the glyphs: Instead, use .cluster_iter().last().cluster_idx.

Auto Trait Implementations

impl<'a> RefUnwindSafe for ClusterIterator<'a>

impl<'a> Send for ClusterIterator<'a>

impl<'a> Sync for ClusterIterator<'a>

impl<'a> Unpin for ClusterIterator<'a>

impl<'a> UnwindSafe for ClusterIterator<'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.