Skip to main content

web_sys/features/
gen_AuthenticationExtensionsPrfValues.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    #[wasm_bindgen(
9        extends = "::js_sys::Object",
10        js_name = "AuthenticationExtensionsPRFValues"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `AuthenticationExtensionsPrfValues` dictionary."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
16    #[doc = ""]
17    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
18    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
19    pub type AuthenticationExtensionsPrfValues;
20    #[cfg(web_sys_unstable_apis)]
21    #[doc = "Get the `first` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
24    #[doc = ""]
25    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
26    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
27    #[wasm_bindgen(method, getter = "first")]
28    pub fn get_first(this: &AuthenticationExtensionsPrfValues) -> ::js_sys::Object;
29    #[cfg(web_sys_unstable_apis)]
30    #[doc = "Change the `first` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
33    #[doc = ""]
34    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
35    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
36    #[wasm_bindgen(method, setter = "first")]
37    pub fn set_first(this: &AuthenticationExtensionsPrfValues, val: &::js_sys::Object);
38    #[cfg(web_sys_unstable_apis)]
39    #[doc = "Change the `first` field of this object."]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
42    #[doc = ""]
43    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45    #[doc = "# Safety"]
46    #[doc = ""]
47    #[doc = "The `val` slice must outlive any use of the dictionary on the JavaScript side. wasm-bindgen passes a raw view into wasm linear memory — if the underlying data is freed or moved before JS is done reading the field, the behaviour is undefined. Prefer the `_array` variant (takes `&Uint8Array`) for a safe alternative that copies the data."]
48    #[wasm_bindgen(method, setter = "first")]
49    pub unsafe fn set_first_u8_slice(this: &AuthenticationExtensionsPrfValues, val: &mut [u8]);
50    #[cfg(web_sys_unstable_apis)]
51    #[doc = "Change the `first` field of this object."]
52    #[doc = ""]
53    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
54    #[doc = ""]
55    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
56    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
57    #[wasm_bindgen(method, setter = "first")]
58    pub fn set_first_u8_array(this: &AuthenticationExtensionsPrfValues, val: &::js_sys::Uint8Array);
59    #[cfg(web_sys_unstable_apis)]
60    #[doc = "Get the `second` field of this object."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
63    #[doc = ""]
64    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
65    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
66    #[wasm_bindgen(method, getter = "second")]
67    pub fn get_second(this: &AuthenticationExtensionsPrfValues) -> Option<::js_sys::Object>;
68    #[cfg(web_sys_unstable_apis)]
69    #[doc = "Change the `second` field of this object."]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
72    #[doc = ""]
73    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
75    #[wasm_bindgen(method, setter = "second")]
76    pub fn set_second(this: &AuthenticationExtensionsPrfValues, val: &::js_sys::Object);
77    #[cfg(web_sys_unstable_apis)]
78    #[doc = "Change the `second` field of this object."]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
81    #[doc = ""]
82    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
84    #[doc = "# Safety"]
85    #[doc = ""]
86    #[doc = "The `val` slice must outlive any use of the dictionary on the JavaScript side. wasm-bindgen passes a raw view into wasm linear memory — if the underlying data is freed or moved before JS is done reading the field, the behaviour is undefined. Prefer the `_array` variant (takes `&Uint8Array`) for a safe alternative that copies the data."]
87    #[wasm_bindgen(method, setter = "second")]
88    pub unsafe fn set_second_u8_slice(this: &AuthenticationExtensionsPrfValues, val: &mut [u8]);
89    #[cfg(web_sys_unstable_apis)]
90    #[doc = "Change the `second` field of this object."]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
93    #[doc = ""]
94    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
95    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
96    #[wasm_bindgen(method, setter = "second")]
97    pub fn set_second_u8_array(
98        this: &AuthenticationExtensionsPrfValues,
99        val: &::js_sys::Uint8Array,
100    );
101}
102#[cfg(web_sys_unstable_apis)]
103impl AuthenticationExtensionsPrfValues {
104    #[doc = "Construct a new `AuthenticationExtensionsPrfValues`."]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
107    #[doc = ""]
108    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
109    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
110    pub fn new(first: &::js_sys::Object) -> Self {
111        #[allow(unused_mut)]
112        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
113        ret.set_first(first);
114        ret
115    }
116    #[doc = "Construct a new `AuthenticationExtensionsPrfValues`."]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
119    #[doc = ""]
120    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
121    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
122    pub unsafe fn new_with_u8_slice(first: &mut [u8]) -> Self {
123        #[allow(unused_mut)]
124        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
125        ret.set_first_u8_slice(first);
126        ret
127    }
128    #[doc = "Construct a new `AuthenticationExtensionsPrfValues`."]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsPrfValues`*"]
131    #[doc = ""]
132    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
133    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
134    pub fn new_with_u8_array(first: &::js_sys::Uint8Array) -> Self {
135        #[allow(unused_mut)]
136        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
137        ret.set_first_u8_array(first);
138        ret
139    }
140    #[cfg(web_sys_unstable_apis)]
141    #[deprecated = "Use `set_first()` instead."]
142    pub fn first(&mut self, val: &::js_sys::Object) -> &mut Self {
143        self.set_first(val);
144        self
145    }
146    #[cfg(web_sys_unstable_apis)]
147    #[deprecated = "Use `set_second()` instead."]
148    pub fn second(&mut self, val: &::js_sys::Object) -> &mut Self {
149        self.set_second(val);
150        self
151    }
152}