Struct SelectBuilder

Source
pub struct SelectBuilder(/* private fields */);

Implementations§

Source§

impl SelectBuilder

Source

pub fn id(self, value: impl AttributeValue<String>) -> Self

Source

pub fn class(self, value: impl AttributeValue<String>) -> Self

Source

pub fn autocomplete(self, value: impl AttributeValue<String>) -> Self

A DOMString providing a hint for a user agent’s autocomplete feature.

Source

pub fn autofocus(self, value: impl AttributeValue<bool>) -> Self

Lets you specify that a form control should have input focus when the page loads. Only one form element in a document can have the autofocus attribute.

Source

pub fn disabled(self, value: impl AttributeValue<bool>) -> Self

Indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example <fieldset>; if there is no containing element with the disabled attribute set, then the control is enabled.

Source

pub fn form(self, value: impl AttributeValue<String>) -> Self

The <form> element to associate the <select> with (its form owner). The value of this attribute must be the id of a <form> in the same document. (If this attribute is not set, the <select> is associated with its ancestor <form> element, if any.)

This attribute lets you associate <select> elements to <form>s anywhere in the document, not just inside a <form>. It can also override an ancestor <form> element.

Source

pub fn multiple(self, value: impl AttributeValue<bool>) -> Self

Indicates that multiple options can be selected in the list. If it is not specified, then only one option can be selected at a time. When multiple is specified, most browsers will show a scrolling list box instead of a single line dropdown.

Source

pub fn name(self, value: impl AttributeValue<String>) -> Self

This attribute is used to specify the name of the control.

Source

pub fn required(self, value: impl AttributeValue<bool>) -> Self

Indicates that an option with a non-empty string value must be selected.

Source

pub fn size(self, value: impl AttributeValue<String>) -> Self

If the control is presented as a scrolling list box (e.g. when multiple is specified), this attribute represents the number of rows in the list that should be visible at one time. Browsers are not required to present a select element as a scrolled list box. The default value is 0.

Source§

impl SelectBuilder

Source

pub fn on_blur( self, f: impl 'static + FnMut(FocusEvent, HtmlSelectElement), ) -> Self

Source

pub fn on_click( self, f: impl 'static + FnMut(MouseEvent, HtmlSelectElement), ) -> Self

Source

pub fn on_change( self, f: impl 'static + FnMut(Event, HtmlSelectElement), ) -> Self

Source

pub fn on_dblclick( self, f: impl 'static + FnMut(MouseEvent, HtmlSelectElement), ) -> Self

Source

pub fn on_focusout( self, f: impl 'static + FnMut(FocusEvent, HtmlSelectElement), ) -> Self

Source

pub fn on_input( self, f: impl 'static + FnMut(InputEvent, HtmlSelectElement), ) -> Self

Source

pub fn on_keydown( self, f: impl 'static + FnMut(KeyboardEvent, HtmlSelectElement), ) -> Self

Source

pub fn on_keyup( self, f: impl 'static + FnMut(KeyboardEvent, HtmlSelectElement), ) -> Self

Source

pub fn effect(self, f: impl Effect<HtmlSelectElement>) -> Self

Source§

impl SelectBuilder

Source

pub fn text(self, child: impl Text) -> Self

Source

pub fn child<Child>(self, c: Child) -> Self
where Child: Into<Element>,

Trait Implementations§

Source§

impl Builder for SelectBuilder

Source§

impl DomElement for SelectBuilder

Source§

impl From<SelectBuilder> for Element

Source§

fn from(builder: SelectBuilder) -> Self

Converts to this type from the input type.
Source§

impl From<SelectBuilder> for ElementBuilder

Source§

fn from(builder: SelectBuilder) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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.