pub struct Error { /* private fields */ }Implementations§
Source§impl Error
impl Error
Sourcepub fn as_known(&self) -> Option<&KnownError>
pub fn as_known(&self) -> Option<&KnownError>
Try to interpret the error as a known error.
pub fn message(&self) -> &str
pub fn batch_request_idx(&self) -> Option<usize>
pub fn new_non_panic_with_current_backtrace(message: String) -> Self
Sourcepub fn new_in_panic_hook(panic_info: &PanicHookInfo<'_>) -> Self
pub fn new_in_panic_hook(panic_info: &PanicHookInfo<'_>) -> Self
Construct a new UnknownError from a std::panic::PanicHookInfo in a
panic hook. UnknownErrors created with this constructor will have a
proper, useful backtrace.
Sourcepub fn new_known(err: KnownError) -> Self
pub fn new_known(err: KnownError) -> Self
Build from a KnownError
pub fn from_panic_payload(panic_payload: Box<dyn Any + Send + 'static>) -> Self
pub fn extract_panic_message( panic_payload: Box<dyn Any + Send + 'static>, ) -> Option<String>
Sourcepub fn unwrap_known(self) -> KnownError
pub fn unwrap_known(self) -> KnownError
Extract the inner known error, or panic.
pub fn set_batch_request_idx(&mut self, batch_request_idx: usize)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<KnownError> for Error
impl From<KnownError> for Error
Source§fn from(known_error: KnownError) -> Self
fn from(known_error: KnownError) -> Self
Converts to this type from the input type.
Source§impl<T: UserFacingError> From<T> for Error
impl<T: UserFacingError> From<T> for Error
Source§impl From<UnknownError> for Error
impl From<UnknownError> for Error
Source§fn from(unknown_error: UnknownError) -> Self
fn from(unknown_error: UnknownError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for Error
impl From<ValidationError> for Error
Source§fn from(err: ValidationError) -> Self
fn from(err: ValidationError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more