pub struct DefaultAgent { /* private fields */ }Expand description
Default implementation of the Agent trait
This implementation provides the standard TAP Agent functionality using DIDComm for secure message exchange.
Implementations§
Source§impl DefaultAgent
impl DefaultAgent
Sourcepub fn new(config: AgentConfig, message_packer: Arc<dyn MessagePacker>) -> Self
pub fn new(config: AgentConfig, message_packer: Arc<dyn MessagePacker>) -> Self
Trait Implementations§
Source§impl Agent for DefaultAgent
impl Agent for DefaultAgent
Source§fn get_agent_did(&self) -> &str
fn get_agent_did(&self) -> &str
Get the agent’s DID Read more
Source§fn send_message<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
message: &'life1 T,
to: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
T: 'async_trait + TapMessageBody + Serialize + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_message<'life0, 'life1, 'life2, 'async_trait, T>(
&'life0 self,
message: &'life1 T,
to: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
T: 'async_trait + TapMessageBody + Serialize + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send a TAP message to a recipient Read more
Source§fn receive_message<'life0, 'life1, 'async_trait, T>(
&'life0 self,
packed_message: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: 'async_trait + TapMessageBody + DeserializeOwned + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn receive_message<'life0, 'life1, 'async_trait, T>(
&'life0 self,
packed_message: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: 'async_trait + TapMessageBody + DeserializeOwned + Send,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Receive and unpack a TAP message Read more
Auto Trait Implementations§
impl Freeze for DefaultAgent
impl !RefUnwindSafe for DefaultAgent
impl Send for DefaultAgent
impl Sync for DefaultAgent
impl Unpin for DefaultAgent
impl !UnwindSafe for DefaultAgent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more