Trait Concurrent

Source
pub trait Concurrent {
    type Context;
    type Input;
    type Output;

    // Required methods
    fn map<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        ctx: &'life1 mut Self::Context,
    ) -> Pin<Box<dyn Future<Output = Option<Self::Input>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn task<'async_trait>(
        input: Self::Input,
    ) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>
       where Self: 'async_trait;
    fn reduce<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        output: Self::Output,
        ctx: &'life1 mut Self::Context,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided methods
    fn initialize<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        _ctx: &'life1 mut Self::Context,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn finalize<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        _ctx: &'life1 mut Self::Context,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
}

Required Associated Types§

Required Methods§

Source

fn map<'life0, 'life1, 'async_trait>( &'life0 mut self, ctx: &'life1 mut Self::Context, ) -> Pin<Box<dyn Future<Output = Option<Self::Input>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn task<'async_trait>( input: Self::Input, ) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>
where Self: 'async_trait,

Source

fn reduce<'life0, 'life1, 'async_trait>( &'life0 mut self, output: Self::Output, ctx: &'life1 mut Self::Context, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Provided Methods§

Source

fn initialize<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut Self::Context, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn finalize<'life0, 'life1, 'async_trait>( &'life0 mut self, _ctx: &'life1 mut Self::Context, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

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§