pub struct CapabilityQuery {
pub required_types: Vec<CapabilityType>,
pub optional_types: Vec<CapabilityType>,
pub min_confidence: f32,
pub min_capability_count: Option<usize>,
pub limit: Option<usize>,
}Expand description
Capability query for finding nodes or squads
Fields§
§required_types: Vec<CapabilityType>Required capability types (AND logic - all must be present)
optional_types: Vec<CapabilityType>Optional capability types (OR logic - any can be present for bonus score)
min_confidence: f32Minimum confidence threshold (0.0 - 1.0)
min_capability_count: Option<usize>Minimum number of total capabilities
limit: Option<usize>Maximum results to return
Implementations§
Source§impl CapabilityQuery
impl CapabilityQuery
Sourcepub fn builder() -> CapabilityQueryBuilder
pub fn builder() -> CapabilityQueryBuilder
Create a new query builder
Sourcepub fn matches(&self, capabilities: &[Capability]) -> bool
pub fn matches(&self, capabilities: &[Capability]) -> bool
Check if a set of capabilities satisfies this query
Sourcepub fn score(&self, capabilities: &[Capability]) -> f32
pub fn score(&self, capabilities: &[Capability]) -> f32
Calculate a relevance score for a set of capabilities (0.0 - 1.0)
Score components:
- Required types: 0.6 weight (normalized by count)
- Optional types: 0.3 weight (normalized by count)
- Average confidence: 0.1 weight
Trait Implementations§
Source§impl Clone for CapabilityQuery
impl Clone for CapabilityQuery
Source§fn clone(&self) -> CapabilityQuery
fn clone(&self) -> CapabilityQuery
Returns a duplicate of the value. Read more
1.0.0 · 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 CapabilityQuery
impl Debug for CapabilityQuery
Source§impl<'de> Deserialize<'de> for CapabilityQuery
impl<'de> Deserialize<'de> for CapabilityQuery
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
Auto Trait Implementations§
impl Freeze for CapabilityQuery
impl RefUnwindSafe for CapabilityQuery
impl Send for CapabilityQuery
impl Sync for CapabilityQuery
impl Unpin for CapabilityQuery
impl UnsafeUnpin for CapabilityQuery
impl UnwindSafe for CapabilityQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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