[][src]Struct governor::RatelimitedSink

pub struct RatelimitedSink<'a, Item, S: Sink<Item>, D: DirectStateStore, C: ReasonablyRealtime> { /* fields omitted */ }

A [Sink][futures::Sink] combinator that only allows sending elements when the rate-limiter allows it.

Implementations

impl<'a, Item, S: Sink<Item>, D: DirectStateStore, C: ReasonablyRealtime> RatelimitedSink<'a, Item, S, D, C>[src]

Conversion methods for the sink combinator.

pub fn get_ref(&self) -> &S[src]

Acquires a reference to the underlying sink that this combinator is sending into.

pub fn get_mut(&mut self) -> &mut S[src]

Acquires a mutable reference to the underlying sink that this combinator is sending into.

pub fn into_inner(self) -> S[src]

Consumes this combinator, returning the underlying sink.

Trait Implementations

impl<'a, Item, S: Sink<Item>, D: DirectStateStore, C: ReasonablyRealtime> Sink<Item> for RatelimitedSink<'a, Item, S, D, C> where
    S: Unpin,
    Item: Unpin
[src]

type Error = S::Error

The type of value produced by the sink when an error occurs.

impl<'a, Item, S: Stream + Sink<Item>, D: DirectStateStore, C: ReasonablyRealtime> Stream for RatelimitedSink<'a, Item, S, D, C> where
    S::Item: Unpin,
    S: Unpin,
    Item: Unpin
[src]

Pass-through implementation for [futures::Stream] if the Sink also implements it.

type Item = <S as Stream>::Item

Values yielded by the stream.

Auto Trait Implementations

impl<'a, Item, S, D, C> !RefUnwindSafe for RatelimitedSink<'a, Item, S, D, C>[src]

impl<'a, Item, S, D, C> Send for RatelimitedSink<'a, Item, S, D, C> where
    C: Sync,
    D: Sync,
    Item: Send,
    S: Send
[src]

impl<'a, Item, S, D, C> Sync for RatelimitedSink<'a, Item, S, D, C> where
    C: Sync,
    D: Sync,
    Item: Sync,
    S: Sync
[src]

impl<'a, Item, S, D, C> Unpin for RatelimitedSink<'a, Item, S, D, C> where
    Item: Unpin,
    S: Unpin
[src]

impl<'a, Item, S, D, C> !UnwindSafe for RatelimitedSink<'a, Item, S, D, C>[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, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized

impl<T> StreamExt for T where
    T: Stream + ?Sized

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.

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<S> TryStreamExt for S where
    S: TryStream + ?Sized

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,