pub struct CompositionResult {
pub composed_capabilities: Vec<Capability>,
pub confidence: f32,
pub contributing_capabilities: Vec<String>,
}Expand description
Result of applying a composition rule
Fields§
§composed_capabilities: Vec<Capability>Composed capabilities detected by the rule
confidence: f32Confidence in the composition (0.0 - 1.0)
contributing_capabilities: Vec<String>Input capabilities that contributed to this composition
Implementations§
Source§impl CompositionResult
impl CompositionResult
Sourcepub fn new(composed_capabilities: Vec<Capability>, confidence: f32) -> Self
pub fn new(composed_capabilities: Vec<Capability>, confidence: f32) -> Self
Create a new composition result
Sourcepub fn with_contributors(self, capability_ids: Vec<String>) -> Self
pub fn with_contributors(self, capability_ids: Vec<String>) -> Self
Add contributing capability IDs
Sourcepub fn has_compositions(&self) -> bool
pub fn has_compositions(&self) -> bool
Check if any capabilities were composed
Trait Implementations§
Source§impl Clone for CompositionResult
impl Clone for CompositionResult
Source§fn clone(&self) -> CompositionResult
fn clone(&self) -> CompositionResult
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 moreAuto Trait Implementations§
impl Freeze for CompositionResult
impl RefUnwindSafe for CompositionResult
impl Send for CompositionResult
impl Sync for CompositionResult
impl Unpin for CompositionResult
impl UnsafeUnpin for CompositionResult
impl UnwindSafe for CompositionResult
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