pub struct ErrorContext {
pub operation: String,
pub organism_id: Option<String>,
pub timestamp: u64,
pub recovery_strategy: ErrorRecovery,
pub metadata: HashMap<String, String>,
}
Expand description
Error context for better debugging
Fieldsยง
ยงoperation: String
ยงorganism_id: Option<String>
ยงtimestamp: u64
ยงrecovery_strategy: ErrorRecovery
ยงmetadata: HashMap<String, String>
Implementationsยง
Sourceยงimpl ErrorContext
impl ErrorContext
pub fn new(operation: &str) -> Self
pub fn with_organism(self, organism_id: &str) -> Self
pub fn with_recovery(self, strategy: ErrorRecovery) -> Self
pub fn with_metadata(self, key: &str, value: &str) -> Self
Trait Implementationsยง
Sourceยงimpl Clone for ErrorContext
impl Clone for ErrorContext
Sourceยง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