pub struct Connect {
pub agent: Option<Agent>,
pub for_id: String,
pub constraints: ConnectionConstraints,
pub metadata: HashMap<String, Value>,
}Expand description
Connect message body (TAIP-15)
Fields§
§agent: Option<Agent>Agent details
for_id: StringDID of the party the agent represents
constraints: ConnectionConstraintsTransaction constraints for the connection
metadata: HashMap<String, Value>Additional metadata for the connection
Implementations§
Source§impl Connect
impl Connect
Sourcepub fn new(for_id: String, constraints: ConnectionConstraints) -> Self
pub fn new(for_id: String, constraints: ConnectionConstraints) -> Self
Creates a new Connect message body
Sourcepub fn with_agent(
agent: Agent,
for_id: String,
constraints: ConnectionConstraints,
) -> Self
pub fn with_agent( agent: Agent, for_id: String, constraints: ConnectionConstraints, ) -> Self
Creates a new Connect message body with agent details
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Connect
impl<'de> Deserialize<'de> for Connect
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl TapMessageBody for Connect
impl TapMessageBody for Connect
Source§fn message_type() -> &'static str
fn message_type() -> &'static str
Get the message type string for this body type.
Source§fn to_didcomm(&self, from_did: Option<&str>) -> Result<Message>
fn to_didcomm(&self, from_did: Option<&str>) -> Result<Message>
Convert this body to a DIDComm message.
Source§fn to_didcomm_with_route<'a, I>(
&self,
from: Option<&str>,
to: I,
) -> Result<Message>where
I: IntoIterator<Item = &'a str>,
fn to_didcomm_with_route<'a, I>(
&self,
from: Option<&str>,
to: I,
) -> Result<Message>where
I: IntoIterator<Item = &'a str>,
Convert this body to a DIDComm message with a sender and multiple recipients. Read more
Auto Trait Implementations§
impl Freeze for Connect
impl RefUnwindSafe for Connect
impl Send for Connect
impl Sync for Connect
impl Unpin for Connect
impl UnwindSafe for Connect
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