pub struct ErrorPatternLibrary { /* private fields */ }Expand description
Error pattern library with hybrid retrieval
Implementations§
Source§impl ErrorPatternLibrary
impl ErrorPatternLibrary
Sourcepub fn new() -> ErrorPatternLibrary
pub fn new() -> ErrorPatternLibrary
Create new pattern library
Sourcepub fn bootstrap() -> ErrorPatternLibrary
pub fn bootstrap() -> ErrorPatternLibrary
Bootstrap with common conversion error patterns
Sourcepub fn add_pattern(&mut self, pattern: ErrorPattern)
pub fn add_pattern(&mut self, pattern: ErrorPattern)
Add pattern to library
Sourcepub fn find_match(&mut self, error_message: &str) -> Option<&ErrorPattern>
pub fn find_match(&mut self, error_message: &str) -> Option<&ErrorPattern>
Find best matching pattern for error message
Sourcepub fn retire_failing_patterns(&mut self)
pub fn retire_failing_patterns(&mut self)
Retire low-performing patterns
Sourcepub fn record_result(&mut self, pattern_id: &str, success: bool)
pub fn record_result(&mut self, pattern_id: &str, success: bool)
Record pattern application result
Trait Implementations§
Source§impl Clone for ErrorPatternLibrary
impl Clone for ErrorPatternLibrary
Source§fn clone(&self) -> ErrorPatternLibrary
fn clone(&self) -> ErrorPatternLibrary
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 ErrorPatternLibrary
impl Debug for ErrorPatternLibrary
Source§impl Default for ErrorPatternLibrary
impl Default for ErrorPatternLibrary
Source§fn default() -> ErrorPatternLibrary
fn default() -> ErrorPatternLibrary
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ErrorPatternLibrary
impl RefUnwindSafe for ErrorPatternLibrary
impl Send for ErrorPatternLibrary
impl Sync for ErrorPatternLibrary
impl Unpin for ErrorPatternLibrary
impl UnsafeUnpin for ErrorPatternLibrary
impl UnwindSafe for ErrorPatternLibrary
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,
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