pub struct ErrorContext {
pub provider: String,
pub endpoint: String,
pub request_id: Option<String>,
pub timestamp: DateTime<Utc>,
pub retry_count: u32,
pub suggested_action: SuggestedAction,
}
Expand description
Context information for error tracking
Fields§
§provider: String
AI provider that generated the error
endpoint: String
API endpoint that was called
request_id: Option<String>
Request ID for tracking
timestamp: DateTime<Utc>
Timestamp when the error occurred
retry_count: u32
Number of retry attempts
suggested_action: SuggestedAction
Suggested action to take
Implementations§
Source§impl ErrorContext
impl ErrorContext
Sourcepub fn with_retry(self, retry_count: u32) -> Self
pub fn with_retry(self, retry_count: u32) -> Self
Create error context with retry information
Sourcepub fn with_request_id(self, request_id: String) -> Self
pub fn with_request_id(self, request_id: String) -> Self
Create error context with request ID
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 moreSource§impl Debug for ErrorContext
impl Debug for ErrorContext
Source§impl<'de> Deserialize<'de> for ErrorContext
impl<'de> Deserialize<'de> for ErrorContext
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 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