[−][src]Struct stdweb::web::FormData
The FormData
interface provides a way to easily construct a set of key/value pairs
representing form fields and their values, which can then be easily sent using the
XMLHttpRequest.send()
method. It uses the same format a form would use if the encoding type
were set to "multipart/form-data"
.
Methods
impl FormData
[src]
pub fn new() -> Self
[src]
Creates a new FormData
.
pub fn from_element<T>(form: &T) -> Result<Self, FormDataFromElementError> where
T: IElement,
[src]
T: IElement,
Creates a new FormData
from a form element.
pub fn append_string(&self, name: &str, value: &str)
[src]
Appends a new value onto an existing key, or adds the key if it does not already exist.
pub fn append_blob<T>(&self, name: &str, value: &T, filename: Option<&str>) where
T: IBlob,
[src]
T: IBlob,
Appends a new blob onto an existing key, or adds the key if it does not already exist.
pub fn delete(&self, name: &str)
[src]
pub fn get(&self, name: &str) -> Option<FormDataEntry>
[src]
Deletes a key and its value(s).
pub fn get_all(&self, name: &str) -> Vec<FormDataEntry>
[src]
Returns all the values associated with a given key.
pub fn has(&self, name: &str) -> bool
[src]
Returns a boolean stating whether a FormData
object contains a certain key.
pub fn set_string(&self, name: &str, value: &str)
[src]
Sets a new value for an existing key, or adds the key/value if it does not already exist.
pub fn set_blob<T>(&self, name: &str, value: &T, filename: Option<&str>) where
T: IBlob,
[src]
T: IBlob,
Sets a new blob for an existing key, or adds the key/value if it does not already exist.
Trait Implementations
impl JsSerialize for FormData
[src]
impl TryFrom<FormData> for Reference
[src]
type Error = Void
The type returned in the event of a conversion error.
fn try_from(value: FormData) -> Result<Self, Self::Error>
[src]
impl TryFrom<Reference> for FormData
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: Reference) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Reference> for FormData
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(reference: &Reference) -> Result<Self, Self::Error>
[src]
impl TryFrom<Value> for FormData
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: Value) -> Result<Self, Self::Error>
[src]
impl<'_r> TryFrom<&'_r Value> for FormData
[src]
type Error = ConversionError
The type returned in the event of a conversion error.
fn try_from(value: &Value) -> Result<Self, Self::Error>
[src]
impl InstanceOf for FormData
[src]
fn instance_of(reference: &Reference) -> bool
[src]
impl ReferenceType for FormData
[src]
unsafe fn from_reference_unchecked(reference: Reference) -> Self
[src]
impl Eq for FormData
[src]
impl PartialEq<FormData> for FormData
[src]
impl AsRef<Reference> for FormData
[src]
impl Clone for FormData
[src]
fn clone(&self) -> FormData
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<FormData> for Reference
[src]
impl Debug for FormData
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,