pub struct FormData { /* private fields */ }
Available on crate feature
html
only.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!
sourcepub fn files(&self) -> Option<Arc<dyn FileEngine>>
pub fn files(&self) -> Option<Arc<dyn FileEngine>>
Get the files of the form event
source§impl FormData
impl FormData
sourcepub fn parsed_values<T>(&self) -> Result<T, Error>where
T: DeserializeOwned,
pub fn parsed_values<T>(&self) -> Result<T, Error>where
T: DeserializeOwned,
Parse the values into a struct with one field per value
Trait Implementations§
source§impl<'de> Deserialize<'de> for FormData
impl<'de> Deserialize<'de> for FormData
source§fn deserialize<D>(
deserializer: D
) -> Result<FormData, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<FormData, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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,
source§impl PartialEq for FormData
impl PartialEq for FormData
source§impl Serialize for FormData
impl Serialize for FormData
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
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> 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, 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.
source§impl<Cfg> TryIntoConfig for Cfg
impl<Cfg> TryIntoConfig for Cfg
source§fn into_config(self) -> Option<Cfg>
fn into_config(self) -> Option<Cfg>
Available on crate feature
launch
only.