Skip to main content

ResultExt

Trait ResultExt 

Source
pub trait ResultExt<T> {
    // Required method
    fn with_query<F>(self, ctx: F) -> Result<T>
       where F: FnOnce() -> QueryContext;
}
Expand description

Attaches SQL and parameter context to a database error.

Required Methods§

Source

fn with_query<F>(self, ctx: F) -> Result<T>
where F: FnOnce() -> QueryContext,

Attach SQL and parameter context lazily on the error path.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, E> ResultExt<T> for Result<T, E>
where E: Into<DrizzleError>,

Source§

fn with_query<F>(self, ctx: F) -> Result<T>
where F: FnOnce() -> QueryContext,

Implementors§