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§
Sourcefn 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 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.
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.