[][src]Struct stdweb::web::html_element::OptionElement

pub struct OptionElement(_);

The HTML <option> element is used to define an item contained in a <select>, an <optgroup>, or a <datalist> element.

(JavaScript docs)

Methods

impl OptionElement[src]

pub fn index(&self) -> i32[src]

The position of the option within the list of options it belongs to, in tree-order. If the option is not part of a list of options, like when it is part of the <datalist> element, the value is 0.

pub fn value(&self) -> String[src]

Reflects the value of the value HTML attribute, if it exists; otherwise reflects value of the Node.textContent property.

Trait Implementations

impl JsSerialize for OptionElement[src]

impl TryFrom<EventTarget> for OptionElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Node> for OptionElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Element> for OptionElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<HtmlElement> for OptionElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<OptionElement> for Reference[src]

type Error = Void

The type returned in the event of a conversion error.

impl TryFrom<Reference> for OptionElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Reference> for OptionElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl TryFrom<Value> for OptionElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl<'_r> TryFrom<&'_r Value> for OptionElement[src]

type Error = ConversionError

The type returned in the event of a conversion error.

impl InstanceOf for OptionElement[src]

impl ReferenceType for OptionElement[src]

impl IEventTarget for OptionElement[src]

impl INode for OptionElement[src]

impl IElement for OptionElement[src]

impl IHtmlElement for OptionElement[src]

impl AsRef<Reference> for OptionElement[src]

impl From<OptionElement> for EventTarget[src]

impl From<OptionElement> for Node[src]

impl From<OptionElement> for Element[src]

impl From<OptionElement> for HtmlElement[src]

impl From<OptionElement> for Reference[src]

impl Clone for OptionElement[src]

impl Eq for OptionElement[src]

impl PartialEq<OptionElement> for OptionElement[src]

impl Debug for OptionElement[src]

Auto Trait Implementations

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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