pub struct Ap2IntentMandate {
pub intent_id: String,
pub subject: String,
pub scope: Ap2Scope,
pub key_id: String,
pub signature: String,
}Expand description
A parsed AP2 Intent Mandate: the user’s pre-authorization for an agent to
spend within Ap2Scope, signed by a key in the Ap2Keyring.
Fields§
§intent_id: StringUnique id the Cart binds to.
subject: StringThe principal who authorized (audit/display).
scope: Ap2ScopeWhat the user consented to.
key_id: StringId of the verifying key in the keyring that signed this intent.
signature: StringHex-encoded Ed25519 signature over Ap2IntentMandate::signing_bytes.
Implementations§
Source§impl Ap2IntentMandate
impl Ap2IntentMandate
Sourcepub fn signing_bytes(&self) -> Vec<u8> ⓘ
pub fn signing_bytes(&self) -> Vec<u8> ⓘ
The canonical bytes the signature covers. Fixed field order + a version tag so the signed payload is stable and unambiguous (not dependent on JSON key ordering).
Trait Implementations§
Source§impl Clone for Ap2IntentMandate
impl Clone for Ap2IntentMandate
Source§fn clone(&self) -> Ap2IntentMandate
fn clone(&self) -> Ap2IntentMandate
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 Ap2IntentMandate
impl Debug for Ap2IntentMandate
Source§impl<'de> Deserialize<'de> for Ap2IntentMandate
impl<'de> Deserialize<'de> for Ap2IntentMandate
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 Ap2IntentMandate
Source§impl PartialEq for Ap2IntentMandate
impl PartialEq for Ap2IntentMandate
Source§impl Serialize for Ap2IntentMandate
impl Serialize for Ap2IntentMandate
impl StructuralPartialEq for Ap2IntentMandate
Auto Trait Implementations§
impl Freeze for Ap2IntentMandate
impl RefUnwindSafe for Ap2IntentMandate
impl Send for Ap2IntentMandate
impl Sync for Ap2IntentMandate
impl Unpin for Ap2IntentMandate
impl UnsafeUnpin for Ap2IntentMandate
impl UnwindSafe for Ap2IntentMandate
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.