Struct flo_stream::Publisher

source ·
pub struct Publisher<Message> { /* private fields */ }
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

Trait Implementations§

Executes the destructor for this type. Read more

Subscribes to this publisher

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

The type of value that the sink accepts.
The type of value produced by the sink when an error occurs.
Begin the process of sending a value to the sink. Read more
Flush all output from this sink, if necessary. Read more
A method to indicate that no more values will ever be pushed into this sink. Read more
Creates a new object which will produce a synchronous sink. Read more
Composes a function in front of the sink. Read more
Composes a function in front of the sink. Read more
Transforms the error returned by the sink.
Map this sink’s error to any error implementing From for this sink’s Error, returning a new sink. Read more
Adds a fixed-size buffer to the current sink. Read more
A future that completes when the sink has finished processing all pending requests. Read more
A future that completes after the given item has been fully processed into the sink, including flushing. Read more
A future that completes after the given stream has been fully processed into the sink, including flushing. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.