pub struct ScriptPropsBuilder<TypedBuilderFields> { /* private fields */ }
Expand description

Builder for ScriptProps instances.

See ScriptProps::builder() for more info.

Implementations§

source§

impl<__children, __blocking, __type_, __src, __referrerpolicy, __nonce, __nomodule, __integrity, __fetchpriority, __defer, __crossorigin, __async_> ScriptPropsBuilder<((), __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

source

pub fn id( self, id: impl Into<String> ) -> ScriptPropsBuilder<((Option<String>,), __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

id: implInto<String>

An ID for the <script> tag.

source§

impl<__children, __blocking, __type_, __src, __referrerpolicy, __nonce, __nomodule, __integrity, __fetchpriority, __defer, __crossorigin, __id> ScriptPropsBuilder<(__id, (), __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

source

pub fn async_( self, async_: impl Into<String> ) -> ScriptPropsBuilder<(__id, (Option<String>,), __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

async_: implInto<String>

The async attribute.

source§

impl<__children, __blocking, __type_, __src, __referrerpolicy, __nonce, __nomodule, __integrity, __fetchpriority, __defer, __async_, __id> ScriptPropsBuilder<(__id, __async_, (), __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

source

pub fn crossorigin( self, crossorigin: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, (Option<String>,), __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

crossorigin: implInto<String>

The crossorigin attribute.

source§

impl<__children, __blocking, __type_, __src, __referrerpolicy, __nonce, __nomodule, __integrity, __fetchpriority, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, (), __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

source

pub fn defer( self, defer: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, (Option<String>,), __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

defer: implInto<String>

The defer attribute.

source§

impl<__children, __blocking, __type_, __src, __referrerpolicy, __nonce, __nomodule, __integrity, __defer, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, (), __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

source

pub fn fetchpriority( self, fetchpriority: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, (Option<String>,), __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

fetchpriority: implInto<String>

The fetchpriority attribute.

source§

impl<__children, __blocking, __type_, __src, __referrerpolicy, __nonce, __nomodule, __fetchpriority, __defer, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, (), __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

source

pub fn integrity( self, integrity: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, (Option<String>,), __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

integrity: implInto<String>

The integrity attribute.

source§

impl<__children, __blocking, __type_, __src, __referrerpolicy, __nonce, __integrity, __fetchpriority, __defer, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, (), __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

source

pub fn nomodule( self, nomodule: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, (Option<String>,), __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

nomodule: implInto<String>

The nomodule attribute.

source§

impl<__children, __blocking, __type_, __src, __referrerpolicy, __nomodule, __integrity, __fetchpriority, __defer, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, (), __referrerpolicy, __src, __type_, __blocking, __children)>

source

pub fn nonce( self, nonce: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, (Option<String>,), __referrerpolicy, __src, __type_, __blocking, __children)>

nonce: implInto<String>

The nonce attribute.

source§

impl<__children, __blocking, __type_, __src, __nonce, __nomodule, __integrity, __fetchpriority, __defer, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, (), __src, __type_, __blocking, __children)>

source

pub fn referrerpolicy( self, referrerpolicy: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, (Option<String>,), __src, __type_, __blocking, __children)>

referrerpolicy: implInto<String>

The referrerpolicy attribute.

source§

impl<__children, __blocking, __type_, __referrerpolicy, __nonce, __nomodule, __integrity, __fetchpriority, __defer, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, (), __type_, __blocking, __children)>

source

pub fn src( self, src: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, (Option<String>,), __type_, __blocking, __children)>

src: implInto<String>

The src attribute.

source§

impl<__children, __blocking, __src, __referrerpolicy, __nonce, __nomodule, __integrity, __fetchpriority, __defer, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, (), __blocking, __children)>

source

pub fn type_( self, type_: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, (Option<String>,), __blocking, __children)>

type_: implInto<String>

The type attribute.

source§

impl<__children, __type_, __src, __referrerpolicy, __nonce, __nomodule, __integrity, __fetchpriority, __defer, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, (), __children)>

source

pub fn blocking( self, blocking: impl Into<String> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, (Option<String>,), __children)>

blocking: implInto<String>

The blocking attribute.

source§

impl<__blocking, __type_, __src, __referrerpolicy, __nonce, __nomodule, __integrity, __fetchpriority, __defer, __crossorigin, __async_, __id> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, ())>

source

pub fn children( self, children: Box<dyn FnOnce(Scope) -> Fragment> ) -> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, (Option<Box<dyn FnOnce(Scope) -> Fragment>>,))>

children: [Box<dyn FnOnce(Scope) -> Fragment>]

The content of the <script> tag.

source§

impl<__children: ScriptPropsBuilder_Optional<Option<Box<dyn FnOnce(Scope) -> Fragment>>>, __blocking: ScriptPropsBuilder_Optional<Option<String>>, __type_: ScriptPropsBuilder_Optional<Option<String>>, __src: ScriptPropsBuilder_Optional<Option<String>>, __referrerpolicy: ScriptPropsBuilder_Optional<Option<String>>, __nonce: ScriptPropsBuilder_Optional<Option<String>>, __nomodule: ScriptPropsBuilder_Optional<Option<String>>, __integrity: ScriptPropsBuilder_Optional<Option<String>>, __fetchpriority: ScriptPropsBuilder_Optional<Option<String>>, __defer: ScriptPropsBuilder_Optional<Option<String>>, __crossorigin: ScriptPropsBuilder_Optional<Option<String>>, __async_: ScriptPropsBuilder_Optional<Option<String>>, __id: ScriptPropsBuilder_Optional<Option<String>>> ScriptPropsBuilder<(__id, __async_, __crossorigin, __defer, __fetchpriority, __integrity, __nomodule, __nonce, __referrerpolicy, __src, __type_, __blocking, __children)>

source

pub fn build(self) -> ScriptProps

Finalise the builder and create its ScriptProps instance

Trait Implementations§

source§

impl<TypedBuilderFields> Clone for ScriptPropsBuilder<TypedBuilderFields>where TypedBuilderFields: Clone,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<TypedBuilderFields> RefUnwindSafe for ScriptPropsBuilder<TypedBuilderFields>where TypedBuilderFields: RefUnwindSafe,

§

impl<TypedBuilderFields> Send for ScriptPropsBuilder<TypedBuilderFields>where TypedBuilderFields: Send,

§

impl<TypedBuilderFields> Sync for ScriptPropsBuilder<TypedBuilderFields>where TypedBuilderFields: Sync,

§

impl<TypedBuilderFields> Unpin for ScriptPropsBuilder<TypedBuilderFields>where TypedBuilderFields: Unpin,

§

impl<TypedBuilderFields> UnwindSafe for ScriptPropsBuilder<TypedBuilderFields>where TypedBuilderFields: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more