Enum pg_async::PgFutureErr
source · pub enum PgFutureErr {
PoisonError,
SendError(String),
NixError(Error),
Utf8Error(Utf8Error),
Sql(PgSqlErr),
Json(Arc<Error>),
Int(ParseIntError),
Float(ParseFloatError),
UnknownType(String, Oid),
Str(&'static str),
}
Expand description
Returned when the future fails. Might print the SQL in Debug
.
Variants
PoisonError
SendError(String)
NixError(Error)
Utf8Error(Utf8Error)
Sql(PgSqlErr)
Json(Arc<Error>)
Int(ParseIntError)
Float(ParseFloatError)
UnknownType(String, Oid)
Happens when we don’t know how to convert a value to JSON.
Str(&'static str)
Implementations
sourceimpl PgFutureErr
impl PgFutureErr
sourcepub fn pg_timeout(&self) -> bool
pub fn pg_timeout(&self) -> bool
True if the future was likely to have been terminated due to a PostgreSQL timeout.
Trait Implementations
sourceimpl Clone for PgFutureErr
impl Clone for PgFutureErr
sourcefn clone(&self) -> PgFutureErr
fn clone(&self) -> PgFutureErr
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for PgFutureErr
impl Debug for PgFutureErr
sourceimpl Display for PgFutureErr
impl Display for PgFutureErr
sourceimpl Error for PgFutureErr
impl Error for PgFutureErr
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl From<&'static str> for PgFutureErr
impl From<&'static str> for PgFutureErr
sourcefn from(err: &'static str) -> PgFutureErr
fn from(err: &'static str) -> PgFutureErr
Converts to this type from the input type.
sourceimpl From<Error> for PgFutureErr
impl From<Error> for PgFutureErr
sourcefn from(err: Error) -> PgFutureErr
fn from(err: Error) -> PgFutureErr
Converts to this type from the input type.
sourceimpl From<Error> for PgFutureErr
impl From<Error> for PgFutureErr
sourcefn from(err: Error) -> PgFutureErr
fn from(err: Error) -> PgFutureErr
Converts to this type from the input type.
sourceimpl From<ParseFloatError> for PgFutureErr
impl From<ParseFloatError> for PgFutureErr
sourcefn from(err: ParseFloatError) -> PgFutureErr
fn from(err: ParseFloatError) -> PgFutureErr
Converts to this type from the input type.
sourceimpl From<ParseIntError> for PgFutureErr
impl From<ParseIntError> for PgFutureErr
sourcefn from(err: ParseIntError) -> PgFutureErr
fn from(err: ParseIntError) -> PgFutureErr
Converts to this type from the input type.
sourceimpl<T> From<PoisonError<T>> for PgFutureErr
impl<T> From<PoisonError<T>> for PgFutureErr
sourcefn from(_err: PoisonError<T>) -> PgFutureErr
fn from(_err: PoisonError<T>) -> PgFutureErr
Converts to this type from the input type.
sourceimpl<T> From<SendError<T>> for PgFutureErr
impl<T> From<SendError<T>> for PgFutureErr
sourcefn from(err: SendError<T>) -> PgFutureErr
fn from(err: SendError<T>) -> PgFutureErr
Converts to this type from the input type.
sourceimpl From<Utf8Error> for PgFutureErr
impl From<Utf8Error> for PgFutureErr
sourcefn from(err: Utf8Error) -> PgFutureErr
fn from(err: Utf8Error) -> PgFutureErr
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for PgFutureErr
impl Send for PgFutureErr
impl Sync for PgFutureErr
impl Unpin for PgFutureErr
impl !UnwindSafe for PgFutureErr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more