pub struct FormSpec<'a> {
pub module: &'a str,
pub action: &'a str,
pub post_to: &'a str,
pub intro: Option<&'a str>,
pub fields: &'a [Field],
pub values: &'a Values,
pub errors: &'a [(String, String)],
pub captcha_site_key: Option<&'a str>,
pub submit_label: &'a str,
}Expand description
What a form needs to render, independent of where it came from.
Fields§
§module: &'a str§action: &'a str§post_to: &'a strPOST target; the /ui route, never /v1.
intro: Option<&'a str>A paragraph above the fields (from the UiSpec).
fields: &'a [Field]§values: &'a Values§errors: &'a [(String, String)]Field name to message; a key of "" is the form-level error.
captcha_site_key: Option<&'a str>Turnstile site key when the action wants a captcha and one is configured.
submit_label: &'a strAuto Trait Implementations§
impl<'a> Freeze for FormSpec<'a>
impl<'a> RefUnwindSafe for FormSpec<'a>
impl<'a> Send for FormSpec<'a>
impl<'a> Sync for FormSpec<'a>
impl<'a> Unpin for FormSpec<'a>
impl<'a> UnsafeUnpin for FormSpec<'a>
impl<'a> UnwindSafe for FormSpec<'a>
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