pub enum AttestationMode {
PrincipalSigned,
NotaryAttested,
}Expand description
Which of the two attestation modes an envelope declares (spec §7.1.7).
The wire spells these exactly as written, so no serde rename is needed.
ABSENT means NotaryAttested — see PolicyDescriptor::effective_attestation_mode.
Variants§
PrincipalSigned
The human’s own key signed this envelope; proof is a chain.
NotaryAttested
A notary asserts the human authorized this. Strictly weaker.
Implementations§
Trait Implementations§
Source§impl Clone for AttestationMode
impl Clone for AttestationMode
Source§fn clone(&self) -> AttestationMode
fn clone(&self) -> AttestationMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AttestationMode
Source§impl Debug for AttestationMode
impl Debug for AttestationMode
Source§impl<'de> Deserialize<'de> for AttestationMode
impl<'de> Deserialize<'de> for AttestationMode
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>,
Source§impl Display for AttestationMode
impl Display for AttestationMode
impl Eq for AttestationMode
Source§impl FromStr for AttestationMode
impl FromStr for AttestationMode
Source§fn from_str(label: &str) -> Result<Self, Self::Err>
fn from_str(label: &str) -> Result<Self, Self::Err>
The inverse of AttestationMode::label, and the ONE place the wire
spellings are matched. Every binding’s require_attestation_mode takes
the required mode as a caller-supplied string, and until this impl
existed each binding matched the spellings itself — four identical
copies of one meaning, each a site where a defaulting typo would BE the
downgrade that gate exists to refuse. The bindings now call this and
stay glue.
The error is a plain message rather than an crate::errors::AphError
on purpose: an unknown label here is a CALLER’s programming mistake
(nothing from the wire is involved), so it must not dress itself in a
protocol code a caller might route on.