Skip to main content

ChoreoHandlerExt

Trait ChoreoHandlerExt 

Source
pub trait ChoreoHandlerExt: ChoreoHandler {
    // Required methods
    fn setup<'life0, 'async_trait>(
        &'life0 mut self,
        role: Self::Role,
    ) -> Pin<Box<dyn Future<Output = ChoreoResult<Self::Endpoint>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn teardown<'life0, 'async_trait>(
        &'life0 mut self,
        ep: Self::Endpoint,
    ) -> Pin<Box<dyn Future<Output = ChoreoResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Extension trait for handler lifecycle management

Provides setup and teardown methods for managing handler state and connections.

Required Methods§

Source

fn setup<'life0, 'async_trait>( &'life0 mut self, role: Self::Role, ) -> Pin<Box<dyn Future<Output = ChoreoResult<Self::Endpoint>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Setup phase - establish connections, initialize state

Called before protocol execution begins.

Source

fn teardown<'life0, 'async_trait>( &'life0 mut self, ep: Self::Endpoint, ) -> Pin<Box<dyn Future<Output = ChoreoResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Teardown phase - close connections, cleanup

Called after protocol execution completes.

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§