Struct nannou::ui::prelude::text::line::Infos[][src]

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, fn(&str, &Font<'static>, u32, f64) -> (Break, f64)>[src]

pub fn wrap_by_character(
    self,
    max_width: f64
) -> Infos<'a, fn(&str, &Font<'static>, u32, f64) -> (Break, f64)>

Notable traits for Infos<'a, F>

impl<'a, F> Iterator for Infos<'a, F> where
    F: for<'b> FnMut(&'b str, &'b Font<'static>, u32, f64) -> (Break, f64)
type Item = Info;
[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: f64
) -> Infos<'a, fn(&str, &Font<'static>, u32, f64) -> (Break, f64)>

Notable traits for Infos<'a, F>

impl<'a, F> Iterator for Infos<'a, F> where
    F: for<'b> FnMut(&'b str, &'b Font<'static>, u32, f64) -> (Break, f64)
type Item = Info;
[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<'static>, u32, f64) -> (Break, f64)
[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<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

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, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> Downcast<T> for T

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

impl<T> Instrument 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<I> IteratorRandom for I where
    I: Iterator
[src]

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SetParameter for T

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.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,