pub struct FeedbackStore { /* private fields */ }Implementations§
Source§impl FeedbackStore
impl FeedbackStore
Sourcepub fn open(path: &Path) -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
Open (or create) a feedback store backed by the given JSONL file.
Sourcepub fn save(&mut self, feedback: &CorrelationFeedback) -> Result<()>
pub fn save(&mut self, feedback: &CorrelationFeedback) -> Result<()>
Record feedback, appending to the JSONL file and updating the cache.
Sourcepub fn confirm(
&mut self,
commit_sha: &str,
bead_id: &str,
by: &str,
original_conf: f64,
reason: &str,
) -> Result<CorrelationFeedback>
pub fn confirm( &mut self, commit_sha: &str, bead_id: &str, by: &str, original_conf: f64, reason: &str, ) -> Result<CorrelationFeedback>
Convenience: record a confirmation.
Sourcepub fn reject(
&mut self,
commit_sha: &str,
bead_id: &str,
by: &str,
original_conf: f64,
reason: &str,
) -> Result<CorrelationFeedback>
pub fn reject( &mut self, commit_sha: &str, bead_id: &str, by: &str, original_conf: f64, reason: &str, ) -> Result<CorrelationFeedback>
Convenience: record a rejection.
Sourcepub fn get(
&self,
commit_sha: &str,
bead_id: &str,
) -> Option<&CorrelationFeedback>
pub fn get( &self, commit_sha: &str, bead_id: &str, ) -> Option<&CorrelationFeedback>
Look up existing feedback for a commit+bead pair.
Sourcepub fn has_feedback(&self, commit_sha: &str, bead_id: &str) -> bool
pub fn has_feedback(&self, commit_sha: &str, bead_id: &str) -> bool
Check if feedback exists for a commit+bead pair.
Sourcepub fn get_by_bead(&self, bead_id: &str) -> Vec<&CorrelationFeedback>
pub fn get_by_bead(&self, bead_id: &str) -> Vec<&CorrelationFeedback>
All feedback entries for a specific bead.
Sourcepub fn stats(&self) -> FeedbackStats
pub fn stats(&self) -> FeedbackStats
Compute aggregate statistics.
Auto Trait Implementations§
impl Freeze for FeedbackStore
impl RefUnwindSafe for FeedbackStore
impl Send for FeedbackStore
impl Sync for FeedbackStore
impl Unpin for FeedbackStore
impl UnsafeUnpin for FeedbackStore
impl UnwindSafe for FeedbackStore
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