referrerpolicy=no-referrer-when-downgrade

Crate metered

Expand description

Metered variant of mpsc channels to be able to extract metrics.

Modules§

oneshot
Metered variant of oneshot channels to be able to extract delays caused by delayed responses.

Structs§

CoarseDuration
A duration type to represent an approximate span of time
Meter
A peek into the inner state of a meter.
MeteredReceiver
A receiver tracking the messages consumed by itself.
MeteredSender
The sender component, tracking the number of items sent across it.
Readout
A readout of sizes from the meter. Note that it is possible, due to asynchrony, for received to be slightly higher than sent.
RecvError
Error when receiving from a closed bounded channel
UnboundedMeteredReceiver
A receiver tracking the messages consumed by itself.
UnboundedMeteredSender
The sender component, tracking the number of items sent across it.

Enums§

MaybeTimeOfFlight
Measure the time of flight between insertion and removal of a single type T
SendError
A bounded channel error
TrySendError
A bounded channel error when trying to send a message (transparently wraps the inner error type)

Functions§

channel
Create a pair of MeteredSender and MeteredReceiver. No priorities are provided
channel_with_priority
Create a pair of MeteredSender and MeteredReceiver. Priority channel is provided
prepare_with_tof
unbounded
Create a wrapped mpsc::channel pair of MeteredSender and MeteredReceiver.