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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.