Skip to main content

TrySubscribable

Trait TrySubscribable 

Source
pub trait TrySubscribable: OutputStream {
    // Required method
    fn try_subscribe(&self) -> Result<impl Subscription, StreamConsumerError>;
}
Expand description

Output stream backend that can reject consumer subscriptions.

Required Methods§

Source

fn try_subscribe(&self) -> Result<impl Subscription, StreamConsumerError>

Creates a new subscription for a consumer, or returns why the consumer cannot be started.

§Errors

Returns StreamConsumerError when the backend cannot start a new consumer, for example because a single-subscriber backend already has an active consumer.

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§