Skip to main content

ObserverBackend

Trait ObserverBackend 

Source
pub trait ObserverBackend:
    Send
    + Sync
    + 'static {
    type Resources: Send + Sync + 'static;

    // Required methods
    fn definition(&self) -> Result<ObserverDefinition>;
    fn run(
        &self,
        resources: Arc<Self::Resources>,
        activation: ObserverActivation,
    ) -> impl Future<Output = Result<()>> + Send;
}

Required Associated Types§

Source

type Resources: Send + Sync + 'static

Required Methods§

Source

fn definition(&self) -> Result<ObserverDefinition>

Source

fn run( &self, resources: Arc<Self::Resources>, activation: ObserverActivation, ) -> impl Future<Output = Result<()>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§