TryGetFut

Trait TryGetFut 

Source
pub trait TryGetFut {
    type Input;
    type Output;
    type Aux;
    type Error;

    // Required method
    fn try_get_fut<'a>(
        self,
        input: &'a mut Self::Input,
    ) -> Result<(impl 'a + Future<Output = Self::Output>, Self::Aux), Self::Error>;
}
Expand description

A functor trait for trying to get a complex future from an input.

Required Associated Types§

Source

type Input

The input type of the functor. Will be returned to the caller if unsuccessful.

Source

type Output

The output type of the resulting future if successful.

Source

type Aux

Auxiliary data that should be returned to the caller if successful.

Source

type Error

Error data that should be returned to the caller if unsuccessful.

Required Methods§

Source

fn try_get_fut<'a>( self, input: &'a mut Self::Input, ) -> Result<(impl 'a + Future<Output = Self::Output>, Self::Aux), Self::Error>

The functor applicator.

Takes a mutable reference some input and returns either a future and some auxiliary data or an error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§