pub struct UnifiedRegistry { /* private fields */ }Expand description
Unified registry that manages pattern registry.
Provides a single interface to learn from unified extraction results, updating pattern registry and saving them atomically. Note: Keywords are now handled in real-time via FocusTrackerConfig, not persisted in the registry.
Implementations§
Source§impl UnifiedRegistry
impl UnifiedRegistry
Sourcepub fn from_pattern_registry(pattern_registry: PatternRegistry) -> Self
pub fn from_pattern_registry(pattern_registry: PatternRegistry) -> Self
Create a unified registry from existing pattern registry.
Sourcepub fn load_or_default() -> Result<Self>
pub fn load_or_default() -> Result<Self>
Load unified registry from default file paths.
If files don’t exist, creates registries with presets loaded.
Sourcepub fn learn_from_extraction(
&mut self,
result: &UnifiedExtractionResult,
_session_id: &str,
)
pub fn learn_from_extraction( &mut self, result: &UnifiedExtractionResult, _session_id: &str, )
Learn from a unified extraction result.
Updates pattern registry with extracted data. Note: Keywords are no longer persisted; they are used in real-time.
Sourcepub fn pattern_registry(&self) -> &PatternRegistry
pub fn pattern_registry(&self) -> &PatternRegistry
Get reference to pattern registry.
Sourcepub fn pattern_registry_mut(&mut self) -> &mut PatternRegistry
pub fn pattern_registry_mut(&mut self) -> &mut PatternRegistry
Get mutable reference to pattern registry.
Sourcepub fn stats(&self) -> UnifiedRegistryStats
pub fn stats(&self) -> UnifiedRegistryStats
Get combined statistics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnifiedRegistry
impl RefUnwindSafe for UnifiedRegistry
impl Send for UnifiedRegistry
impl Sync for UnifiedRegistry
impl Unpin for UnifiedRegistry
impl UnsafeUnpin for UnifiedRegistry
impl UnwindSafe for UnifiedRegistry
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