pub struct GenericError {
pub message: String,
}Expand description
A special marker type for generic/standard errors that don’t have specific metadata
Fields§
§message: StringTrait Implementations§
Source§impl AlienErrorData for GenericError
impl AlienErrorData for GenericError
Source§fn http_status_code(&self) -> u16
fn http_status_code(&self) -> u16
HTTP status code for this error (defaults to 500).
Source§fn retryable_inherit(&self) -> Option<bool>
fn retryable_inherit(&self) -> Option<bool>
Whether to inherit the retryable flag from the source error.
Returns None if this error should inherit from source, Some(value) for explicit value.
Source§fn internal_inherit(&self) -> Option<bool>
fn internal_inherit(&self) -> Option<bool>
Whether to inherit the internal flag from the source error.
Returns None if this error should inherit from source, Some(value) for explicit value.
Source§fn http_status_code_inherit(&self) -> Option<u16>
fn http_status_code_inherit(&self) -> Option<u16>
Whether to inherit the HTTP status code from the source error.
Returns None if this error should inherit from source, Some(value) for explicit value.
Source§impl Clone for GenericError
impl Clone for GenericError
Source§fn clone(&self) -> GenericError
fn clone(&self) -> GenericError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GenericError
impl Debug for GenericError
Source§impl Default for GenericError
impl Default for GenericError
Source§fn default() -> GenericError
fn default() -> GenericError
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GenericError
impl<'de> Deserialize<'de> for GenericError
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 Display for GenericError
impl Display for GenericError
Source§impl Error for GenericError
impl Error for GenericError
1.30.0 · Source§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 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for GenericError
impl PartialEq for GenericError
Source§impl Serialize for GenericError
impl Serialize for GenericError
impl Eq for GenericError
impl StructuralPartialEq for GenericError
Auto Trait Implementations§
impl Freeze for GenericError
impl RefUnwindSafe for GenericError
impl Send for GenericError
impl Sync for GenericError
impl Unpin for GenericError
impl UnsafeUnpin for GenericError
impl UnwindSafe for GenericError
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<E> IntoAlienErrorDirect for Ewhere
E: Error + 'static,
impl<E> IntoAlienErrorDirect for Ewhere
E: Error + 'static,
Source§fn into_alien_error(self) -> AlienError
fn into_alien_error(self) -> AlienError
Convert a standard error into an AlienError