pub trait ControlApplier<T>:
Send
+ Sync
+ 'static{
// Required method
fn apply(
&self,
value: T,
) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + '_>>;
}Expand description
Async callback registered on a Control. Each call attempts
to apply a new value and returns Ok(()) once the new value
is in effect for this subscriber, or Err(msg) if the apply
could not be completed.
Implementors should keep their own state consistent with either the old or the new value; partial / corrupted apply states are outside the protocol.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".