pub struct RecordedError {
pub error: ModelErrorKind,
pub http_status: Option<u16>,
pub retry_after_ms: Option<u64>,
pub message: String,
}Expand description
A ModelError in a form a recording can hold. ModelError itself stays
free of serde so the model interface owes nothing to the recorder; replay
reconstructs the original through RecordedError::into_model_error, which
is what lets a recorded failure — an overload that triggered the fallback
model, say — replay as a failure instead of being silently skipped.
The status is http_status because the enclosing Outcome already
spends status on its own tag.
Fields§
§error: ModelErrorKind§http_status: Option<u16>§retry_after_ms: Option<u64>§message: StringImplementations§
Source§impl RecordedError
impl RecordedError
pub fn into_model_error(self) -> ModelError
Trait Implementations§
Source§impl Clone for RecordedError
impl Clone for RecordedError
Source§impl Debug for RecordedError
impl Debug for RecordedError
Source§impl<'de> Deserialize<'de> for RecordedError
impl<'de> Deserialize<'de> for RecordedError
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 From<&ModelError> for RecordedError
impl From<&ModelError> for RecordedError
Source§fn from(e: &ModelError) -> Self
fn from(e: &ModelError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RecordedError
impl PartialEq for RecordedError
Source§impl Serialize for RecordedError
impl Serialize for RecordedError
impl StructuralPartialEq for RecordedError
Auto Trait Implementations§
impl Forget for RecordedError
impl Freeze for RecordedError
impl Move for RecordedError
impl RefUnwindSafe for RecordedError
impl Send for RecordedErrorwhere
RawVecInner: Send,
impl Sync for RecordedErrorwhere
RawVecInner: Sync,
impl Unpin for RecordedError
impl UnsafeUnpin for RecordedError
impl UnwindSafe for RecordedErrorwhere
RawVecInner: UnwindSafe,
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