pub enum InputComponent {
Text {
id: String,
label: String,
placeholder: Option<String>,
initial_value: Option<String>,
required: bool,
multiline: bool,
min_length: Option<u32>,
max_length: Option<u32>,
},
Number {
id: String,
label: String,
placeholder: Option<String>,
initial_value: Option<f64>,
required: bool,
min: Option<f64>,
max: Option<f64>,
step: Option<f64>,
},
Checkbox {
id: String,
label: String,
initial_value: bool,
required: bool,
},
Choice {
id: String,
label: String,
options: Vec<ChoiceOption>,
multiple: bool,
required: bool,
min_values: Option<u16>,
max_values: Option<u16>,
},
Toggle {
id: String,
label: String,
initial_value: bool,
},
Date {
id: String,
label: String,
initial_value: Option<NaiveDate>,
required: bool,
},
Time {
id: String,
label: String,
initial_value: Option<NaiveTime>,
required: bool,
},
DateTime {
id: String,
label: String,
initial_value: Option<DateTime<Utc>>,
required: bool,
},
File {
id: String,
label: String,
required: bool,
min_files: Option<u16>,
max_files: Option<u16>,
accepted_mime_types: Vec<String>,
max_file_bytes: Option<u64>,
},
PlatformNative(PlatformNativeData),
}Variants§
Text
Fields
Number
Fields
Checkbox
Choice
Fields
§
options: Vec<ChoiceOption>Toggle
Date
Time
DateTime
File
Fields
PlatformNative(PlatformNativeData)
Trait Implementations§
Source§impl Clone for InputComponent
impl Clone for InputComponent
Source§fn clone(&self) -> InputComponent
fn clone(&self) -> InputComponent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for InputComponent
impl Debug for InputComponent
Source§impl From<InputComponent> for InteractionComponent
impl From<InputComponent> for InteractionComponent
Source§fn from(value: InputComponent) -> Self
fn from(value: InputComponent) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InputComponent
impl PartialEq for InputComponent
impl StructuralPartialEq for InputComponent
Auto Trait Implementations§
impl Freeze for InputComponent
impl RefUnwindSafe for InputComponent
impl Send for InputComponent
impl Sync for InputComponent
impl Unpin for InputComponent
impl UnsafeUnpin for InputComponent
impl UnwindSafe for InputComponent
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