pub struct OperationalError {
pub code: Option<String>,
pub message: Option<String>,
pub severity: Option<ErrorSeverity>,
pub category: Option<String>,
pub timestamp: Option<DateTime<Utc>>,
pub recoverable: Option<bool>,
pub recovery_action: Option<String>,
pub is_active: Option<bool>,
}Expand description
Operational error.
Fields§
§code: Option<String>Error code
message: Option<String>Error message
severity: Option<ErrorSeverity>Error severity
category: Option<String>Error category/component
timestamp: Option<DateTime<Utc>>Time error occurred
recoverable: Option<bool>Whether error is recoverable
recovery_action: Option<String>Recovery action taken or suggested
is_active: Option<bool>Whether error is currently active
Implementations§
Source§impl OperationalError
impl OperationalError
Sourcepub fn new(
code: impl Into<String>,
message: impl Into<String>,
severity: ErrorSeverity,
) -> Self
pub fn new( code: impl Into<String>, message: impl Into<String>, severity: ErrorSeverity, ) -> Self
Create a new error.
Sourcepub fn recoverable(self) -> Self
pub fn recoverable(self) -> Self
Mark as recoverable.
Trait Implementations§
Source§impl Clone for OperationalError
impl Clone for OperationalError
Source§fn clone(&self) -> OperationalError
fn clone(&self) -> OperationalError
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 OperationalError
impl Debug for OperationalError
Source§impl Default for OperationalError
impl Default for OperationalError
Source§fn default() -> OperationalError
fn default() -> OperationalError
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OperationalError
impl<'de> Deserialize<'de> for OperationalError
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
Auto Trait Implementations§
impl Freeze for OperationalError
impl RefUnwindSafe for OperationalError
impl Send for OperationalError
impl Sync for OperationalError
impl Unpin for OperationalError
impl UnwindSafe for OperationalError
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