web_sys/features/
gen_UrlSearchParams.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "URLSearchParams",
10 typescript_type = "URLSearchParams"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `UrlSearchParams` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
18 pub type UrlSearchParams;
19 #[wasm_bindgen(catch, constructor, js_class = "URLSearchParams")]
20 #[doc = "The `new UrlSearchParams(..)` constructor, creating a new instance of `UrlSearchParams`."]
21 #[doc = ""]
22 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams)"]
23 #[doc = ""]
24 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
25 pub fn new() -> Result<UrlSearchParams, JsValue>;
26 #[wasm_bindgen(catch, constructor, js_class = "URLSearchParams")]
27 #[doc = "The `new UrlSearchParams(..)` constructor, creating a new instance of `UrlSearchParams`."]
28 #[doc = ""]
29 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams)"]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
32 pub fn new_with_str_sequence_sequence(
33 init: &::wasm_bindgen::JsValue,
34 ) -> Result<UrlSearchParams, JsValue>;
35 #[wasm_bindgen(catch, constructor, js_class = "URLSearchParams")]
36 #[doc = "The `new UrlSearchParams(..)` constructor, creating a new instance of `UrlSearchParams`."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
41 pub fn new_with_record_from_str_to_str(
42 init: &::js_sys::Object,
43 ) -> Result<UrlSearchParams, JsValue>;
44 #[wasm_bindgen(catch, constructor, js_class = "URLSearchParams")]
45 #[doc = "The `new UrlSearchParams(..)` constructor, creating a new instance of `UrlSearchParams`."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
50 pub fn new_with_str(init: &str) -> Result<UrlSearchParams, JsValue>;
51 #[wasm_bindgen(method, js_class = "URLSearchParams")]
52 #[doc = "The `append()` method."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/append)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
57 pub fn append(this: &UrlSearchParams, name: &str, value: &str);
58 #[wasm_bindgen(method, js_class = "URLSearchParams")]
59 #[doc = "The `delete()` method."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/delete)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
64 pub fn delete(this: &UrlSearchParams, name: &str);
65 #[wasm_bindgen(catch, method, js_class = "URLSearchParams", js_name = "forEach")]
66 #[doc = "The `forEach()` method."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/forEach)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
71 pub fn for_each(this: &UrlSearchParams, callback: &::js_sys::Function) -> Result<(), JsValue>;
72 #[wasm_bindgen(method, js_class = "URLSearchParams")]
73 #[doc = "The `get()` method."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/get)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
78 pub fn get(this: &UrlSearchParams, name: &str) -> Option<::alloc::string::String>;
79 #[wasm_bindgen(method, js_class = "URLSearchParams", js_name = "getAll")]
80 #[doc = "The `getAll()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/getAll)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
85 pub fn get_all(this: &UrlSearchParams, name: &str) -> ::js_sys::Array;
86 #[wasm_bindgen(method, js_class = "URLSearchParams")]
87 #[doc = "The `has()` method."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/has)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
92 pub fn has(this: &UrlSearchParams, name: &str) -> bool;
93 #[wasm_bindgen(method, js_class = "URLSearchParams")]
94 #[doc = "The `set()` method."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/set)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
99 pub fn set(this: &UrlSearchParams, name: &str, value: &str);
100 #[wasm_bindgen(catch, method, js_class = "URLSearchParams")]
101 #[doc = "The `sort()` method."]
102 #[doc = ""]
103 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/sort)"]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
106 pub fn sort(this: &UrlSearchParams) -> Result<(), JsValue>;
107 #[wasm_bindgen(method, js_class = "URLSearchParams")]
108 #[doc = "The `entries()` method."]
109 #[doc = ""]
110 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/entries)"]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
113 pub fn entries(this: &UrlSearchParams) -> ::js_sys::Iterator;
114 #[wasm_bindgen(method, js_class = "URLSearchParams")]
115 #[doc = "The `keys()` method."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/keys)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
120 pub fn keys(this: &UrlSearchParams) -> ::js_sys::Iterator;
121 #[wasm_bindgen(method, js_class = "URLSearchParams")]
122 #[doc = "The `values()` method."]
123 #[doc = ""]
124 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/values)"]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `UrlSearchParams`*"]
127 pub fn values(this: &UrlSearchParams) -> ::js_sys::Iterator;
128}