pub trait UseContext {
type Message;
// Required method
fn use_context<T, F>(&self, f: F) -> ContextValue<T>
where T: 'static + Clone + PartialEq,
F: Fn(T) -> Self::Message + 'static;
}
Expand description
Functional component for using the context.
Required Associated Types§
Required Methods§
fn use_context<T, F>(&self, f: F) -> ContextValue<T>
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.