web_webtransport_sys/gen/
gen_WebTransportHash.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = WebTransportHash)]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `WebTransportHash` dictionary."]
9 pub type WebTransportHash;
10}
11impl WebTransportHash {
12 #[doc = "Construct a new `WebTransportHash`."]
13 pub fn new() -> Self {
14 #[allow(unused_mut)]
15 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
16 ret
17 }
18 #[doc = "Change the `algorithm` field of this object."]
19 pub fn algorithm(&mut self, val: &str) -> &mut Self {
20 use wasm_bindgen::JsValue;
21 let r = ::js_sys::Reflect::set(
22 self.as_ref(),
23 &JsValue::from("algorithm"),
24 &JsValue::from(val),
25 );
26 debug_assert!(
27 r.is_ok(),
28 "setting properties should never fail on our dictionary objects"
29 );
30 let _ = r;
31 self
32 }
33 #[doc = "Change the `value` field of this object."]
34 pub fn value(&mut self, val: &::js_sys::Object) -> &mut Self {
35 use wasm_bindgen::JsValue;
36 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("value"), &JsValue::from(val));
37 debug_assert!(
38 r.is_ok(),
39 "setting properties should never fail on our dictionary objects"
40 );
41 let _ = r;
42 self
43 }
44}
45impl Default for WebTransportHash {
46 fn default() -> Self {
47 Self::new()
48 }
49}