[−][src]Struct language_reporting::Join
Equivalent to Each()
, but inserts a joiner between two adjacent elements.
Example
struct Point(i32, i32); let items = vec![Point(10, 20), Point(5, 10), Point(6, 42)]; let document = Document::with(Join( (&items, ", "), |item, doc| doc.add("Point(").add(item.0).add(",").add(item.1).add(")") )); assert_eq!(document.to_string()?, "Point(10,20), Point(5,10), Point(6,42)");
Fields
iterator: Iterator
joiner: &'static str
Trait Implementations
impl<U, I> From<(I, &'static str)> for Join<U, I> where
I: IntoIterator<Item = U>,
[src]
I: IntoIterator<Item = U>,
impl<'item, U, Iterator> IterBlockComponent for Join<U, Iterator> where
Iterator: IntoIterator<Item = U>,
[src]
Iterator: IntoIterator<Item = U>,
Auto Trait Implementations
impl<U, Iterator> Send for Join<U, Iterator> where
Iterator: Send,
Iterator: Send,
impl<U, Iterator> Sync for Join<U, Iterator> where
Iterator: Sync,
Iterator: Sync,
impl<U, Iterator> Unpin for Join<U, Iterator> where
Iterator: Unpin,
Iterator: Unpin,
impl<U, Iterator> UnwindSafe for Join<U, Iterator> where
Iterator: UnwindSafe,
Iterator: UnwindSafe,
impl<U, Iterator> RefUnwindSafe for Join<U, Iterator> where
Iterator: RefUnwindSafe,
Iterator: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,