pub trait ObservableResource {
type Status: PartialEq + Copy + 'static;
// Required method
fn observable_status(&self) -> Self::Status;
}Available on crate feature
client only.Expand description
Bridges a resource type to its status for the generic Observer.
Each resource exposes its status via an inherent status() method, which
cannot be called generically without a trait; this trait (pub(crate), not
part of the public API) surfaces it with an associated Status type so
Observer<R> can dedup notifications for any resource kind.
Required Associated Types§
Required Methods§
fn observable_status(&self) -> Self::Status
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".