[][src]Struct lazy_queue::bounded::LazyQueue

pub struct LazyQueue<Item> { /* fields omitted */ }

A clonable thread safe sink-like queue.

Methods

impl<Item> LazyQueue<Item>[src]

pub fn new<F, I>(
    processor: F,
    queue_len: usize
) -> (Self, QueueProcessor<Item, F, I>) where
    F: FnMut(Item) -> I,
    I: Future
[src]

Creates a new lazy queue using given processor.

impl<Item: Debug> LazyQueue<Item>[src]

pub async fn send<'_>(&'_ mut self, item: Item) -> Result<(), SendError<Item>>[src]

Sends a value, waiting until there is capacity.

See tokio::sync::mpsc::Sender::send for more details.

Trait Implementations

impl<Item> Clone for LazyQueue<Item>[src]

Auto Trait Implementations

impl<Item> !RefUnwindSafe for LazyQueue<Item>

impl<Item> Send for LazyQueue<Item> where
    Item: Send

impl<Item> Sync for LazyQueue<Item> where
    Item: Send

impl<Item> Unpin for LazyQueue<Item>

impl<Item> !UnwindSafe for LazyQueue<Item>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.