pub struct ForEach<V> { /* private fields */ }
Expand description
A group of views that is dynamically computed from a given collection.
Implementations§
Source§impl<V> ForEach<V>where
V: View,
impl<V> ForEach<V>where
V: View,
Sourcepub fn new<I: HasId>(
collection: impl IntoIterator<Item = I>,
view_func: impl Fn(I) -> V,
) -> Self
pub fn new<I: HasId>( collection: impl IntoIterator<Item = I>, view_func: impl Fn(I) -> V, ) -> Self
Creates new views from the given collection.
Sourcepub fn with_index<I: HasId>(
collection: impl IntoIterator<Item = I>,
view_func: impl Fn(usize, I) -> V,
) -> Self
pub fn with_index<I: HasId>( collection: impl IntoIterator<Item = I>, view_func: impl Fn(usize, I) -> V, ) -> Self
Creates new views from the given collection, additionally taking the index.
Sourcepub fn with_index_id<I>(
collection: impl IntoIterator<Item = I>,
view_func: impl Fn(usize, I) -> V,
) -> Self
pub fn with_index_id<I>( collection: impl IntoIterator<Item = I>, view_func: impl Fn(usize, I) -> V, ) -> Self
Creates new views from the given collection, identified by their index.
Trait Implementations§
impl<V: Eq> Eq for ForEach<V>
impl<V> StructuralPartialEq for ForEach<V>
Auto Trait Implementations§
impl<V> Freeze for ForEach<V>
impl<V> RefUnwindSafe for ForEach<V>where
V: RefUnwindSafe,
impl<V> Send for ForEach<V>where
V: Send,
impl<V> Sync for ForEach<V>where
V: Sync,
impl<V> Unpin for ForEach<V>where
V: Unpin,
impl<V> UnwindSafe for ForEach<V>where
V: 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