pub struct RoutingCandidate {
pub id: String,
pub descriptor_id: String,
pub preference_rank: u32,
pub profile: String,
pub authority_hash: String,
pub credential_available: bool,
pub enabled: bool,
pub token_status: Option<TokenStatus>,
pub scopes: BTreeSet<String>,
}Expand description
Executable candidate bound to a catalog descriptor and runtime authority.
Fields§
§id: StringStable digest over profile, descriptor, authority, and credential identity.
descriptor_id: StringContent-addressed model descriptor this candidate references.
preference_rank: u32Lower values are preferred. Candidate ID breaks ties deterministically.
profile: StringUser-defined profile name used for deterministic preference and configuration.
Secret-free authority digest, including credential identity when present.
credential_available: boolFalse when an explicitly required credential could not be resolved.
enabled: boolExplicit local kill switch.
token_status: Option<TokenStatus>Resolved token lifecycle, when the candidate is secret-free account-aware.
scopes: BTreeSet<String>Canonically ordered granted scopes, when account metadata is present.
Implementations§
Source§impl RoutingCandidate
impl RoutingCandidate
Sourcepub fn new(
descriptor_id: impl Into<String>,
preference_rank: u32,
profile: impl Into<String>,
authority_hash: impl Into<String>,
credential_available: bool,
enabled: bool,
) -> Result<Self, RoutingError>
pub fn new( descriptor_id: impl Into<String>, preference_rank: u32, profile: impl Into<String>, authority_hash: impl Into<String>, credential_available: bool, enabled: bool, ) -> Result<Self, RoutingError>
Constructs a credential-only candidate (legacy, no auth lifecycle).
Sourcepub fn with_auth(
descriptor_id: impl Into<String>,
preference_rank: u32,
profile: impl Into<String>,
authority_hash: impl Into<String>,
credential_available: bool,
enabled: bool,
token_status: Option<TokenStatus>,
scopes: BTreeSet<String>,
) -> Result<Self, RoutingError>
pub fn with_auth( descriptor_id: impl Into<String>, preference_rank: u32, profile: impl Into<String>, authority_hash: impl Into<String>, credential_available: bool, enabled: bool, token_status: Option<TokenStatus>, scopes: BTreeSet<String>, ) -> Result<Self, RoutingError>
Constructs an account-aware candidate with a secret-free token lifecycle.
Sourcepub fn material_digest(&self) -> Result<String, RoutingError>
pub fn material_digest(&self) -> Result<String, RoutingError>
Material-digests the candidate’s profile-bound fields without the ID.
Sourcepub fn validate(&self) -> Result<(), RoutingError>
pub fn validate(&self) -> Result<(), RoutingError>
Validates material fields and ensures the ID matches the material digest.
Trait Implementations§
Source§impl Clone for RoutingCandidate
impl Clone for RoutingCandidate
Source§fn clone(&self) -> RoutingCandidate
fn clone(&self) -> RoutingCandidate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more