pub trait Observer<H: Send + Sync + 'static = Supervisor>:
Sized
+ Send
+ 'static {
type Error: Error + Send + Sync + 'static;
const ID: &'static str;
const INTERVAL: Duration;
const DESCRIPTION: &'static str = "";
const STREAMS: &'static [Entry] = _;
const DEMAND_KEYS: &'static [DemandKey] = _;
const ACTIVATION: Activation = Activation::Plugin;
// Required methods
fn initialize(
resources: &ExecutionContext,
) -> impl Future<Output = Result<Self, Self::Error>> + Send;
fn observe(
&mut self,
ctx: &ObserverContext<'_, H>,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
// Provided methods
fn stop(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send { ... }
fn cleanup(
&mut self,
) -> impl Future<Output = Result<(), Self::Error>> + Send { ... }
}Required Associated Constants§
Provided Associated Constants§
const DESCRIPTION: &'static str = ""
const STREAMS: &'static [Entry] = _
const DEMAND_KEYS: &'static [DemandKey] = _
const ACTIVATION: Activation = Activation::Plugin
Required Associated Types§
Required Methods§
fn initialize( resources: &ExecutionContext, ) -> impl Future<Output = Result<Self, Self::Error>> + Send
fn observe( &mut self, ctx: &ObserverContext<'_, H>, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Provided Methods§
fn stop(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send
fn cleanup(&mut self) -> impl Future<Output = Result<(), Self::Error>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".