pub struct RenderIteratorDelimited<I, S>(pub I, pub S)
where
I: IntoIterator,
I::Item: Render,
S: AsRef<str>;Expand description
Wraps an Iterator, making it implement Render, with a delimiter between items.
All items yielded by the iterator must implement Render, which will be rendered
sequentially, in the order they are yielded, with a string delimiter in-between. The delimiter
is not escaped.
This renderer is lazy; the iterator wrapped by this type will only be iterated when
render is called on the value, not when the value is constructed.
Consider using the iter! macro instead of constructing this type manually.
Tuple Fields§
§0: IThe iterator from which items are rendered.
1: SThe delimiter to render between the items.
Trait Implementations§
Auto Trait Implementations§
impl<I, S> Freeze for RenderIteratorDelimited<I, S>
impl<I, S> RefUnwindSafe for RenderIteratorDelimited<I, S>where
I: RefUnwindSafe,
S: RefUnwindSafe,
impl<I, S> Send for RenderIteratorDelimited<I, S>
impl<I, S> Sync for RenderIteratorDelimited<I, S>
impl<I, S> Unpin for RenderIteratorDelimited<I, S>
impl<I, S> UnwindSafe for RenderIteratorDelimited<I, S>where
I: UnwindSafe,
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more