pub struct FormBuilder {
pub form: FormConfig,
}Expand description
Fluent builder that starts from an auto-generated FormConfig
and lets the caller patch individual fields. An
override_field(name, ...) call whose name doesn’t match any
generated field is a silent no-op — the builder intentionally
doesn’t fail on typos so it composes with optional overrides from
config files.
Fields§
§form: FormConfigImplementations§
Source§impl FormBuilder
impl FormBuilder
Sourcepub fn from_admin_ui_model(model: &dyn AdminUiModel) -> Self
pub fn from_admin_ui_model(model: &dyn AdminUiModel) -> Self
Construct a builder seeded from an AdminUiModel impl.
Source§impl FormBuilder
impl FormBuilder
pub fn from_model<T: FormModel>() -> Self
pub fn override_field(self, name: &str, patch: FieldOverride) -> Self
pub fn build(self) -> FormConfig
Auto Trait Implementations§
impl Freeze for FormBuilder
impl RefUnwindSafe for FormBuilder
impl Send for FormBuilder
impl Sync for FormBuilder
impl Unpin for FormBuilder
impl UnsafeUnpin for FormBuilder
impl UnwindSafe for FormBuilder
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> 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 more