Skip to main content

CommunicationMandate

Struct CommunicationMandate 

Source
pub struct CommunicationMandate {
Show 13 fields pub id: String, pub delegation_mandate_id: Option<String>, pub human_principal_did: String, pub agent_did: String, pub channel_kind: ChannelKind, pub recipient_addressing: Value, pub content_class: ContentClass, pub body_sha256: String, pub body_size: u64, pub policy_decision: PolicyDecision, pub issued_at: String, pub expires_at: String, pub notary_signature: String,
}
Expand description

Single-use, per-message authorization derived from a standing DelegationMandate (or issued directly for a one-shot AskEveryTime decision). Signed by the notary.

Fields§

§id: String

urn:uuid:... mandate identifier.

§delegation_mandate_id: Option<String>

Parent DelegationMandate.id (or None for one-shot AskEveryTime flow).

§human_principal_did: String

DID of the human principal (re-stated for tamper-detect).

§agent_did: String

DID of the agent sender (re-stated).

§channel_kind: ChannelKind

Channel kind, drawn from the closed set (§7.1.5).

Typed to match the envelope’s field for the same reason as content_class below: §6.2 requires this value EQUAL the value the resulting envelope carries, and that equality is only checkable by the compiler if both sides are the same type.

§recipient_addressing: Value

Recipient addressing (channel-shaped JSON; opaque to APH core).

§content_class: ContentClass

Content classification, drawn from the closed set (§7.1.6).

Typed to match the envelope’s field: §6.2 requires the mandate value EQUAL the value the resulting envelope carries, and an equality between two Strings that are meant to be the same closed vocabulary is an equality the compiler cannot help with.

§body_sha256: String

SHA-256 hex of the outbound message body bytes (lowercase, no 0x).

§body_size: u64

Body size in bytes.

§policy_decision: PolicyDecision

Policy decision the human made (AlwaysAllow, AskEveryTime, NeverAllow).

§issued_at: String

RFC 3339 issuance timestamp.

§expires_at: String

RFC 3339 expiry timestamp.

§notary_signature: String

Notary service signature over the canonical JCS form MINUS notary_signature.

Trait Implementations§

Source§

impl Clone for CommunicationMandate

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CommunicationMandate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CommunicationMandate

Source§

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 Eq for CommunicationMandate

Source§

impl PartialEq for CommunicationMandate

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for CommunicationMandate

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CommunicationMandate

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.