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,
}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.
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 candidate, material-digests its fields, and validates the result.
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
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RoutingCandidate
impl Debug for RoutingCandidate
Source§impl<'de> Deserialize<'de> for RoutingCandidate
impl<'de> Deserialize<'de> for RoutingCandidate
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RoutingCandidate
Source§impl PartialEq for RoutingCandidate
impl PartialEq for RoutingCandidate
Source§impl Serialize for RoutingCandidate
impl Serialize for RoutingCandidate
impl StructuralPartialEq for RoutingCandidate
Auto Trait Implementations§
impl Freeze for RoutingCandidate
impl RefUnwindSafe for RoutingCandidate
impl Send for RoutingCandidate
impl Sync for RoutingCandidate
impl Unpin for RoutingCandidate
impl UnsafeUnpin for RoutingCandidate
impl UnwindSafe for RoutingCandidate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more