Struct AsyncOnceWith

Source
pub struct AsyncOnceWith<T> { /* private fields */ }

Implementations§

Source§

impl<A, T> AsyncOnceWith<T>
where T: FnOnce() -> A,

Source

pub fn new(f: T) -> AsyncOnceWith<T>

Trait Implementations§

Source§

impl<A, T> AsyncIterator for AsyncOnceWith<T>
where T: FnOnce() -> A,

Source§

type Item = A

Source§

async fn next(&mut self) -> Option<Self::Item>

Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
Source§

fn awaited(self) -> Awaited<Self>
where Self: Sized, Self::Item: Future,

Source§

fn map<F, B>(self, f: F) -> Map<Self, F>
where F: FnMut(Self::Item) -> B, Self: Sized,

Source§

fn amap<F, B, O>(self, f: F) -> AsyncMap<Self, F>
where F: FnMut(Self::Item) -> O, O: Future<Output = B>, Self: Sized,

Source§

fn enumerate(self) -> Enumerate<Self>
where Self: Sized,

Source§

fn peekable(self) -> Peekable<Self>
where Self: Sized,

Source§

fn filter<P>(self, predicate: P) -> Filter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Source§

fn afilter<P, F>(self, predicate: P) -> AsyncFilter<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> F, F: Future<Output = bool>,

Note: Read more
Source§

fn filter_map<F, B>(self, operation: F) -> FilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Source§

fn afilter_map<F, B, O>(self, operation: F) -> AsyncFilterMap<Self, F>
where Self: Sized, F: FnMut(Self::Item) -> O, O: Future<Output = Option<B>>,

Source§

fn copied<'a, T>(self) -> Copied<Self>
where T: 'a + Copy, Self: Sized + AsyncIterator<Item = &'a T>,

Source§

fn cloned<'a, T>(self) -> Cloned<Self>
where T: 'a + Clone, Self: Sized + AsyncIterator<Item = &'a T>,

Source§

fn inspect<P>(self, op: P) -> Inspect<Self, P>
where Self: Sized, P: FnMut(&Self::Item),

Source§

fn fuse(self) -> Fuse<Self>
where Self: Sized,

Source§

fn flatten(self) -> Flatten<Self, Self::Item>
where Self: Sized, Self::Item: IntoAsyncIterator,

Source§

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
where Self: Sized, U: IntoAsyncIterator, F: FnMut(Self::Item) -> U,

Source§

fn aflat_map<U, F, B>(self, f: F) -> AsyncFlatMap<Self, U, F, B>
where Self: Sized, U: IntoAsyncIterator, F: FnMut(Self::Item) -> B, B: Future<Output = U>,

Source§

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoAsyncIterator>::AsyncIter>
where Self: Sized, U: IntoAsyncIterator,

Source§

fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
where Self: Sized, Self::Item: Clone,

Source§

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
where Self: Sized, G: FnMut() -> Self::Item,

Source§

fn aintersperse_with<G, F>(self, separator: G) -> AsyncIntersperseWith<Self, G>
where Self: Sized, G: FnMut() -> F, F: Future<Output = Self::Item>,

Source§

fn take(self, n: usize) -> Take<Self>
where Self: Sized,

Source§

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Source§

fn atake_while<P, F>(self, predicate: P) -> AsyncTakeWhile<Self, P>
where Self: Sized, P: FnMut(&Self::Item) -> F, F: Future<Output = bool>,

Note: Read more
Source§

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,

Source§

fn ascan<St, B, F, O>(self, initial_state: St, f: F) -> AsyncScan<Self, St, F>
where Self: Sized, F: FnMut(&mut St, Self::Item) -> O, O: Future<Output = Option<B>>,

Note: Read more
Source§

fn find<P>(&mut self, predicate: P) -> impl Future<Output = Option<Self::Item>>
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Source§

fn afind<P, F>( &mut self, predicate: P, ) -> impl Future<Output = Option<Self::Item>>
where Self: Sized, P: FnMut(&Self::Item) -> F, F: Future<Output = bool>,

Source§

fn find_map<P, B>(&mut self, operation: P) -> impl Future<Output = Option<B>>
where Self: Sized, P: FnMut(Self::Item) -> Option<B>,

Source§

fn afind_map<P, F, B>( &mut self, operation: P, ) -> impl Future<Output = Option<B>>
where Self: Sized, P: FnMut(Self::Item) -> F, F: Future<Output = Option<B>>,

Source§

fn collect<B>(self) -> impl Future<Output = B>
where B: FromAsyncIterator<Self::Item>, Self: Sized,

Source§

fn fold<B>( self, init: B, f: impl FnMut(B, Self::Item) -> B, ) -> impl Future<Output = B>
where Self: Sized,

Source§

fn afold<B, F>( self, init: B, f: impl FnMut(B, Self::Item) -> F, ) -> impl Future<Output = B>
where Self: Sized, F: Future<Output = B>,

Source§

fn for_each(self, f: impl FnMut(Self::Item)) -> impl Future<Output = ()>
where Self: Sized,

Source§

fn afor_each<F>( self, f: impl FnMut(Self::Item) -> F, ) -> impl Future<Output = ()>
where Self: Sized, F: Future<Output = ()>,

Source§

fn reduce( self, f: impl FnMut(Self::Item, Self::Item) -> Self::Item, ) -> impl Future<Output = Option<Self::Item>>
where Self: Sized,

Source§

fn areduce<F>( self, f: impl FnMut(Self::Item, Self::Item) -> F, ) -> impl Future<Output = Option<Self::Item>>
where Self: Sized, F: Future<Output = Self::Item>,

Source§

fn count(self) -> impl Future<Output = usize>
where Self: Sized,

Source§

fn all(self, f: impl FnMut(Self::Item) -> bool) -> impl Future<Output = bool>
where Self: Sized,

Source§

fn aall<F>(self, f: impl FnMut(Self::Item) -> F) -> impl Future<Output = bool>
where Self: Sized, F: Future<Output = bool>,

Source§

fn any(self, f: impl FnMut(Self::Item) -> bool) -> impl Future<Output = bool>
where Self: Sized,

Source§

fn aany<F>(self, f: impl FnMut(Self::Item) -> F) -> impl Future<Output = bool>
where Self: Sized, F: Future<Output = bool>,

Auto Trait Implementations§

§

impl<T> Freeze for AsyncOnceWith<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for AsyncOnceWith<T>
where T: RefUnwindSafe,

§

impl<T> Send for AsyncOnceWith<T>
where T: Send,

§

impl<T> Sync for AsyncOnceWith<T>
where T: Sync,

§

impl<T> Unpin for AsyncOnceWith<T>
where T: Unpin,

§

impl<T> UnwindSafe for AsyncOnceWith<T>
where T: 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.