[][src]Struct governor::RatelimitedSink

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

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

Methods

impl<'a, Item, S: Sink<Item>> RatelimitedSink<'a, Item, S>[src]

Conversion methods for the sink combinator.

Important traits for &'_ mut W
pub fn get_ref(&self) -> &S[src]

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

Important traits for &'_ mut W
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>> Sink<Item> for RatelimitedSink<'a, Item, S> 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>> Stream for RatelimitedSink<'a, Item, S> 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> Send for RatelimitedSink<'a, Item, S> where
    Item: Send,
    S: Send

impl<'a, Item, S> Sync for RatelimitedSink<'a, Item, S> where
    Item: Sync,
    S: Sync

impl<'a, Item, S> Unpin for RatelimitedSink<'a, Item, S> where
    Item: Unpin,
    S: Unpin

impl<'a, Item, S> !UnwindSafe for RatelimitedSink<'a, Item, S>

impl<'a, Item, S> !RefUnwindSafe for RatelimitedSink<'a, Item, S>

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

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

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

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

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

impl<T, Item> SinkExt<Item> for T where
    T: Sink<Item> + ?Sized
[src]

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