#[non_exhaustive]pub struct AttemptObservation {
pub status: Option<StatusCode>,
pub loaded_url: Option<Url>,
pub session_id: Option<SessionId>,
pub proxy_info: Option<ProxyInfo>,
pub response_bytes: Option<usize>,
}Expand description
Metadata observed after a kind successfully constructs its handler context.
§Examples
use http::StatusCode;
use millipede_core::crawler::AttemptObservation;
let mut observation = AttemptObservation::default();
observation.status = Some(StatusCode::OK);
observation.response_bytes = Some(1_024);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.status: Option<StatusCode>HTTP response status, when applicable.
loaded_url: Option<Url>Final loaded URL after redirects, when applicable.
session_id: Option<SessionId>Session used by the attempt.
proxy_info: Option<ProxyInfo>Proxy used by the attempt.
response_bytes: Option<usize>Buffered response size.
Trait Implementations§
Source§impl Clone for AttemptObservation
impl Clone for AttemptObservation
Source§fn clone(&self) -> AttemptObservation
fn clone(&self) -> AttemptObservation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AttemptObservation
impl Debug for AttemptObservation
Source§impl Default for AttemptObservation
impl Default for AttemptObservation
Source§fn default() -> AttemptObservation
fn default() -> AttemptObservation
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AttemptObservation
impl RefUnwindSafe for AttemptObservation
impl Send for AttemptObservation
impl Sync for AttemptObservation
impl Unpin for AttemptObservation
impl UnsafeUnpin for AttemptObservation
impl UnwindSafe for AttemptObservation
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