pub struct FormConfig {
pub title: String,
pub subtitle: String,
pub fields: Vec<FieldConfig>,
pub submitted: bool,
pub save_failed: bool,
pub hidden_fields: Vec<(String, String)>,
}Fields§
§title: String§subtitle: String§fields: Vec<FieldConfig>§submitted: booltrue once values have been bound from a real submission. The
renderer uses this to swap the inline error summary for a
.form-success banner when validation passes, so the user
sees an explicit confirmation rather than a silent re-render.
Set automatically by bind_form.
save_failed: booltrue if a submission was bound + validated cleanly but the
downstream persistence write returned an error. The renderer
shows a .form-error-summary “save failed” banner instead of
the success banner. Independent of submitted so callers can
flip just this one field.
Extra <input type="hidden"> fields to emit inside the form,
in order. Used to round-trip the editing primary key (and any
other state the route handler wants preserved across a POST)
without requiring the field to appear in fields.
Trait Implementations§
Source§impl Clone for FormConfig
impl Clone for FormConfig
Source§fn clone(&self) -> FormConfig
fn clone(&self) -> FormConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FormConfig
impl RefUnwindSafe for FormConfig
impl Send for FormConfig
impl Sync for FormConfig
impl Unpin for FormConfig
impl UnsafeUnpin for FormConfig
impl UnwindSafe for FormConfig
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