maxcountryman_web_sys/features/
gen_Blob.rs

1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = Blob , typescript_type = "Blob")]
7    #[derive(Debug, Clone, PartialEq, Eq)]
8    #[doc = "The `Blob` class."]
9    #[doc = ""]
10    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob)"]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
13    pub type Blob;
14    # [wasm_bindgen (structural , method , getter , js_class = "Blob" , js_name = size)]
15    #[doc = "Getter for the `size` field of this object."]
16    #[doc = ""]
17    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/size)"]
18    #[doc = ""]
19    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
20    pub fn size(this: &Blob) -> f64;
21    # [wasm_bindgen (structural , method , getter , js_class = "Blob" , js_name = type)]
22    #[doc = "Getter for the `type` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/type)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
27    pub fn type_(this: &Blob) -> String;
28    #[wasm_bindgen(catch, constructor, js_class = "Blob")]
29    #[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
30    #[doc = ""]
31    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
34    pub fn new() -> Result<Blob, JsValue>;
35    #[wasm_bindgen(catch, constructor, js_class = "Blob")]
36    #[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
37    #[doc = ""]
38    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
41    pub fn new_with_buffer_source_sequence(
42        blob_parts: &::wasm_bindgen::JsValue,
43    ) -> Result<Blob, JsValue>;
44    #[wasm_bindgen(catch, constructor, js_class = "Blob")]
45    #[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
50    pub fn new_with_u8_array_sequence(
51        blob_parts: &::wasm_bindgen::JsValue,
52    ) -> Result<Blob, JsValue>;
53    #[wasm_bindgen(catch, constructor, js_class = "Blob")]
54    #[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
55    #[doc = ""]
56    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
59    pub fn new_with_blob_sequence(blob_parts: &::wasm_bindgen::JsValue) -> Result<Blob, JsValue>;
60    #[wasm_bindgen(catch, constructor, js_class = "Blob")]
61    #[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
66    pub fn new_with_str_sequence(blob_parts: &::wasm_bindgen::JsValue) -> Result<Blob, JsValue>;
67    #[cfg(feature = "BlobPropertyBag")]
68    #[wasm_bindgen(catch, constructor, js_class = "Blob")]
69    #[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobPropertyBag`*"]
74    pub fn new_with_buffer_source_sequence_and_options(
75        blob_parts: &::wasm_bindgen::JsValue,
76        options: &BlobPropertyBag,
77    ) -> Result<Blob, JsValue>;
78    #[cfg(feature = "BlobPropertyBag")]
79    #[wasm_bindgen(catch, constructor, js_class = "Blob")]
80    #[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
81    #[doc = ""]
82    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobPropertyBag`*"]
85    pub fn new_with_u8_array_sequence_and_options(
86        blob_parts: &::wasm_bindgen::JsValue,
87        options: &BlobPropertyBag,
88    ) -> Result<Blob, JsValue>;
89    #[cfg(feature = "BlobPropertyBag")]
90    #[wasm_bindgen(catch, constructor, js_class = "Blob")]
91    #[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
92    #[doc = ""]
93    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
94    #[doc = ""]
95    #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobPropertyBag`*"]
96    pub fn new_with_blob_sequence_and_options(
97        blob_parts: &::wasm_bindgen::JsValue,
98        options: &BlobPropertyBag,
99    ) -> Result<Blob, JsValue>;
100    #[cfg(feature = "BlobPropertyBag")]
101    #[wasm_bindgen(catch, constructor, js_class = "Blob")]
102    #[doc = "The `new Blob(..)` constructor, creating a new instance of `Blob`."]
103    #[doc = ""]
104    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobPropertyBag`*"]
107    pub fn new_with_str_sequence_and_options(
108        blob_parts: &::wasm_bindgen::JsValue,
109        options: &BlobPropertyBag,
110    ) -> Result<Blob, JsValue>;
111    # [wasm_bindgen (method , structural , js_class = "Blob" , js_name = arrayBuffer)]
112    #[doc = "The `arrayBuffer()` method."]
113    #[doc = ""]
114    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer)"]
115    #[doc = ""]
116    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
117    pub fn array_buffer(this: &Blob) -> ::js_sys::Promise;
118    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
119    #[doc = "The `slice()` method."]
120    #[doc = ""]
121    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
122    #[doc = ""]
123    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
124    pub fn slice(this: &Blob) -> Result<Blob, JsValue>;
125    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
126    #[doc = "The `slice()` method."]
127    #[doc = ""]
128    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
131    pub fn slice_with_i32(this: &Blob, start: i32) -> Result<Blob, JsValue>;
132    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
133    #[doc = "The `slice()` method."]
134    #[doc = ""]
135    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
136    #[doc = ""]
137    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
138    pub fn slice_with_f64(this: &Blob, start: f64) -> Result<Blob, JsValue>;
139    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
140    #[doc = "The `slice()` method."]
141    #[doc = ""]
142    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
143    #[doc = ""]
144    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
145    pub fn slice_with_i32_and_i32(this: &Blob, start: i32, end: i32) -> Result<Blob, JsValue>;
146    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
147    #[doc = "The `slice()` method."]
148    #[doc = ""]
149    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
150    #[doc = ""]
151    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
152    pub fn slice_with_f64_and_i32(this: &Blob, start: f64, end: i32) -> Result<Blob, JsValue>;
153    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
154    #[doc = "The `slice()` method."]
155    #[doc = ""]
156    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
157    #[doc = ""]
158    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
159    pub fn slice_with_i32_and_f64(this: &Blob, start: i32, end: f64) -> Result<Blob, JsValue>;
160    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
161    #[doc = "The `slice()` method."]
162    #[doc = ""]
163    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
164    #[doc = ""]
165    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
166    pub fn slice_with_f64_and_f64(this: &Blob, start: f64, end: f64) -> Result<Blob, JsValue>;
167    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
168    #[doc = "The `slice()` method."]
169    #[doc = ""]
170    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
171    #[doc = ""]
172    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
173    pub fn slice_with_i32_and_i32_and_content_type(
174        this: &Blob,
175        start: i32,
176        end: i32,
177        content_type: &str,
178    ) -> Result<Blob, JsValue>;
179    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
180    #[doc = "The `slice()` method."]
181    #[doc = ""]
182    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
183    #[doc = ""]
184    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
185    pub fn slice_with_f64_and_i32_and_content_type(
186        this: &Blob,
187        start: f64,
188        end: i32,
189        content_type: &str,
190    ) -> Result<Blob, JsValue>;
191    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
192    #[doc = "The `slice()` method."]
193    #[doc = ""]
194    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
195    #[doc = ""]
196    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
197    pub fn slice_with_i32_and_f64_and_content_type(
198        this: &Blob,
199        start: i32,
200        end: f64,
201        content_type: &str,
202    ) -> Result<Blob, JsValue>;
203    # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
204    #[doc = "The `slice()` method."]
205    #[doc = ""]
206    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
207    #[doc = ""]
208    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
209    pub fn slice_with_f64_and_f64_and_content_type(
210        this: &Blob,
211        start: f64,
212        end: f64,
213        content_type: &str,
214    ) -> Result<Blob, JsValue>;
215    #[cfg(feature = "ReadableStream")]
216    # [wasm_bindgen (method , structural , js_class = "Blob" , js_name = stream)]
217    #[doc = "The `stream()` method."]
218    #[doc = ""]
219    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream)"]
220    #[doc = ""]
221    #[doc = "*This API requires the following crate features to be activated: `Blob`, `ReadableStream`*"]
222    pub fn stream(this: &Blob) -> ReadableStream;
223    # [wasm_bindgen (method , structural , js_class = "Blob" , js_name = text)]
224    #[doc = "The `text()` method."]
225    #[doc = ""]
226    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/text)"]
227    #[doc = ""]
228    #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
229    pub fn text(this: &Blob) -> ::js_sys::Promise;
230}