Skip to main content

ThreadAwareFnMut

Trait ThreadAwareFnMut 

Source
pub trait ThreadAwareFnMut<T>: ThreadAware {
    // Required method
    fn call_mut(&mut self) -> T;
}
Expand description

Marks FnMut()-like closure whose captured values all implement ThreadAware.

This trait is used to define closures that can be called mutably, allowing the closure to modify its internal state.

Required Methods§

Source

fn call_mut(&mut self) -> T

Calls the closure mutably, returning the result.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, D> ThreadAwareFnMut<T> for Closure<T, D>
where D: ThreadAware,

Source§

impl<T, D> ThreadAwareFnMut<T> for ClosureMut<T, D>
where D: ThreadAware,