Struct ErrorContext
pub struct ErrorContext {
pub severity: ErrorSeverity,
pub component: ComponentType,
pub operation: String,
pub context: Option<String>,
pub timestamp: SystemTime,
}Expand description
Error context for detailed error reporting
Fields§
§severity: ErrorSeverityError severity
component: ComponentTypeComponent that generated the error
operation: StringOperation that failed
context: Option<String>Additional context information
timestamp: SystemTimeTimestamp when error occurred
Implementations§
§impl ErrorContext
impl ErrorContext
pub fn new(
severity: ErrorSeverity,
component: ComponentType,
operation: impl Into<String>,
) -> ErrorContext
pub fn new( severity: ErrorSeverity, component: ComponentType, operation: impl Into<String>, ) -> ErrorContext
Create a new error context
pub fn with_context(self, context: impl Into<String>) -> ErrorContext
pub fn with_context(self, context: impl Into<String>) -> ErrorContext
Add context information
Trait Implementations§
§impl Clone for ErrorContext
impl Clone for ErrorContext
§fn clone(&self) -> ErrorContext
fn clone(&self) -> ErrorContext
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 moreAuto Trait Implementations§
impl Freeze for ErrorContext
impl RefUnwindSafe for ErrorContext
impl Send for ErrorContext
impl Sync for ErrorContext
impl Unpin for ErrorContext
impl UnwindSafe for ErrorContext
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