pub struct FormField<K> {
pub field: K,
pub name: &'static str,
pub keys: Vec<String>,
pub answers_blank: bool,
}Expand description
One record-form field and the form keys it binds.
Fields§
§field: KThe field, as the form’s field enum names it.
name: &'static strThe Rust field name, for build-time refusals.
keys: Vec<String>The keys the field binds: one for a scalar, every key of an embedded value (an enum’s discriminant first).
answers_blank: boolWhether an empty submission has an answer. The build check refuses the
field only where one of its keys can be posted empty with nothing to
resolve it; a scalar’s answer is its declared #[form(blank = ..)] or
its type’s own, and an embedded value answers when every leaf does
(EmbeddedForm::answers_blank).
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for FormField<K>where
K: Freeze,
impl<K> RefUnwindSafe for FormField<K>where
K: RefUnwindSafe,
impl<K> Send for FormField<K>where
K: Send,
impl<K> Sync for FormField<K>where
K: Sync,
impl<K> Unpin for FormField<K>where
K: Unpin,
impl<K> UnsafeUnpin for FormField<K>where
K: UnsafeUnpin,
impl<K> UnwindSafe for FormField<K>where
K: UnwindSafe,
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