Enum metrics_sqlite::MetricsError
source · pub enum MetricsError {
DbConnectionError(ConnectionError),
MigrationError(Box<dyn Error + Send + Sync>),
QueryError(Error),
InvalidDatabasePath,
EmptyDatabase,
KeyNotFound(String),
}
Expand description
Error type for any db/vitals related errors
Variants§
DbConnectionError(ConnectionError)
Error with database
MigrationError(Box<dyn Error + Send + Sync>)
Error migrating database
QueryError(Error)
Error querying metrics DB
InvalidDatabasePath
Error if path given is invalid
EmptyDatabase
Attempted to query database but found no records
KeyNotFound(String)
Given metric key name wasn’t found in the DB
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)>
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 From<ConnectionError> for MetricsError
impl From<ConnectionError> for MetricsError
source§fn from(source: ConnectionError) -> Self
fn from(source: ConnectionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for MetricsError
impl Send for MetricsError
impl Sync for MetricsError
impl Unpin 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
Mutably borrows from an owned value. Read more
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: AsExpression<T> + Sized,
T: SqlType + TypedExpressionType,
fn into_sql<T>(self) -> Self::Expressionwhere Self: AsExpression<T> + Sized, T: SqlType + TypedExpressionType,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
T: SqlType + TypedExpressionType,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere &'a Self: AsExpression<T>, T: SqlType + TypedExpressionType,
Convert
&self
to an expression for Diesel’s query builder. Read more