Skip to main content

Claims

Struct Claims 

Source
pub struct Claims {
Show 27 fields pub iss: String, pub sub: String, pub tenant: Option<String>, pub exp: i64, pub iat: i64, pub jti: Option<String>, pub sid: Option<String>, pub hs_session_authority_generation: Option<String>, pub hs_profile: Option<String>, pub hs_signer_suite_v1: Option<String>, pub hs_signer_pq_key_v1: Option<String>, pub hs_signer_inventory_v1: Option<String>, pub hs_source_issuer_v1: Option<String>, pub hs_source_subject_v1: Option<String>, pub hs_tui_profile: Option<String>, pub hs_tui_signer_pq_key_v1: Option<String>, pub hs_tui_source_issuer_v1: Option<String>, pub hs_tui_source_subject_v1: Option<String>, pub workload_session_id: Option<String>, pub aud: Option<String>, pub client_id: Option<String>, pub scope: Option<String>, pub cnf: Option<Cnf>, pub token: Option<String>, pub clearance: Option<CredentialClearance>, pub act: Option<ActClaim>, pub cap: Option<String>,
}
Expand description

JWT claims for authentication.

Casbin remains the server-side policy authority. OAuth access tokens also carry the grant’s scope ceiling so a verifier can enforce the intersection of subject policy and the authority delegated by that specific grant.

Fields§

§iss: String

