pub struct Listener<R: Clone = (), A = ()> {
    pub(crate) b_receiver: Receiver<R>,
    pub(crate) mpsc_sender: UnboundedSender<A>,
    pub(crate) shutdown_reason: Option<ShutdownReason<R>>,
}
Expand description

Generics

See Broadcaster for documentation on the generic args.

Fields

b_receiver: Receiver<R>mpsc_sender: UnboundedSender<A>shutdown_reason: Option<ShutdownReason<R>>

Implementations

Doesn’t return until a shutdown occurs.

Returns None if no shutdown has occurred, otherwise returns the shutdown reason.

Get the underlying shutdown reason, if present. Does not send any shut

Block until an acknowledgement of the shutdown is sent. It is possible for the Broadcaster to have already closed.

Returns

Returns the original shutdown reason, if any.

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.