pub fn guard<Func, R>(f: Func) -> R
where
    Func: FnOnce() -> R + std::panic::UnwindSafe + std::panic::RefUnwindSafe,
{
    pg_try(f).unwrap()
}
/// Guard a closure such that Rust Panics are properly converted into Postgres ERRORs
///
/// Generally, this function won't need to be used directly, as it's also the implementation
/// behind the `#[pg_guard]` and `#[pg_extern]` macros.  Which means the function you'd like to guard
/// is likely already guarded.
///
/// This function is re-entrant and will properly "bubble-up" panics or errors to the top-level
/// before they're converted into Postgres ERRORs
Guard a closure such that Rust Panics are properly converted into Postgres ERRORs
Generally, this function won't need to be used directly, as it's also the implementation
behind the `#[pg_guard]` and `#[pg_extern]` macros.  Which means the function you'd like to guard
is likely already guarded.

This function is re-entrant and will properly "bubble-up" panics or errors to the top-level
before they're converted into Postgres ERRORs
Guard a closure such that Rust Panics are properly converted into Postgres ERRORs Generally this function won ' t need to be used directly as it ' s also the implementation behind the ` # [ pg_guard ] ` and ` # [ pg_extern ] ` macros . Which means the function you ' d like to guard is likely already guarded . This function is re - entrant and will properly " bubble - up " panics or errors to the top - level before they ' re converted into Postgres ERRORs
pub fn guard<Func, R>(f: Func) -> R
where
    Func: FnOnce() -> R + std::panic::UnwindSafe + std::panic::RefUnwindSafe,
{
    pg_try(f).unwrap()
}
pub fn guard < Func , R > ( f : Func ) -> R where Func : FnOnce ( ) -> R + std :: panic :: UnwindSafe + std :: panic :: RefUnwindSafe , { pg_try ( f ) . unwrap ( ) }
Guard a closure such that Rust Panics are properly converted into Postgres ERRORs
Generally, this function won't need to be used directly, as it's also the implementation
behind the `#[pg_guard]` and `#[pg_extern]` macros.
Guard a closure such that Rust Panics are properly converted into Postgres ERRORs Generally this function won ' t need to be used directly as it ' s also the implementation behind the ` # [ pg_guard ] ` and ` # [ pg_extern ] ` macros .
f
Func
f
Func