Skip to main content

ObservableResource

Trait ObservableResource 

Source
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§

Source

type Status: PartialEq + Copy + 'static

Required Methods§

Source

fn observable_status(&self) -> Self::Status

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T: 'static, E: 'static> ObservableResource for InfiniteQueryResource<T, E>

Source§

impl<T: 'static, E: 'static> ObservableResource for QueryResource<T, E>

Source§

impl<V: 'static, T: 'static, E: 'static> ObservableResource for MutationResource<V, T, E>