pub enum PostgrestUtilError {
Postgres(PostgresError),
Postgrest(PostgrestError),
Custom(CustomError),
}Expand description
Enum representing the different types of errors that can occur.
Variants§
Implementations§
Source§impl PostgrestUtilError
impl PostgrestUtilError
Sourcepub fn from_error_response(resp: ErrorResponse) -> Self
pub fn from_error_response(resp: ErrorResponse) -> Self
Creates an error from an ErrorResponse.
Sourcepub const fn http_status_code(&self, is_authenticated: bool) -> u16
pub const fn http_status_code(&self, is_authenticated: bool) -> u16
Returns the corresponding HTTP status code for the error.
Trait Implementations§
Source§impl Clone for PostgrestUtilError
impl Clone for PostgrestUtilError
Source§fn clone(&self) -> PostgrestUtilError
fn clone(&self) -> PostgrestUtilError
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PostgrestUtilError
impl Debug for PostgrestUtilError
Source§impl Display for PostgrestUtilError
impl Display for PostgrestUtilError
Source§impl Error for PostgrestUtilError
impl Error for PostgrestUtilError
1.30.0§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl Ord for PostgrestUtilError
impl Ord for PostgrestUtilError
Source§impl PartialEq for PostgrestUtilError
impl PartialEq for PostgrestUtilError
Source§impl PartialOrd for PostgrestUtilError
impl PartialOrd for PostgrestUtilError
impl Eq for PostgrestUtilError
impl StructuralPartialEq for PostgrestUtilError
Auto Trait Implementations§
impl Freeze for PostgrestUtilError
impl RefUnwindSafe for PostgrestUtilError
impl Send for PostgrestUtilError
impl Sync for PostgrestUtilError
impl Unpin for PostgrestUtilError
impl UnwindSafe for PostgrestUtilError
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)