Trait pgrx_pg_sys::submodules::panic::ErrorReportable

source ·
pub trait ErrorReportable {
    type Inner;

    // Required method
    fn 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§

source

fn report(self) -> Self::Inner

Raise a Postgres ERROR if appropriate, otherwise return a value

Implementations on Foreign Types§

source§

impl<T, E> ErrorReportable for Result<T, E>
where E: Any + Display,

source§

fn 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.

§

type Inner = T

Implementors§