Skip to main content

MessageAgentHandler

Trait MessageAgentHandler 

Source
pub trait MessageAgentHandler: Send + Sync {
    // Required method
    fn dispatch<'life0, 'async_trait>(
        &'life0 self,
        request: MessageAgentRequest,
    ) -> Pin<Box<dyn Future<Output = Result<MessageAgentAck, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn cancel<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _source_session_id: &'life1 str,
        _delivery_id: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

Host delivery door. Implementations enqueue the message and return at once.

Required Methods§

Source

fn dispatch<'life0, 'async_trait>( &'life0 self, request: MessageAgentRequest, ) -> Pin<Box<dyn Future<Output = Result<MessageAgentAck, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn cancel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _source_session_id: &'life1 str, _delivery_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Optional cancellation door. Default = unsupported (the tool reports the handler’s refusal; it never pretends the request was withdrawn).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§