Struct net_traits::request::Request
source · pub struct Request {Show 31 fields
pub id: RequestId,
pub method: Method,
pub local_urls_only: bool,
pub sandboxed_storage_area_urls: bool,
pub headers: HeaderMap,
pub unsafe_request: bool,
pub body: Option<RequestBody>,
pub window: Window,
pub keep_alive: bool,
pub service_workers_mode: ServiceWorkersMode,
pub initiator: Initiator,
pub destination: Destination,
pub origin: Origin,
pub referrer: Referrer,
pub referrer_policy: ReferrerPolicy,
pub pipeline_id: Option<PipelineId>,
pub synchronous: bool,
pub mode: RequestMode,
pub use_cors_preflight: bool,
pub credentials_mode: CredentialsMode,
pub use_url_credentials: bool,
pub cache_mode: CacheMode,
pub redirect_mode: RedirectMode,
pub integrity_metadata: String,
pub url_list: Vec<ServoUrl>,
pub redirect_count: u32,
pub response_tainting: ResponseTainting,
pub parser_metadata: ParserMetadata,
pub policy_container: RequestPolicyContainer,
pub https_state: HttpsState,
pub crash: Option<String>,
}
Expand description
A Request as defined by the Fetch spec.
Fields§
§id: RequestId
The id of this request so that the task that triggered it can route messages to the correct listeners.
method: Method
§local_urls_only: bool
§sandboxed_storage_area_urls: bool
§headers: HeaderMap
§unsafe_request: bool
§body: Option<RequestBody>
§window: Window
§keep_alive: bool
§service_workers_mode: ServiceWorkersMode
§initiator: Initiator
§destination: Destination
§origin: Origin
§referrer: Referrer
§referrer_policy: ReferrerPolicy
§pipeline_id: Option<PipelineId>
§synchronous: bool
§mode: RequestMode
§use_cors_preflight: bool
§credentials_mode: CredentialsMode
§use_url_credentials: bool
§cache_mode: CacheMode
§redirect_mode: RedirectMode
§integrity_metadata: String
§url_list: Vec<ServoUrl>
§redirect_count: u32
§response_tainting: ResponseTainting
§parser_metadata: ParserMetadata
§policy_container: RequestPolicyContainer
§https_state: HttpsState
§crash: Option<String>
Servo internal: if crash details are present, trigger a crash error page with these details.
Implementations§
source§impl Request
impl Request
pub fn new( id: RequestId, url: ServoUrl, origin: Option<Origin>, referrer: Referrer, pipeline_id: Option<PipelineId>, https_state: HttpsState, ) -> Request
sourcepub fn current_url(&self) -> ServoUrl
pub fn current_url(&self) -> ServoUrl
sourcepub fn current_url_mut(&mut self) -> &mut ServoUrl
pub fn current_url_mut(&mut self) -> &mut ServoUrl
sourcepub fn is_subresource_request(&self) -> bool
pub fn is_subresource_request(&self) -> bool
pub fn timing_type(&self) -> ResourceTimingType
Trait Implementations§
source§impl MallocSizeOf for Request
impl MallocSizeOf for Request
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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
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