Trait HasSubscription

Source
pub trait HasSubscription: HasStreamType {
    type Subscription<Item: Async>: Async;

    // Required method
    fn subscribe<T>(
        subcription: &Self::Subscription<T>,
    ) -> impl Future<Output = Option<Self::Stream<T>>> + Send
       where T: Async;
}

Required Associated Types§

Required Methods§

Source

fn subscribe<T>( subcription: &Self::Subscription<T>, ) -> impl Future<Output = Option<Self::Stream<T>>> + Send
where T: Async,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Runtime> HasSubscription for Runtime
where Runtime: HasStreamType + HasComponents, Runtime::Components: ProvideSubscription<Runtime>,

Source§

type Subscription<Item: Async> = <<Runtime as HasComponents>::Components as ProvideSubscription<Runtime>>::Subscription<Item>