pub struct ScriptBuilder { /* private fields */ }
Expand description

A builder struct for Script

Implementations§

source§

impl ScriptBuilder

source

pub fn build(&mut self) -> Script

Finish building the element

source

pub fn end(&mut self)

The final term in a chaining constructor.

This takes &mut self, and returns nothing. So you can use it as the final method when chaining in a closure.

source

pub fn src(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the src attribute

source

pub fn type_(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the type attribute

source

pub fn nomodule(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the nomodule attribute

source

pub fn async_(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the async attribute

source

pub fn defer(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the defer attribute

source

pub fn crossorigin(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the crossorigin attribute

source

pub fn integrity(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the integrity attribute

source

pub fn referrerpolicy( &mut self, value: impl Into<Cow<'static, str>> ) -> &mut Self

Set the value of the referrerpolicy attribute

source

pub fn blocking(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the blocking attribute

source

pub fn fetchpriority( &mut self, value: impl Into<Cow<'static, str>> ) -> &mut Self

Set the value of the fetchpriority attribute

source

pub fn access_key(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the accesskey attribute

source

pub fn auto_capitalize( &mut self, value: impl Into<Cow<'static, str>> ) -> &mut Self

Set the value of the autocapitalize attribute

source

pub fn autofocus(&mut self, value: bool) -> &mut Self

Set the value of the autofocus attribute

source

pub fn class(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the class attribute

source

pub fn content_editable( &mut self, value: impl Into<Cow<'static, str>> ) -> &mut Self

Set the value of the contenteditable attribute

source

pub fn direction(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the dir attribute

source

pub fn draggable(&mut self, value: bool) -> &mut Self

Set the value of the draggable attribute

source

pub fn enter_key_hint( &mut self, value: impl Into<Cow<'static, str>> ) -> &mut Self

Set the value of the enterkeyhint attribute

source

pub fn export_parts(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the exportparts attribute

source

pub fn hidden(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the hidden attribute

source

pub fn id(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the id attribute

source

pub fn inert(&mut self, value: bool) -> &mut Self

Set the value of the inert attribute

source

pub fn input_mode(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the inputmode attribute

source

pub fn is_(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the is attribute

source

pub fn item_id(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the itemid attribute

source

pub fn item_prop(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the itemprop attribute

source

pub fn item_ref(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the itemref attribute

source

pub fn item_scope(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the itemscope attribute

source

pub fn item_type(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the itemtype attribute

source

pub fn lang(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the lang attribute

source

pub fn nonce(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the nonce attribute

source

pub fn part(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the part attribute

source

pub fn slot(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the slot attribute

source

pub fn spellcheck(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the spellcheck attribute

source

pub fn style(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the style attribute

source

pub fn tab_index(&mut self, value: i64) -> &mut Self

Set the value of the tabindex attribute

source

pub fn title(&mut self, value: impl Into<Cow<'static, str>>) -> &mut Self

Set the value of the title attribute

source

pub fn translate(&mut self, value: bool) -> &mut Self

Set the value of the translate attribute

Auto Trait Implementations§

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, 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, 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.