]>
git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_SocketsDict.rs
1 #![allow(unused_imports)]
3 use wasm_bindgen
::prelude
::*;
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = SocketsDict)]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `SocketsDict` dictionary."]
10 #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"]
14 #[doc = "Construct a new `SocketsDict`."]
16 #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"]
17 pub fn new() -> Self {
19 let mut ret
: Self = ::wasm_bindgen
::JsCast
::unchecked_into(::js_sys
::Object
::new());
22 #[doc = "Change the `received` field of this object."]
24 #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"]
25 pub fn received(&mut self, val
: f64) -> &mut Self {
26 use wasm_bindgen
::JsValue
;
27 let r
= ::js_sys
::Reflect
::set(
29 &JsValue
::from("received"),
34 "setting properties should never fail on our dictionary objects"
39 #[doc = "Change the `sent` field of this object."]
41 #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"]
42 pub fn sent(&mut self, val
: f64) -> &mut Self {
43 use wasm_bindgen
::JsValue
;
44 let r
= ::js_sys
::Reflect
::set(self.as_ref(), &JsValue
::from("sent"), &JsValue
::from(val
));
47 "setting properties should never fail on our dictionary objects"
52 #[doc = "Change the `sockets` field of this object."]
54 #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"]
55 pub fn sockets(&mut self, val
: &::wasm_bindgen
::JsValue
) -> &mut Self {
56 use wasm_bindgen
::JsValue
;
57 let r
= ::js_sys
::Reflect
::set(
59 &JsValue
::from("sockets"),
64 "setting properties should never fail on our dictionary objects"
70 impl Default
for SocketsDict
{
71 fn default() -> Self {