pub struct FormData(_);
Expand description
A FormData representation of the request body, providing access to form encoded fields and files.
Implementations§
source§impl FormData
impl FormData
pub fn new() -> Self
sourcepub fn get(&self, name: &str) -> Option<FormEntry>
pub fn get(&self, name: &str) -> Option<FormEntry>
Returns the first value associated with a given key from within a FormData
object.
sourcepub fn get_all(&self, name: &str) -> Option<Vec<FormEntry>>
pub fn get_all(&self, name: &str) -> Option<Vec<FormEntry>>
Returns a vec of all the values associated with a given key from within a FormData
object.
sourcepub fn has(&self, name: &str) -> bool
pub fn has(&self, name: &str) -> bool
Returns a boolean stating whether a FormData
object contains a certain key.
sourcepub fn append(&mut self, name: &str, value: &str) -> Result<()>
pub fn append(&mut self, name: &str, value: &str) -> Result<()>
Appends a new value onto an existing key inside a FormData
object, or adds the key if it
does not already exist.
Trait Implementations§
Auto Trait Implementations§
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