pub enum AnomalyGridError {
SequenceTooShort {
expected: usize,
actual: usize,
operation: String,
},
InvalidMaxOrder {
value: usize,
context: String,
},
InvalidThreshold {
value: f64,
expected_range: String,
},
MemoryLimitExceeded {
current: usize,
limit: usize,
suggestion: String,
},
EmptyContextTree {
suggestion: String,
},
InvalidConfiguration {
parameter: String,
value: String,
expected: String,
},
}Expand description
Custom error types for Anomaly Grid operations
Variants§
SequenceTooShort
Sequence is too short for the requested operation
Fields
InvalidMaxOrder
Invalid max_order parameter
InvalidThreshold
Invalid threshold parameter
MemoryLimitExceeded
Memory limit exceeded during context tree building
Fields
EmptyContextTree
Context tree is empty (no training data)
InvalidConfiguration
Invalid configuration parameter
Implementations§
Source§impl AnomalyGridError
impl AnomalyGridError
Sourcepub fn sequence_too_short(
expected: usize,
actual: usize,
operation: &str,
) -> Self
pub fn sequence_too_short( expected: usize, actual: usize, operation: &str, ) -> Self
Create a sequence too short error with context
Sourcepub fn invalid_max_order(value: usize) -> Self
pub fn invalid_max_order(value: usize) -> Self
Create an invalid max_order error
Sourcepub fn invalid_threshold(value: f64) -> Self
pub fn invalid_threshold(value: f64) -> Self
Create an invalid threshold error
Sourcepub fn memory_limit_exceeded(current: usize, limit: usize) -> Self
pub fn memory_limit_exceeded(current: usize, limit: usize) -> Self
Create a memory limit exceeded error
Sourcepub fn empty_context_tree() -> Self
pub fn empty_context_tree() -> Self
Create an empty context tree error
Sourcepub fn invalid_configuration(
parameter: &str,
value: &str,
expected: &str,
) -> Self
pub fn invalid_configuration( parameter: &str, value: &str, expected: &str, ) -> Self
Create an invalid configuration error
Trait Implementations§
Source§impl Clone for AnomalyGridError
impl Clone for AnomalyGridError
Source§fn clone(&self) -> AnomalyGridError
fn clone(&self) -> AnomalyGridError
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 AnomalyGridError
impl Debug for AnomalyGridError
Source§impl Display for AnomalyGridError
impl Display for AnomalyGridError
Source§impl Error for AnomalyGridError
impl Error for AnomalyGridError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl PartialEq for AnomalyGridError
impl PartialEq for AnomalyGridError
impl StructuralPartialEq for AnomalyGridError
Auto Trait Implementations§
impl Freeze for AnomalyGridError
impl RefUnwindSafe for AnomalyGridError
impl Send for AnomalyGridError
impl Sync for AnomalyGridError
impl Unpin for AnomalyGridError
impl UnwindSafe for AnomalyGridError
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
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