Select

Struct Select 

Source
pub struct Select<'p> { /* private fields */ }
Expand description

<select>: Select element

Implementations§

Source§

impl<'p> Select<'p>

<select> items

Source

pub fn autocomplete<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add autocomplete attribute

Source

pub fn disabled(&mut self) -> &mut Self

Add disabled Boolean attribute

Source

pub fn form<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add form attribute

Source

pub fn multiple(&mut self) -> &mut Self

Add multiple Boolean attribute

Source

pub fn name<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add name attribute

Source

pub fn required(&mut self) -> &mut Self

Add required Boolean attribute

Source

pub fn size<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add size attribute

Source

pub fn option(&mut self) -> Option<'_>

Add Option child element

Source

pub fn optgroup(&mut self) -> OptGroup<'_>

Add OptGroup child element

Source

pub fn hr(&mut self) -> Hr<'_>

Add Hr child element

Source

pub fn comment<'v, V>(&mut self, com: V) -> &mut Self
where V: Into<Value<'v>>,

Add a comment

These characters will be replaced with entities:

CharEntity
-&hyphen;
<&gt;
>&lt;
Source

pub fn raw(&mut self, trusted: impl AsRef<str>) -> &mut Self

Add raw content

WARNING: trusted is used verbatim, with no escaping; do not call with untrusted content.

Source

pub fn close(&'p mut self) -> &'p mut Page

Close the element

Adds the closing tag if necessary (e.g. </select>).

Source§

impl<'p> Select<'p>

Global attributes

Source

pub fn id<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add id attribute

Source

pub fn class<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add class attribute

Source

pub fn accesskey<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add accesskey attribute

Source

pub fn autocapitalize<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add autocapitalize attribute

Source

pub fn autocorrect<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add autocorrect attribute

Source

pub fn autofocus(&mut self) -> &mut Self

Add autofocus Boolean attribute

Source

pub fn contenteditable<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add contenteditable attribute

Source

pub fn dir<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add dir attribute

Source

pub fn draggable<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add draggable attribute

Source

pub fn enterkeyhint<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add enterkeyhint attribute

Source

pub fn exportparts<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add exportparts attribute

Source

pub fn hidden<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add hidden attribute

Source

pub fn inert(&mut self) -> &mut Self

Add inert Boolean attribute

Source

pub fn is<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add is attribute

Source

pub fn inputmode<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add inputmode attribute

Source

pub fn lang<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add lang attribute

Source

pub fn nonce<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add nonce attribute

Source

pub fn part<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add part attribute

Source

pub fn popover<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add popover attribute

Source

pub fn role<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add role attribute

Source

pub fn slot<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add slot attribute

Source

pub fn spellcheck<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add spellcheck attribute

Source

pub fn style<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add style attribute

Source

pub fn tabindex<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add tabindex attribute

Source

pub fn title<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add title attribute

Source

pub fn translate<'a, V>(&mut self, val: V) -> &mut Self
where V: Into<Value<'a>>,

Add translate attribute

Auto Trait Implementations§

§

impl<'p> Freeze for Select<'p>

§

impl<'p> RefUnwindSafe for Select<'p>

§

impl<'p> Send for Select<'p>

§

impl<'p> Sync for Select<'p>

§

impl<'p> Unpin for Select<'p>

§

impl<'p> !UnwindSafe for Select<'p>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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 T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.