pub trait Then<'a, A, B, C, F, R> {
// Required method
fn then(self, f: F) -> R;
}
Expand description
trait Then allows you to compose functions. Type param A represents the function arg of Self
Type param B represents the return type of Self
Type B also acts as the input arg of function f
Type C represents the return type of function f
Required Methods§
Implementors§
impl<'a, T1: 'a + Send, T2: 'a + Send, T3: 'a, E1: Send + 'a, E2> Then<'a, T1, T2, T3, Box<dyn FnOnce(T2) -> Result<T3, E2> + Sync + Send + 'a>, Box<dyn FnOnce(T1) -> Result<T3, E2> + Sync + Send + 'a>> for BoxedFn1<'a, T1, T2, E1>
Then implementation for composing sync function (BoxedFn1) with another sync function(BoxedFn1)
impl<'a, T1: 'a + Send, T2: 'a + Send, T3: 'a, E1: Send + 'a, E2> Then<'a, T1, T2, T3, Box<dyn FnOnce(T2) -> Result<T3, E2> + Sync + Send + 'a>, Box<dyn FnOnce(T1) -> Pin<Box<dyn Future<Output = Result<T3, E2>> + Send + 'a>> + Sync + Send + 'a>> for BoxedAsyncFn1<'a, T1, T2, E1>
Then implementation for composing async function(BoxedAsyncFn1) with another sync function(BoxedFn1)
impl<'a, T1: 'a + Send, T2: 'a + Send, T3: 'a, E1: Send + 'a, E2> Then<'a, T1, T2, T3, Box<dyn FnOnce(T2) -> Pin<Box<dyn Future<Output = Result<T3, E2>> + Send + 'a>> + Sync + Send + 'a>, Box<dyn FnOnce(T1) -> Pin<Box<dyn Future<Output = Result<T3, E2>> + Send + 'a>> + Sync + Send + 'a>> for BoxedAsyncFn1<'a, T1, T2, E1>
Then implementation for composing async function(BoxedAsyncFn1) with another async function(BoxedAsyncFn1)
impl<'a, T1: 'a + Send, T2: 'a + Send, T3: 'a, E1: Send + 'a, E2> Then<'a, T1, T2, T3, Box<dyn FnOnce(T2) -> Pin<Box<dyn Future<Output = Result<T3, E2>> + Send + 'a>> + Sync + Send + 'a>, Box<dyn FnOnce(T1) -> Pin<Box<dyn Future<Output = Result<T3, E2>> + Send + 'a>> + Sync + Send + 'a>> for BoxedFn1<'a, T1, T2, E1>
Then implementation for composing sync function(BoxedFn1) with another async function(BoxedAsyncFn1)