pub struct AgentAdvertisement {
pub agent: String,
pub capabilities: Vec<DealCapability>,
pub public_key_hex: String,
pub ledger_anchor_url: String,
pub terms_template: Value,
}Fields§
§agent: String§capabilities: Vec<DealCapability>§public_key_hex: StringHex-encoded 32-byte Ed25519 public key.
ledger_anchor_url: String§terms_template: ValueImplementations§
Source§impl AgentAdvertisement
impl AgentAdvertisement
pub fn new( agent: impl Into<String>, capabilities: Vec<DealCapability>, public_key: &Ed25519PubBytes, ledger_anchor_url: impl Into<String>, ) -> Self
Sourcepub fn to_well_known(&self) -> Result<String, Error>
pub fn to_well_known(&self) -> Result<String, Error>
Serialize to the canonical /.well-known/mnemo-deal-agent.json body.
Sourcepub fn from_well_known(body: &str) -> Result<Self, Error>
pub fn from_well_known(body: &str) -> Result<Self, Error>
Parse a /.well-known/mnemo-deal-agent.json body.
Trait Implementations§
Source§impl Clone for AgentAdvertisement
impl Clone for AgentAdvertisement
Source§fn clone(&self) -> AgentAdvertisement
fn clone(&self) -> AgentAdvertisement
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentAdvertisement
impl Debug for AgentAdvertisement
Source§impl<'de> Deserialize<'de> for AgentAdvertisement
impl<'de> Deserialize<'de> for AgentAdvertisement
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 PartialEq for AgentAdvertisement
impl PartialEq for AgentAdvertisement
Source§impl Serialize for AgentAdvertisement
impl Serialize for AgentAdvertisement
impl StructuralPartialEq for AgentAdvertisement
Auto Trait Implementations§
impl Freeze for AgentAdvertisement
impl RefUnwindSafe for AgentAdvertisement
impl Send for AgentAdvertisement
impl Sync for AgentAdvertisement
impl Unpin for AgentAdvertisement
impl UnsafeUnpin for AgentAdvertisement
impl UnwindSafe for AgentAdvertisement
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