pub struct AuthorityAttestation {
pub id: String,
pub authority: Authority,
pub agent: Option<AgentInCapacity>,
pub representation: Representation,
pub subject: String,
pub statement: String,
pub action_required: bool,
pub issued_unix: u32,
pub issued_instant: Option<InstantBridge>,
pub blob_hash: Option<String>,
}Expand description
An attestation issued by an authority (through an optional agent-in-capacity) about a subject.
This is the general model; government_letter is a preset over it. The attestation body
itself lives out-of-band as a blob (blob_hash); this struct is the indexable envelope.
Fields§
§id: String§agent: Option<AgentInCapacity>§representation: Representation§subject: StringWhat / who is attested (the subject of the attestation).
statement: StringFree-text statement / subject line describing the attestation.
action_required: bool§issued_unix: u32§issued_instant: Option<InstantBridge>High-resolution instant (T71 bridge). Preferred over issued_unix
when present; the u32 field is kept for backward-compatible deserialization.
blob_hash: Option<String>Implementations§
Source§impl AuthorityAttestation
impl AuthorityAttestation
Sourcepub fn new(
authority: Authority,
subject: impl Into<String>,
statement: impl Into<String>,
issued_unix: u32,
) -> Self
pub fn new( authority: Authority, subject: impl Into<String>, statement: impl Into<String>, issued_unix: u32, ) -> Self
A new attestation from authority about subject, with the given free-text statement,
issued at issued_unix. Defaults: no agent, Pdf representation, no action required, no blob.
Sourcepub fn issued_at(&self) -> InstantBridge
pub fn issued_at(&self) -> InstantBridge
Resolve the issued instant, preferring the high-resolution
InstantBridge field when present (T71 bridge).
Sourcepub fn with_agent(self, agent: AgentInCapacity) -> Self
pub fn with_agent(self, agent: AgentInCapacity) -> Self
Attach the agent-in-capacity who issued the attestation.
Sourcepub fn with_department(self, department: impl Into<String>) -> Self
pub fn with_department(self, department: impl Into<String>) -> Self
Set the authority’s department / branch.
Sourcepub fn with_jurisdiction(self, jurisdiction: impl Into<String>) -> Self
pub fn with_jurisdiction(self, jurisdiction: impl Into<String>) -> Self
Set the authority’s jurisdiction (e.g. “AU”, “AU-VIC”).
Sourcepub fn with_blob(self, blob_hash: impl Into<String>) -> Self
pub fn with_blob(self, blob_hash: impl Into<String>) -> Self
Reference the content-addressed blob (PDF / credential bytes) for this attestation.
Sourcepub fn with_representation(self, representation: Representation) -> Self
pub fn with_representation(self, representation: Representation) -> Self
Set the delivery representation (Pdf / Credential / PdfWithEmbeddedCredential).
Sourcepub fn with_action_required(self, action_required: bool) -> Self
pub fn with_action_required(self, action_required: bool) -> Self
Mark whether the owner must act on this attestation.