Skip to main content

TransformAttemptCreator

Trait TransformAttemptCreator 

Source
pub trait TransformAttemptCreator: Send {
    type Input: Send;
    type Output: Send;
    type TransformRequest: TransformRequest<Input = Self::Input, Output = Self::Output>;
    type TransformAttempt: TransformAttempt<CallArgsType = Self::Input, ReturnType = Self::Output>;
    type TransformAttemptCreationError: Error + Send + Sync;

    // Required methods
    fn new<'async_trait>(
        config: Arc<Mutex<impl 'async_trait + Config>>,
    ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
       where Self: Sized + 'async_trait;
    fn create_new_attempt<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        request: &'life1 Self::TransformRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Self::TransformAttempt, Self::TransformAttemptCreationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn create_new_reattempt<'life0, 'async_trait>(
        &'life0 mut self,
        request: <Self::TransformAttempt as TransformAttempt>::Identifier,
        error: <Self::TransformAttempt as TransformAttempt>::ReturnPackage,
    ) -> Pin<Box<dyn Future<Output = Result<Self::TransformAttempt, Self::TransformAttemptCreationError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Source

type Input: Send

Source

type Output: Send

Source

type TransformRequest: TransformRequest<Input = Self::Input, Output = Self::Output>

Source

type TransformAttempt: TransformAttempt<CallArgsType = Self::Input, ReturnType = Self::Output>

Source

type TransformAttemptCreationError: Error + Send + Sync

Required Methods§

Source

fn new<'async_trait>( config: Arc<Mutex<impl 'async_trait + Config>>, ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: Sized + 'async_trait,

Source

fn create_new_attempt<'life0, 'life1, 'async_trait>( &'life0 mut self, request: &'life1 Self::TransformRequest, ) -> Pin<Box<dyn Future<Output = Result<Self::TransformAttempt, Self::TransformAttemptCreationError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Converts a TransformRequest into a TransformAttempt.

Source

fn create_new_reattempt<'life0, 'async_trait>( &'life0 mut self, request: <Self::TransformAttempt as TransformAttempt>::Identifier, error: <Self::TransformAttempt as TransformAttempt>::ReturnPackage, ) -> Pin<Box<dyn Future<Output = Result<Self::TransformAttempt, Self::TransformAttemptCreationError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Converts a TransformRequest into a TransformAttempt.

Implementors§