Trait DefaultAgentExt

Source
pub trait DefaultAgentExt {
    // Required method
    fn send_serialized_message<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        message: &'life1 Message,
        to_did: &'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

This trait extends the DefaultAgent with methods for serializing and packing DIDComm messages for transmission. It provides functionality for converting in-memory message objects to secure, serialized formats that follow the DIDComm messaging protocol standards.

Required Methods§

Source

fn send_serialized_message<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, message: &'life1 Message, to_did: &'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,

Pack and serialize a DIDComm message for transmission

This method takes a DIDComm message and recipient DID, then:

  1. Adds appropriate security headers and metadata
  2. Applies security measures (signatures in the current implementation)
  3. Serializes the message to a string format
§Parameters
  • message - The DIDComm message to serialize
  • to_did - The DID of the recipient
§Returns

The packed message as a string, ready for transmission

Implementations on Foreign Types§

Source§

impl DefaultAgentExt for DefaultAgent

Source§

fn send_serialized_message<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, message: &'life1 Message, to_did: &'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,

Implementors§