[][src]Struct join_lazy_fmt::DisplayableJoin

pub struct DisplayableJoin<'sep, Sep: ?Sized, Iter> where
    Sep: 'sep + Display,
    Iter: Iterator,
    Iter::Item: Display
{ /* fields omitted */ }

The return value of Join::join, which is lazily Displayable.

This means that it can be easily instanciated into a String by calling .to_string() on it, while remaining lazy by default for a performant combination with nested Join::join.

Can only be Displayed once!

This is to avoid having to memoize the iterator values from Join::join.

So, if you need to Display it multiple times, you have no other choice but to instanciate it into a String and Display that instead (i.e., no need to implement a non-zero-cost memoizing logic when memoization remains possible through conversion to a String).

Trait Implementations

impl<'sep, Sep: ?Sized, Iter> Display for DisplayableJoin<'sep, Sep, Iter> where
    Sep: 'sep + Display,
    Iter: Iterator,
    Iter::Item: Display
[src]

fn fmt(&self, stream: &mut Formatter) -> Result[src]

Note: This should only be called once.

If you need to call it multiple times, you should convert it into a String

Auto Trait Implementations

impl<'sep, Sep: ?Sized, Iter> Send for DisplayableJoin<'sep, Sep, Iter> where
    Iter: Send,
    Sep: Sync

impl<'sep, Sep, Iter> !Sync for DisplayableJoin<'sep, Sep, Iter>

Blanket Implementations

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto 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> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]