Trait TapAgentExt

Source
pub trait TapAgentExt {
    // Required method
    fn send_serialized_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 PlainMessage,
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

This trait extends the TapAgent 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, 'async_trait>( &'life0 self, message: &'life1 PlainMessage, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Pack and serialize a DIDComm message for transmission

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

  1. Uses the agent’s PlainMessagePacker to properly sign and encrypt the message
  2. 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 TapAgentExt for TapAgent

Source§

fn send_serialized_message<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 PlainMessage, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§