Skip to main content

ObserverPublisher

Trait ObserverPublisher 

Source
pub trait ObserverPublisher<V: Send>:
    Send
    + Sync
    + Sized {
    type Error: Error + From<PublicationError> + Send + Sync + 'static;

    const STREAM: Option<Entry> = None;

    // Required method
    fn publish(
        &self,
        context: &ObserverContext<'_, Self>,
        value: V,
    ) -> impl Future<Output = Result<(), Self::Error>> + Send;
}

Provided Associated Constants§

Source

const STREAM: Option<Entry> = None

Required Associated Types§

Required Methods§

Source

fn publish( &self, context: &ObserverContext<'_, Self>, value: V, ) -> 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".

Implementors§