Struct flo_stream::WeakPublisher[][src]

pub struct WeakPublisher<Message> { /* fields omitted */ }

A weak publisher is a publisher that

Implementations

impl<Message: Clone> WeakPublisher<Message>[src]

pub fn count_subscribers(&self) -> usize[src]

Counts the number of subscribers in this publisher

pub fn republish(&self) -> Self[src]

Creates a duplicate publisher that can be used to publish to the same streams as this object

Trait Implementations

impl<Message: 'static + Send + Clone> MessagePublisher for WeakPublisher<Message>[src]

type Message = Message

fn subscribe(&mut self) -> Subscriber<Message>[src]

Subscribes to this publisher

Subscribers only receive messages sent to the publisher after they are created.

fn when_ready(&mut self) -> BoxFuture<'static, MessageSender<Message>>[src]

Reserves a space for a message with the subscribers, returning when it's ready

fn when_empty(&mut self) -> BoxFuture<'static, ()>[src]

Waits until all subscribers have consumed all pending messages

fn is_closed(&self) -> bool[src]

Returns true if this publisher is closed (will not publish any further messages to its subscribers)

fn when_closed(&self) -> BoxFuture<'static, ()>[src]

Future that returns when this publisher is closed

Auto Trait Implementations

impl<Message> RefUnwindSafe for WeakPublisher<Message>[src]

impl<Message> Send for WeakPublisher<Message> where
    Message: Send
[src]

impl<Message> Sync for WeakPublisher<Message> where
    Message: Send
[src]

impl<Message> Unpin for WeakPublisher<Message>[src]

impl<Message> UnwindSafe for WeakPublisher<Message>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.