pub trait Notify<Value>: Send + Sync {
// Required method
fn notify(&self, value: Value);
}Expand description
A synchronous destination for a notification value.
Called in ordinary thread context, never directly in a raw signal handler. Implementations should return promptly: enqueue work or wake a future rather than waiting for it to finish. Waiting remains specific to the destination.
Channel implementations enqueue without waiting for capacity. A closed receiver discards the value. Bounded senders have no default implementation: an application must choose its own overflow policy in a wrapper.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".