Issuer URL — the hyprstream node that minted this token. Matches the OAuth issuer URL (e.g. “https://cloud-a.example.com”). Required for federation: receiving nodes use this to fetch JWKS. Defaults to empty string for backward compat (treated as local-only).

§sub: String§tenant: Option<String>

Verified tenant/Casbin domain assigned by the token authority.

This value is consumed only after JWT signature verification. Missing, empty, or wildcard tenants cannot be used as authorization domains.

§exp: i64§iat: i64§jti: Option<String>

RFC 7519 JWT ID — unique token identifier for revocation.

§sid: Option<String>

Registered OIDC session ID (sid) — groups an interactive session whose access-token rotations share one revocable session. Absent on standalone service credentials (no session lifecycle).

§hs_session_authority_generation: Option<String>

Signed generation for profiles that use server-side session authority. Stateless Federate proof credentials use hs_signer_inventory_v1 instead. This is JWT-only; envelope claims cannot assert this state.

§hs_profile: Option<String>

Exact opt-in Federate PoP/COSE subprofile. This is not authority on its own; the reserved host path must verify the signed issuer and holder.

§hs_signer_suite_v1: Option<String>

Federate-only top-level commitment to the ordered hybrid signer suite. Unlike generic v16 cnf.hs_signer_suite, this is not a second RFC 7800 confirmation method: cnf.jwk remains the sole confirmation key.

§hs_signer_pq_key_v1: Option<String>

The public ML-DSA-65 half of the COSE proof key pair. It is safe to carry in the issuer-signed credential and lets a verifier validate the holder proof without resolving a session row just to recover a key.

§hs_signer_inventory_v1: Option<String>

Digest of the issuer’s trusted signer inventory at login. This expires stale proof credentials after an inventory change without a session DB.

§hs_source_issuer_v1: Option<String>

Signed login provenance. sub remains the canonical ATProto DID; these claims retain the upstream OIDC identity used to establish it.

§hs_source_subject_v1: Option<String>§hs_tui_profile: Option<String>

TUI-consumer Federate profile (W1.3), deliberately namespaced hs_tui_* and DISTINCT from every www federate-session-v1 suite/inventory marker above. A credential of the TUI client class must NOT enter the deferred federate-session dispatch branch, so none of these claims may ever appear in Claims::has_federate_profile_marker: the TUI credential authenticates through normal JWT verification with cnf.jwk holder binding instead. The exact profile string pins the class.

§hs_tui_signer_pq_key_v1: Option<String>

The public ML-DSA-65 half of the TUI holder’s COSE proof key pair (TUI-namespaced analogue of hs_signer_pq_key_v1).

§hs_tui_source_issuer_v1: Option<String>

Signed login provenance for the TUI class (TUI-namespaced analogue of hs_source_issuer_v1/hs_source_subject_v1).

§hs_tui_source_subject_v1: Option<String>§workload_session_id: Option<String>

Workload credential family session ID (workload_session_id) — a distinct namespace from OIDC sid (v16 §3.3). Present only on credentials of an enrolled workload family (e.g. a service-JWT renewal chain); a standalone service credential omits it.

§aud: Option<String>

RFC 8707 audience claim for resource indicator binding.

§client_id: Option<String>

RFC 9068 §2.2.1 client_id — the OAuth client the access token was issued to. REQUIRED (non-empty) on locally issued at+jwt credentials (v16 credential profile; JWT-only, no CWT mapping). Distinct from aud (the RFC 8707 resource indicator) and from sub (the resource owner). Absent on non-at+jwt credentials (e.g. wit+jwt service tokens) and on the in-process empty-issuer provenance path.

§scope: Option<String>

OAuth 2.0 granted scope set, serialized as a space-delimited string.

This is optional because non-OAuth service tokens do not originate from an OAuth grant. Consumers that derive authority from OAuth scopes MUST use Self::has_scope and fail closed when this claim is absent.

§cnf: Option<Cnf>

RFC 8705 / WIMSE proof-of-possession confirmation claim.

Binds the Ed25519 signing key to the JWT-attested identity via a standard JWK object (cnf.jwk). For service tokens (WIT), derived by the CA from the root key. For user tokens, set during OAuth flow from the verified Ed25519 challenge-response.

§token: Option<String>

Original JWT token for end-to-end verification. When present, downstream services MUST verify this token independently rather than trusting the envelope claims alone.

SECURITY:

  • #[serde(skip)] prevents recursive JWT-in-JWT embedding and JSON exposure.
  • This field is ONLY populated via Cap’n Proto (ToCapnp/FromCapnp).
  • Custom Debug impl redacts this field as [REDACTED].
  • Do NOT change to skip_serializing_if — that would leak the token in JSON.
§clearance: Option<CredentialClearance>

MAC clearance (S8/#574, design §3, §11). The authority-asserted clearance the issuing node grants this subject: a SecurityLabel carrying level + compartments. This is the authority-asserted half of the S1 subject context; the issuing node signs the JWT, so the clearance cannot be self-asserted by the subject.

Assurance is NOT carried here. Per the S1/#548 contract, the assurance axis of a subject’s context is derived from the verified key material, never trusted from a claim. The MAC PDP clamps the clearance’s assurance DOWN to what the verified crypto supports (see crate::auth::mac::SecurityContext::from_clearance). So an Ed25519-only identity carrying a PqHybrid clearance floors to Classical at enforcement time — the claim cannot grant assurance the key does not back.

None ⇒ unlabeled subject ⇒ the MAC monitor denies (no default clearance; the S1 fail-closed rule). Carried on the hybrid-signed envelope/JWT so it is itself PQ-forgery-resistant.

§act: Option<ActClaim>

Delegation actor (RFC 8693 §4.1 act, #680/#681). Present iff this is a delegated (on-behalf-of) token: Self::sub is the delegator (source of authority), act the actor that signs the downstream envelope. Drives the two-principal MAC derivation (#681): clearance = meet(sub, act), assurance from the verified signer (the actor). See ActClaim. JWT-carried only (mirrors Self::clearance); reconstructed None on the Cap’n Proto path.

§cap: Option<String>

Attenuated capability subset (ZSP, Fu1/#677, TODO(#572-scope-claim)). The least-authority capability the minted token actually encodes, in ability@resource form. ZSP mints the subset that covers the request, never the whole grant — this claim puts that subset on the wire so the downstream PEP (S2) enforces the minted authority (and a refresh can only re-grant this subset, never widen). Distinct from Casbin scopes (which are NOT in JWTs): this is the MAC/UCAN capability the S6 exchange authorized.

None ⇒ not a grant-minted token (ordinary auth token). JWT-carried only (mirrors Self::clearance/Self::act); reconstructed None on the Cap’n Proto path.

Implementations§

Source§

impl Claims

Source

pub fn new(sub: String, iat: i64, exp: i64) -> Self

Create new claims.

Source

pub fn with_actor(self, actor: Option<ActClaim>) -> Self

Attach a delegation actor (RFC 8693 act).

Source

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

The terminal (deepest) actor subject in the delegation chain, if any.

Source

pub fn with_jti(self) -> Self

Set a random JWT ID (RFC 7519 jti claim) for revocation support.

Source

pub fn with_sid(self, sid: impl Into<String>) -> Self

Set the OIDC session ID (sid claim).

Source

pub fn with_session_authority_generation(self, generation: [u8; 32]) -> Self

Set a session-authority generation in its one canonical encoding. This does not make a token eligible for dispatch; profile, proof, replay and Policy checks remain mandatory.

Source

pub fn session_authority_generation(&self) -> Result<Option<[u8; 32]>>

Parse the signed generation without accepting padding, alternate alphabets, truncation, or a wire-provided state locator.

Source

pub fn with_federate_signer_inventory(self, inventory: [u8; 32]) -> Self

Set the trusted signer-inventory digest for the stateless Federate proof profile. This binds a short-lived credential to the host’s current verifier inventory without naming a database or session row.

Source

pub fn federate_signer_inventory(&self) -> Result<Option<[u8; 32]>>

Parse the signed Federate signer-inventory digest in its sole canonical base64url encoding. Callers decide whether the all-zero value is valid for their configured inventory.

Source

pub fn is_reserved_federate_staging_credential(&self) -> bool

Recognize the fixed host/client even when one profile marker was removed by a faulty issuer or token transformation.

Source

pub fn is_reserved_federate_credential(&self, configured_host: &str) -> bool

Source

pub fn has_federate_profile_marker(&self) -> bool

Any signed Federate-only marker takes the deferred, fail-closed path; stripping one marker cannot reinterpret the remaining token as generic.

The TUI-consumer markers (hs_tui_*, W1.3) are deliberately NOT in this set: a TUI-class credential authenticates through normal JWT verification (with cnf.jwk holder binding), never through the deferred federate-session dispatch branch. A TUI credential carrying any www marker below still trips this check and is rejected in that branch (it is not the reserved staging class); a www credential carrying any TUI marker is rejected by the www proof consumer.

Source

pub fn has_federate_tui_profile_marker(&self) -> bool

Any signed TUI-consumer marker. Used by the TUI profile consumer to reject www-class credentials that smuggle TUI markers (mixed-marker defense) and to require the complete TUI marker set.

Source

pub fn has_complete_federate_tui_profile(&self) -> bool

The COMPLETE TUI-consumer marker set. The mint stamps all four unconditionally, so a classified credential with any marker missing is never legitimate.

Source

pub fn is_federate_tui_class(&self, local_issuers: &[&str]) -> bool

Whether this credential is of the Federate TUI client class (W1.3): it carries any TUI marker, OR it names the deployment-configured TUI client id at a local issuer — the authority-owned, marker-independent class pin, mirroring the www reserved (iss, client_id) predicate so a class-shaped credential with every marker stripped still cannot fall through to generic handling.

Source

pub fn with_federate_tui_markers( self, pq_key_b64url: String, source_issuer: String, source_subject: String, ) -> Self

Stamp the TUI-consumer Federate profile marker set. Every claim is TUI-namespaced and disjoint from the www federate-session-v1 suite/inventory markers, so the credential never enters the deferred federate dispatch branch; the marker alone is never authority.

Source

pub fn with_federate_signer_suite(self, thumbprint_b64url: String) -> Self

Stamp the exact Federate profile and its ordered hybrid-suite digest. This marker alone is never authority; the reserved path also verifies the signed source binding, holder proof, replay admission and live Policy.

Source

pub fn with_workload_session_id(self, id: impl Into<String>) -> Self

Set the workload credential family session ID (workload_session_id claim) — enrolled workload families only.

Source

pub fn session_key(&self) -> Result<Option<SessionKey>, SessionClaimError>

The credential’s session binding under exact-one parsing (v16 §3.3): a credential carries AT MOST ONE session identifier, in a disjoint namespace — OIDC sid (interactive) or workload_session_id (enrolled workload family). Both-present is ambiguous and rejects; a present-but-empty identifier is malformed and rejects. Neither is Ok(None) (standalone credential, no session).

Every authorization and cache-insertion path MUST use this parser — never an sid.or_else(workload_session_id) chain, which would let an active OIDC session mask a revoked or unknown workload session.

Source

pub fn with_issuer(self, issuer: String) -> Self

Set the issuer URL (RFC 7519 iss claim). Should be the OAuth issuer URL of the hyprstream node that issued this token.

Source

pub fn with_tenant(self, tenant: String) -> Self

Set the authority-asserted tenant used as the Casbin request domain.

Source

pub fn with_audience(self, audience: Option<String>) -> Self

Create new claims with an audience (RFC 8707 resource indicator).

Source

pub fn with_client_id(self, client_id: impl Into<String>) -> Self

Set the RFC 9068 §2.2.1 client_id claim (the OAuth client the access token was issued to). An empty/whitespace value is treated as absent so a caller cannot satisfy the profile’s non-empty requirement with a blank.

Source

pub fn with_scope(self, scope: Option<String>) -> Self

Set the OAuth 2.0 granted scope claim.

Source

pub fn granted_scopes(&self) -> impl Iterator<Item = &str>

Iterate over the exact scopes granted to this token.

An absent claim yields an empty iterator, keeping scope-based consumers fail closed for legacy and non-OAuth tokens.

Source

pub fn has_scope(&self, required: &str) -> bool

Return whether this token’s signed grant contains required exactly.

Source

pub fn with_token(self, token: String) -> Self

Attach original JWT token for e2e verification by downstream services.

Source

pub fn with_cnf_jwk(self, key_bytes: &[u8; 32]) -> Self

Set the RFC 8705 cnf.jwk confirmation claim (WIMSE WIT key binding).

key_bytes is the raw 32-byte Ed25519 public key. Produces a standard OKP JWK object with kty: "OKP", crv: "Ed25519", x: <base64url>.

Source

pub fn with_cnf_hs_signer_suite(self, thumbprint_b64url: String) -> Self

Set the v16 cnf.hs_signer_suite confirmation (frozen WS-A profile §1.1/§5): the base64url signer-suite content thumbprint. Merged into any existing cnf so a legacy jwk/jkt binding is preserved alongside it. Compute thumbprint_b64url from crate::auth::signer_suite_thumbprint.

Source

pub fn with_cnf_jkt(self, key_bytes: &[u8; 32]) -> Self

Set the RFC 9449 cnf.jkt confirmation claim (DPoP JWK thumbprint).

key_bytes is the raw 32-byte Ed25519 public key. The thumbprint is computed per RFC 7638: SHA-256 of the lexicographic canonical JWK JSON, base64url-encoded.

Source

pub fn with_cnf_jkt_thumbprint(self, jkt: String) -> Self

Set the RFC 9449 cnf.jkt from a PRE-COMPUTED thumbprint string (e.g. a verified DPoP proof’s jkt). Merged into any existing cnf.

Source

pub fn with_clearance(self, clearance: SecurityLabel) -> Self

Set the MAC clearance claim (S8/#574). The authority-asserted clearance the issuing node grants this subject (level + compartments). The resulting JWT carries this under its (hybrid) signature, so it is itself PQ-forgery-resistant; the assurance axis is NOT carried here — it is derived from the verified key material at enforcement time.

Source

pub fn with_credential_clearance(self, clearance: CredentialClearance) -> Self

Set the MAC clearance claim from its two-axis wire projection directly. Used when FORWARDING an already-projected clearance (e.g. re-stamping a verified source credential’s clearance onto a derived ticket) — the value is copied through unchanged. Prefer Self::with_clearance when starting from a full SecurityLabel.

Source

pub fn with_act(self, actor: ActClaim) -> Self

Set the RFC 8693 delegation actor (act, #680/#681). Marks this as a delegated (on-behalf-of) token: Self::sub stays the delegator; actor is the principal that will sign the downstream envelope. The MAC PDP derives clearance as meet(sub, act) and assurance from the verified signer. See ActClaim.

Source

pub fn with_cap(self, cap: String) -> Self

Set the attenuated capability subset (cap, ZSP Fu1/#677) the minted token encodes, in ability@resource form. See Self::cap.

Source

pub fn cnf_key_bytes(&self) -> Option<[u8; 32]>

Extract the raw 32-byte Ed25519 public key from cnf.jwk.x, if present.

Source

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

Return the cnf.jkt thumbprint string, if present.

Source

pub fn verify_token( &self, verifying_key: &VerifyingKey, expected_aud: Option<&str>, ) -> Result<Option<Claims>, JwtError>

Independently verify the embedded JWT token.

Returns the verified claims if the token is present and valid. Returns None if no token is embedded. Returns Err if token is present but verification fails (MUST reject request).

Note: jwt::decode() validates both signature and exp (via is_expired()).

Source

pub fn is_expired(&self) -> bool

Check if token is expired (with 5-second leeway for clock skew).

Source

pub fn is_local_to(&self, local_issuers: &[&str]) -> bool

True if this token was issued by a local node.

Delegates to is_local_iss using this token’s iss field.

Source

pub fn strip_federated_clearance(&mut self, local_issuers: &[&str])

Strip the authority-asserted MAC clearance when this token’s issuer is NOT a local issuer (Fu5/#677).

clearance is authority-asserted: the issuing node signs the JWT, so a local issuer (this node, or a configured local cluster issuer) is trusted to grant MAC clearance. An external OIDC issuer trusted for identity is NOT thereby trusted to assert MAC clearance on this node — honoring it would let any trusted-for-identity federated IdP mint MAC clearance. Federated-path decode therefore drops the claim before the MAC PDP can read it (crate::auth::mac::SubjectContextClaims::credential_clearance returns None ⇒ unlabeled ⇒ deny). Local-issuer tokens are unaffected.

Source

pub fn strip_federated_tenant(&mut self, local_issuers: &[&str])

Strip the authority-asserted tenant when this token’s issuer is not local.

A federated issuer trusted for identity is not trusted to select a local Casbin tenant domain. Clearing the claim makes downstream domain resolution fail closed, while preserving tenant bindings minted by local issuers.

Source

pub fn subject(&self, local_issuers: &[&str]) -> Subject

Derive the Casbin authorization subject from these claims.

Local tokens (issued by this node) produce bare subjects ("alice") matching existing Casbin rules. Federated tokens produce namespaced subjects ("https://other.node:alice") to prevent cross-node spoofing.

UNAUTHENTICATED_DID_SENTINEL is credential absence, not a principal. Even a verified token carrying it therefore resolves to the unauthenticated floor and can never authenticate as the sentinel.

Trait Implementations§

Source§

impl Clone for Claims

Source§

fn clone(&self) -> Claims

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 Claims

Source§

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

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

impl<'de> Deserialize<'de> for Claims

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 From<&Claims> for Subject

Source§

fn from(claims: &Claims) -> Self

Converts to this type from the input type.
Source§

impl FromCapnp for Claims

Source§

type Reader<'a> = Reader<'a>

The Cap’n Proto reader type for this struct.
Source§

fn read_from(reader: Self::Reader<'_>) -> Result<Self>

Read this struct’s fields from the reader.
Source§

impl Serialize for Claims

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 SubjectContextClaims for Claims

Source§

fn credential_clearance(&self) -> Option<CredentialClearance>

The authority-asserted clearance carried in the verified claims, if any, as its two-axis wire projection (level + compartments only; assurance is structurally absent from the credential wire — v16 §11). None ⇒ unlabeled subject ⇒ the monitor MUST deny (no default clearance).
Source§

fn security_context( &self, key_material: VerifiedKeyMaterial, ) -> Option<SecurityContext>

Assemble the full subject context, deriving the assurance axis PURELY from the verified key material (never from the wire — the wire cannot carry assurance). Returns None (→ deny) if the subject carries no clearance. Implementors normally only need to provide credential_clearance.
Source§

impl ToCapnp for Claims

Source§

type Builder<'a> = Builder<'a>

The Cap’n Proto builder type for this struct.
Source§

fn write_to(&self, builder: &mut Self::Builder<'_>)

Write this struct’s fields to the builder.

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> ServiceExt for T

§

fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>
where Self: Sized,

Apply a transformation to the response body. Read more
§

fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using HTTP status codes. Read more
§

fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>
where Self: Sized,

High level tracing that classifies responses using gRPC headers. Read more
§

fn follow_redirects(self) -> FollowRedirect<Self>
where Self: Sized,

Follow redirect resposes using the Standard policy. Read more
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 = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSync for T
where T: Sync,

§

impl<T> MaybeSync for T
where T: Sync,

Source§

impl<T> TerminalState for T
where T: Clone + Send + Sync,