[][src]Struct moxie_dom::elements::forms::SelectBuilder

#[must_use = "needs to be built"]pub struct SelectBuilder { /* fields omitted */ }

The HTML <select> element represents a control that provides a menu of options.

A type for initializing the element's attributes before calling build.

Implementations

impl SelectBuilder[src]

pub fn build(self) -> Select[src]

Initialize the element with all of the attributes so far.

impl SelectBuilder[src]

pub fn autocomplete(self, to_set: impl ToString) -> Self[src]

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

pub fn autofocus(self, to_set: bool) -> Self[src]

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.

pub fn disabled(self, to_set: bool) -> Self[src]

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.

pub fn form(self, to_set: impl ToString) -> Self[src]

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.

pub fn multiple(self, to_set: bool) -> Self[src]

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.

pub fn name(self, to_set: impl ToString) -> Self[src]

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

pub fn required(self, to_set: bool) -> Self[src]

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

pub fn size(self, to_set: impl ToString) -> Self[src]

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.

Trait Implementations

impl ElementBuilder for SelectBuilder[src]

impl<E> EventTarget<E> for SelectBuilder where
    E: GlobalEvent
[src]

impl GlobalEventHandler for SelectBuilder[src]

impl HtmlElementBuilder for SelectBuilder[src]

impl NodeWrapper for SelectBuilder[src]

impl Parent<Optgroup> for SelectBuilder[src]

impl Parent<Option> for SelectBuilder[src]

Auto Trait Implementations

impl !RefUnwindSafe for SelectBuilder[src]

impl !Send for SelectBuilder[src]

impl !Sync for SelectBuilder[src]

impl Unpin for SelectBuilder[src]

impl !UnwindSafe for SelectBuilder[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<N> Child for N where
    N: NodeWrapper
[src]

impl<T> Downcast for T where
    T: Any

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.