Archived
generated from mitchell/rust_template
minor tweaks
This commit is contained in:
+4
-2
@@ -299,14 +299,16 @@ pub trait FormData: Default + Clone + 'static {
|
||||
|
||||
/// Defines how the form should be layed out and how the data should be parsed and validated.
|
||||
///
|
||||
/// To construct a [`From`] object, use one of the [`get_form`()] methods.
|
||||
///
|
||||
/// Uses the given form builder to specify what fields should be present
|
||||
/// in the form, what properties those fields should have, and how that
|
||||
/// data should be parsed and checked.
|
||||
fn build_form(fb: FormBuilder<Self, Self::Style>) -> FormBuilder<Self, Self::Style>;
|
||||
|
||||
/// Gets the [`Form`] for this FormData type.
|
||||
/// Constructs a [`Form`] for this FormData type.
|
||||
///
|
||||
/// The [`Form`] provides the way to render the form
|
||||
/// The [`Form`] provides the way to render the form.
|
||||
fn get_form(style: Self::Style) -> Form<Self> {
|
||||
let builder = FormBuilder::new_full_builder(style);
|
||||
let builder = Self::build_form(builder);
|
||||
|
||||
Reference in New Issue
Block a user