pub struct ProcedureConfidence {
pub success_count: u32,
pub failure_count: u32,
pub score: f64,
}Expand description
Confidence metrics for a procedure based on execution history.
Fields§
§success_count: u32Number of successful executions
failure_count: u32Number of failed executions
score: f64Computed confidence score (0.0 - 1.0)
Implementations§
Source§impl ProcedureConfidence
impl ProcedureConfidence
Sourcepub fn new() -> ProcedureConfidence
pub fn new() -> ProcedureConfidence
Create a new confidence tracker with zero counts.
Sourcepub fn record_success(&mut self)
pub fn record_success(&mut self)
Record a successful execution.
Sourcepub fn record_failure(&mut self)
pub fn record_failure(&mut self)
Record a failed execution.
Sourcepub fn total_executions(&self) -> u32
pub fn total_executions(&self) -> u32
Get the total number of executions.
Sourcepub fn is_high_confidence(&self) -> bool
pub fn is_high_confidence(&self) -> bool
Check if this procedure has high confidence (> 0.8).
Trait Implementations§
Source§impl Clone for ProcedureConfidence
impl Clone for ProcedureConfidence
Source§fn clone(&self) -> ProcedureConfidence
fn clone(&self) -> ProcedureConfidence
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 ProcedureConfidence
impl Debug for ProcedureConfidence
Source§impl Default for ProcedureConfidence
impl Default for ProcedureConfidence
Source§fn default() -> ProcedureConfidence
fn default() -> ProcedureConfidence
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProcedureConfidence
impl<'de> Deserialize<'de> for ProcedureConfidence
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProcedureConfidence, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProcedureConfidence, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ProcedureConfidence
impl PartialEq for ProcedureConfidence
Source§fn eq(&self, other: &ProcedureConfidence) -> bool
fn eq(&self, other: &ProcedureConfidence) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProcedureConfidence
impl Serialize for ProcedureConfidence
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ProcedureConfidence
Auto Trait Implementations§
impl Freeze for ProcedureConfidence
impl RefUnwindSafe for ProcedureConfidence
impl Send for ProcedureConfidence
impl Sync for ProcedureConfidence
impl Unpin for ProcedureConfidence
impl UnsafeUnpin for ProcedureConfidence
impl UnwindSafe for ProcedureConfidence
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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