Skip to main content

AsyncTryGetFut

Trait AsyncTryGetFut 

Source
pub trait AsyncTryGetFut<'a>: 'a {
    type Input: 'a;
    type Output: 'a;
    type Aux: 'a;
    type Error: 'a;

    // Required method
    async fn async_try_get_fut<'b>(
        self,
        input: &'b mut Self::Input,
    ) -> Result<(impl 'b + 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: 'a

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

Source

type Output: 'a

The output type of the resulting future if successful.

Source

type Aux: 'a

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

Source

type Error: 'a

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

Required Methods§

Source

async fn async_try_get_fut<'b>( self, input: &'b mut Self::Input, ) -> Result<(impl 'b + 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".

Implementors§