Struct net_traits::request::Request
source · pub struct Request {Show 29 fields
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: Option<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 csp_list: Option<CspList>,
pub https_state: HttpsState,
}
Expand description
A Request as defined by the Fetch spec.
Fields§
§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: Option<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
§csp_list: Option<CspList>
§https_state: HttpsState
Implementations§
source§impl Request
impl Request
pub fn new(
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.