pub trait ErrorReportable {
type Inner;
// Required method
fn unwrap_or_report(self) -> Self::Inner;
}Expand description
Indicates that something can be reported as a Postgres ERROR, if that’s what it might represent.
Required Associated Types§
Required Methods§
Sourcefn unwrap_or_report(self) -> Self::Inner
fn unwrap_or_report(self) -> Self::Inner
Raise a Postgres ERROR if appropriate, otherwise return a value
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<T, E> ErrorReportable for Result<T, E>
impl<T, E> ErrorReportable for Result<T, E>
Source§fn unwrap_or_report(self) -> Self::Inner
fn unwrap_or_report(self) -> Self::Inner
If this Result represents the Ok variant, that value is returned.
If this Result represents the Err variant, raise it as an error. If it happens to
be an ErrorReport, then that is specifically raised. Otherwise it’s just a general
ereport! as a PgLogLevel::ERROR.