]>
git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_Blob.rs
1 #![allow(unused_imports)]
3 use wasm_bindgen
::prelude
::*;
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = Blob , typescript_type = "Blob")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `Blob` class."]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob)"]
12 #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
14 # [wasm_bindgen (structural , method , getter , js_class = "Blob" , js_name = size)]
15 #[doc = "Getter for the `size` field of this object."]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/size)"]
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."]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/type)"]
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`."]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
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`."]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
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`."]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
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`."]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
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`."]
63 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
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`."]
71 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
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`."]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
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`."]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
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`."]
104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/Blob)"]
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."]
114 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/arrayBuffer)"]
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."]
121 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
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."]
128 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
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."]
135 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
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."]
142 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
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."]
149 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
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."]
156 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
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."]
163 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
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."]
170 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
172 #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
173 pub fn slice_with_i32_and_i32_and_content_type(
178 ) -> Result
<Blob
, JsValue
>;
179 # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
180 #[doc = "The `slice()` method."]
182 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
184 #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
185 pub fn slice_with_f64_and_i32_and_content_type(
190 ) -> Result
<Blob
, JsValue
>;
191 # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
192 #[doc = "The `slice()` method."]
194 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
196 #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
197 pub fn slice_with_i32_and_f64_and_content_type(
202 ) -> Result
<Blob
, JsValue
>;
203 # [wasm_bindgen (catch , method , structural , js_class = "Blob" , js_name = slice)]
204 #[doc = "The `slice()` method."]
206 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice)"]
208 #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
209 pub fn slice_with_f64_and_f64_and_content_type(
214 ) -> Result
<Blob
, JsValue
>;
215 #[cfg(feature = "ReadableStream")]
216 # [wasm_bindgen (method , structural , js_class = "Blob" , js_name = stream)]
217 #[doc = "The `stream()` method."]
219 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream)"]
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."]
226 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Blob/text)"]
228 #[doc = "*This API requires the following crate features to be activated: `Blob`*"]
229 pub fn text(this
: &Blob
) -> ::js_sys
::Promise
;