pub struct URLSearchParams {
pub url: Rc<RefCell<Url>>,
}Expand description
Represents URLSearchParams in the JavaScript context
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
§Examples
ⓘ
// This is JavaScript
const params = new URLSearchParams();
params.set("foo", "bar");Fields§
§url: Rc<RefCell<Url>>Implementations§
Source§impl<'js> URLSearchParams
impl<'js> URLSearchParams
pub const js_append: __impl_append = __impl_append
pub const js_delete: __impl_delete = __impl_delete
pub const js_entries: __impl_entries = __impl_entries
pub const js_for_each: __impl_for_each = __impl_for_each
pub const js_get: __impl_get = __impl_get
pub const js_get_all: __impl_get_all = __impl_get_all
pub const js_has: __impl_has = __impl_has
pub const js_keys: __impl_keys = __impl_keys
pub const js_set: __impl_set = __impl_set
pub const js_sort: __impl_sort = __impl_sort
pub const js_to_string: __impl_to_string = __impl_to_string
pub const js_values: __impl_values = __impl_values
pub const js_iterator: __impl_iterator = __impl_iterator
Source§impl<'js> URLSearchParams
impl<'js> URLSearchParams
pub fn append(&mut self, key: Coerced<String>, value: Coerced<String>)
pub fn delete(&mut self, key: Coerced<String>, value: Opt<Value<'js>>)
pub fn entries( this: This<Class<'js, URLSearchParams>>, ctx: Ctx<'js>, ) -> Result<Class<'js, URLSearchParamsIter<'js>>>
pub fn for_each( this: This<Class<'js, URLSearchParams>>, callback: Function<'js>, ) -> Result<()>
pub fn get(&mut self, ctx: Ctx<'js>, key: String) -> Result<Value<'js>>
pub fn get_all(&mut self, key: String) -> Vec<String>
pub fn has(&self, key: Coerced<String>, value: Opt<Value<'js>>) -> bool
pub fn keys( this: This<Class<'js, URLSearchParams>>, ctx: Ctx<'js>, ) -> Result<Class<'js, URLSearchParamsIter<'js>>>
pub fn set(&mut self, key: Coerced<String>, value: Coerced<String>)
pub fn sort(&mut self)
pub fn to_string(&self) -> String
pub fn values( this: This<Class<'js, URLSearchParams>>, ctx: Ctx<'js>, ) -> Result<Class<'js, URLSearchParamsIter<'js>>>
pub fn iterator( this: This<Class<'js, URLSearchParams>>, ctx: Ctx<'js>, ) -> Result<Class<'js, URLSearchParamsIter<'js>>>
pub fn size(&self) -> usize
pub fn to_string_tag() -> &'static str
pub fn new(ctx: Ctx<'js>, init: Opt<Value<'js>>) -> Result<Self>
Trait Implementations§
Source§impl Clone for URLSearchParams
impl Clone for URLSearchParams
Source§fn clone(&self) -> URLSearchParams
fn clone(&self) -> URLSearchParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'js> ConstructorCreator<'js, URLSearchParams> for ConstructorCreate<URLSearchParams>
impl<'js> ConstructorCreator<'js, URLSearchParams> for ConstructorCreate<URLSearchParams>
fn create_constructor(&self, ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>
Source§impl<'js> FromJs<'js> for URLSearchParamswhere
for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,
impl<'js> FromJs<'js> for URLSearchParamswhere
for<'a> CloneWrapper<'a, Self>: CloneTrait<Self>,
Source§impl<'js> IntoJs<'js> for URLSearchParams
impl<'js> IntoJs<'js> for URLSearchParams
Source§impl<'js> JsClass<'js> for URLSearchParams
impl<'js> JsClass<'js> for URLSearchParams
Source§fn constructor(ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>
fn constructor(ctx: &Ctx<'js>) -> Result<Option<Constructor<'js>>>
Returns a predefined constructor for this specific class type if there is one.
Source§fn call<'a>(
this: &JsCell<'js, Self>,
params: Params<'a, 'js>,
) -> Result<Value<'js>, Error>
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>
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>
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>
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>
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>
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>
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<'js> JsLifetime<'js> for URLSearchParams
impl<'js> JsLifetime<'js> for URLSearchParams
Source§type Changed<'to> = URLSearchParams
type Changed<'to> = URLSearchParams
The target which has the same type as a
Self but with another lifetime 'tSource§impl<'js> MethodImplementor<URLSearchParams> for MethodImpl<URLSearchParams>
impl<'js> MethodImplementor<URLSearchParams> for MethodImpl<URLSearchParams>
Auto Trait Implementations§
impl !RefUnwindSafe for URLSearchParams
impl !Send for URLSearchParams
impl !Sync for URLSearchParams
impl !UnwindSafe for URLSearchParams
impl Freeze for URLSearchParams
impl Unpin for URLSearchParams
impl UnsafeUnpin for URLSearchParams
Blanket Implementations§
Source§impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
impl<'js, T> AsProperty<'js, T> for Twhere
T: IntoJs<'js>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
impl<'js, T> FromParam<'js> for Twhere
T: FromJs<'js>,
Source§fn param_requirement() -> ParamRequirement
fn param_requirement() -> ParamRequirement
The parameters requirements this value requires.
Source§fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
fn from_param<'a>(params: &mut ParamsAccessor<'a, 'js>) -> Result<T, Error>
Convert from a parameter value.
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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