pub struct Case {
pub name: String,
pub description: String,
pub request: Request,
pub response: Option<Response>,
pub context: Context,
pub log_path: Option<PathBuf>,
}Expand description
One sanitized HTTP transaction, plus environmental context, plus a pointer to the log file that recorded it.
The shape mirrors what an on-call engineer would attach to an
escalation: the request that went out, the response that came back
(if any), what the caller’s own stack observed at the network layer
(Context), and a pointer to the relevant log slice.
Fields§
§name: StringStable case identifier; must match the JSON file’s basename.
description: StringOne-line human description of what this fixture exercises. Currently consumed only by docs/snapshots; not load-bearing.
request: Request§response: Option<Response>Absent for connection-layer failures (DNS, TLS, timeout) where no response was received.
context: Context§log_path: Option<PathBuf>Path to the log file relative to the project root. Resolved by
log_path_for.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Case
impl<'de> Deserialize<'de> for Case
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 Case
impl RefUnwindSafe for Case
impl Send for Case
impl Sync for Case
impl Unpin for Case
impl UnsafeUnpin for Case
impl UnwindSafe for Case
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