pub struct DecisionLogger { /* private fields */ }Expand description
Captures and stores user decisions with full metadata
Implementations§
Source§impl DecisionLogger
impl DecisionLogger
Sourcepub async fn log_decision(&self, decision: Decision) -> Result<String>
pub async fn log_decision(&self, decision: Decision) -> Result<String>
Log a decision with timestamp, context, and type
Sourcepub async fn get_history(&self) -> Vec<Decision>
pub async fn get_history(&self) -> Vec<Decision>
Get decision history (all captured decisions)
Sourcepub async fn get_history_by_context(
&self,
context: &DecisionContext,
) -> Vec<Decision>
pub async fn get_history_by_context( &self, context: &DecisionContext, ) -> Vec<Decision>
Get decision history for a specific context
Sourcepub async fn get_history_by_type(&self, decision_type: &str) -> Vec<Decision>
pub async fn get_history_by_type(&self, decision_type: &str) -> Vec<Decision>
Get decision history filtered by decision type
Sourcepub async fn get_decision(&self, decision_id: &str) -> Result<Decision>
pub async fn get_decision(&self, decision_id: &str) -> Result<Decision>
Get a specific decision by ID
Sourcepub async fn replay_decisions(&self) -> Vec<Decision>
pub async fn replay_decisions(&self) -> Vec<Decision>
Replay decisions for validation (returns decisions in order)
Sourcepub async fn replay_decisions_for_context(
&self,
context: &DecisionContext,
) -> Vec<Decision>
pub async fn replay_decisions_for_context( &self, context: &DecisionContext, ) -> Vec<Decision>
Replay decisions for a specific context
Sourcepub async fn decision_count(&self) -> usize
pub async fn decision_count(&self) -> usize
Get the number of captured decisions
Sourcepub async fn get_statistics(&self) -> DecisionStatistics
pub async fn get_statistics(&self) -> DecisionStatistics
Get statistics about captured decisions
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DecisionLogger
impl !RefUnwindSafe for DecisionLogger
impl Send for DecisionLogger
impl Sync for DecisionLogger
impl Unpin for DecisionLogger
impl !UnwindSafe for DecisionLogger
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