pub trait ForEach<T> {
type Ref<'a>;
// Required methods
fn for_each<F>(&self, for_each: F) -> CallbackHandle
where F: for<'a> FnMut(Self::Ref<'a>) + Send + 'static;
fn for_each_subsequent<F>(&self, for_each: F) -> CallbackHandle
where F: for<'a> FnMut(Self::Ref<'a>) + Send + 'static;
}
Expand description
A type that can have a for_each
operation applied to it.
Required Associated Types§
Required Methods§
sourcefn for_each<F>(&self, for_each: F) -> CallbackHandle
fn for_each<F>(&self, for_each: F) -> CallbackHandle
Invokes for_each
with the current contents and each time this source’s
contents are updated.
sourcefn for_each_subsequent<F>(&self, for_each: F) -> CallbackHandle
fn for_each_subsequent<F>(&self, for_each: F) -> CallbackHandle
Attaches for_each
to this value so that it is invoked each time the
source’s contents are updated.
for_each
will not be invoked with the currently stored value.
Object Safety§
This trait is not object safe.