Struct laby::RenderIterator
source · pub struct RenderIterator<I>(pub I)
where
I: IntoIterator,
I::Item: Render;
Expand description
Wraps an Iterator
, making it implement Render
.
This is a workaround for Rust’s lack of impl specialization. When Rust gets specialization, this type may no longer be necessary.
All items yielded by the iterator must implement Render
, which will be rendered
sequentially, in the order they are yielded, without delimiters.
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: I
The iterator from which items are rendered.