]>
git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_PushSubscriptionJson.rs
1 #![allow(unused_imports)]
4 use wasm_bindgen
::prelude
::*;
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PushSubscriptionJSON)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `PushSubscriptionJson` dictionary."]
11 #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"]
12 pub type PushSubscriptionJson
;
14 impl PushSubscriptionJson
{
15 #[doc = "Construct a new `PushSubscriptionJson`."]
17 #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"]
18 pub fn new() -> Self {
20 let mut ret
: Self = ::wasm_bindgen
::JsCast
::unchecked_into(::js_sys
::Object
::new());
23 #[doc = "Change the `endpoint` field of this object."]
25 #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"]
26 pub fn endpoint(&mut self, val
: &str) -> &mut Self {
27 use wasm_bindgen
::JsValue
;
28 let r
= ::js_sys
::Reflect
::set(
30 &JsValue
::from("endpoint"),
35 "setting properties should never fail on our dictionary objects"
40 #[cfg(feature = "PushSubscriptionKeys")]
41 #[doc = "Change the `keys` field of this object."]
43 #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`, `PushSubscriptionKeys`*"]
44 pub fn keys(&mut self, val
: &PushSubscriptionKeys
) -> &mut Self {
45 use wasm_bindgen
::JsValue
;
46 let r
= ::js_sys
::Reflect
::set(self.as_ref(), &JsValue
::from("keys"), &JsValue
::from(val
));
49 "setting properties should never fail on our dictionary objects"
55 impl Default
for PushSubscriptionJson
{
56 fn default() -> Self {