Skip to main content

PageResponse

Struct PageResponse 

Source
pub struct PageResponse {
Show 25 fields pub content: Option<Vec<u8>>, pub content_map: Option<HashMap<String, Bytes>>, pub headers: Option<HeaderMap>, pub remote_addr: Option<SocketAddr>, pub cookies: Option<HeaderMap>, pub status_code: StatusCode, pub final_url: Option<String>, pub error_for_status: Option<Result<Response, Error>>, pub screenshot_bytes: Option<Vec<u8>>, pub openai_credits_used: Option<Vec<OpenAIUsage>>, pub extra_ai_data: Option<Vec<AIResults>>, pub gemini_credits_used: Option<Vec<GeminiUsage>>, pub extra_gemini_data: Option<Vec<AIResults>>, pub remote_multimodal_usage: Option<Vec<AutomationUsage>>, pub extra_remote_multimodal_data: Option<Vec<AutomationResults>>, pub waf_check: bool, pub bytes_transferred: Option<f64>, pub signature: Option<u64>, pub response_map: Option<HashMap<String, f64>>, pub request_map: Option<HashMap<String, f64>>, pub anti_bot_tech: AntiBotTech, pub metadata: Option<Box<Metadata>>, pub duration: Option<Instant>, pub spawn_pages: Option<Vec<String>>, pub content_truncated: bool,
}
Expand description

The response of a web page.

Fields§

§content: Option<Vec<u8>>

The page response resource.

§content_map: Option<HashMap<String, Bytes>>
Available on crate feature spider_cloud only.

Additional content keyed by return format (populated when multiple formats are requested via [SpiderCloudConfig::with_return_formats]).

§headers: Option<HeaderMap>

The headers of the response. (Always None if a webdriver protocol is used for fetching.).

§remote_addr: Option<SocketAddr>
Available on crate feature remote_addr only.

The remote address of the page.

§cookies: Option<HeaderMap>
Available on crate feature cookies only.

The cookies of the response.

§status_code: StatusCode

The status code of the request.

§final_url: Option<String>

The final url destination after any redirects.

§error_for_status: Option<Result<Response, Error>>

The message of the response error if any.

§screenshot_bytes: Option<Vec<u8>>
Available on crate feature chrome only.

The screenshot bytes of the page. The ScreenShotConfig bytes boolean needs to be set to true.

§openai_credits_used: Option<Vec<OpenAIUsage>>
Available on crate feature openai only.

The credits used from OpenAI in order.

§extra_ai_data: Option<Vec<AIResults>>
Available on crate feature openai only.

The extra data from the AI, example extracting data etc…

§gemini_credits_used: Option<Vec<GeminiUsage>>
Available on crate feature gemini only.

The credits used from Gemini in order.

§extra_gemini_data: Option<Vec<AIResults>>
Available on crate feature gemini only.

The extra data from the Gemini AI.

§remote_multimodal_usage: Option<Vec<AutomationUsage>>

The usage from remote multimodal automation (extraction, etc.). Works with both Chrome and HTTP-only crawls.

§extra_remote_multimodal_data: Option<Vec<AutomationResults>>

The extra data from the remote multimodal automation (extraction results, etc.). Works with both Chrome and HTTP-only crawls.

§waf_check: bool

A WAF was found on the page.

§bytes_transferred: Option<f64>

The total bytes transferred for the page. Mainly used for chrome events. Inspect the content for bytes when using http instead.

§signature: Option<u64>

The signature of the page to use for handling de-duplication.

§response_map: Option<HashMap<String, f64>>
Available on crate feature chrome only.

All of the response events mapped with the amount of bytes used.

§request_map: Option<HashMap<String, f64>>
Available on crate feature chrome only.

All of the request events mapped with the time period of the event sent.

§anti_bot_tech: AntiBotTech

The anti-bot tech used.

§metadata: Option<Box<Metadata>>

The metadata of the page.

§duration: Option<Instant>
Available on crate feature time only.

The duration of the request.

§spawn_pages: Option<Vec<String>>

URLs to spawn as new pages from OpenPage actions. These are URLs the automation agent requested to open in new tabs. The caller (website.rs) should create new pages for these using the browser.

§content_truncated: bool

Whether the response content was truncated due to a stream error, chunk idle timeout, or Content-Length mismatch (fewer bytes received than expected).

Trait Implementations§

Source§

impl Debug for PageResponse

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for PageResponse

Source§

fn default() -> PageResponse

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more