Struct flo_stream::Publisher [−][src]
pub struct Publisher<Message> { /* fields omitted */ }
Expand description
A publisher represents a sink that sends messages to zero or more subscribers
Call subscribe()
to create subscribers. Any messages sent to this sink will be relayed to all connected
subscribers. If the publisher is dropped, any connected subscribers will relay all sent messages and then
indicate that they have finished.
Implementations
Creates a new publisher with a particular buffer size
Counts the number of subscribers in this publisher
Creates a duplicate publisher that can be used to publish to the same streams as this object
Creates a duplicate publisher that can be used to publish to the same streams as this object
This creates a ‘weak’ publisher, which will stop republishing once all of the ‘strong’ publishers have been dropped.
Trait Implementations
Subscribes to this publisher
Subscribers only receive messages sent to the publisher after they are created.
Reserves a space for a message with the subscribers, returning when it’s ready
Waits until all subscribers have consumed all pending messages
Returns true if this publisher is closed (will not publish any further messages to its subscribers)
Future that returns when this publisher is closed