pub enum MetricsError {
Sqlite(Error),
Chrono(ParseError),
Io(Error),
Task(String),
InvalidData(String),
}Expand description
Errors that can occur during metrics storage operations.
This enum covers all the error cases that can arise when working with the metrics storage system, from database errors to data validation issues.
Variants§
Sqlite(Error)
SQLite database operation failed.
This can occur due to SQL syntax errors, constraint violations, database corruption, or connection issues.
Chrono(ParseError)
Timestamp parsing failed.
This occurs when reading timestamps from the database that don’t conform to the expected RFC3339 format.
Io(Error)
I/O operation failed.
This can occur when creating the database file, directory, or during other file system operations.
Task(String)
Async task failed to complete.
This occurs when a spawned blocking task panics or is cancelled, typically indicating a serious system issue.
InvalidData(String)
Data validation failed.
This occurs when retrieved data doesn’t match expected constraints, such as invalid enum values or malformed data.
Trait Implementations§
Source§impl Debug for MetricsError
impl Debug for MetricsError
Source§impl Display for MetricsError
impl Display for MetricsError
Source§impl Error for MetricsError
impl Error for MetricsError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for MetricsError
impl From<Error> for MetricsError
Source§impl From<Error> for MetricsError
impl From<Error> for MetricsError
Source§impl From<ParseError> for MetricsError
impl From<ParseError> for MetricsError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl Freeze for MetricsError
impl !RefUnwindSafe for MetricsError
impl Send for MetricsError
impl Sync for MetricsError
impl Unpin for MetricsError
impl UnsafeUnpin for MetricsError
impl !UnwindSafe for MetricsError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.