pub enum TrustProof {
Hmac,
JwtSig,
OAuthCodeExchange,
Ed25519,
}Expand description
Canonical identifiers of the verifiers that can produce a
Trusted<T> from an Untrusted<T>. Each identifier maps to a
runtime impl in [crate::trust_verifiers].
Variants§
Hmac
HMAC-SHA256 over the raw payload with a shared secret; used for webhook signature verification (Stripe, GitHub, generic HMAC).
JwtSig
JWT signature verification (RS256/RS384/RS512) via a JWKS
endpoint. Shared with v1.4.0’s [crate::jwt_verifier].
OAuthCodeExchange
OAuth2 authorization-code exchange using PKCE S256. Returns an access token proof that the bearer controls the code verifier.
Ed25519
Ed25519 detached signature verification (Sigstore-style).
Implementations§
Source§impl TrustProof
impl TrustProof
Sourcepub const ALL: &'static [TrustProof]
pub const ALL: &'static [TrustProof]
Every variant. Keeping this as an explicit slice ensures the compiler errors if we add a variant without updating the catalogue consumers.
Sourcepub fn slug(self) -> &'static str
pub fn slug(self) -> &'static str
Slug used in source text — appears in #[refines(...)]
annotations and in crate::type_checker diagnostics.
Sourcepub fn from_slug(slug: &str) -> Option<TrustProof>
pub fn from_slug(slug: &str) -> Option<TrustProof>
Resolve a slug to a proof, returning None for unknown
identifiers. The checker uses this to reject annotations that
don’t map to the closed catalogue.
Trait Implementations§
Source§impl Clone for TrustProof
impl Clone for TrustProof
Source§fn clone(&self) -> TrustProof
fn clone(&self) -> TrustProof
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more