#[non_exhaustive]pub struct ServerException {
pub code: i32,
pub name: Option<String>,
pub message: String,
pub stack_trace: Option<String>,
}Available on crate feature
ext only.Expand description
A Code: N. DB::Exception: ... rejection out of Error::BadResponse.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.code: i32Signed on the wire; small positives in practice.
name: Option<String>The trailing (UPPERCASE_NAME) tag; older and proxied errors omit it.
message: StringBody without the code prefix, the marker, the name tag and the version.
stack_trace: Option<String>The Stack trace: section, when the server included one.
Implementations§
Source§impl ServerException
impl ServerException
Sourcepub fn parse(error: &Error) -> Option<Self>
pub fn parse(error: &Error) -> Option<Self>
None for any other Error variant, and for a body that neither opens
with Code: N. nor is a bare code – a proxy page or a bare status line.
A bare code parses with an empty message.
Sourcepub fn is_retriable(&self) -> bool
pub fn is_retriable(&self) -> bool
Off the same table as crate::Error::is_retriable_code.
Trait Implementations§
Source§impl Clone for ServerException
impl Clone for ServerException
Source§impl Debug for ServerException
impl Debug for ServerException
impl Eq for ServerException
Source§impl PartialEq for ServerException
impl PartialEq for ServerException
impl StructuralPartialEq for ServerException
Auto Trait Implementations§
impl Freeze for ServerException
impl RefUnwindSafe for ServerException
impl Send for ServerException
impl Sync for ServerException
impl Unpin for ServerException
impl UnsafeUnpin for ServerException
impl UnwindSafe for ServerException
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.