#[non_exhaustive]pub struct Script {
pub src: Option<Cow<'static, str>>,
pub type_: Option<Cow<'static, str>>,
pub nomodule: Option<Cow<'static, str>>,
pub async_: Option<Cow<'static, str>>,
pub defer: Option<Cow<'static, str>>,
pub crossorigin: Option<Cow<'static, str>>,
pub integrity: Option<Cow<'static, str>>,
pub referrerpolicy: Option<Cow<'static, str>>,
pub blocking: Option<Cow<'static, str>>,
pub fetchpriority: Option<Cow<'static, str>>,
/* private fields */
}
Expand description
The HTML <script>
element
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.src: Option<Cow<'static, str>>
Address of the resource
type_: Option<Cow<'static, str>>
Type of script
nomodule: Option<Cow<'static, str>>
Prevents execution in user agents that support module scripts
async_: Option<Cow<'static, str>>
Execute script when available, without blocking while fetching
defer: Option<Cow<'static, str>>
Defer script execution
crossorigin: Option<Cow<'static, str>>
How the element handles crossorigin requests
integrity: Option<Cow<'static, str>>
Integrity metadata used in Subresource Integrity checks [SRI]
referrerpolicy: Option<Cow<'static, str>>
Referrer policy for fetches initiated by the element
blocking: Option<Cow<'static, str>>
Whether the element is potentially render-blocking
fetchpriority: Option<Cow<'static, str>>
Sets the priority for fetches initiated by the element
Trait Implementations§
source§impl PartialEq<Script> for Script
impl PartialEq<Script> for Script
source§impl PartialOrd<Script> for Script
impl PartialOrd<Script> for Script
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more