AndThenAsync

Trait AndThenAsync 

Source
pub trait AndThenAsync<T, U, F>
where F: FnOnce(T) -> Pin<Box<dyn Future<Output = U> + Send>> + Send,
{ type Output; // Required method fn and_then_async<'async_trait>( self, map: F, ) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>> where Self: 'async_trait; }

Required Associated Types§

Required Methods§

Source

fn and_then_async<'async_trait>( self, map: F, ) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>
where Self: 'async_trait,

Implementations on Foreign Types§

Source§

impl<'a, T, U, F> AndThenAsync<T, U, F> for Option<T>
where T: Send, U: Send, F: 'static + FnOnce(T) -> Pin<Box<dyn Future<Output = U> + Send>> + Send,

Source§

type Output = Option<U>

Source§

fn and_then_async<'async_trait>( self, map: F, ) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>
where Self: 'async_trait,

Source§

impl<'a, T, U, F> AndThenAsync<T, U, F> for Result<T>
where T: Send, U: Send, F: 'static + FnOnce(T) -> Pin<Box<dyn Future<Output = U> + Send>> + Send,

Source§

type Output = Result<U, Error>

Source§

fn and_then_async<'async_trait>( self, map: F, ) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>
where Self: 'async_trait,

Implementors§