pub enum Element {
Input(InputType),
Textarea,
Select(SelectType),
Button(ButtonType),
}
Expand description
Form element types, each of which represent a different HTML element.
Variants§
Implementations§
Source§impl Element
impl Element
Sourcepub fn validate(&self, formvalue: &Value) -> Result<(), ValidationError>
pub fn validate(&self, formvalue: &Value) -> Result<(), ValidationError>
Validate a value for an element type.
Sourcepub fn element_name(&self) -> &'static str
pub fn element_name(&self) -> &'static str
Return the element’s name (nodeName), used by HtmlForm
to fill
its element
attribute.
Sourcepub fn element_type(&self) -> &'static str
pub fn element_type(&self) -> &'static str
Return the element’s type (type
attribute), used by HtmlForm
to
fill its type
attribute.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more