pub struct UiOptions {Show 20 fields
pub css_class: Option<String>,
pub input_class: Option<String>,
pub label_class: Option<String>,
pub width: Option<String>,
pub rows: Option<u32>,
pub cols: Option<u32>,
pub autocomplete: Option<String>,
pub autofocus: bool,
pub disabled: bool,
pub readonly: bool,
pub inputmode: Option<String>,
pub heading_level: Option<u8>,
pub max_rating: Option<u32>,
pub scale_min: Option<i32>,
pub scale_max: Option<i32>,
pub scale_step: Option<i32>,
pub scale_labels: Option<ScaleLabels>,
pub show_char_count: bool,
pub custom_attributes: HashMap<String, String>,
pub condition: Option<ConditionRule>,
}Expand description
UI/display options for a form field.
These options control how the field is rendered in HTML.
Fields§
§css_class: Option<String>CSS class(es) for the field container.
input_class: Option<String>CSS class(es) for the input element.
label_class: Option<String>CSS class(es) for the label.
width: Option<String>Width hint (e.g., “full”, “half”, “third”, “25%”).
rows: Option<u32>Number of rows for textarea.
cols: Option<u32>Number of columns for textarea.
autocomplete: Option<String>Autocomplete attribute value.
autofocus: boolWhether to autofocus this field.
disabled: boolWhether the field is disabled.
readonly: boolWhether the field is read-only.
inputmode: Option<String>Input mode (for mobile keyboards).
heading_level: Option<u8>Heading level for heading fields (1-6).
max_rating: Option<u32>Maximum star rating value.
scale_min: Option<i32>Scale minimum value.
scale_max: Option<i32>Scale maximum value.
scale_step: Option<i32>Scale step value.
scale_labels: Option<ScaleLabels>Labels for scale endpoints.
show_char_count: boolWhether to show the character count.
custom_attributes: HashMap<String, String>Custom HTML attributes as key-value pairs.
condition: Option<ConditionRule>Condition rule for dynamic field visibility.
When present, the field is only shown if the condition evaluates to true.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UiOptions
impl<'de> Deserialize<'de> for UiOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for UiOptions
impl RefUnwindSafe for UiOptions
impl Send for UiOptions
impl Sync for UiOptions
impl Unpin for UiOptions
impl UnsafeUnpin for UiOptions
impl UnwindSafe for UiOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more