pub struct Ap2CartMandate {
pub cart_id: String,
pub intent_id: String,
pub merchant: String,
pub category: Option<String>,
pub total: Ap2Money,
pub key_id: String,
pub signature: String,
}Expand description
A parsed AP2 Cart Mandate: the concrete cart the agent assembled, bound to
an Intent by intent_id and signed.
Fields§
§cart_id: StringUnique cart id (audit/display).
intent_id: StringThe Intent this cart is authorized under — the binding link.
merchant: StringThe merchant this cart pays.
category: Option<String>Optional category (checked against the intent scope when the scope constrains categories).
total: Ap2MoneyThe cart total.
key_id: StringId of the verifying key in the keyring that signed this cart.
signature: StringHex-encoded Ed25519 signature over Ap2CartMandate::signing_bytes.
Implementations§
Source§impl Ap2CartMandate
impl Ap2CartMandate
Sourcepub fn signing_bytes(&self) -> Vec<u8> ⓘ
pub fn signing_bytes(&self) -> Vec<u8> ⓘ
The canonical bytes the signature covers — includes intent_id, so a
valid cart signature cryptographically binds the cart to one specific
intent (the chain link).
Trait Implementations§
Source§impl Clone for Ap2CartMandate
impl Clone for Ap2CartMandate
Source§fn clone(&self) -> Ap2CartMandate
fn clone(&self) -> Ap2CartMandate
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 Ap2CartMandate
impl Debug for Ap2CartMandate
Source§impl<'de> Deserialize<'de> for Ap2CartMandate
impl<'de> Deserialize<'de> for Ap2CartMandate
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
impl Eq for Ap2CartMandate
Source§impl PartialEq for Ap2CartMandate
impl PartialEq for Ap2CartMandate
Source§impl Serialize for Ap2CartMandate
impl Serialize for Ap2CartMandate
impl StructuralPartialEq for Ap2CartMandate
Auto Trait Implementations§
impl Freeze for Ap2CartMandate
impl RefUnwindSafe for Ap2CartMandate
impl Send for Ap2CartMandate
impl Sync for Ap2CartMandate
impl Unpin for Ap2CartMandate
impl UnsafeUnpin for Ap2CartMandate
impl UnwindSafe for Ap2CartMandate
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.