Skip to main content

Payload

Struct Payload 

Source
pub struct Payload { /* private fields */ }
Expand description

Strongly typed wilder.pser/0.5 payload.

Implementations§

Source§

impl Payload

Source

pub fn from_json(bytes: &[u8]) -> Result<Self>

Parses JSON and validates every profile rule, including chain.hash.

§Errors

Returns an error when JSON parsing or any profile validation rule fails.

Source

pub fn from_json_for_production(bytes: &[u8]) -> Result<Self>

Parses producer input, replaces the supplied chain.hash, and validates the result.

§Errors

Returns an error when JSON parsing, hashing, or any profile validation rule fails.

Source

pub fn to_jcs(&self) -> Result<Vec<u8>>

Returns the RFC 8785 JCS serialization of the complete payload.

§Errors

Returns an error if the payload cannot be serialized.

Source

pub fn spec(&self) -> &str

Returns the profile version string.

Source

pub fn site_id(&self) -> &str

Returns the stable site identifier used as the CWT subject.

Source

pub const fn attestation_binding_mode(&self) -> &BindingMode

Returns the witness key identifier used as the CWT issuer by the CLI.

Source

pub fn witness_key(&self) -> &str

Key identifier of the TEE signing key.

Source

pub fn chain_hash(&self) -> &str

Returns the stored chain digest.

Source

pub fn chain_seq(&self) -> u64

Returns the receipt’s position in its chain.

Source

pub fn chain_prev_hash(&self) -> Option<&str>

Returns the preceding receipt’s chain.hash, or None at sequence zero.

Source

pub const fn issuer_affiliation(&self) -> &IssuerAffiliation

Returns whether the Site Owner and the Issuer are affiliated parties.

A value outside the closed set is returned as IssuerAffiliation::Unrecognized carrying the original string, never folded into one of the named values. IssuerAffiliation::NotDisclosed means nobody made a claim and MUST NOT be read as a claim of independence. See IssuerAffiliation for why.

Source

pub const fn adapter_ack_provenance(&self) -> &AckProvenance

Returns how the acknowledgement in adapter.ackDigest was obtained.

A value outside the closed set is returned as AckProvenance::Unrecognized carrying the original string, never folded into one of the named values. See AckProvenance for why.

Source

pub fn actor_id(&self) -> &str

Returns the stable actor identifier.

Source

pub fn actor_operator(&self) -> &str

Returns the operator string associated with the actor.

Source

pub fn engagement_id(&self) -> &str

Returns the stable engagement identifier.

Source

pub fn engagement_type(&self) -> &str

Returns the engagement type string (RFC 3986 URI or short identifier per §6 of the draft).

Source

pub fn engagement_window_start(&self) -> &str

Returns the RFC 3339 UTC start of the engagement window.

Source

pub fn engagement_window_end(&self) -> &str

Returns the RFC 3339 UTC end of the engagement window.

Source

pub fn engagement_evidence_digest(&self) -> &str

Returns the SHA-256 digest of the raw evidence bundle referenced by this engagement.

Source

pub fn attestation_tee_class(&self) -> &str

Returns the TEE class identifier.

Source

pub fn sealed_evidence_digest(&self) -> &str

Returns the SHA-256 digest of the sealed evidence blob.

Source

pub fn sealed_evidence_size_bytes(&self) -> u64

Returns the size in bytes of the sealed evidence blob.

Source

pub fn sealed_evidence_encoding(&self) -> &str

Returns the sealed evidence encoding identifier.

Source

pub fn adapter_system(&self) -> &str

Returns the operations-layer system identifier.

This value selects which write-in adapter is responsible for pushing this receipt. Values are defined by the PSER profile registry (see §6 of the draft). Example values: "buildium", "propertymeld".

Source

pub fn adapter_endpoint(&self) -> &str

Returns the opaque per-system endpoint identifier.

The value is interpreted by the target adapter, not by pask-wire. For the buildium adapter it is the Buildium rental property ID; for other adapters, consult the adapter documentation.

Source

pub fn adapter_posted_at(&self) -> &str

Returns the RFC 3339 UTC timestamp at which the write-in was posted.

Source

pub fn adapter_ack_digest(&self) -> &str

Returns the SHA-256 digest of the operations-layer acknowledgement.

Source

pub fn adapter_is_write_only(&self) -> bool

Returns whether the receipt is marked WRITE_ONLY.

Every wilder.pser/0.3 receipt that parses successfully MUST be WRITE_ONLY; this accessor exists so downstream adapters can enforce the property as defense-in-depth without pattern-matching the internal enum.

Trait Implementations§

Source§

impl Clone for Payload

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 Payload

Source§

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

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

impl<'de> Deserialize<'de> for Payload

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 Payload

Source§

impl PartialEq for Payload

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 Payload

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 Payload

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.