pub struct FloatField {
pub name: String,
pub label: Option<String>,
pub required: bool,
pub help_text: Option<String>,
pub widget: Widget,
pub initial: Option<Value>,
pub max_value: Option<f64>,
pub min_value: Option<f64>,
}Expand description
FloatField for floating-point number input
Fields§
§name: StringThe field name used as the form data key.
label: Option<String>Optional human-readable label for display.
required: boolWhether this field must be filled in.
help_text: Option<String>Optional help text displayed alongside the field.
widget: WidgetThe widget type used for rendering this field.
initial: Option<Value>Optional initial (default) value for the field.
max_value: Option<f64>Maximum allowed value.
min_value: Option<f64>Minimum allowed value.
Implementations§
Trait Implementations§
Source§impl Clone for FloatField
impl Clone for FloatField
Source§fn clone(&self) -> FloatField
fn clone(&self) -> FloatField
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 FloatField
impl Debug for FloatField
Source§impl FormField for FloatField
impl FormField for FloatField
Source§fn initial(&self) -> Option<&Value>
fn initial(&self) -> Option<&Value>
Returns the initial (default) value for this field, if any.
Source§fn clean(&self, value: Option<&Value>) -> FieldResult<Value>
fn clean(&self, value: Option<&Value>) -> FieldResult<Value>
Validates and cleans the submitted value, returning the cleaned result.
Auto Trait Implementations§
impl Freeze for FloatField
impl RefUnwindSafe for FloatField
impl Send for FloatField
impl Sync for FloatField
impl Unpin for FloatField
impl UnsafeUnpin for FloatField
impl UnwindSafe for FloatField
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