[][src]Struct sp_utils::status_sinks::StatusSinks

pub struct StatusSinks<T> { /* fields omitted */ }

Holds a list of UnboundedSenders, each associated with a certain time period. Every time the period elapses, we push an element on the sender.

Senders are removed only when they are closed.

Implementations

impl<T> StatusSinks<T>[src]

pub fn new() -> StatusSinks<T>[src]

Builds a new empty collection.

pub fn push(&self, interval: Duration, sender: TracingUnboundedSender<T>)[src]

Adds a sender to the collection.

The interval is the time period between two pushes on the sender.

pub async fn next(&self) -> ReadySinkEvent<'_, T>[src]

Waits until one of the sinks is ready, then returns an object that can be used to send an element on said sink.

If the object isn't used to send an element, the slot is skipped.

Auto Trait Implementations

impl<T> !RefUnwindSafe for StatusSinks<T>[src]

impl<T> Send for StatusSinks<T> where
    T: Send
[src]

impl<T> Sync for StatusSinks<T> where
    T: Send
[src]

impl<T> Unpin for StatusSinks<T>[src]

impl<T> !UnwindSafe for StatusSinks<T>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.