pub struct CracklePattern { /* private fields */ }Expand description
A pattern detected during the cooling phase.
Like a craze line in pottery glaze, each pattern is a record of something that wasn’t designed — it emerged from the interaction of many tasks as the system cooled.
Implementations§
Source§impl CracklePattern
impl CracklePattern
Sourcepub fn new(
kind: PatternKind,
description: impl Into<String>,
involved_tasks: Vec<String>,
confidence: f64,
) -> Self
pub fn new( kind: PatternKind, description: impl Into<String>, involved_tasks: Vec<String>, confidence: f64, ) -> Self
Create a new detected pattern.
Sourcepub fn kind(&self) -> &PatternKind
pub fn kind(&self) -> &PatternKind
The kind of pattern detected.
Sourcepub fn description(&self) -> &str
pub fn description(&self) -> &str
Human-readable description of the pattern.
Sourcepub fn involved_tasks(&self) -> &[String]
pub fn involved_tasks(&self) -> &[String]
Labels of tasks involved in this pattern.
Sourcepub fn confidence(&self) -> f64
pub fn confidence(&self) -> f64
Confidence score (0.0 to 1.0).
Sourcepub fn with_metric(self, name: impl Into<String>, value: f64) -> Self
pub fn with_metric(self, name: impl Into<String>, value: f64) -> Self
Add a metric to this pattern.
Sourcepub fn with_metrics(self, metrics: Vec<(String, f64)>) -> Self
pub fn with_metrics(self, metrics: Vec<(String, f64)>) -> Self
Create a pattern with additional metrics.
Trait Implementations§
Source§impl Clone for CracklePattern
impl Clone for CracklePattern
Source§fn clone(&self) -> CracklePattern
fn clone(&self) -> CracklePattern
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 moreAuto Trait Implementations§
impl Freeze for CracklePattern
impl RefUnwindSafe for CracklePattern
impl Send for CracklePattern
impl Sync for CracklePattern
impl Unpin for CracklePattern
impl UnsafeUnpin for CracklePattern
impl UnwindSafe for CracklePattern
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