Skip to main content

FormDataJs

Struct FormDataJs 

Source
pub struct FormDataJs { /* private fields */ }

Implementations§

Source§

impl FormDataJs

Source

pub const js_append: __impl_append = __impl_append

Source

pub const js_set: __impl_set = __impl_set

Source

pub const js_has: __impl_has = __impl_has

Source

pub const js_delete: __impl_delete = __impl_delete

Source

pub const js_get: __impl_get = __impl_get

Source

pub const js_get_all: __impl_get_all = __impl_get_all

Source

pub const js_keys: __impl_keys = __impl_keys

Source

pub const js_values: __impl_values = __impl_values

Source

pub const js_entries: __impl_entries = __impl_entries

Source

pub const js_js_iter: __impl_js_iter = __impl_js_iter

Source

pub const js_for_each: __impl_for_each = __impl_for_each

Source§

impl FormDataJs

Source

pub fn from_entries(entries: Vec<(String, FormEntry)>) -> Self

Build from entries a host produced (a parsed multipart or urlencoded body).

Source

pub fn entries_slice(&self) -> &[(String, FormEntry)]

The entries, in insertion order.

Source§

impl FormDataJs

Source

pub fn from_urlencoded(body: &str) -> Self

Build from an application/x-www-form-urlencoded body: + decodes to a space and every entry is text (the format cannot carry files).

Source§

impl FormDataJs

Source

pub fn append(&mut self, name: String, value: Value<'_>, filename: Opt<String>)

Source

pub fn set(&mut self, name: String, value: Value<'_>, filename: Opt<String>)

Source

pub fn has(&self, name: String) -> bool

Source

pub fn delete(&mut self, name: String)

Source

pub fn get<'js>(&self, ctx: Ctx<'js>, name: String) -> Result<Value<'js>>

Source

pub fn get_all<'js>( &self, ctx: Ctx<'js>, name: String, ) -> Result<Vec<Value<'js>>>

Source

pub fn keys<'js>( ctx: Ctx<'js>, this: This<Class<'js, Self>>, ) -> Result<Object<'js>>

Source

pub fn values<'js>( ctx: Ctx<'js>, this: This<Class<'js, Self>>, ) -> Result<Object<'js>>

Source

pub fn entries<'js>( ctx: Ctx<'js>, this: This<Class<'js, Self>>, ) -> Result<Object<'js>>

Source

pub fn js_iter<'js>( ctx: Ctx<'js>, this: This<Class<'js, Self>>, ) -> Result<Object<'js>>

Source

pub fn for_each<'js>(&self, ctx: Ctx<'js>, cb: Function<'js>) -> Result<()>

Source

pub fn to_string_tag() -> &'static str

Spec: every platform object carries Symbol.toStringTag, so Object.prototype.toString.call(x) reads [object FormData].

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl<'js> ConstructorCreator<'js, FormDataJs> for ConstructorCreate<FormDataJs>

Source§

fn create_constructor(&self, ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>

Source§

impl Default for FormDataJs

Source§

fn default() -> FormDataJs

Returns the “default value” for a type. Read more
Source§

impl<'js> FromJs<'js> for FormDataJs
where for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,

Source§

fn from_js(ctx: &Ctx<'js>, value: Value<'js>) -> Result<Self>

Source§

impl<'js> IntoJs<'js> for FormDataJs

Source§

fn into_js(self, ctx: &Ctx<'js>) -> Result<Value<'js>>

Source§

impl<'js> JsClass<'js> for FormDataJs

Source§

const NAME: &'static str = "FormData"

The name the constructor has in JavaScript
Source§

type Mutable = Writable

Can the type be mutated while a JavaScript value. Read more
Source§

fn prototype(ctx: &Ctx<'js>) -> Result<Option<Object<'js>>>

Returns the class prototype,
Source§

fn constructor(ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>

Returns a predefined constructor for this specific class type if there is one.
Source§

const KIND: ClassKind = ClassKind::Plain

The kind of this class (plain, callable, or exotic).
Source§

fn call<'a>( this: &JsCell<'js, Self>, params: Params<'a, 'js>, ) -> Result<Value<'js>, Error>

The function which will be called if Self::KIND is ClassKind::Callable and an object with this class is called as if it is a function.
Source§

fn exotic_get_property( this: &JsCell<'js, Self>, ctx: &Ctx<'js>, _atom: Atom<'js>, _receiver: Value<'js>, ) -> Result<Value<'js>, Error>

The function which will be called if a get property is performed on an object with this class
Source§

fn exotic_set_property( this: &JsCell<'js, Self>, _ctx: &Ctx<'js>, _atom: Atom<'js>, _receiver: Value<'js>, _value: Value<'js>, ) -> Result<bool, Error>

The function which will be called if a set property is performed on an object with this class
Source§

fn exotic_delete_property( this: &JsCell<'js, Self>, _ctx: &Ctx<'js>, _atom: Atom<'js>, ) -> Result<bool, Error>

The function which will be called if a delete property is performed on an object with this class
Source§

fn exotic_has_property( this: &JsCell<'js, Self>, _ctx: &Ctx<'js>, _atom: Atom<'js>, ) -> Result<bool, Error>

The function which will be called if has property or similar is called on an object with this class
Source§

fn exotic_get_own_property( this: &JsCell<'js, Self>, _ctx: &Ctx<'js>, _atom: Atom<'js>, ) -> Result<Option<PropertyDescriptor<'js>>, Error>

Called to get the own property descriptor for a given property name. Read more
Source§

fn exotic_get_own_property_names( this: &JsCell<'js, Self>, _ctx: &Ctx<'js>, ) -> Result<Vec<PropertyName<'js>>, Error>

Called to enumerate the own property names of this object. Read more
Source§

impl JsLifetime<'_> for FormDataJs

Source§

type Changed<'to> = FormDataJs

The target which has the same type as a Self but with another lifetime 't
Source§

impl MethodImplementor<FormDataJs> for MethodImpl<FormDataJs>

Source§

fn implement(&self, _proto: &Object<'_>) -> Result<()>

Source§

impl<'js> Trace<'js> for FormDataJs

Source§

fn trace<'a>(&self, _tracer: Tracer<'a, 'js>)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'js, T> AsProperty<'js, T> for T
where T: IntoJs<'js>,

Source§

fn config( self, ctx: &Ctx<'js>, ) -> Result<(i32, Value<'js>, Value<'js>, Value<'js>), Error>

Property configuration Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<'js, T> IntoArg<'js> for T
where T: IntoJs<'js>,

Source§

fn num_args(&self) -> usize

The number of arguments this value produces.
Source§

fn into_arg(self, args: &mut Args<'js>) -> Result<(), Error>

Convert the value into an argument.
Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ParallelSend for T
where T: Send,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more