pub struct Authority {
pub type_id: String,
pub label: String,
pub jurisdiction: Option<String>,
pub department: Option<String>,
}Expand description
The authorizing body behind an attestation.
type_id is an extensible URI-ish string (see authority_type); label is the human-readable
name. jurisdiction locates the authority’s remit (e.g. "AU", "AU-VIC"), and department is
an optional branch / sub-unit within the authority.
Fields§
§type_id: StringExtensible type id, e.g. authority_type::GOVERNMENT or a caller-coined "authority:…".
label: StringHuman-readable name of the authority, e.g. “Services Australia”, “Acme Pathology”.
jurisdiction: Option<String>§department: Option<String>Implementations§
Source§impl Authority
impl Authority
Sourcepub fn new(type_id: impl Into<String>, label: impl Into<String>) -> Self
pub fn new(type_id: impl Into<String>, label: impl Into<String>) -> Self
A new authority of the given extensible type_id with a human label.
Sourcepub fn is_government(&self) -> bool
pub fn is_government(&self) -> bool
True if this authority is a government (authority_type::GOVERNMENT).
Sourcepub fn is_medical(&self) -> bool
pub fn is_medical(&self) -> bool
True if this authority is a pathology / medical body — its attestations carry more weight as
evidence (see build_authority_attestation_envelope). Matches the exact PATHOLOGY const
or any type id under the authority:pathology/authority:medical prefix so caller-coined
ids like "authority:pathology:acme-labs" are still recognised as clinician-grade.