pub trait DbErrorContext<Output>: Sized {
// Required method
fn with_db_context<D>(self, context: impl FnOnce() -> D) -> Output
where D: Display;
// Provided method
fn db_context<D>(self, context: D) -> Output
where D: Display { ... }
}Expand description
Extension trait for .db_context() and .with_db_context()
Required Methods§
Sourcefn with_db_context<D>(self, context: impl FnOnce() -> D) -> Outputwhere
D: Display,
fn with_db_context<D>(self, context: impl FnOnce() -> D) -> Outputwhere
D: Display,
Returns the error, or result, with more context (from a closure)
If necessary, converts a rusqlite::Error to a DbSqlError.
Provided Methods§
Sourcefn db_context<D>(self, context: D) -> Outputwhere
D: Display,
fn db_context<D>(self, context: D) -> Outputwhere
D: Display,
Returns the error, or result, with more context
If necessary, converts a rusqlite::Error to a DbSqlError.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.