html_dsl/types/input
Types
An enum of all possible input types for an HTML input element.
pub type InputType {
Button
Checkbox
Color
Date
DatetimeLocal
Email
File
Hidden
Image
Month
Number
Password
Radio
Range
Reset
Search
Submit
Tel
Text
Time
Url
Week
}
Constructors
-
Button
-
Checkbox
-
Color
-
Date
-
DatetimeLocal
-
Email
-
File
-
Hidden
-
Image
-
Month
-
Number
-
Password
-
Radio
-
Range
-
Reset
-
Search
-
Submit
-
Tel
-
Text
-
Time
-
Url
-
Week
Functions
pub fn input_type_to_attribute(input_type: InputType) -> String
A function that converts an input type to the corresponding HTML attribute as a string.
@param
input_type: The input type to convert.@return
: The corresponding HTML attribute as a string. @example
let str = input_type_to_attribute(InputType.Text)
// str == "type=\"text\""