[][src]Enum es_htmlform::types::Element

pub enum Element {
    Input(InputType),
    Textarea,
    Select(SelectType),
    Button(ButtonType),
}

Form element types, each of which represent a different HTML element.

Variants

Input(InputType)
Textarea
Select(SelectType)
Button(ButtonType)

Methods

impl Element[src]

pub fn validate(&self, formvalue: &Value) -> Result<(), ValidationError>[src]

Validate a value for an element type.

pub fn element_name(&self) -> &'static str[src]

Return the element's name (nodeName), used by HtmlForm to fill its element attribute.

pub fn element_type(&self) -> &'static str[src]

Return the element's type (type attribute), used by HtmlForm to fill its type attribute.

pub fn multi(&self) -> bool[src]

Return true for multi-selects and checkbox inputs, used by HtmlForm to fill its multi attribute.

Trait Implementations

impl Debug for Element[src]

Auto Trait Implementations

impl Send for Element

impl Sync for Element

impl Unpin for Element

impl UnwindSafe for Element

impl RefUnwindSafe for Element

Blanket Implementations

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

impl<T> From<T> for 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.

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]