AsyncOnce

Struct AsyncOnce 

Source
pub struct AsyncOnce<Value, NextAccepts> { /* private fields */ }
Expand description

AsyncAccepts<T> implementation that forwards only once.

Implementations§

Source§

impl<Value, NextAccepts> AsyncOnce<Value, NextAccepts>
where NextAccepts: AsyncAccepts<Value>,

Source

pub fn new(next_acceptor: NextAccepts) -> Self

Creates a new AsyncOnce.

Trait Implementations§

Source§

impl<Value, NextAccepts> AsyncAccepts<Value> for AsyncOnce<Value, NextAccepts>
where NextAccepts: AsyncAccepts<Value>,

Source§

fn accept_async<'a>(&'a self, value: Value) -> impl Future<Output = ()> + 'a
where Value: 'a,

Source§

impl<Value: Debug, NextAccepts: Debug> Debug for AsyncOnce<Value, NextAccepts>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Value, NextAccepts> !Freeze for AsyncOnce<Value, NextAccepts>

§

impl<Value, NextAccepts> RefUnwindSafe for AsyncOnce<Value, NextAccepts>
where NextAccepts: RefUnwindSafe, Value: RefUnwindSafe,

§

impl<Value, NextAccepts> Send for AsyncOnce<Value, NextAccepts>
where NextAccepts: Send, Value: Send,

§

impl<Value, NextAccepts> Sync for AsyncOnce<Value, NextAccepts>
where NextAccepts: Sync, Value: Sync,

§

impl<Value, NextAccepts> Unpin for AsyncOnce<Value, NextAccepts>
where NextAccepts: Unpin, Value: Unpin,

§

impl<Value, NextAccepts> UnwindSafe for AsyncOnce<Value, NextAccepts>
where NextAccepts: UnwindSafe, Value: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.