pub struct FixtureResponse { /* private fields */ }Expand description
One deterministic fixture response.
Implementations§
Source§impl FixtureResponse
impl FixtureResponse
Sourcepub fn failure(_detail: impl Into<String>) -> Self
pub fn failure(_detail: impl Into<String>) -> Self
A hard transport failure (TLS/5xx/malformed equivalent).
The detail is accepted for call-site compatibility but never exposed in diagnostics, mirroring production category-only errors so credential-bearing strings cannot leak.
Sourcepub fn truncated(prefix_len: usize) -> Self
pub fn truncated(prefix_len: usize) -> Self
A body truncated after prefix_len bytes (early disconnect).
Sourcepub fn slow(body: Vec<u8>, delay: Duration) -> Self
pub fn slow(body: Vec<u8>, delay: Duration) -> Self
A body delivered only after delay (timeout testing).
An adapter-unavailable condition (missing executable/spawn failure equivalent) for composition fallback testing.
Trait Implementations§
Source§impl Clone for FixtureResponse
impl Clone for FixtureResponse
Auto Trait Implementations§
impl Freeze for FixtureResponse
impl RefUnwindSafe for FixtureResponse
impl Send for FixtureResponse
impl Sync for FixtureResponse
impl Unpin for FixtureResponse
impl UnsafeUnpin for FixtureResponse
impl UnwindSafe for FixtureResponse
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