Module metered_channel

Source

Structs§

Permit
A newtype for an mpsc::Permit which allows us to inject gauge accounting in the case the permit is dropped w/o sending
Receiver
An [mpsc::Receiver] with an [IntGauge] counting the number of currently queued items.
ReceiverStream
A wrapper around crate::metered_channel::Receiver that implements [Stream].
Sender
An [mpsc::Sender] with an [IntGauge] counting the number of currently queued items.
WeakSender
An [mpsc::WeakSender] with an [IntGauge] counting the number of currently queued items.

Traits§

WithPermit
Defines an asynchronous method with_permit for working with a permit to send a message.

Functions§

channel
Similar to mpsc::channel, channel creates a pair of Sender and Receiver Deprecated: use monitored_mpsc::channel instead.