pub struct Sender<T> { /* private fields */ }
Expand description

A broadcast sender that can be used with the postage::Sink trait. Can be cloned.

The sender task is suspended when the internal buffer is filled.

Note: no implementation of the futures::Sink trait is provided for the broadcast Sender.

Implementations

Subscribes to the channel, creating a new receiver. The receiver will observe all messages sent after the call to subscribe.

Messages currently in the buffer are not received.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Attempts to accept the message, without blocking. Read more

Attempts to send a message into the sink. Read more

Attempts to send a message over the sink, without blocking. Read more

Chains two sink implementations. Messages will be transmitted to the argument until it rejects a message. Then messages will be transmitted to self. Read more

Filters messages, forwarding them to the sink if the filter returns true

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.