pub struct PgTryResult<T>(_);
Expand description

A std::result::Result-type value returned from pg_try() that allows for performing cleanup work after a closure raised an error and before it is possibly rethrown

Implementations

Retrieve the returned value or panic if the try block raised an error

Safety

This function is unsafe because you might be ignoring a caught Postgres ERROR (or Rust panic) and you better know what you’re doing when you do that.

Doing so can potentially leave Postgres in an undefined state and ultimately cause it to crash.

Perform some operation cleanup operation after the try block if an error was thrown.

Safety

This function does not rethrow a caught ERROR. You better know what you’re doing when you call this function.

Ignoring a caught error can leave Postgres in an undefined state and ultimately cause it to crash.

Perform some operation cleanup operation after the try block if an error was thrown.

In the event an error was caught, it is rethrown.

Perform some operation after the try block completes, regardless of if an error was thrown.

In the event an error was caught, it is rethrown. Otherwise, the return value from the try block is returned

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more