Struct script_traits::LoadData
source · pub struct LoadData {
pub load_origin: LoadOrigin,
pub url: ServoUrl,
pub creator_pipeline_id: Option<PipelineId>,
pub method: Method,
pub headers: HeaderMap,
pub data: Option<RequestBody>,
pub js_eval_result: Option<JsEvalResult>,
pub referrer: Referrer,
pub referrer_policy: ReferrerPolicy,
pub srcdoc: String,
pub inherited_secure_context: Option<bool>,
pub crash: Option<String>,
}
Expand description
can be passed to LoadUrl
to load a page with GET/POST
parameters or headers
Fields§
§load_origin: LoadOrigin
The origin where the load started.
url: ServoUrl
The URL.
creator_pipeline_id: Option<PipelineId>
The creator pipeline id if this is an about:blank load.
method: Method
The method.
headers: HeaderMap
The headers.
data: Option<RequestBody>
The data that will be used as the body of the request.
js_eval_result: Option<JsEvalResult>
The result of evaluating a javascript scheme url.
referrer: Referrer
The referrer.
referrer_policy: ReferrerPolicy
The referrer policy.
srcdoc: String
The source to use instead of a network response for a srcdoc document.
inherited_secure_context: Option<bool>
The inherited context is Secure, None if not inherited
crash: Option<String>
Servo internal: if crash details are present, trigger a crash error page with these details.
Implementations§
source§impl LoadData
impl LoadData
sourcepub fn new(
load_origin: LoadOrigin,
url: ServoUrl,
creator_pipeline_id: Option<PipelineId>,
referrer: Referrer,
referrer_policy: ReferrerPolicy,
inherited_secure_context: Option<bool>,
) -> LoadData
pub fn new( load_origin: LoadOrigin, url: ServoUrl, creator_pipeline_id: Option<PipelineId>, referrer: Referrer, referrer_policy: ReferrerPolicy, inherited_secure_context: Option<bool>, ) -> LoadData
Create a new LoadData
object.
Trait Implementations§
source§impl<'de> Deserialize<'de> for LoadData
impl<'de> Deserialize<'de> for LoadData
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LoadData
impl RefUnwindSafe for LoadData
impl Send for LoadData
impl Sync for LoadData
impl Unpin for LoadData
impl UnwindSafe for LoadData
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert