pub struct AnalysisContext<'a> {
pub page: &'a ParsedPage,
pub status_code: Option<u16>,
pub headers: &'a [(String, String)],
pub response_time: Option<Duration>,
pub redirect_chain: &'a [RedirectHop],
pub robots_txt: Option<&'a str>,
}Expand description
Context for analyzing a page, bundling parsed HTML with HTTP metadata.
Passed to each Analyzer to provide all the data needed for analysis.
The context borrows the parsed page and response metadata to avoid
unnecessary cloning.
Fields§
§page: &'a ParsedPageThe parsed page content.
status_code: Option<u16>HTTP status code (if fetched).
headers: &'a [(String, String)]Response headers.
response_time: Option<Duration>Response time (if measured).
redirect_chain: &'a [RedirectHop]Redirect chain hops (if any).
robots_txt: Option<&'a str>Pre-fetched robots.txt content for this page’s domain (if available).
Auto Trait Implementations§
impl<'a> Freeze for AnalysisContext<'a>
impl<'a> RefUnwindSafe for AnalysisContext<'a>
impl<'a> Send for AnalysisContext<'a>
impl<'a> Sync for AnalysisContext<'a>
impl<'a> Unpin for AnalysisContext<'a>
impl<'a> UnsafeUnpin for AnalysisContext<'a>
impl<'a> UnwindSafe for AnalysisContext<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more