pub trait RunnableEventType<Msg, MsgResult, EventResult> {
// Required method
fn process<'life0, 'async_trait, F, Fut, Context>(
&'life0 self,
message_handler: F,
ctx: Arc<Context>,
) -> Pin<Box<dyn Future<Output = Result<EventResult>> + 'async_trait>>
where F: Fn(Msg, Arc<Context>) -> Fut + 'async_trait,
Fut: Future<Output = Result<MsgResult>> + 'async_trait,
Msg: DeserializeOwned,
Context: 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A trait that allows a type to be used as the EventType trait of a LambdaContext.
Required Methods§
fn process<'life0, 'async_trait, F, Fut, Context>(
&'life0 self,
message_handler: F,
ctx: Arc<Context>,
) -> Pin<Box<dyn Future<Output = Result<EventResult>> + 'async_trait>>where
F: Fn(Msg, Arc<Context>) -> Fut + 'async_trait,
Fut: Future<Output = Result<MsgResult>> + 'async_trait,
Msg: DeserializeOwned,
Context: 'async_trait,
Self: 'async_trait,
'life0: '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.