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

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

The HTML <option> element is used to define an item contained in a <select>, an <optgroup>, or a <datalist> element. As such, <option> can represent menu items in popups and other lists of items in an HTML document.

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

Implementations

impl OptionBuilder[src]

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

Initialize the element with all of the attributes so far.

impl OptionBuilder[src]

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

If set, this option is not checkable. Often browsers grey out such control and it won't receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled

element.

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

This attribute is text for the label indicating the meaning of the option. If the label attribute isn't defined, its value is that of the element text content.

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

If present, indicates that the option is initially selected. If the

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

The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element.

Trait Implementations

impl Element for OptionBuilder[src]

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

impl GlobalEventHandler for OptionBuilder[src]

impl HtmlElement for OptionBuilder[src]

impl Node for OptionBuilder[src]

impl Parent<Text> for OptionBuilder[src]

Auto Trait Implementations

impl !RefUnwindSafe for OptionBuilder

impl !Send for OptionBuilder

impl !Sync for OptionBuilder

impl Unpin for OptionBuilder

impl !UnwindSafe for OptionBuilder

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: Node
[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.