pub struct GotchaStore {
pub project_hash: String,
pub gotchas: Vec<Gotcha>,
pub error_log: Vec<SessionErrorLog>,
pub stats: GotchaStats,
pub updated_at: DateTime<Utc>,
pub pending_errors: Vec<PendingError>,
}Fields§
§project_hash: String§gotchas: Vec<Gotcha>§error_log: Vec<SessionErrorLog>§stats: GotchaStats§updated_at: DateTime<Utc>§pending_errors: Vec<PendingError>Implementations§
Source§impl GotchaStore
impl GotchaStore
pub fn new(project_hash: &str) -> Self
pub fn load(project_root: &str) -> Self
pub fn save(&self, project_root: &str) -> Result<(), String>
pub fn detect_error( &mut self, output: &str, command: &str, exit_code: i32, files_touched: &[String], session_id: &str, ) -> bool
pub fn try_resolve_pending( &mut self, command: &str, files_touched: &[String], session_id: &str, ) -> Option<Gotcha>
pub fn report_gotcha( &mut self, trigger: &str, resolution: &str, category: &str, severity: &str, session_id: &str, ) -> &Gotcha
pub fn cross_session_boost(&mut self)
pub fn apply_decay(&mut self)
pub fn check_promotions(&mut self) -> Vec<(String, String, String, f32)>
pub fn extract_universal(&self) -> Vec<Gotcha>
pub fn top_relevant( &self, files_touched: &[String], limit: usize, ) -> Vec<&Gotcha>
pub fn format_injection_block(&self, files_touched: &[String]) -> String
pub fn mark_prevented(&mut self, gotcha_id: &str)
pub fn format_list(&self) -> String
pub fn clear(&mut self)
Trait Implementations§
Source§impl Clone for GotchaStore
impl Clone for GotchaStore
Source§fn clone(&self) -> GotchaStore
fn clone(&self) -> GotchaStore
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 moreSource§impl Debug for GotchaStore
impl Debug for GotchaStore
Source§impl<'de> Deserialize<'de> for GotchaStore
impl<'de> Deserialize<'de> for GotchaStore
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GotchaStore
impl RefUnwindSafe for GotchaStore
impl Send for GotchaStore
impl Sync for GotchaStore
impl Unpin for GotchaStore
impl UnsafeUnpin for GotchaStore
impl UnwindSafe for GotchaStore
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