[][src]Struct conrod_core::text::line::Infos

pub struct Infos<'a, F> { /* fields omitted */ }

An iterator yielding an Info struct for each line in the given text wrapped by the given next_break_fn.

Infos is a fundamental part of performing lazy reasoning about text within conrod.

Construct an Infos iterator via the infos function and its two builder methods, wrap_by_character and wrap_by_whitespace.

Implementations

impl<'a> Infos<'a, NextBreakFnPtr>[src]

pub fn wrap_by_character(self, max_width: Scalar) -> Self[src]

Converts Self into an Infos whose lines are wrapped at the character that first causes the line width to exceed the given max_width.

pub fn wrap_by_whitespace(self, max_width: Scalar) -> Self[src]

Converts Self into an Infos whose lines are wrapped at the whitespace prior to the character that causes the line width to exceed the given max_width.

Trait Implementations

impl<'a, F> Clone for Infos<'a, F> where
    F: Clone
[src]

impl<'a, F> Iterator for Infos<'a, F> where
    F: for<'b> FnMut(&'b str, &'b Font, FontSize, Scalar) -> (Break, Scalar)
[src]

type Item = Info

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a, F> RefUnwindSafe for Infos<'a, F> where
    F: RefUnwindSafe

impl<'a, F> Send for Infos<'a, F> where
    F: Send

impl<'a, F> Sync for Infos<'a, F> where
    F: Sync

impl<'a, F> Unpin for Infos<'a, F> where
    F: Unpin

impl<'a, F> UnwindSafe for Infos<'a, F> where
    F: UnwindSafe

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.