pub struct FormData { /* private fields */ }
Implementations§
source§impl FormData
impl FormData
sourcepub fn new(event: impl HasFormData + 'static) -> FormData
pub fn new(event: impl HasFormData + 'static) -> FormData
Create a new form event
sourcepub fn parsed<T>(&self) -> Result<T, <T as FromStr>::Err>where
T: FromStr,
pub fn parsed<T>(&self) -> Result<T, <T as FromStr>::Err>where
T: FromStr,
Get the value of the form event as a parsed type
sourcepub fn checked(&self) -> bool
pub fn checked(&self) -> bool
Try to parse the value as a boolean
Returns false if the value is not a boolean, or if it is false! Does not verify anything about the event itself, use with caution
sourcepub fn values(&self) -> HashMap<String, FormValue>
pub fn values(&self) -> HashMap<String, FormValue>
Collect all the named form values from the containing form.
Every input must be named!
Trait Implementations§
source§impl From<&PlatformEventData> for FormData
impl From<&PlatformEventData> for FormData
source§fn from(val: &PlatformEventData) -> FormData
fn from(val: &PlatformEventData) -> FormData
Converts to this type from the input type.
source§impl<E> From<E> for FormDatawhere
E: HasFormData,
impl<E> From<E> for FormDatawhere
E: HasFormData,
Auto Trait Implementations§
impl Freeze for FormData
impl !RefUnwindSafe for FormData
impl !Send for FormData
impl !Sync for FormData
impl Unpin for FormData
impl !UnwindSafe for FormData
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> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.