cabin::html::h

Trait Script

Source
pub trait Script: WithAttribute {
Show 14 methods // Provided methods fn src(self, src: impl Into<Cow<'static, str>>) -> Self::Output<Src> { ... } fn type(self, type: impl Into<Cow<'static, str>>) -> Self::Output<Type> { ... } fn no_module(self) -> Self::Output<NoModule> { ... } fn with_no_module(self, no_module: bool) -> Self::Output<NoModule> { ... } fn async(self) -> Self::Output<Async> { ... } fn with_async(self, async: bool) -> Self::Output<Async> { ... } fn defer(self) -> Self::Output<Defer> { ... } fn with_defer(self, defer: bool) -> Self::Output<Defer> { ... } fn cross_origin( self, cross_origin: CrossOrigin, ) -> Self::Output<CrossOrigin> { ... } fn integrity( self, integrity: impl Into<Cow<'static, str>>, ) -> Self::Output<Integrity> { ... } fn referrer_policy( self, referrer_policy: ReferrerPolicy, ) -> Self::Output<ReferrerPolicy> { ... } fn blocking(self) -> Self::Output<Blocking> { ... } fn with_blocking(self, blocking: bool) -> Self::Output<Blocking> { ... } fn fetch_priority( self, fetch_priority: FetchPriority, ) -> Self::Output<FetchPriority> { ... }
}
Expand description

A script element allows to include dynamic script and data blocks in their documents.

Provided Methods§

Source

fn src(self, src: impl Into<Cow<'static, str>>) -> Self::Output<Src>

Address of the resource.

Source

fn type(self, type: impl Into<Cow<'static, str>>) -> Self::Output<Type>

The type of the script.

Source

fn no_module(self) -> Self::Output<NoModule>

Whether to prevent execution in user agents that support module scripts.

Source

fn with_no_module(self, no_module: bool) -> Self::Output<NoModule>

Whether to prevent execution in user agents that support module scripts.

Source

fn async(self) -> Self::Output<Async>

Execute script when available, without blocking while fetching.

Source

fn with_async(self, async: bool) -> Self::Output<Async>

Execute script when available, without blocking while fetching.

Source

fn defer(self) -> Self::Output<Defer>

Defer script execution.

Source

fn with_defer(self, defer: bool) -> Self::Output<Defer>

Defer script execution.

Source

fn cross_origin(self, cross_origin: CrossOrigin) -> Self::Output<CrossOrigin>

Handling of crossorigin requests.

Source

fn integrity( self, integrity: impl Into<Cow<'static, str>>, ) -> Self::Output<Integrity>

Integrity metadata used in Subresource Integrity checks.

Source

fn referrer_policy( self, referrer_policy: ReferrerPolicy, ) -> Self::Output<ReferrerPolicy>

How much referrer information to send.

Source

fn blocking(self) -> Self::Output<Blocking>

Source

fn with_blocking(self, blocking: bool) -> Self::Output<Blocking>

Source

fn fetch_priority( self, fetch_priority: FetchPriority, ) -> Self::Output<FetchPriority>

Sets the priority for fetches initiated by the element.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<A: Attributes, V: 'static> Script for Html<Script, A, V>