Struct OptionBuilder

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

Implementations§

Source§

impl OptionBuilder

Source

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

Source

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

Source

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

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 <optgroup> element.

Source

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

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.

Source

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

If present, indicates that the option is initially selected. If the <option> element is the descendant of a <select> element whose multiple attribute is not set, only one single <option> of this <select> element may have the selected attribute.

Source

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

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.

Source§

impl OptionBuilder

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source§

impl OptionBuilder

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 OptionBuilder

Source§

impl DomElement for OptionBuilder

Source§

impl From<OptionBuilder> for Element

Source§

fn from(builder: OptionBuilder) -> Self

Converts to this type from the input type.
Source§

impl From<OptionBuilder> for ElementBuilder

Source§

fn from(builder: OptionBuilder) -> 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.