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