pub struct Field {Show 20 fields
pub id: String,
pub key: String,
pub field_type: FieldType,
pub label: String,
pub help: String,
pub required: bool,
pub placeholder: String,
pub default: String,
pub options: Vec<Choice>,
pub validation: Vec<ValidationRule>,
pub rules: Vec<ConditionalRule>,
pub min: Option<f64>,
pub max: Option<f64>,
pub step: Option<f64>,
pub accept: String,
pub scale: Option<u8>,
pub content: String,
pub min_length: Option<u32>,
pub max_length: Option<u32>,
pub pattern: String,
}Expand description
One input (or presentational element) in a column.
Fields§
§id: String§key: StringSubmission key — the name attribute and the data_json key.
Empty for presentational types (static / richtext).
field_type: FieldType§label: String§help: String§required: bool§placeholder: String§default: String§options: Vec<Choice>Choices for select / radio / checkboxes / multiselect.
validation: Vec<ValidationRule>Validation rules.
rules: Vec<ConditionalRule>Conditional show/hide/require rules.
min: Option<f64>§max: Option<f64>§step: Option<f64>§accept: StringAccepted MIME/extension list for file.
scale: Option<u8>Number of points for rating.
content: StringStatic/richtext body (presentational types carry their content here).
min_length: Option<u32>§max_length: Option<u32>§pattern: StringClient-side HTML5 pattern (regex). Enforced in the browser; the
server enforces length + type-format checks.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Field
Auto Trait Implementations§
impl Forget for Field
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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 moreCreates a shared type from an unshared type.