pub trait TransposeFuture {
type Output: Future;
// Required method
fn transpose(self) -> Self::Output;
}Required Associated Types§
Required Methods§
Implementations on Foreign Types§
Source§impl<F: IntoFuture> TransposeFuture for Option<F>
impl<F: IntoFuture> TransposeFuture for Option<F>
Source§fn transpose(self) -> Self::Output
fn transpose(self) -> Self::Output
Transpose an Option<impl Future<Output = T>> to an impl Future<Output = Option
let x: Option<i32> = Some(async {5}).transpose().await;type Output = TransposedOption<<F as IntoFuture>::IntoFuture>
Source§impl<F: IntoFuture, T: Unpin> TransposeFuture for Result<F, T>
impl<F: IntoFuture, T: Unpin> TransposeFuture for Result<F, T>
Source§fn transpose(self) -> Self::Output
fn transpose(self) -> Self::Output
Transpose an Result<impl Future<Output = T>, E> to an impl Future<Output = Result<T, E>>
let x: Result<i32, ()> = Ok(async {5}).transpose().await;