Struct mas_templates::FormState
source · pub struct FormState<K: Hash + Eq> { /* private fields */ }
Expand description
The state of a form and its fields
Implementations§
source§impl<K: FormField> FormState<K>
impl<K: FormField> FormState<K>
sourcepub fn add_error_on_field(&mut self, field: K, error: FieldError)
pub fn add_error_on_field(&mut self, field: K, error: FieldError)
Add an error on a form field
sourcepub fn with_error_on_field(self, field: K, error: FieldError) -> Self
pub fn with_error_on_field(self, field: K, error: FieldError) -> Self
Add an error on a form field
sourcepub fn add_error_on_form(&mut self, error: FormError)
pub fn add_error_on_form(&mut self, error: FormError)
Add an error on the form
sourcepub fn with_error_on_form(self, error: FormError) -> Self
pub fn with_error_on_form(self, error: FormError) -> Self
Add an error on the form
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for FormState<K>
impl<K> RefUnwindSafe for FormState<K>where
K: RefUnwindSafe,
impl<K> Send for FormState<K>where
K: Send,
impl<K> Sync for FormState<K>where
K: Sync,
impl<K> Unpin for FormState<K>where
K: Unpin,
impl<K> UnwindSafe for FormState<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
source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. 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