pub struct RequestResult {
pub duration: Duration,
pub completed_at: Instant,
pub success: bool,
pub status_code: Option<u16>,
pub response_body: Option<String>,
}Fields§
§duration: Duration§completed_at: InstantWall-clock instant at which the response was received (or the error occurred).
Used by the output module to bucket results into per-stage windows when
mode == Curve. Zero-cost in fixed mode where curve_stages is None.
success: bool§status_code: Option<u16>§response_body: Option<String>Implementations§
Source§impl RequestResult
impl RequestResult
Sourcepub fn new(
duration: Duration,
success: bool,
status_code: Option<u16>,
response_body: Option<String>,
) -> Self
pub fn new( duration: Duration, success: bool, status_code: Option<u16>, response_body: Option<String>, ) -> Self
Constructs a RequestResult with all fields explicit.
Use this constructor rather than struct literals so that adding fields in the future causes a compile error at every call site, preventing silent omissions.
Auto Trait Implementations§
impl Freeze for RequestResult
impl RefUnwindSafe for RequestResult
impl Send for RequestResult
impl Sync for RequestResult
impl Unpin for RequestResult
impl UnsafeUnpin for RequestResult
impl UnwindSafe for RequestResult
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