diff --git a/crates/web-sys/src/features/gen_AddEventListenerOptions.rs b/crates/web-sys/src/features/gen_AddEventListenerOptions.rs index b453ed0641c..4296f8aab06 100644 --- a/crates/web-sys/src/features/gen_AddEventListenerOptions.rs +++ b/crates/web-sys/src/features/gen_AddEventListenerOptions.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] pub type AddEventListenerOptions; + #[wasm_bindgen(method, getter = "capture")] + fn capture_shim(this: &AddEventListenerOptions) -> bool; #[wasm_bindgen(method, setter = "capture")] - fn capture_shim(this: &AddEventListenerOptions, val: bool); + fn set_capture_shim(this: &AddEventListenerOptions, val: bool); + #[wasm_bindgen(method, getter = "once")] + fn once_shim(this: &AddEventListenerOptions) -> bool; #[wasm_bindgen(method, setter = "once")] - fn once_shim(this: &AddEventListenerOptions, val: bool); + fn set_once_shim(this: &AddEventListenerOptions, val: bool); + #[wasm_bindgen(method, getter = "passive")] + fn passive_shim(this: &AddEventListenerOptions) -> bool; #[wasm_bindgen(method, setter = "passive")] - fn passive_shim(this: &AddEventListenerOptions, val: bool); + fn set_passive_shim(this: &AddEventListenerOptions, val: bool); +} +#[doc = "The trait to access properties on the `AddEventListenerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] +pub trait AddEventListenerOptionsGetters { + #[doc = "Get the `capture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + fn capture(&self) -> bool; + #[doc = "Get the `once` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + fn once(&self) -> bool; + #[doc = "Get the `passive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] + fn passive(&self) -> bool; +} +impl AddEventListenerOptionsGetters for AddEventListenerOptions { + fn capture(&self) -> bool { + self.capture_shim() + } + fn once(&self) -> bool { + self.once_shim() + } + fn passive(&self) -> bool { + self.passive_shim() + } } impl AddEventListenerOptions { #[doc = "Construct a new `AddEventListenerOptions`."] @@ -30,21 +64,21 @@ impl AddEventListenerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] pub fn capture(&mut self, val: bool) -> &mut Self { - self.capture_shim(val); + self.set_capture_shim(val); self } #[doc = "Change the `once` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] pub fn once(&mut self, val: bool) -> &mut Self { - self.once_shim(val); + self.set_once_shim(val); self } #[doc = "Change the `passive` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AddEventListenerOptions`*"] pub fn passive(&mut self, val: bool) -> &mut Self { - self.passive_shim(val); + self.set_passive_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AesCbcParams.rs b/crates/web-sys/src/features/gen_AesCbcParams.rs index a342b655e6a..17298d7757d 100644 --- a/crates/web-sys/src/features/gen_AesCbcParams.rs +++ b/crates/web-sys/src/features/gen_AesCbcParams.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] pub type AesCbcParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &AesCbcParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesCbcParams, val: &str); + fn set_name_shim(this: &AesCbcParams, val: &str); + #[wasm_bindgen(method, getter = "iv")] + fn iv_shim(this: &AesCbcParams) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "iv")] - fn iv_shim(this: &AesCbcParams, val: &::js_sys::Object); + fn set_iv_shim(this: &AesCbcParams, val: &::js_sys::Object); +} +#[doc = "The trait to access properties on the `AesCbcParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] +pub trait AesCbcParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] + fn name(&self) -> String; + #[doc = "Get the `iv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] + fn iv(&self) -> ::js_sys::Object; +} +impl AesCbcParamsGetters for AesCbcParams { + fn name(&self) -> String { + self.name_shim() + } + fn iv(&self) -> ::js_sys::Object { + self.iv_shim() + } } impl AesCbcParams { #[doc = "Construct a new `AesCbcParams`."] @@ -22,22 +47,22 @@ impl AesCbcParams { pub fn new(name: &str, iv: &::js_sys::Object) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.iv(iv); + Self::name(&mut ret, name); + Self::iv(&mut ret, iv); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `iv` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCbcParams`*"] pub fn iv(&mut self, val: &::js_sys::Object) -> &mut Self { - self.iv_shim(val); + self.set_iv_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AesCtrParams.rs b/crates/web-sys/src/features/gen_AesCtrParams.rs index ce6270ad036..e979b8bb19f 100644 --- a/crates/web-sys/src/features/gen_AesCtrParams.rs +++ b/crates/web-sys/src/features/gen_AesCtrParams.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] pub type AesCtrParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &AesCtrParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesCtrParams, val: &str); + fn set_name_shim(this: &AesCtrParams, val: &str); + #[wasm_bindgen(method, getter = "counter")] + fn counter_shim(this: &AesCtrParams) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "counter")] - fn counter_shim(this: &AesCtrParams, val: &::js_sys::Object); + fn set_counter_shim(this: &AesCtrParams, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "length")] + fn length_shim(this: &AesCtrParams) -> u8; #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AesCtrParams, val: u8); + fn set_length_shim(this: &AesCtrParams, val: u8); +} +#[doc = "The trait to access properties on the `AesCtrParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] +pub trait AesCtrParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + fn name(&self) -> String; + #[doc = "Get the `counter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + fn counter(&self) -> ::js_sys::Object; + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] + fn length(&self) -> u8; +} +impl AesCtrParamsGetters for AesCtrParams { + fn name(&self) -> String { + self.name_shim() + } + fn counter(&self) -> ::js_sys::Object { + self.counter_shim() + } + fn length(&self) -> u8 { + self.length_shim() + } } impl AesCtrParams { #[doc = "Construct a new `AesCtrParams`."] @@ -24,30 +58,30 @@ impl AesCtrParams { pub fn new(name: &str, counter: &::js_sys::Object, length: u8) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.counter(counter); - ret.length(length); + Self::name(&mut ret, name); + Self::counter(&mut ret, counter); + Self::length(&mut ret, length); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `counter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] pub fn counter(&mut self, val: &::js_sys::Object) -> &mut Self { - self.counter_shim(val); + self.set_counter_shim(val); self } #[doc = "Change the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesCtrParams`*"] pub fn length(&mut self, val: u8) -> &mut Self { - self.length_shim(val); + self.set_length_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs b/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs index f0dc4f1e939..462c0d2228e 100644 --- a/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs +++ b/crates/web-sys/src/features/gen_AesDerivedKeyParams.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] pub type AesDerivedKeyParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &AesDerivedKeyParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesDerivedKeyParams, val: &str); + fn set_name_shim(this: &AesDerivedKeyParams, val: &str); + #[wasm_bindgen(method, getter = "length")] + fn length_shim(this: &AesDerivedKeyParams) -> u32; #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AesDerivedKeyParams, val: u32); + fn set_length_shim(this: &AesDerivedKeyParams, val: u32); +} +#[doc = "The trait to access properties on the `AesDerivedKeyParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] +pub trait AesDerivedKeyParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] + fn name(&self) -> String; + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] + fn length(&self) -> u32; +} +impl AesDerivedKeyParamsGetters for AesDerivedKeyParams { + fn name(&self) -> String { + self.name_shim() + } + fn length(&self) -> u32 { + self.length_shim() + } } impl AesDerivedKeyParams { #[doc = "Construct a new `AesDerivedKeyParams`."] @@ -22,22 +47,22 @@ impl AesDerivedKeyParams { pub fn new(name: &str, length: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.length(length); + Self::name(&mut ret, name); + Self::length(&mut ret, length); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesDerivedKeyParams`*"] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AesGcmParams.rs b/crates/web-sys/src/features/gen_AesGcmParams.rs index 13bac4af42c..83224d019de 100644 --- a/crates/web-sys/src/features/gen_AesGcmParams.rs +++ b/crates/web-sys/src/features/gen_AesGcmParams.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] pub type AesGcmParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &AesGcmParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesGcmParams, val: &str); + fn set_name_shim(this: &AesGcmParams, val: &str); + #[wasm_bindgen(method, getter = "additionalData")] + fn additional_data_shim(this: &AesGcmParams) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "additionalData")] - fn additional_data_shim(this: &AesGcmParams, val: &::js_sys::Object); + fn set_additional_data_shim(this: &AesGcmParams, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "iv")] + fn iv_shim(this: &AesGcmParams) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "iv")] - fn iv_shim(this: &AesGcmParams, val: &::js_sys::Object); + fn set_iv_shim(this: &AesGcmParams, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "tagLength")] + fn tag_length_shim(this: &AesGcmParams) -> u8; #[wasm_bindgen(method, setter = "tagLength")] - fn tag_length_shim(this: &AesGcmParams, val: u8); + fn set_tag_length_shim(this: &AesGcmParams, val: u8); +} +#[doc = "The trait to access properties on the `AesGcmParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] +pub trait AesGcmParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + fn name(&self) -> String; + #[doc = "Get the `additionalData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + fn additional_data(&self) -> ::js_sys::Object; + #[doc = "Get the `iv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + fn iv(&self) -> ::js_sys::Object; + #[doc = "Get the `tagLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] + fn tag_length(&self) -> u8; +} +impl AesGcmParamsGetters for AesGcmParams { + fn name(&self) -> String { + self.name_shim() + } + fn additional_data(&self) -> ::js_sys::Object { + self.additional_data_shim() + } + fn iv(&self) -> ::js_sys::Object { + self.iv_shim() + } + fn tag_length(&self) -> u8 { + self.tag_length_shim() + } } impl AesGcmParams { #[doc = "Construct a new `AesGcmParams`."] @@ -26,36 +69,36 @@ impl AesGcmParams { pub fn new(name: &str, iv: &::js_sys::Object) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.iv(iv); + Self::name(&mut ret, name); + Self::iv(&mut ret, iv); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `additionalData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] pub fn additional_data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.additional_data_shim(val); + self.set_additional_data_shim(val); self } #[doc = "Change the `iv` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] pub fn iv(&mut self, val: &::js_sys::Object) -> &mut Self { - self.iv_shim(val); + self.set_iv_shim(val); self } #[doc = "Change the `tagLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesGcmParams`*"] pub fn tag_length(&mut self, val: u8) -> &mut Self { - self.tag_length_shim(val); + self.set_tag_length_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs b/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs index b525478f622..d50360ee601 100644 --- a/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_AesKeyAlgorithm.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] pub type AesKeyAlgorithm; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &AesKeyAlgorithm) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesKeyAlgorithm, val: &str); + fn set_name_shim(this: &AesKeyAlgorithm, val: &str); + #[wasm_bindgen(method, getter = "length")] + fn length_shim(this: &AesKeyAlgorithm) -> u16; #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AesKeyAlgorithm, val: u16); + fn set_length_shim(this: &AesKeyAlgorithm, val: u16); +} +#[doc = "The trait to access properties on the `AesKeyAlgorithm` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] +pub trait AesKeyAlgorithmGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] + fn name(&self) -> String; + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] + fn length(&self) -> u16; +} +impl AesKeyAlgorithmGetters for AesKeyAlgorithm { + fn name(&self) -> String { + self.name_shim() + } + fn length(&self) -> u16 { + self.length_shim() + } } impl AesKeyAlgorithm { #[doc = "Construct a new `AesKeyAlgorithm`."] @@ -22,22 +47,22 @@ impl AesKeyAlgorithm { pub fn new(name: &str, length: u16) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.length(length); + Self::name(&mut ret, name); + Self::length(&mut ret, length); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyAlgorithm`*"] pub fn length(&mut self, val: u16) -> &mut Self { - self.length_shim(val); + self.set_length_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AesKeyGenParams.rs b/crates/web-sys/src/features/gen_AesKeyGenParams.rs index 266ae71921d..cd6aafd808a 100644 --- a/crates/web-sys/src/features/gen_AesKeyGenParams.rs +++ b/crates/web-sys/src/features/gen_AesKeyGenParams.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] pub type AesKeyGenParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &AesKeyGenParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AesKeyGenParams, val: &str); + fn set_name_shim(this: &AesKeyGenParams, val: &str); + #[wasm_bindgen(method, getter = "length")] + fn length_shim(this: &AesKeyGenParams) -> u16; #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AesKeyGenParams, val: u16); + fn set_length_shim(this: &AesKeyGenParams, val: u16); +} +#[doc = "The trait to access properties on the `AesKeyGenParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] +pub trait AesKeyGenParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] + fn name(&self) -> String; + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] + fn length(&self) -> u16; +} +impl AesKeyGenParamsGetters for AesKeyGenParams { + fn name(&self) -> String { + self.name_shim() + } + fn length(&self) -> u16 { + self.length_shim() + } } impl AesKeyGenParams { #[doc = "Construct a new `AesKeyGenParams`."] @@ -22,22 +47,22 @@ impl AesKeyGenParams { pub fn new(name: &str, length: u16) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.length(length); + Self::name(&mut ret, name); + Self::length(&mut ret, length); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AesKeyGenParams`*"] pub fn length(&mut self, val: u16) -> &mut Self { - self.length_shim(val); + self.set_length_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_Algorithm.rs b/crates/web-sys/src/features/gen_Algorithm.rs index 3a82cd9e61e..a4ceae7ca8e 100644 --- a/crates/web-sys/src/features/gen_Algorithm.rs +++ b/crates/web-sys/src/features/gen_Algorithm.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] pub type Algorithm; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &Algorithm) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &Algorithm, val: &str); + fn set_name_shim(this: &Algorithm, val: &str); +} +#[doc = "The trait to access properties on the `Algorithm` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] +pub trait AlgorithmGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] + fn name(&self) -> String; +} +impl AlgorithmGetters for Algorithm { + fn name(&self) -> String { + self.name_shim() + } } impl Algorithm { #[doc = "Construct a new `Algorithm`."] @@ -20,14 +36,14 @@ impl Algorithm { pub fn new(name: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Algorithm`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs b/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs index ac016920b6f..732de72a5bd 100644 --- a/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs +++ b/crates/web-sys/src/features/gen_AllowedBluetoothDevice.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AllowedBluetoothDevice; + #[wasm_bindgen(method, getter = "allowedServices")] + fn allowed_services_shim(this: &AllowedBluetoothDevice) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "allowedServices")] - fn allowed_services_shim(this: &AllowedBluetoothDevice, val: &::wasm_bindgen::JsValue); + fn set_allowed_services_shim(this: &AllowedBluetoothDevice, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "deviceId")] + fn device_id_shim(this: &AllowedBluetoothDevice) -> String; #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &AllowedBluetoothDevice, val: &str); + fn set_device_id_shim(this: &AllowedBluetoothDevice, val: &str); + #[wasm_bindgen(method, getter = "mayUseGATT")] + fn may_use_gatt_shim(this: &AllowedBluetoothDevice) -> bool; #[wasm_bindgen(method, setter = "mayUseGATT")] - fn may_use_gatt_shim(this: &AllowedBluetoothDevice, val: bool); + fn set_may_use_gatt_shim(this: &AllowedBluetoothDevice, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AllowedBluetoothDevice` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] +pub trait AllowedBluetoothDeviceGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowedServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn allowed_services(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn device_id(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mayUseGATT` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedBluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn may_use_gatt(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl AllowedBluetoothDeviceGetters for AllowedBluetoothDevice { + #[cfg(web_sys_unstable_apis)] + fn allowed_services(&self) -> ::wasm_bindgen::JsValue { + self.allowed_services_shim() + } + #[cfg(web_sys_unstable_apis)] + fn device_id(&self) -> String { + self.device_id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn may_use_gatt(&self) -> bool { + self.may_use_gatt_shim() + } } #[cfg(web_sys_unstable_apis)] impl AllowedBluetoothDevice { @@ -36,9 +87,9 @@ impl AllowedBluetoothDevice { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.allowed_services(allowed_services); - ret.device_id(device_id); - ret.may_use_gatt(may_use_gatt); + Self::allowed_services(&mut ret, allowed_services); + Self::device_id(&mut ret, device_id); + Self::may_use_gatt(&mut ret, may_use_gatt); ret } #[cfg(web_sys_unstable_apis)] @@ -49,7 +100,7 @@ impl AllowedBluetoothDevice { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn allowed_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.allowed_services_shim(val); + self.set_allowed_services_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -60,7 +111,7 @@ impl AllowedBluetoothDevice { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn device_id(&mut self, val: &str) -> &mut Self { - self.device_id_shim(val); + self.set_device_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -71,7 +122,7 @@ impl AllowedBluetoothDevice { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn may_use_gatt(&mut self, val: bool) -> &mut Self { - self.may_use_gatt_shim(val); + self.set_may_use_gatt_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AllowedUsbDevice.rs b/crates/web-sys/src/features/gen_AllowedUsbDevice.rs index 23070d3117d..e0fbc04d5e4 100644 --- a/crates/web-sys/src/features/gen_AllowedUsbDevice.rs +++ b/crates/web-sys/src/features/gen_AllowedUsbDevice.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AllowedUsbDevice; + #[wasm_bindgen(method, getter = "productId")] + fn product_id_shim(this: &AllowedUsbDevice) -> u8; #[wasm_bindgen(method, setter = "productId")] - fn product_id_shim(this: &AllowedUsbDevice, val: u8); + fn set_product_id_shim(this: &AllowedUsbDevice, val: u8); + #[wasm_bindgen(method, getter = "serialNumber")] + fn serial_number_shim(this: &AllowedUsbDevice) -> String; #[wasm_bindgen(method, setter = "serialNumber")] - fn serial_number_shim(this: &AllowedUsbDevice, val: &str); + fn set_serial_number_shim(this: &AllowedUsbDevice, val: &str); + #[wasm_bindgen(method, getter = "vendorId")] + fn vendor_id_shim(this: &AllowedUsbDevice) -> u8; #[wasm_bindgen(method, setter = "vendorId")] - fn vendor_id_shim(this: &AllowedUsbDevice, val: u8); + fn set_vendor_id_shim(this: &AllowedUsbDevice, val: u8); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AllowedUsbDevice` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] +pub trait AllowedUsbDeviceGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `productId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn product_id(&self) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `serialNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn serial_number(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AllowedUsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn vendor_id(&self) -> u8; +} +#[cfg(web_sys_unstable_apis)] +impl AllowedUsbDeviceGetters for AllowedUsbDevice { + #[cfg(web_sys_unstable_apis)] + fn product_id(&self) -> u8 { + self.product_id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn serial_number(&self) -> String { + self.serial_number_shim() + } + #[cfg(web_sys_unstable_apis)] + fn vendor_id(&self) -> u8 { + self.vendor_id_shim() + } } #[cfg(web_sys_unstable_apis)] impl AllowedUsbDevice { @@ -32,8 +83,8 @@ impl AllowedUsbDevice { pub fn new(product_id: u8, vendor_id: u8) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.product_id(product_id); - ret.vendor_id(vendor_id); + Self::product_id(&mut ret, product_id); + Self::vendor_id(&mut ret, vendor_id); ret } #[cfg(web_sys_unstable_apis)] @@ -44,7 +95,7 @@ impl AllowedUsbDevice { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn product_id(&mut self, val: u8) -> &mut Self { - self.product_id_shim(val); + self.set_product_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +106,7 @@ impl AllowedUsbDevice { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn serial_number(&mut self, val: &str) -> &mut Self { - self.serial_number_shim(val); + self.set_serial_number_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +117,7 @@ impl AllowedUsbDevice { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn vendor_id(&mut self, val: u8) -> &mut Self { - self.vendor_id_shim(val); + self.set_vendor_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AnalyserOptions.rs b/crates/web-sys/src/features/gen_AnalyserOptions.rs index 776ce399d63..419aa35030e 100644 --- a/crates/web-sys/src/features/gen_AnalyserOptions.rs +++ b/crates/web-sys/src/features/gen_AnalyserOptions.rs @@ -10,22 +10,98 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] pub type AnalyserOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &AnalyserOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &AnalyserOptions, val: u32); + fn set_channel_count_shim(this: &AnalyserOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &AnalyserOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &AnalyserOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &AnalyserOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &AnalyserOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &AnalyserOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &AnalyserOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "fftSize")] + fn fft_size_shim(this: &AnalyserOptions) -> u32; #[wasm_bindgen(method, setter = "fftSize")] - fn fft_size_shim(this: &AnalyserOptions, val: u32); + fn set_fft_size_shim(this: &AnalyserOptions, val: u32); + #[wasm_bindgen(method, getter = "maxDecibels")] + fn max_decibels_shim(this: &AnalyserOptions) -> f64; #[wasm_bindgen(method, setter = "maxDecibels")] - fn max_decibels_shim(this: &AnalyserOptions, val: f64); + fn set_max_decibels_shim(this: &AnalyserOptions, val: f64); + #[wasm_bindgen(method, getter = "minDecibels")] + fn min_decibels_shim(this: &AnalyserOptions) -> f64; #[wasm_bindgen(method, setter = "minDecibels")] - fn min_decibels_shim(this: &AnalyserOptions, val: f64); + fn set_min_decibels_shim(this: &AnalyserOptions, val: f64); + #[wasm_bindgen(method, getter = "smoothingTimeConstant")] + fn smoothing_time_constant_shim(this: &AnalyserOptions) -> f64; #[wasm_bindgen(method, setter = "smoothingTimeConstant")] - fn smoothing_time_constant_shim(this: &AnalyserOptions, val: f64); + fn set_smoothing_time_constant_shim(this: &AnalyserOptions, val: f64); +} +#[doc = "The trait to access properties on the `AnalyserOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] +pub trait AnalyserOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelCountMode`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelInterpretation`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `fftSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + fn fft_size(&self) -> u32; + #[doc = "Get the `maxDecibels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + fn max_decibels(&self) -> f64; + #[doc = "Get the `minDecibels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + fn min_decibels(&self) -> f64; + #[doc = "Get the `smoothingTimeConstant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] + fn smoothing_time_constant(&self) -> f64; +} +impl AnalyserOptionsGetters for AnalyserOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn fft_size(&self) -> u32 { + self.fft_size_shim() + } + fn max_decibels(&self) -> f64 { + self.max_decibels_shim() + } + fn min_decibels(&self) -> f64 { + self.min_decibels_shim() + } + fn smoothing_time_constant(&self) -> f64 { + self.smoothing_time_constant_shim() + } } impl AnalyserOptions { #[doc = "Construct a new `AnalyserOptions`."] @@ -40,7 +116,7 @@ impl AnalyserOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -48,7 +124,7 @@ impl AnalyserOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelCountMode`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -56,35 +132,35 @@ impl AnalyserOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`, `ChannelInterpretation`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `fftSize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] pub fn fft_size(&mut self, val: u32) -> &mut Self { - self.fft_size_shim(val); + self.set_fft_size_shim(val); self } #[doc = "Change the `maxDecibels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] pub fn max_decibels(&mut self, val: f64) -> &mut Self { - self.max_decibels_shim(val); + self.set_max_decibels_shim(val); self } #[doc = "Change the `minDecibels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] pub fn min_decibels(&mut self, val: f64) -> &mut Self { - self.min_decibels_shim(val); + self.set_min_decibels_shim(val); self } #[doc = "Change the `smoothingTimeConstant` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnalyserOptions`*"] pub fn smoothing_time_constant(&mut self, val: f64) -> &mut Self { - self.smoothing_time_constant_shim(val); + self.set_smoothing_time_constant_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AnimationEventInit.rs b/crates/web-sys/src/features/gen_AnimationEventInit.rs index 49910c05af7..57bb1da199c 100644 --- a/crates/web-sys/src/features/gen_AnimationEventInit.rs +++ b/crates/web-sys/src/features/gen_AnimationEventInit.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] pub type AnimationEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &AnimationEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &AnimationEventInit, val: bool); + fn set_bubbles_shim(this: &AnimationEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &AnimationEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &AnimationEventInit, val: bool); + fn set_cancelable_shim(this: &AnimationEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &AnimationEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &AnimationEventInit, val: bool); + fn set_composed_shim(this: &AnimationEventInit, val: bool); + #[wasm_bindgen(method, getter = "animationName")] + fn animation_name_shim(this: &AnimationEventInit) -> String; #[wasm_bindgen(method, setter = "animationName")] - fn animation_name_shim(this: &AnimationEventInit, val: &str); + fn set_animation_name_shim(this: &AnimationEventInit, val: &str); + #[wasm_bindgen(method, getter = "elapsedTime")] + fn elapsed_time_shim(this: &AnimationEventInit) -> f32; #[wasm_bindgen(method, setter = "elapsedTime")] - fn elapsed_time_shim(this: &AnimationEventInit, val: f32); + fn set_elapsed_time_shim(this: &AnimationEventInit, val: f32); + #[wasm_bindgen(method, getter = "pseudoElement")] + fn pseudo_element_shim(this: &AnimationEventInit) -> String; #[wasm_bindgen(method, setter = "pseudoElement")] - fn pseudo_element_shim(this: &AnimationEventInit, val: &str); + fn set_pseudo_element_shim(this: &AnimationEventInit, val: &str); +} +#[doc = "The trait to access properties on the `AnimationEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] +pub trait AnimationEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `animationName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + fn animation_name(&self) -> String; + #[doc = "Get the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + fn elapsed_time(&self) -> f32; + #[doc = "Get the `pseudoElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] + fn pseudo_element(&self) -> String; +} +impl AnimationEventInitGetters for AnimationEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn animation_name(&self) -> String { + self.animation_name_shim() + } + fn elapsed_time(&self) -> f32 { + self.elapsed_time_shim() + } + fn pseudo_element(&self) -> String { + self.pseudo_element_shim() + } } impl AnimationEventInit { #[doc = "Construct a new `AnimationEventInit`."] @@ -36,42 +97,42 @@ impl AnimationEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `animationName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] pub fn animation_name(&mut self, val: &str) -> &mut Self { - self.animation_name_shim(val); + self.set_animation_name_shim(val); self } #[doc = "Change the `elapsedTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { - self.elapsed_time_shim(val); + self.set_elapsed_time_shim(val); self } #[doc = "Change the `pseudoElement` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationEventInit`*"] pub fn pseudo_element(&mut self, val: &str) -> &mut Self { - self.pseudo_element_shim(val); + self.set_pseudo_element_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs b/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs index de0898ed513..0a6b9c35c57 100644 --- a/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs +++ b/crates/web-sys/src/features/gen_AnimationPlaybackEventInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] pub type AnimationPlaybackEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &AnimationPlaybackEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &AnimationPlaybackEventInit, val: bool); + fn set_bubbles_shim(this: &AnimationPlaybackEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &AnimationPlaybackEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &AnimationPlaybackEventInit, val: bool); + fn set_cancelable_shim(this: &AnimationPlaybackEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &AnimationPlaybackEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &AnimationPlaybackEventInit, val: bool); + fn set_composed_shim(this: &AnimationPlaybackEventInit, val: bool); + #[wasm_bindgen(method, getter = "currentTime")] + fn current_time_shim(this: &AnimationPlaybackEventInit) -> Option; #[wasm_bindgen(method, setter = "currentTime")] - fn current_time_shim(this: &AnimationPlaybackEventInit, val: Option); + fn set_current_time_shim(this: &AnimationPlaybackEventInit, val: Option); + #[wasm_bindgen(method, getter = "timelineTime")] + fn timeline_time_shim(this: &AnimationPlaybackEventInit) -> Option; #[wasm_bindgen(method, setter = "timelineTime")] - fn timeline_time_shim(this: &AnimationPlaybackEventInit, val: Option); + fn set_timeline_time_shim(this: &AnimationPlaybackEventInit, val: Option); +} +#[doc = "The trait to access properties on the `AnimationPlaybackEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] +pub trait AnimationPlaybackEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `currentTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + fn current_time(&self) -> Option; + #[doc = "Get the `timelineTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] + fn timeline_time(&self) -> Option; +} +impl AnimationPlaybackEventInitGetters for AnimationPlaybackEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn current_time(&self) -> Option { + self.current_time_shim() + } + fn timeline_time(&self) -> Option { + self.timeline_time_shim() + } } impl AnimationPlaybackEventInit { #[doc = "Construct a new `AnimationPlaybackEventInit`."] @@ -34,35 +86,35 @@ impl AnimationPlaybackEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `currentTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] pub fn current_time(&mut self, val: Option) -> &mut Self { - self.current_time_shim(val); + self.set_current_time_shim(val); self } #[doc = "Change the `timelineTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPlaybackEventInit`*"] pub fn timeline_time(&mut self, val: Option) -> &mut Self { - self.timeline_time_shim(val); + self.set_timeline_time_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs b/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs index 8b9e529af90..9b6e63d0292 100644 --- a/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs +++ b/crates/web-sys/src/features/gen_AnimationPropertyDetails.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] pub type AnimationPropertyDetails; + #[wasm_bindgen(method, getter = "property")] + fn property_shim(this: &AnimationPropertyDetails) -> String; #[wasm_bindgen(method, setter = "property")] - fn property_shim(this: &AnimationPropertyDetails, val: &str); + fn set_property_shim(this: &AnimationPropertyDetails, val: &str); + #[wasm_bindgen(method, getter = "runningOnCompositor")] + fn running_on_compositor_shim(this: &AnimationPropertyDetails) -> bool; #[wasm_bindgen(method, setter = "runningOnCompositor")] - fn running_on_compositor_shim(this: &AnimationPropertyDetails, val: bool); + fn set_running_on_compositor_shim(this: &AnimationPropertyDetails, val: bool); + #[wasm_bindgen(method, getter = "values")] + fn values_shim(this: &AnimationPropertyDetails) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "values")] - fn values_shim(this: &AnimationPropertyDetails, val: &::wasm_bindgen::JsValue); + fn set_values_shim(this: &AnimationPropertyDetails, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "warning")] + fn warning_shim(this: &AnimationPropertyDetails) -> String; #[wasm_bindgen(method, setter = "warning")] - fn warning_shim(this: &AnimationPropertyDetails, val: &str); + fn set_warning_shim(this: &AnimationPropertyDetails, val: &str); +} +#[doc = "The trait to access properties on the `AnimationPropertyDetails` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] +pub trait AnimationPropertyDetailsGetters { + #[doc = "Get the `property` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + fn property(&self) -> String; + #[doc = "Get the `runningOnCompositor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + fn running_on_compositor(&self) -> bool; + #[doc = "Get the `values` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + fn values(&self) -> ::js_sys::Array; + #[doc = "Get the `warning` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] + fn warning(&self) -> String; +} +impl AnimationPropertyDetailsGetters for AnimationPropertyDetails { + fn property(&self) -> String { + self.property_shim() + } + fn running_on_compositor(&self) -> bool { + self.running_on_compositor_shim() + } + fn values(&self) -> ::js_sys::Array { + self.values_shim() + } + fn warning(&self) -> String { + self.warning_shim() + } } impl AnimationPropertyDetails { #[doc = "Construct a new `AnimationPropertyDetails`."] @@ -30,37 +73,37 @@ impl AnimationPropertyDetails { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.property(property); - ret.running_on_compositor(running_on_compositor); - ret.values(values); + Self::property(&mut ret, property); + Self::running_on_compositor(&mut ret, running_on_compositor); + Self::values(&mut ret, values); ret } #[doc = "Change the `property` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] pub fn property(&mut self, val: &str) -> &mut Self { - self.property_shim(val); + self.set_property_shim(val); self } #[doc = "Change the `runningOnCompositor` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] pub fn running_on_compositor(&mut self, val: bool) -> &mut Self { - self.running_on_compositor_shim(val); + self.set_running_on_compositor_shim(val); self } #[doc = "Change the `values` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] pub fn values(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.values_shim(val); + self.set_values_shim(val); self } #[doc = "Change the `warning` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyDetails`*"] pub fn warning(&mut self, val: &str) -> &mut Self { - self.warning_shim(val); + self.set_warning_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs b/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs index 28ace13608c..169aea9fb3f 100644 --- a/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs +++ b/crates/web-sys/src/features/gen_AnimationPropertyValueDetails.rs @@ -11,14 +11,60 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] pub type AnimationPropertyValueDetails; #[cfg(feature = "CompositeOperation")] + #[wasm_bindgen(method, getter = "composite")] + fn composite_shim(this: &AnimationPropertyValueDetails) -> CompositeOperation; + #[cfg(feature = "CompositeOperation")] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &AnimationPropertyValueDetails, val: CompositeOperation); + fn set_composite_shim(this: &AnimationPropertyValueDetails, val: CompositeOperation); + #[wasm_bindgen(method, getter = "easing")] + fn easing_shim(this: &AnimationPropertyValueDetails) -> String; #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &AnimationPropertyValueDetails, val: &str); + fn set_easing_shim(this: &AnimationPropertyValueDetails, val: &str); + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &AnimationPropertyValueDetails) -> f64; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &AnimationPropertyValueDetails, val: f64); + fn set_offset_shim(this: &AnimationPropertyValueDetails, val: f64); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &AnimationPropertyValueDetails) -> String; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &AnimationPropertyValueDetails, val: &str); + fn set_value_shim(this: &AnimationPropertyValueDetails, val: &str); +} +#[doc = "The trait to access properties on the `AnimationPropertyValueDetails` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] +pub trait AnimationPropertyValueDetailsGetters { + #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"] + fn composite(&self) -> CompositeOperation; + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + fn easing(&self) -> String; + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + fn offset(&self) -> f64; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] + fn value(&self) -> String; +} +impl AnimationPropertyValueDetailsGetters for AnimationPropertyValueDetails { + #[cfg(feature = "CompositeOperation")] + fn composite(&self) -> CompositeOperation { + self.composite_shim() + } + fn easing(&self) -> String { + self.easing_shim() + } + fn offset(&self) -> f64 { + self.offset_shim() + } + fn value(&self) -> String { + self.value_shim() + } } impl AnimationPropertyValueDetails { #[cfg(feature = "CompositeOperation")] @@ -28,8 +74,8 @@ impl AnimationPropertyValueDetails { pub fn new(composite: CompositeOperation, offset: f64) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.composite(composite); - ret.offset(offset); + Self::composite(&mut ret, composite); + Self::offset(&mut ret, offset); ret } #[cfg(feature = "CompositeOperation")] @@ -37,28 +83,28 @@ impl AnimationPropertyValueDetails { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`, `CompositeOperation`*"] pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { - self.composite_shim(val); + self.set_composite_shim(val); self } #[doc = "Change the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing_shim(val); self } #[doc = "Change the `offset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AnimationPropertyValueDetails`*"] pub fn value(&mut self, val: &str) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AssignedNodesOptions.rs b/crates/web-sys/src/features/gen_AssignedNodesOptions.rs index 45eba715538..4246f13427e 100644 --- a/crates/web-sys/src/features/gen_AssignedNodesOptions.rs +++ b/crates/web-sys/src/features/gen_AssignedNodesOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] pub type AssignedNodesOptions; + #[wasm_bindgen(method, getter = "flatten")] + fn flatten_shim(this: &AssignedNodesOptions) -> bool; #[wasm_bindgen(method, setter = "flatten")] - fn flatten_shim(this: &AssignedNodesOptions, val: bool); + fn set_flatten_shim(this: &AssignedNodesOptions, val: bool); +} +#[doc = "The trait to access properties on the `AssignedNodesOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] +pub trait AssignedNodesOptionsGetters { + #[doc = "Get the `flatten` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] + fn flatten(&self) -> bool; +} +impl AssignedNodesOptionsGetters for AssignedNodesOptions { + fn flatten(&self) -> bool { + self.flatten_shim() + } } impl AssignedNodesOptions { #[doc = "Construct a new `AssignedNodesOptions`."] @@ -26,7 +42,7 @@ impl AssignedNodesOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AssignedNodesOptions`*"] pub fn flatten(&mut self, val: bool) -> &mut Self { - self.flatten_shim(val); + self.set_flatten_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AttributeNameValue.rs b/crates/web-sys/src/features/gen_AttributeNameValue.rs index 46535ab0223..d6bb890e1bd 100644 --- a/crates/web-sys/src/features/gen_AttributeNameValue.rs +++ b/crates/web-sys/src/features/gen_AttributeNameValue.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] pub type AttributeNameValue; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &AttributeNameValue) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &AttributeNameValue, val: &str); + fn set_name_shim(this: &AttributeNameValue, val: &str); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &AttributeNameValue) -> String; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &AttributeNameValue, val: &str); + fn set_value_shim(this: &AttributeNameValue, val: &str); +} +#[doc = "The trait to access properties on the `AttributeNameValue` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] +pub trait AttributeNameValueGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] + fn name(&self) -> String; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] + fn value(&self) -> String; +} +impl AttributeNameValueGetters for AttributeNameValue { + fn name(&self) -> String { + self.name_shim() + } + fn value(&self) -> String { + self.value_shim() + } } impl AttributeNameValue { #[doc = "Construct a new `AttributeNameValue`."] @@ -22,22 +47,22 @@ impl AttributeNameValue { pub fn new(name: &str, value: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.value(value); + Self::name(&mut ret, name); + Self::value(&mut ret, value); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AttributeNameValue`*"] pub fn value(&mut self, val: &str) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioBufferOptions.rs b/crates/web-sys/src/features/gen_AudioBufferOptions.rs index b3f905927bf..b022a984040 100644 --- a/crates/web-sys/src/features/gen_AudioBufferOptions.rs +++ b/crates/web-sys/src/features/gen_AudioBufferOptions.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] pub type AudioBufferOptions; + #[wasm_bindgen(method, getter = "length")] + fn length_shim(this: &AudioBufferOptions) -> u32; #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &AudioBufferOptions, val: u32); + fn set_length_shim(this: &AudioBufferOptions, val: u32); + #[wasm_bindgen(method, getter = "numberOfChannels")] + fn number_of_channels_shim(this: &AudioBufferOptions) -> u32; #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &AudioBufferOptions, val: u32); + fn set_number_of_channels_shim(this: &AudioBufferOptions, val: u32); + #[wasm_bindgen(method, getter = "sampleRate")] + fn sample_rate_shim(this: &AudioBufferOptions) -> f32; #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioBufferOptions, val: f32); + fn set_sample_rate_shim(this: &AudioBufferOptions, val: f32); +} +#[doc = "The trait to access properties on the `AudioBufferOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] +pub trait AudioBufferOptionsGetters { + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + fn length(&self) -> u32; + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + fn number_of_channels(&self) -> u32; + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] + fn sample_rate(&self) -> f32; +} +impl AudioBufferOptionsGetters for AudioBufferOptions { + fn length(&self) -> u32 { + self.length_shim() + } + fn number_of_channels(&self) -> u32 { + self.number_of_channels_shim() + } + fn sample_rate(&self) -> f32 { + self.sample_rate_shim() + } } impl AudioBufferOptions { #[doc = "Construct a new `AudioBufferOptions`."] @@ -24,29 +58,29 @@ impl AudioBufferOptions { pub fn new(length: u32, sample_rate: f32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.length(length); - ret.sample_rate(sample_rate); + Self::length(&mut ret, length); + Self::sample_rate(&mut ret, sample_rate); ret } #[doc = "Change the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length_shim(val); self } #[doc = "Change the `numberOfChannels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); + self.set_number_of_channels_shim(val); self } #[doc = "Change the `sampleRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferOptions`*"] pub fn sample_rate(&mut self, val: f32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs b/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs index 5da87254d67..89ef09929b4 100644 --- a/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs +++ b/crates/web-sys/src/features/gen_AudioBufferSourceOptions.rs @@ -11,18 +11,82 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] pub type AudioBufferSourceOptions; #[cfg(feature = "AudioBuffer")] + #[wasm_bindgen(method, getter = "buffer")] + fn buffer_shim(this: &AudioBufferSourceOptions) -> Option; + #[cfg(feature = "AudioBuffer")] #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &AudioBufferSourceOptions, val: Option<&AudioBuffer>); + fn set_buffer_shim(this: &AudioBufferSourceOptions, val: Option<&AudioBuffer>); + #[wasm_bindgen(method, getter = "detune")] + fn detune_shim(this: &AudioBufferSourceOptions) -> f32; #[wasm_bindgen(method, setter = "detune")] - fn detune_shim(this: &AudioBufferSourceOptions, val: f32); + fn set_detune_shim(this: &AudioBufferSourceOptions, val: f32); + #[wasm_bindgen(method, getter = "loop")] + fn loop__shim(this: &AudioBufferSourceOptions) -> bool; #[wasm_bindgen(method, setter = "loop")] - fn loop__shim(this: &AudioBufferSourceOptions, val: bool); + fn set_loop__shim(this: &AudioBufferSourceOptions, val: bool); + #[wasm_bindgen(method, getter = "loopEnd")] + fn loop_end_shim(this: &AudioBufferSourceOptions) -> f64; #[wasm_bindgen(method, setter = "loopEnd")] - fn loop_end_shim(this: &AudioBufferSourceOptions, val: f64); + fn set_loop_end_shim(this: &AudioBufferSourceOptions, val: f64); + #[wasm_bindgen(method, getter = "loopStart")] + fn loop_start_shim(this: &AudioBufferSourceOptions) -> f64; #[wasm_bindgen(method, setter = "loopStart")] - fn loop_start_shim(this: &AudioBufferSourceOptions, val: f64); + fn set_loop_start_shim(this: &AudioBufferSourceOptions, val: f64); + #[wasm_bindgen(method, getter = "playbackRate")] + fn playback_rate_shim(this: &AudioBufferSourceOptions) -> f32; #[wasm_bindgen(method, setter = "playbackRate")] - fn playback_rate_shim(this: &AudioBufferSourceOptions, val: f32); + fn set_playback_rate_shim(this: &AudioBufferSourceOptions, val: f32); +} +#[doc = "The trait to access properties on the `AudioBufferSourceOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] +pub trait AudioBufferSourceOptionsGetters { + #[cfg(feature = "AudioBuffer")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceOptions`*"] + fn buffer(&self) -> Option; + #[doc = "Get the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + fn detune(&self) -> f32; + #[doc = "Get the `loop` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + fn loop_(&self) -> bool; + #[doc = "Get the `loopEnd` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + fn loop_end(&self) -> f64; + #[doc = "Get the `loopStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + fn loop_start(&self) -> f64; + #[doc = "Get the `playbackRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] + fn playback_rate(&self) -> f32; +} +impl AudioBufferSourceOptionsGetters for AudioBufferSourceOptions { + #[cfg(feature = "AudioBuffer")] + fn buffer(&self) -> Option { + self.buffer_shim() + } + fn detune(&self) -> f32 { + self.detune_shim() + } + fn loop_(&self) -> bool { + self.loop__shim() + } + fn loop_end(&self) -> f64 { + self.loop_end_shim() + } + fn loop_start(&self) -> f64 { + self.loop_start_shim() + } + fn playback_rate(&self) -> f32 { + self.playback_rate_shim() + } } impl AudioBufferSourceOptions { #[doc = "Construct a new `AudioBufferSourceOptions`."] @@ -38,42 +102,42 @@ impl AudioBufferSourceOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `AudioBufferSourceOptions`*"] pub fn buffer(&mut self, val: Option<&AudioBuffer>) -> &mut Self { - self.buffer_shim(val); + self.set_buffer_shim(val); self } #[doc = "Change the `detune` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] pub fn detune(&mut self, val: f32) -> &mut Self { - self.detune_shim(val); + self.set_detune_shim(val); self } #[doc = "Change the `loop` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] pub fn loop_(&mut self, val: bool) -> &mut Self { - self.loop__shim(val); + self.set_loop__shim(val); self } #[doc = "Change the `loopEnd` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] pub fn loop_end(&mut self, val: f64) -> &mut Self { - self.loop_end_shim(val); + self.set_loop_end_shim(val); self } #[doc = "Change the `loopStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] pub fn loop_start(&mut self, val: f64) -> &mut Self { - self.loop_start_shim(val); + self.set_loop_start_shim(val); self } #[doc = "Change the `playbackRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBufferSourceOptions`*"] pub fn playback_rate(&mut self, val: f32) -> &mut Self { - self.playback_rate_shim(val); + self.set_playback_rate_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioConfiguration.rs b/crates/web-sys/src/features/gen_AudioConfiguration.rs index 058667594ce..affd23af9e3 100644 --- a/crates/web-sys/src/features/gen_AudioConfiguration.rs +++ b/crates/web-sys/src/features/gen_AudioConfiguration.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] pub type AudioConfiguration; + #[wasm_bindgen(method, getter = "bitrate")] + fn bitrate_shim(this: &AudioConfiguration) -> f64; #[wasm_bindgen(method, setter = "bitrate")] - fn bitrate_shim(this: &AudioConfiguration, val: f64); + fn set_bitrate_shim(this: &AudioConfiguration, val: f64); + #[wasm_bindgen(method, getter = "channels")] + fn channels_shim(this: &AudioConfiguration) -> String; #[wasm_bindgen(method, setter = "channels")] - fn channels_shim(this: &AudioConfiguration, val: &str); + fn set_channels_shim(this: &AudioConfiguration, val: &str); + #[wasm_bindgen(method, getter = "contentType")] + fn content_type_shim(this: &AudioConfiguration) -> String; #[wasm_bindgen(method, setter = "contentType")] - fn content_type_shim(this: &AudioConfiguration, val: &str); + fn set_content_type_shim(this: &AudioConfiguration, val: &str); + #[wasm_bindgen(method, getter = "samplerate")] + fn samplerate_shim(this: &AudioConfiguration) -> u32; #[wasm_bindgen(method, setter = "samplerate")] - fn samplerate_shim(this: &AudioConfiguration, val: u32); + fn set_samplerate_shim(this: &AudioConfiguration, val: u32); +} +#[doc = "The trait to access properties on the `AudioConfiguration` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] +pub trait AudioConfigurationGetters { + #[doc = "Get the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + fn bitrate(&self) -> f64; + #[doc = "Get the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + fn channels(&self) -> String; + #[doc = "Get the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + fn content_type(&self) -> String; + #[doc = "Get the `samplerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] + fn samplerate(&self) -> u32; +} +impl AudioConfigurationGetters for AudioConfiguration { + fn bitrate(&self) -> f64 { + self.bitrate_shim() + } + fn channels(&self) -> String { + self.channels_shim() + } + fn content_type(&self) -> String { + self.content_type_shim() + } + fn samplerate(&self) -> u32 { + self.samplerate_shim() + } } impl AudioConfiguration { #[doc = "Construct a new `AudioConfiguration`."] @@ -32,28 +75,28 @@ impl AudioConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] pub fn bitrate(&mut self, val: f64) -> &mut Self { - self.bitrate_shim(val); + self.set_bitrate_shim(val); self } #[doc = "Change the `channels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] pub fn channels(&mut self, val: &str) -> &mut Self { - self.channels_shim(val); + self.set_channels_shim(val); self } #[doc = "Change the `contentType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] pub fn content_type(&mut self, val: &str) -> &mut Self { - self.content_type_shim(val); + self.set_content_type_shim(val); self } #[doc = "Change the `samplerate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`*"] pub fn samplerate(&mut self, val: u32) -> &mut Self { - self.samplerate_shim(val); + self.set_samplerate_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioContextOptions.rs b/crates/web-sys/src/features/gen_AudioContextOptions.rs index 85b9ffaa010..c55a1a8d006 100644 --- a/crates/web-sys/src/features/gen_AudioContextOptions.rs +++ b/crates/web-sys/src/features/gen_AudioContextOptions.rs @@ -10,12 +10,51 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] pub type AudioContextOptions; + #[wasm_bindgen(method, getter = "latencyHint")] + fn latency_hint_shim(this: &AudioContextOptions) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "latencyHint")] - fn latency_hint_shim(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); + fn set_latency_hint_shim(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "sampleRate")] + fn sample_rate_shim(this: &AudioContextOptions) -> f32; #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioContextOptions, val: f32); + fn set_sample_rate_shim(this: &AudioContextOptions, val: f32); + #[wasm_bindgen(method, getter = "sinkId")] + fn sink_id_shim(this: &AudioContextOptions) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "sinkId")] - fn sink_id_shim(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); + fn set_sink_id_shim(this: &AudioContextOptions, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `AudioContextOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] +pub trait AudioContextOptionsGetters { + #[doc = "Get the `latencyHint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + fn latency_hint(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + fn sample_rate(&self) -> f32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sinkId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sink_id(&self) -> ::wasm_bindgen::JsValue; +} +impl AudioContextOptionsGetters for AudioContextOptions { + fn latency_hint(&self) -> ::wasm_bindgen::JsValue { + self.latency_hint_shim() + } + fn sample_rate(&self) -> f32 { + self.sample_rate_shim() + } + #[cfg(web_sys_unstable_apis)] + fn sink_id(&self) -> ::wasm_bindgen::JsValue { + self.sink_id_shim() + } } impl AudioContextOptions { #[doc = "Construct a new `AudioContextOptions`."] @@ -30,14 +69,14 @@ impl AudioContextOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] pub fn latency_hint(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.latency_hint_shim(val); + self.set_latency_hint_shim(val); self } #[doc = "Change the `sampleRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioContextOptions`*"] pub fn sample_rate(&mut self, val: f32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -48,7 +87,7 @@ impl AudioContextOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sink_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.sink_id_shim(val); + self.set_sink_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs b/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs index b7fb5f2426a..cfd74592905 100644 --- a/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs +++ b/crates/web-sys/src/features/gen_AudioDataCopyToOptions.rs @@ -15,14 +15,82 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDataCopyToOptions; #[cfg(feature = "AudioSampleFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &AudioDataCopyToOptions) -> AudioSampleFormat; + #[cfg(feature = "AudioSampleFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &AudioDataCopyToOptions, val: AudioSampleFormat); + fn set_format_shim(this: &AudioDataCopyToOptions, val: AudioSampleFormat); + #[wasm_bindgen(method, getter = "frameCount")] + fn frame_count_shim(this: &AudioDataCopyToOptions) -> u32; #[wasm_bindgen(method, setter = "frameCount")] - fn frame_count_shim(this: &AudioDataCopyToOptions, val: u32); + fn set_frame_count_shim(this: &AudioDataCopyToOptions, val: u32); + #[wasm_bindgen(method, getter = "frameOffset")] + fn frame_offset_shim(this: &AudioDataCopyToOptions) -> u32; #[wasm_bindgen(method, setter = "frameOffset")] - fn frame_offset_shim(this: &AudioDataCopyToOptions, val: u32); + fn set_frame_offset_shim(this: &AudioDataCopyToOptions, val: u32); + #[wasm_bindgen(method, getter = "planeIndex")] + fn plane_index_shim(this: &AudioDataCopyToOptions) -> u32; #[wasm_bindgen(method, setter = "planeIndex")] - fn plane_index_shim(this: &AudioDataCopyToOptions, val: u32); + fn set_plane_index_shim(this: &AudioDataCopyToOptions, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AudioDataCopyToOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] +pub trait AudioDataCopyToOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioSampleFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`, `AudioSampleFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> AudioSampleFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `frameCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn frame_count(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `frameOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn frame_offset(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `planeIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn plane_index(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl AudioDataCopyToOptionsGetters for AudioDataCopyToOptions { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioSampleFormat")] + fn format(&self) -> AudioSampleFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn frame_count(&self) -> u32 { + self.frame_count_shim() + } + #[cfg(web_sys_unstable_apis)] + fn frame_offset(&self) -> u32 { + self.frame_offset_shim() + } + #[cfg(web_sys_unstable_apis)] + fn plane_index(&self) -> u32 { + self.plane_index_shim() + } } #[cfg(web_sys_unstable_apis)] impl AudioDataCopyToOptions { @@ -35,7 +103,7 @@ impl AudioDataCopyToOptions { pub fn new(plane_index: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.plane_index(plane_index); + Self::plane_index(&mut ret, plane_index); ret } #[cfg(web_sys_unstable_apis)] @@ -47,7 +115,7 @@ impl AudioDataCopyToOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +126,7 @@ impl AudioDataCopyToOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn frame_count(&mut self, val: u32) -> &mut Self { - self.frame_count_shim(val); + self.set_frame_count_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +137,7 @@ impl AudioDataCopyToOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn frame_offset(&mut self, val: u32) -> &mut Self { - self.frame_offset_shim(val); + self.set_frame_offset_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -80,7 +148,7 @@ impl AudioDataCopyToOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn plane_index(&mut self, val: u32) -> &mut Self { - self.plane_index_shim(val); + self.set_plane_index_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDataInit.rs b/crates/web-sys/src/features/gen_AudioDataInit.rs index 88afffc7932..97c10cf2138 100644 --- a/crates/web-sys/src/features/gen_AudioDataInit.rs +++ b/crates/web-sys/src/features/gen_AudioDataInit.rs @@ -14,19 +14,115 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDataInit; + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &AudioDataInit) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &AudioDataInit, val: &::js_sys::Object); + fn set_data_shim(this: &AudioDataInit, val: &::js_sys::Object); + #[cfg(feature = "AudioSampleFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &AudioDataInit) -> AudioSampleFormat; #[cfg(feature = "AudioSampleFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &AudioDataInit, val: AudioSampleFormat); + fn set_format_shim(this: &AudioDataInit, val: AudioSampleFormat); + #[wasm_bindgen(method, getter = "numberOfChannels")] + fn number_of_channels_shim(this: &AudioDataInit) -> u32; #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &AudioDataInit, val: u32); + fn set_number_of_channels_shim(this: &AudioDataInit, val: u32); + #[wasm_bindgen(method, getter = "numberOfFrames")] + fn number_of_frames_shim(this: &AudioDataInit) -> u32; #[wasm_bindgen(method, setter = "numberOfFrames")] - fn number_of_frames_shim(this: &AudioDataInit, val: u32); + fn set_number_of_frames_shim(this: &AudioDataInit, val: u32); + #[wasm_bindgen(method, getter = "sampleRate")] + fn sample_rate_shim(this: &AudioDataInit) -> f32; #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioDataInit, val: f32); + fn set_sample_rate_shim(this: &AudioDataInit, val: f32); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &AudioDataInit) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &AudioDataInit, val: f64); + fn set_timestamp_shim(this: &AudioDataInit, val: f64); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AudioDataInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] +pub trait AudioDataInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data(&self) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioSampleFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`, `AudioSampleFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> AudioSampleFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn number_of_channels(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numberOfFrames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn number_of_frames(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sample_rate(&self) -> f32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp(&self) -> f64; +} +#[cfg(web_sys_unstable_apis)] +impl AudioDataInitGetters for AudioDataInit { + #[cfg(web_sys_unstable_apis)] + fn data(&self) -> ::js_sys::Object { + self.data_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioSampleFormat")] + fn format(&self) -> AudioSampleFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn number_of_channels(&self) -> u32 { + self.number_of_channels_shim() + } + #[cfg(web_sys_unstable_apis)] + fn number_of_frames(&self) -> u32 { + self.number_of_frames_shim() + } + #[cfg(web_sys_unstable_apis)] + fn sample_rate(&self) -> f32 { + self.sample_rate_shim() + } + #[cfg(web_sys_unstable_apis)] + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } } #[cfg(web_sys_unstable_apis)] impl AudioDataInit { @@ -47,12 +143,12 @@ impl AudioDataInit { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.data(data); - ret.format(format); - ret.number_of_channels(number_of_channels); - ret.number_of_frames(number_of_frames); - ret.sample_rate(sample_rate); - ret.timestamp(timestamp); + Self::data(&mut ret, data); + Self::format(&mut ret, format); + Self::number_of_channels(&mut ret, number_of_channels); + Self::number_of_frames(&mut ret, number_of_frames); + Self::sample_rate(&mut ret, sample_rate); + Self::timestamp(&mut ret, timestamp); ret } #[cfg(web_sys_unstable_apis)] @@ -63,7 +159,7 @@ impl AudioDataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -75,7 +171,7 @@ impl AudioDataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: AudioSampleFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -86,7 +182,7 @@ impl AudioDataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); + self.set_number_of_channels_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -97,7 +193,7 @@ impl AudioDataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn number_of_frames(&mut self, val: u32) -> &mut Self { - self.number_of_frames_shim(val); + self.set_number_of_frames_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -108,7 +204,7 @@ impl AudioDataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sample_rate(&mut self, val: f32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -119,7 +215,7 @@ impl AudioDataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDecoderConfig.rs b/crates/web-sys/src/features/gen_AudioDecoderConfig.rs index 561f6c58664..201c8db4059 100644 --- a/crates/web-sys/src/features/gen_AudioDecoderConfig.rs +++ b/crates/web-sys/src/features/gen_AudioDecoderConfig.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDecoderConfig; + #[wasm_bindgen(method, getter = "codec")] + fn codec_shim(this: &AudioDecoderConfig) -> String; #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &AudioDecoderConfig, val: &str); + fn set_codec_shim(this: &AudioDecoderConfig, val: &str); + #[wasm_bindgen(method, getter = "description")] + fn description_shim(this: &AudioDecoderConfig) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &AudioDecoderConfig, val: &::js_sys::Object); + fn set_description_shim(this: &AudioDecoderConfig, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "numberOfChannels")] + fn number_of_channels_shim(this: &AudioDecoderConfig) -> u32; #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &AudioDecoderConfig, val: u32); + fn set_number_of_channels_shim(this: &AudioDecoderConfig, val: u32); + #[wasm_bindgen(method, getter = "sampleRate")] + fn sample_rate_shim(this: &AudioDecoderConfig) -> u32; #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioDecoderConfig, val: u32); + fn set_sample_rate_shim(this: &AudioDecoderConfig, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AudioDecoderConfig` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] +pub trait AudioDecoderConfigGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn codec(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn description(&self) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn number_of_channels(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sample_rate(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl AudioDecoderConfigGetters for AudioDecoderConfig { + #[cfg(web_sys_unstable_apis)] + fn codec(&self) -> String { + self.codec_shim() + } + #[cfg(web_sys_unstable_apis)] + fn description(&self) -> ::js_sys::Object { + self.description_shim() + } + #[cfg(web_sys_unstable_apis)] + fn number_of_channels(&self) -> u32 { + self.number_of_channels_shim() + } + #[cfg(web_sys_unstable_apis)] + fn sample_rate(&self) -> u32 { + self.sample_rate_shim() + } } #[cfg(web_sys_unstable_apis)] impl AudioDecoderConfig { @@ -34,9 +99,9 @@ impl AudioDecoderConfig { pub fn new(codec: &str, number_of_channels: u32, sample_rate: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.codec(codec); - ret.number_of_channels(number_of_channels); - ret.sample_rate(sample_rate); + Self::codec(&mut ret, codec); + Self::number_of_channels(&mut ret, number_of_channels); + Self::sample_rate(&mut ret, sample_rate); ret } #[cfg(web_sys_unstable_apis)] @@ -47,7 +112,7 @@ impl AudioDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); + self.set_codec_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +123,7 @@ impl AudioDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn description(&mut self, val: &::js_sys::Object) -> &mut Self { - self.description_shim(val); + self.set_description_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +134,7 @@ impl AudioDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); + self.set_number_of_channels_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -80,7 +145,7 @@ impl AudioDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sample_rate(&mut self, val: u32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDecoderInit.rs b/crates/web-sys/src/features/gen_AudioDecoderInit.rs index 927ec60a7f9..167a2a2632a 100644 --- a/crates/web-sys/src/features/gen_AudioDecoderInit.rs +++ b/crates/web-sys/src/features/gen_AudioDecoderInit.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDecoderInit; + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &AudioDecoderInit) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &AudioDecoderInit, val: &::js_sys::Function); + fn set_error_shim(this: &AudioDecoderInit, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "output")] + fn output_shim(this: &AudioDecoderInit) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "output")] - fn output_shim(this: &AudioDecoderInit, val: &::js_sys::Function); + fn set_output_shim(this: &AudioDecoderInit, val: &::js_sys::Function); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AudioDecoderInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] +pub trait AudioDecoderInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn error(&self) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn output(&self) -> ::js_sys::Function; +} +#[cfg(web_sys_unstable_apis)] +impl AudioDecoderInitGetters for AudioDecoderInit { + #[cfg(web_sys_unstable_apis)] + fn error(&self) -> ::js_sys::Function { + self.error_shim() + } + #[cfg(web_sys_unstable_apis)] + fn output(&self) -> ::js_sys::Function { + self.output_shim() + } } #[cfg(web_sys_unstable_apis)] impl AudioDecoderInit { @@ -30,8 +67,8 @@ impl AudioDecoderInit { pub fn new(error: &::js_sys::Function, output: &::js_sys::Function) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.error(error); - ret.output(output); + Self::error(&mut ret, error); + Self::output(&mut ret, output); ret } #[cfg(web_sys_unstable_apis)] @@ -42,7 +79,7 @@ impl AudioDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +90,7 @@ impl AudioDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { - self.output_shim(val); + self.set_output_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioDecoderSupport.rs b/crates/web-sys/src/features/gen_AudioDecoderSupport.rs index ecbbc3eed95..019c8015e07 100644 --- a/crates/web-sys/src/features/gen_AudioDecoderSupport.rs +++ b/crates/web-sys/src/features/gen_AudioDecoderSupport.rs @@ -15,10 +15,50 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioDecoderSupport; #[cfg(feature = "AudioDecoderConfig")] + #[wasm_bindgen(method, getter = "config")] + fn config_shim(this: &AudioDecoderSupport) -> AudioDecoderConfig; + #[cfg(feature = "AudioDecoderConfig")] #[wasm_bindgen(method, setter = "config")] - fn config_shim(this: &AudioDecoderSupport, val: &AudioDecoderConfig); + fn set_config_shim(this: &AudioDecoderSupport, val: &AudioDecoderConfig); + #[wasm_bindgen(method, getter = "supported")] + fn supported_shim(this: &AudioDecoderSupport) -> bool; #[wasm_bindgen(method, setter = "supported")] - fn supported_shim(this: &AudioDecoderSupport, val: bool); + fn set_supported_shim(this: &AudioDecoderSupport, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AudioDecoderSupport` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioDecoderSupport`*"] +pub trait AudioDecoderSupportGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioDecoderConfig")] + #[doc = "Get the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `AudioDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn config(&self) -> AudioDecoderConfig; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn supported(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl AudioDecoderSupportGetters for AudioDecoderSupport { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioDecoderConfig")] + fn config(&self) -> AudioDecoderConfig { + self.config_shim() + } + #[cfg(web_sys_unstable_apis)] + fn supported(&self) -> bool { + self.supported_shim() + } } #[cfg(web_sys_unstable_apis)] impl AudioDecoderSupport { @@ -42,7 +82,7 @@ impl AudioDecoderSupport { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn config(&mut self, val: &AudioDecoderConfig) -> &mut Self { - self.config_shim(val); + self.set_config_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +93,7 @@ impl AudioDecoderSupport { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn supported(&mut self, val: bool) -> &mut Self { - self.supported_shim(val); + self.set_supported_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioEncoderConfig.rs b/crates/web-sys/src/features/gen_AudioEncoderConfig.rs index a21f98ad4da..880c07dbf0a 100644 --- a/crates/web-sys/src/features/gen_AudioEncoderConfig.rs +++ b/crates/web-sys/src/features/gen_AudioEncoderConfig.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioEncoderConfig; + #[wasm_bindgen(method, getter = "bitrate")] + fn bitrate_shim(this: &AudioEncoderConfig) -> f64; #[wasm_bindgen(method, setter = "bitrate")] - fn bitrate_shim(this: &AudioEncoderConfig, val: f64); + fn set_bitrate_shim(this: &AudioEncoderConfig, val: f64); + #[wasm_bindgen(method, getter = "codec")] + fn codec_shim(this: &AudioEncoderConfig) -> String; #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &AudioEncoderConfig, val: &str); + fn set_codec_shim(this: &AudioEncoderConfig, val: &str); + #[wasm_bindgen(method, getter = "numberOfChannels")] + fn number_of_channels_shim(this: &AudioEncoderConfig) -> u32; #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &AudioEncoderConfig, val: u32); + fn set_number_of_channels_shim(this: &AudioEncoderConfig, val: u32); + #[wasm_bindgen(method, getter = "sampleRate")] + fn sample_rate_shim(this: &AudioEncoderConfig) -> u32; #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &AudioEncoderConfig, val: u32); + fn set_sample_rate_shim(this: &AudioEncoderConfig, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AudioEncoderConfig` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] +pub trait AudioEncoderConfigGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bitrate(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn codec(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn number_of_channels(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sample_rate(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl AudioEncoderConfigGetters for AudioEncoderConfig { + #[cfg(web_sys_unstable_apis)] + fn bitrate(&self) -> f64 { + self.bitrate_shim() + } + #[cfg(web_sys_unstable_apis)] + fn codec(&self) -> String { + self.codec_shim() + } + #[cfg(web_sys_unstable_apis)] + fn number_of_channels(&self) -> u32 { + self.number_of_channels_shim() + } + #[cfg(web_sys_unstable_apis)] + fn sample_rate(&self) -> u32 { + self.sample_rate_shim() + } } #[cfg(web_sys_unstable_apis)] impl AudioEncoderConfig { @@ -34,7 +99,7 @@ impl AudioEncoderConfig { pub fn new(codec: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.codec(codec); + Self::codec(&mut ret, codec); ret } #[cfg(web_sys_unstable_apis)] @@ -45,7 +110,7 @@ impl AudioEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bitrate(&mut self, val: f64) -> &mut Self { - self.bitrate_shim(val); + self.set_bitrate_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -56,7 +121,7 @@ impl AudioEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); + self.set_codec_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -67,7 +132,7 @@ impl AudioEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); + self.set_number_of_channels_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -78,7 +143,7 @@ impl AudioEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sample_rate(&mut self, val: u32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioEncoderInit.rs b/crates/web-sys/src/features/gen_AudioEncoderInit.rs index 52bae3763d0..cfcd036ddc4 100644 --- a/crates/web-sys/src/features/gen_AudioEncoderInit.rs +++ b/crates/web-sys/src/features/gen_AudioEncoderInit.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioEncoderInit; + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &AudioEncoderInit) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &AudioEncoderInit, val: &::js_sys::Function); + fn set_error_shim(this: &AudioEncoderInit, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "output")] + fn output_shim(this: &AudioEncoderInit) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "output")] - fn output_shim(this: &AudioEncoderInit, val: &::js_sys::Function); + fn set_output_shim(this: &AudioEncoderInit, val: &::js_sys::Function); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AudioEncoderInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] +pub trait AudioEncoderInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn error(&self) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn output(&self) -> ::js_sys::Function; +} +#[cfg(web_sys_unstable_apis)] +impl AudioEncoderInitGetters for AudioEncoderInit { + #[cfg(web_sys_unstable_apis)] + fn error(&self) -> ::js_sys::Function { + self.error_shim() + } + #[cfg(web_sys_unstable_apis)] + fn output(&self) -> ::js_sys::Function { + self.output_shim() + } } #[cfg(web_sys_unstable_apis)] impl AudioEncoderInit { @@ -30,8 +67,8 @@ impl AudioEncoderInit { pub fn new(error: &::js_sys::Function, output: &::js_sys::Function) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.error(error); - ret.output(output); + Self::error(&mut ret, error); + Self::output(&mut ret, output); ret } #[cfg(web_sys_unstable_apis)] @@ -42,7 +79,7 @@ impl AudioEncoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +90,7 @@ impl AudioEncoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { - self.output_shim(val); + self.set_output_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioEncoderSupport.rs b/crates/web-sys/src/features/gen_AudioEncoderSupport.rs index c19fad1e944..c6e64d7b55f 100644 --- a/crates/web-sys/src/features/gen_AudioEncoderSupport.rs +++ b/crates/web-sys/src/features/gen_AudioEncoderSupport.rs @@ -15,10 +15,50 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioEncoderSupport; #[cfg(feature = "AudioEncoderConfig")] + #[wasm_bindgen(method, getter = "config")] + fn config_shim(this: &AudioEncoderSupport) -> AudioEncoderConfig; + #[cfg(feature = "AudioEncoderConfig")] #[wasm_bindgen(method, setter = "config")] - fn config_shim(this: &AudioEncoderSupport, val: &AudioEncoderConfig); + fn set_config_shim(this: &AudioEncoderSupport, val: &AudioEncoderConfig); + #[wasm_bindgen(method, getter = "supported")] + fn supported_shim(this: &AudioEncoderSupport) -> bool; #[wasm_bindgen(method, setter = "supported")] - fn supported_shim(this: &AudioEncoderSupport, val: bool); + fn set_supported_shim(this: &AudioEncoderSupport, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AudioEncoderSupport` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioEncoderSupport`*"] +pub trait AudioEncoderSupportGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioEncoderConfig")] + #[doc = "Get the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderConfig`, `AudioEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn config(&self) -> AudioEncoderConfig; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn supported(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl AudioEncoderSupportGetters for AudioEncoderSupport { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioEncoderConfig")] + fn config(&self) -> AudioEncoderConfig { + self.config_shim() + } + #[cfg(web_sys_unstable_apis)] + fn supported(&self) -> bool { + self.supported_shim() + } } #[cfg(web_sys_unstable_apis)] impl AudioEncoderSupport { @@ -42,7 +82,7 @@ impl AudioEncoderSupport { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn config(&mut self, val: &AudioEncoderConfig) -> &mut Self { - self.config_shim(val); + self.set_config_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +93,7 @@ impl AudioEncoderSupport { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn supported(&mut self, val: bool) -> &mut Self { - self.supported_shim(val); + self.set_supported_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioNodeOptions.rs b/crates/web-sys/src/features/gen_AudioNodeOptions.rs index a5baf5de084..ce683fbe8c5 100644 --- a/crates/web-sys/src/features/gen_AudioNodeOptions.rs +++ b/crates/web-sys/src/features/gen_AudioNodeOptions.rs @@ -10,14 +10,54 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] pub type AudioNodeOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &AudioNodeOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &AudioNodeOptions, val: u32); + fn set_channel_count_shim(this: &AudioNodeOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &AudioNodeOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &AudioNodeOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &AudioNodeOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &AudioNodeOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &AudioNodeOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &AudioNodeOptions, val: ChannelInterpretation); +} +#[doc = "The trait to access properties on the `AudioNodeOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] +pub trait AudioNodeOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelCountMode`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelInterpretation`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; +} +impl AudioNodeOptionsGetters for AudioNodeOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } } impl AudioNodeOptions { #[doc = "Construct a new `AudioNodeOptions`."] @@ -32,7 +72,7 @@ impl AudioNodeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -40,7 +80,7 @@ impl AudioNodeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelCountMode`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -48,7 +88,7 @@ impl AudioNodeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioNodeOptions`, `ChannelInterpretation`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioSinkOptions.rs b/crates/web-sys/src/features/gen_AudioSinkOptions.rs index 666dd222b52..69a7e6c5c89 100644 --- a/crates/web-sys/src/features/gen_AudioSinkOptions.rs +++ b/crates/web-sys/src/features/gen_AudioSinkOptions.rs @@ -15,8 +15,34 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type AudioSinkOptions; #[cfg(feature = "AudioSinkType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &AudioSinkOptions) -> AudioSinkType; + #[cfg(feature = "AudioSinkType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &AudioSinkOptions, val: AudioSinkType); + fn set_type__shim(this: &AudioSinkOptions, val: AudioSinkType); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `AudioSinkOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`*"] +pub trait AudioSinkOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioSinkType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioSinkOptions`, `AudioSinkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn type_(&self) -> AudioSinkType; +} +#[cfg(web_sys_unstable_apis)] +impl AudioSinkOptionsGetters for AudioSinkOptions { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioSinkType")] + fn type_(&self) -> AudioSinkType { + self.type__shim() + } } #[cfg(web_sys_unstable_apis)] impl AudioSinkOptions { @@ -30,7 +56,7 @@ impl AudioSinkOptions { pub fn new(type_: AudioSinkType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.type_(type_); + Self::type_(&mut ret, type_); ret } #[cfg(web_sys_unstable_apis)] @@ -42,7 +68,7 @@ impl AudioSinkOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn type_(&mut self, val: AudioSinkType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs b/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs index 4d683ce3c00..a49de37d342 100644 --- a/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs +++ b/crates/web-sys/src/features/gen_AudioWorkletNodeOptions.rs @@ -10,22 +10,98 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] pub type AudioWorkletNodeOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &AudioWorkletNodeOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &AudioWorkletNodeOptions, val: u32); + fn set_channel_count_shim(this: &AudioWorkletNodeOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &AudioWorkletNodeOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &AudioWorkletNodeOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &AudioWorkletNodeOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &AudioWorkletNodeOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &AudioWorkletNodeOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &AudioWorkletNodeOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "numberOfInputs")] + fn number_of_inputs_shim(this: &AudioWorkletNodeOptions) -> u32; #[wasm_bindgen(method, setter = "numberOfInputs")] - fn number_of_inputs_shim(this: &AudioWorkletNodeOptions, val: u32); + fn set_number_of_inputs_shim(this: &AudioWorkletNodeOptions, val: u32); + #[wasm_bindgen(method, getter = "numberOfOutputs")] + fn number_of_outputs_shim(this: &AudioWorkletNodeOptions) -> u32; #[wasm_bindgen(method, setter = "numberOfOutputs")] - fn number_of_outputs_shim(this: &AudioWorkletNodeOptions, val: u32); + fn set_number_of_outputs_shim(this: &AudioWorkletNodeOptions, val: u32); + #[wasm_bindgen(method, getter = "outputChannelCount")] + fn output_channel_count_shim(this: &AudioWorkletNodeOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "outputChannelCount")] - fn output_channel_count_shim(this: &AudioWorkletNodeOptions, val: &::wasm_bindgen::JsValue); + fn set_output_channel_count_shim(this: &AudioWorkletNodeOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "processorOptions")] + fn processor_options_shim(this: &AudioWorkletNodeOptions) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "processorOptions")] - fn processor_options_shim(this: &AudioWorkletNodeOptions, val: Option<&::js_sys::Object>); + fn set_processor_options_shim(this: &AudioWorkletNodeOptions, val: Option<&::js_sys::Object>); +} +#[doc = "The trait to access properties on the `AudioWorkletNodeOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] +pub trait AudioWorkletNodeOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `numberOfInputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + fn number_of_inputs(&self) -> u32; + #[doc = "Get the `numberOfOutputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + fn number_of_outputs(&self) -> u32; + #[doc = "Get the `outputChannelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + fn output_channel_count(&self) -> ::js_sys::Array; + #[doc = "Get the `processorOptions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] + fn processor_options(&self) -> Option<::js_sys::Object>; +} +impl AudioWorkletNodeOptionsGetters for AudioWorkletNodeOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn number_of_inputs(&self) -> u32 { + self.number_of_inputs_shim() + } + fn number_of_outputs(&self) -> u32 { + self.number_of_outputs_shim() + } + fn output_channel_count(&self) -> ::js_sys::Array { + self.output_channel_count_shim() + } + fn processor_options(&self) -> Option<::js_sys::Object> { + self.processor_options_shim() + } } impl AudioWorkletNodeOptions { #[doc = "Construct a new `AudioWorkletNodeOptions`."] @@ -40,7 +116,7 @@ impl AudioWorkletNodeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -48,7 +124,7 @@ impl AudioWorkletNodeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelCountMode`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -56,35 +132,35 @@ impl AudioWorkletNodeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`, `ChannelInterpretation`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `numberOfInputs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] pub fn number_of_inputs(&mut self, val: u32) -> &mut Self { - self.number_of_inputs_shim(val); + self.set_number_of_inputs_shim(val); self } #[doc = "Change the `numberOfOutputs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] pub fn number_of_outputs(&mut self, val: u32) -> &mut Self { - self.number_of_outputs_shim(val); + self.set_number_of_outputs_shim(val); self } #[doc = "Change the `outputChannelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] pub fn output_channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.output_channel_count_shim(val); + self.set_output_channel_count_shim(val); self } #[doc = "Change the `processorOptions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNodeOptions`*"] pub fn processor_options(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.processor_options_shim(val); + self.set_processor_options_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs index 954af0d7237..eaefd41a8be 100644 --- a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs +++ b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientInputs.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] pub type AuthenticationExtensionsClientInputs; + #[wasm_bindgen(method, getter = "appid")] + fn appid_shim(this: &AuthenticationExtensionsClientInputs) -> String; #[wasm_bindgen(method, setter = "appid")] - fn appid_shim(this: &AuthenticationExtensionsClientInputs, val: &str); + fn set_appid_shim(this: &AuthenticationExtensionsClientInputs, val: &str); +} +#[doc = "The trait to access properties on the `AuthenticationExtensionsClientInputs` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] +pub trait AuthenticationExtensionsClientInputsGetters { + #[doc = "Get the `appid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] + fn appid(&self) -> String; +} +impl AuthenticationExtensionsClientInputsGetters for AuthenticationExtensionsClientInputs { + fn appid(&self) -> String { + self.appid_shim() + } } impl AuthenticationExtensionsClientInputs { #[doc = "Construct a new `AuthenticationExtensionsClientInputs`."] @@ -26,7 +42,7 @@ impl AuthenticationExtensionsClientInputs { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`*"] pub fn appid(&mut self, val: &str) -> &mut Self { - self.appid_shim(val); + self.set_appid_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs index 9b63b43d5df..cc99ee8334f 100644 --- a/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs +++ b/crates/web-sys/src/features/gen_AuthenticationExtensionsClientOutputs.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] pub type AuthenticationExtensionsClientOutputs; + #[wasm_bindgen(method, getter = "appid")] + fn appid_shim(this: &AuthenticationExtensionsClientOutputs) -> bool; #[wasm_bindgen(method, setter = "appid")] - fn appid_shim(this: &AuthenticationExtensionsClientOutputs, val: bool); + fn set_appid_shim(this: &AuthenticationExtensionsClientOutputs, val: bool); +} +#[doc = "The trait to access properties on the `AuthenticationExtensionsClientOutputs` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] +pub trait AuthenticationExtensionsClientOutputsGetters { + #[doc = "Get the `appid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] + fn appid(&self) -> bool; +} +impl AuthenticationExtensionsClientOutputsGetters for AuthenticationExtensionsClientOutputs { + fn appid(&self) -> bool { + self.appid_shim() + } } impl AuthenticationExtensionsClientOutputs { #[doc = "Construct a new `AuthenticationExtensionsClientOutputs`."] @@ -26,7 +42,7 @@ impl AuthenticationExtensionsClientOutputs { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientOutputs`*"] pub fn appid(&mut self, val: bool) -> &mut Self { - self.appid_shim(val); + self.set_appid_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs b/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs index 4ebf1beed46..e64665bbf57 100644 --- a/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs +++ b/crates/web-sys/src/features/gen_AuthenticatorSelectionCriteria.rs @@ -11,20 +11,63 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] pub type AuthenticatorSelectionCriteria; #[cfg(feature = "AuthenticatorAttachment")] - #[wasm_bindgen(method, setter = "authenticatorAttachment")] + #[wasm_bindgen(method, getter = "authenticatorAttachment")] fn authenticator_attachment_shim( this: &AuthenticatorSelectionCriteria, + ) -> AuthenticatorAttachment; + #[cfg(feature = "AuthenticatorAttachment")] + #[wasm_bindgen(method, setter = "authenticatorAttachment")] + fn set_authenticator_attachment_shim( + this: &AuthenticatorSelectionCriteria, val: AuthenticatorAttachment, ); + #[wasm_bindgen(method, getter = "requireResidentKey")] + fn require_resident_key_shim(this: &AuthenticatorSelectionCriteria) -> bool; #[wasm_bindgen(method, setter = "requireResidentKey")] - fn require_resident_key_shim(this: &AuthenticatorSelectionCriteria, val: bool); + fn set_require_resident_key_shim(this: &AuthenticatorSelectionCriteria, val: bool); + #[cfg(feature = "UserVerificationRequirement")] + #[wasm_bindgen(method, getter = "userVerification")] + fn user_verification_shim(this: &AuthenticatorSelectionCriteria) + -> UserVerificationRequirement; #[cfg(feature = "UserVerificationRequirement")] #[wasm_bindgen(method, setter = "userVerification")] - fn user_verification_shim( + fn set_user_verification_shim( this: &AuthenticatorSelectionCriteria, val: UserVerificationRequirement, ); } +#[doc = "The trait to access properties on the `AuthenticatorSelectionCriteria` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] +pub trait AuthenticatorSelectionCriteriaGetters { + #[cfg(feature = "AuthenticatorAttachment")] + #[doc = "Get the `authenticatorAttachment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`, `AuthenticatorSelectionCriteria`*"] + fn authenticator_attachment(&self) -> AuthenticatorAttachment; + #[doc = "Get the `requireResidentKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] + fn require_resident_key(&self) -> bool; + #[cfg(feature = "UserVerificationRequirement")] + #[doc = "Get the `userVerification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `UserVerificationRequirement`*"] + fn user_verification(&self) -> UserVerificationRequirement; +} +impl AuthenticatorSelectionCriteriaGetters for AuthenticatorSelectionCriteria { + #[cfg(feature = "AuthenticatorAttachment")] + fn authenticator_attachment(&self) -> AuthenticatorAttachment { + self.authenticator_attachment_shim() + } + fn require_resident_key(&self) -> bool { + self.require_resident_key_shim() + } + #[cfg(feature = "UserVerificationRequirement")] + fn user_verification(&self) -> UserVerificationRequirement { + self.user_verification_shim() + } +} impl AuthenticatorSelectionCriteria { #[doc = "Construct a new `AuthenticatorSelectionCriteria`."] #[doc = ""] @@ -39,14 +82,14 @@ impl AuthenticatorSelectionCriteria { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticatorAttachment`, `AuthenticatorSelectionCriteria`*"] pub fn authenticator_attachment(&mut self, val: AuthenticatorAttachment) -> &mut Self { - self.authenticator_attachment_shim(val); + self.set_authenticator_attachment_shim(val); self } #[doc = "Change the `requireResidentKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`*"] pub fn require_resident_key(&mut self, val: bool) -> &mut Self { - self.require_resident_key_shim(val); + self.set_require_resident_key_shim(val); self } #[cfg(feature = "UserVerificationRequirement")] @@ -54,7 +97,7 @@ impl AuthenticatorSelectionCriteria { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `UserVerificationRequirement`*"] pub fn user_verification(&mut self, val: UserVerificationRequirement) -> &mut Self { - self.user_verification_shim(val); + self.set_user_verification_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_AutocompleteInfo.rs b/crates/web-sys/src/features/gen_AutocompleteInfo.rs index fbc62528fb1..e7b6c025752 100644 --- a/crates/web-sys/src/features/gen_AutocompleteInfo.rs +++ b/crates/web-sys/src/features/gen_AutocompleteInfo.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] pub type AutocompleteInfo; + #[wasm_bindgen(method, getter = "addressType")] + fn address_type_shim(this: &AutocompleteInfo) -> String; #[wasm_bindgen(method, setter = "addressType")] - fn address_type_shim(this: &AutocompleteInfo, val: &str); + fn set_address_type_shim(this: &AutocompleteInfo, val: &str); + #[wasm_bindgen(method, getter = "contactType")] + fn contact_type_shim(this: &AutocompleteInfo) -> String; #[wasm_bindgen(method, setter = "contactType")] - fn contact_type_shim(this: &AutocompleteInfo, val: &str); + fn set_contact_type_shim(this: &AutocompleteInfo, val: &str); + #[wasm_bindgen(method, getter = "fieldName")] + fn field_name_shim(this: &AutocompleteInfo) -> String; #[wasm_bindgen(method, setter = "fieldName")] - fn field_name_shim(this: &AutocompleteInfo, val: &str); + fn set_field_name_shim(this: &AutocompleteInfo, val: &str); + #[wasm_bindgen(method, getter = "section")] + fn section_shim(this: &AutocompleteInfo) -> String; #[wasm_bindgen(method, setter = "section")] - fn section_shim(this: &AutocompleteInfo, val: &str); + fn set_section_shim(this: &AutocompleteInfo, val: &str); +} +#[doc = "The trait to access properties on the `AutocompleteInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] +pub trait AutocompleteInfoGetters { + #[doc = "Get the `addressType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + fn address_type(&self) -> String; + #[doc = "Get the `contactType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + fn contact_type(&self) -> String; + #[doc = "Get the `fieldName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + fn field_name(&self) -> String; + #[doc = "Get the `section` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] + fn section(&self) -> String; +} +impl AutocompleteInfoGetters for AutocompleteInfo { + fn address_type(&self) -> String { + self.address_type_shim() + } + fn contact_type(&self) -> String { + self.contact_type_shim() + } + fn field_name(&self) -> String { + self.field_name_shim() + } + fn section(&self) -> String { + self.section_shim() + } } impl AutocompleteInfo { #[doc = "Construct a new `AutocompleteInfo`."] @@ -32,28 +75,28 @@ impl AutocompleteInfo { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] pub fn address_type(&mut self, val: &str) -> &mut Self { - self.address_type_shim(val); + self.set_address_type_shim(val); self } #[doc = "Change the `contactType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] pub fn contact_type(&mut self, val: &str) -> &mut Self { - self.contact_type_shim(val); + self.set_contact_type_shim(val); self } #[doc = "Change the `fieldName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] pub fn field_name(&mut self, val: &str) -> &mut Self { - self.field_name_shim(val); + self.set_field_name_shim(val); self } #[doc = "Change the `section` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AutocompleteInfo`*"] pub fn section(&mut self, val: &str) -> &mut Self { - self.section_shim(val); + self.set_section_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs b/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs index 073a7138836..ea8231ecef3 100644 --- a/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs +++ b/crates/web-sys/src/features/gen_BaseComputedKeyframe.rs @@ -11,16 +11,71 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] pub type BaseComputedKeyframe; #[cfg(feature = "CompositeOperation")] + #[wasm_bindgen(method, getter = "composite")] + fn composite_shim(this: &BaseComputedKeyframe) -> Option; + #[cfg(feature = "CompositeOperation")] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &BaseComputedKeyframe, val: Option); + fn set_composite_shim(this: &BaseComputedKeyframe, val: Option); + #[wasm_bindgen(method, getter = "easing")] + fn easing_shim(this: &BaseComputedKeyframe) -> String; #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &BaseComputedKeyframe, val: &str); + fn set_easing_shim(this: &BaseComputedKeyframe, val: &str); + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &BaseComputedKeyframe) -> Option; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &BaseComputedKeyframe, val: Option); + fn set_offset_shim(this: &BaseComputedKeyframe, val: Option); + #[wasm_bindgen(method, getter = "simulateComputeValuesFailure")] + fn simulate_compute_values_failure_shim(this: &BaseComputedKeyframe) -> bool; #[wasm_bindgen(method, setter = "simulateComputeValuesFailure")] - fn simulate_compute_values_failure_shim(this: &BaseComputedKeyframe, val: bool); + fn set_simulate_compute_values_failure_shim(this: &BaseComputedKeyframe, val: bool); + #[wasm_bindgen(method, getter = "computedOffset")] + fn computed_offset_shim(this: &BaseComputedKeyframe) -> f64; #[wasm_bindgen(method, setter = "computedOffset")] - fn computed_offset_shim(this: &BaseComputedKeyframe, val: f64); + fn set_computed_offset_shim(this: &BaseComputedKeyframe, val: f64); +} +#[doc = "The trait to access properties on the `BaseComputedKeyframe` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] +pub trait BaseComputedKeyframeGetters { + #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"] + fn composite(&self) -> Option; + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + fn easing(&self) -> String; + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + fn offset(&self) -> Option; + #[doc = "Get the `simulateComputeValuesFailure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + fn simulate_compute_values_failure(&self) -> bool; + #[doc = "Get the `computedOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] + fn computed_offset(&self) -> f64; +} +impl BaseComputedKeyframeGetters for BaseComputedKeyframe { + #[cfg(feature = "CompositeOperation")] + fn composite(&self) -> Option { + self.composite_shim() + } + fn easing(&self) -> String { + self.easing_shim() + } + fn offset(&self) -> Option { + self.offset_shim() + } + fn simulate_compute_values_failure(&self) -> bool { + self.simulate_compute_values_failure_shim() + } + fn computed_offset(&self) -> f64 { + self.computed_offset_shim() + } } impl BaseComputedKeyframe { #[doc = "Construct a new `BaseComputedKeyframe`."] @@ -36,35 +91,35 @@ impl BaseComputedKeyframe { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`, `CompositeOperation`*"] pub fn composite(&mut self, val: Option) -> &mut Self { - self.composite_shim(val); + self.set_composite_shim(val); self } #[doc = "Change the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing_shim(val); self } #[doc = "Change the `offset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] pub fn offset(&mut self, val: Option) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } #[doc = "Change the `simulateComputeValuesFailure` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self { - self.simulate_compute_values_failure_shim(val); + self.set_simulate_compute_values_failure_shim(val); self } #[doc = "Change the `computedOffset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseComputedKeyframe`*"] pub fn computed_offset(&mut self, val: f64) -> &mut Self { - self.computed_offset_shim(val); + self.set_computed_offset_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BaseKeyframe.rs b/crates/web-sys/src/features/gen_BaseKeyframe.rs index 0c2f97da2aa..73d2659ae0b 100644 --- a/crates/web-sys/src/features/gen_BaseKeyframe.rs +++ b/crates/web-sys/src/features/gen_BaseKeyframe.rs @@ -11,14 +11,60 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] pub type BaseKeyframe; #[cfg(feature = "CompositeOperation")] + #[wasm_bindgen(method, getter = "composite")] + fn composite_shim(this: &BaseKeyframe) -> Option; + #[cfg(feature = "CompositeOperation")] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &BaseKeyframe, val: Option); + fn set_composite_shim(this: &BaseKeyframe, val: Option); + #[wasm_bindgen(method, getter = "easing")] + fn easing_shim(this: &BaseKeyframe) -> String; #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &BaseKeyframe, val: &str); + fn set_easing_shim(this: &BaseKeyframe, val: &str); + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &BaseKeyframe) -> Option; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &BaseKeyframe, val: Option); + fn set_offset_shim(this: &BaseKeyframe, val: Option); + #[wasm_bindgen(method, getter = "simulateComputeValuesFailure")] + fn simulate_compute_values_failure_shim(this: &BaseKeyframe) -> bool; #[wasm_bindgen(method, setter = "simulateComputeValuesFailure")] - fn simulate_compute_values_failure_shim(this: &BaseKeyframe, val: bool); + fn set_simulate_compute_values_failure_shim(this: &BaseKeyframe, val: bool); +} +#[doc = "The trait to access properties on the `BaseKeyframe` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] +pub trait BaseKeyframeGetters { + #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"] + fn composite(&self) -> Option; + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + fn easing(&self) -> String; + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + fn offset(&self) -> Option; + #[doc = "Get the `simulateComputeValuesFailure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] + fn simulate_compute_values_failure(&self) -> bool; +} +impl BaseKeyframeGetters for BaseKeyframe { + #[cfg(feature = "CompositeOperation")] + fn composite(&self) -> Option { + self.composite_shim() + } + fn easing(&self) -> String { + self.easing_shim() + } + fn offset(&self) -> Option { + self.offset_shim() + } + fn simulate_compute_values_failure(&self) -> bool { + self.simulate_compute_values_failure_shim() + } } impl BaseKeyframe { #[doc = "Construct a new `BaseKeyframe`."] @@ -34,28 +80,28 @@ impl BaseKeyframe { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`, `CompositeOperation`*"] pub fn composite(&mut self, val: Option) -> &mut Self { - self.composite_shim(val); + self.set_composite_shim(val); self } #[doc = "Change the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing_shim(val); self } #[doc = "Change the `offset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] pub fn offset(&mut self, val: Option) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } #[doc = "Change the `simulateComputeValuesFailure` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BaseKeyframe`*"] pub fn simulate_compute_values_failure(&mut self, val: bool) -> &mut Self { - self.simulate_compute_values_failure_shim(val); + self.set_simulate_compute_values_failure_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs b/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs index d2dfb18f80e..3067b7ea343 100644 --- a/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs +++ b/crates/web-sys/src/features/gen_BasePropertyIndexedKeyframe.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] pub type BasePropertyIndexedKeyframe; + #[wasm_bindgen(method, getter = "composite")] + fn composite_shim(this: &BasePropertyIndexedKeyframe) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + fn set_composite_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "easing")] + fn easing_shim(this: &BasePropertyIndexedKeyframe) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + fn set_easing_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &BasePropertyIndexedKeyframe) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); + fn set_offset_shim(this: &BasePropertyIndexedKeyframe, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `BasePropertyIndexedKeyframe` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] +pub trait BasePropertyIndexedKeyframeGetters { + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + fn composite(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + fn easing(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] + fn offset(&self) -> ::wasm_bindgen::JsValue; +} +impl BasePropertyIndexedKeyframeGetters for BasePropertyIndexedKeyframe { + fn composite(&self) -> ::wasm_bindgen::JsValue { + self.composite_shim() + } + fn easing(&self) -> ::wasm_bindgen::JsValue { + self.easing_shim() + } + fn offset(&self) -> ::wasm_bindgen::JsValue { + self.offset_shim() + } } impl BasePropertyIndexedKeyframe { #[doc = "Construct a new `BasePropertyIndexedKeyframe`."] @@ -30,21 +64,21 @@ impl BasePropertyIndexedKeyframe { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] pub fn composite(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.composite_shim(val); + self.set_composite_shim(val); self } #[doc = "Change the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] pub fn easing(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.easing_shim(val); + self.set_easing_shim(val); self } #[doc = "Change the `offset` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasePropertyIndexedKeyframe`*"] pub fn offset(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BasicCardRequest.rs b/crates/web-sys/src/features/gen_BasicCardRequest.rs index 4509a71d546..b64a0545969 100644 --- a/crates/web-sys/src/features/gen_BasicCardRequest.rs +++ b/crates/web-sys/src/features/gen_BasicCardRequest.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] pub type BasicCardRequest; + #[wasm_bindgen(method, getter = "supportedNetworks")] + fn supported_networks_shim(this: &BasicCardRequest) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "supportedNetworks")] - fn supported_networks_shim(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); + fn set_supported_networks_shim(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "supportedTypes")] + fn supported_types_shim(this: &BasicCardRequest) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "supportedTypes")] - fn supported_types_shim(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); + fn set_supported_types_shim(this: &BasicCardRequest, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `BasicCardRequest` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] +pub trait BasicCardRequestGetters { + #[doc = "Get the `supportedNetworks` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] + fn supported_networks(&self) -> ::js_sys::Array; + #[doc = "Get the `supportedTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] + fn supported_types(&self) -> ::js_sys::Array; +} +impl BasicCardRequestGetters for BasicCardRequest { + fn supported_networks(&self) -> ::js_sys::Array { + self.supported_networks_shim() + } + fn supported_types(&self) -> ::js_sys::Array { + self.supported_types_shim() + } } impl BasicCardRequest { #[doc = "Construct a new `BasicCardRequest`."] @@ -28,14 +53,14 @@ impl BasicCardRequest { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] pub fn supported_networks(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.supported_networks_shim(val); + self.set_supported_networks_shim(val); self } #[doc = "Change the `supportedTypes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardRequest`*"] pub fn supported_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.supported_types_shim(val); + self.set_supported_types_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BasicCardResponse.rs b/crates/web-sys/src/features/gen_BasicCardResponse.rs index bafff97512c..9691b71abe7 100644 --- a/crates/web-sys/src/features/gen_BasicCardResponse.rs +++ b/crates/web-sys/src/features/gen_BasicCardResponse.rs @@ -11,18 +11,82 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] pub type BasicCardResponse; #[cfg(feature = "PaymentAddress")] + #[wasm_bindgen(method, getter = "billingAddress")] + fn billing_address_shim(this: &BasicCardResponse) -> Option; + #[cfg(feature = "PaymentAddress")] #[wasm_bindgen(method, setter = "billingAddress")] - fn billing_address_shim(this: &BasicCardResponse, val: Option<&PaymentAddress>); + fn set_billing_address_shim(this: &BasicCardResponse, val: Option<&PaymentAddress>); + #[wasm_bindgen(method, getter = "cardNumber")] + fn card_number_shim(this: &BasicCardResponse) -> String; #[wasm_bindgen(method, setter = "cardNumber")] - fn card_number_shim(this: &BasicCardResponse, val: &str); + fn set_card_number_shim(this: &BasicCardResponse, val: &str); + #[wasm_bindgen(method, getter = "cardSecurityCode")] + fn card_security_code_shim(this: &BasicCardResponse) -> String; #[wasm_bindgen(method, setter = "cardSecurityCode")] - fn card_security_code_shim(this: &BasicCardResponse, val: &str); + fn set_card_security_code_shim(this: &BasicCardResponse, val: &str); + #[wasm_bindgen(method, getter = "cardholderName")] + fn cardholder_name_shim(this: &BasicCardResponse) -> String; #[wasm_bindgen(method, setter = "cardholderName")] - fn cardholder_name_shim(this: &BasicCardResponse, val: &str); + fn set_cardholder_name_shim(this: &BasicCardResponse, val: &str); + #[wasm_bindgen(method, getter = "expiryMonth")] + fn expiry_month_shim(this: &BasicCardResponse) -> String; #[wasm_bindgen(method, setter = "expiryMonth")] - fn expiry_month_shim(this: &BasicCardResponse, val: &str); + fn set_expiry_month_shim(this: &BasicCardResponse, val: &str); + #[wasm_bindgen(method, getter = "expiryYear")] + fn expiry_year_shim(this: &BasicCardResponse) -> String; #[wasm_bindgen(method, setter = "expiryYear")] - fn expiry_year_shim(this: &BasicCardResponse, val: &str); + fn set_expiry_year_shim(this: &BasicCardResponse, val: &str); +} +#[doc = "The trait to access properties on the `BasicCardResponse` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] +pub trait BasicCardResponseGetters { + #[cfg(feature = "PaymentAddress")] + #[doc = "Get the `billingAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`, `PaymentAddress`*"] + fn billing_address(&self) -> Option; + #[doc = "Get the `cardNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + fn card_number(&self) -> String; + #[doc = "Get the `cardSecurityCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + fn card_security_code(&self) -> String; + #[doc = "Get the `cardholderName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + fn cardholder_name(&self) -> String; + #[doc = "Get the `expiryMonth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + fn expiry_month(&self) -> String; + #[doc = "Get the `expiryYear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] + fn expiry_year(&self) -> String; +} +impl BasicCardResponseGetters for BasicCardResponse { + #[cfg(feature = "PaymentAddress")] + fn billing_address(&self) -> Option { + self.billing_address_shim() + } + fn card_number(&self) -> String { + self.card_number_shim() + } + fn card_security_code(&self) -> String { + self.card_security_code_shim() + } + fn cardholder_name(&self) -> String { + self.cardholder_name_shim() + } + fn expiry_month(&self) -> String { + self.expiry_month_shim() + } + fn expiry_year(&self) -> String { + self.expiry_year_shim() + } } impl BasicCardResponse { #[doc = "Construct a new `BasicCardResponse`."] @@ -31,7 +95,7 @@ impl BasicCardResponse { pub fn new(card_number: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.card_number(card_number); + Self::card_number(&mut ret, card_number); ret } #[cfg(feature = "PaymentAddress")] @@ -39,42 +103,42 @@ impl BasicCardResponse { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`, `PaymentAddress`*"] pub fn billing_address(&mut self, val: Option<&PaymentAddress>) -> &mut Self { - self.billing_address_shim(val); + self.set_billing_address_shim(val); self } #[doc = "Change the `cardNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] pub fn card_number(&mut self, val: &str) -> &mut Self { - self.card_number_shim(val); + self.set_card_number_shim(val); self } #[doc = "Change the `cardSecurityCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] pub fn card_security_code(&mut self, val: &str) -> &mut Self { - self.card_security_code_shim(val); + self.set_card_security_code_shim(val); self } #[doc = "Change the `cardholderName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] pub fn cardholder_name(&mut self, val: &str) -> &mut Self { - self.cardholder_name_shim(val); + self.set_cardholder_name_shim(val); self } #[doc = "Change the `expiryMonth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] pub fn expiry_month(&mut self, val: &str) -> &mut Self { - self.expiry_month_shim(val); + self.set_expiry_month_shim(val); self } #[doc = "Change the `expiryYear` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BasicCardResponse`*"] pub fn expiry_year(&mut self, val: &str) -> &mut Self { - self.expiry_year_shim(val); + self.set_expiry_year_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BiquadFilterOptions.rs b/crates/web-sys/src/features/gen_BiquadFilterOptions.rs index 6a0863aa344..0b5bedcd393 100644 --- a/crates/web-sys/src/features/gen_BiquadFilterOptions.rs +++ b/crates/web-sys/src/features/gen_BiquadFilterOptions.rs @@ -10,25 +10,113 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] pub type BiquadFilterOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &BiquadFilterOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &BiquadFilterOptions, val: u32); + fn set_channel_count_shim(this: &BiquadFilterOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &BiquadFilterOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &BiquadFilterOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &BiquadFilterOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &BiquadFilterOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &BiquadFilterOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &BiquadFilterOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "Q")] + fn q_shim(this: &BiquadFilterOptions) -> f32; #[wasm_bindgen(method, setter = "Q")] - fn q_shim(this: &BiquadFilterOptions, val: f32); + fn set_q_shim(this: &BiquadFilterOptions, val: f32); + #[wasm_bindgen(method, getter = "detune")] + fn detune_shim(this: &BiquadFilterOptions) -> f32; #[wasm_bindgen(method, setter = "detune")] - fn detune_shim(this: &BiquadFilterOptions, val: f32); + fn set_detune_shim(this: &BiquadFilterOptions, val: f32); + #[wasm_bindgen(method, getter = "frequency")] + fn frequency_shim(this: &BiquadFilterOptions) -> f32; #[wasm_bindgen(method, setter = "frequency")] - fn frequency_shim(this: &BiquadFilterOptions, val: f32); + fn set_frequency_shim(this: &BiquadFilterOptions, val: f32); + #[wasm_bindgen(method, getter = "gain")] + fn gain_shim(this: &BiquadFilterOptions) -> f32; #[wasm_bindgen(method, setter = "gain")] - fn gain_shim(this: &BiquadFilterOptions, val: f32); + fn set_gain_shim(this: &BiquadFilterOptions, val: f32); + #[cfg(feature = "BiquadFilterType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &BiquadFilterOptions) -> BiquadFilterType; #[cfg(feature = "BiquadFilterType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &BiquadFilterOptions, val: BiquadFilterType); + fn set_type__shim(this: &BiquadFilterOptions, val: BiquadFilterType); +} +#[doc = "The trait to access properties on the `BiquadFilterOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] +pub trait BiquadFilterOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelCountMode`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `Q` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + fn q(&self) -> f32; + #[doc = "Get the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + fn detune(&self) -> f32; + #[doc = "Get the `frequency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + fn frequency(&self) -> f32; + #[doc = "Get the `gain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] + fn gain(&self) -> f32; + #[cfg(feature = "BiquadFilterType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"] + fn type_(&self) -> BiquadFilterType; +} +impl BiquadFilterOptionsGetters for BiquadFilterOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn q(&self) -> f32 { + self.q_shim() + } + fn detune(&self) -> f32 { + self.detune_shim() + } + fn frequency(&self) -> f32 { + self.frequency_shim() + } + fn gain(&self) -> f32 { + self.gain_shim() + } + #[cfg(feature = "BiquadFilterType")] + fn type_(&self) -> BiquadFilterType { + self.type__shim() + } } impl BiquadFilterOptions { #[doc = "Construct a new `BiquadFilterOptions`."] @@ -43,7 +131,7 @@ impl BiquadFilterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -51,7 +139,7 @@ impl BiquadFilterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelCountMode`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -59,35 +147,35 @@ impl BiquadFilterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `ChannelInterpretation`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `Q` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] pub fn q(&mut self, val: f32) -> &mut Self { - self.q_shim(val); + self.set_q_shim(val); self } #[doc = "Change the `detune` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] pub fn detune(&mut self, val: f32) -> &mut Self { - self.detune_shim(val); + self.set_detune_shim(val); self } #[doc = "Change the `frequency` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] pub fn frequency(&mut self, val: f32) -> &mut Self { - self.frequency_shim(val); + self.set_frequency_shim(val); self } #[doc = "Change the `gain` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`*"] pub fn gain(&mut self, val: f32) -> &mut Self { - self.gain_shim(val); + self.set_gain_shim(val); self } #[cfg(feature = "BiquadFilterType")] @@ -95,7 +183,7 @@ impl BiquadFilterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BiquadFilterOptions`, `BiquadFilterType`*"] pub fn type_(&mut self, val: BiquadFilterType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BlobEventInit.rs b/crates/web-sys/src/features/gen_BlobEventInit.rs index 0fa75a06fb3..11c3d17d0ef 100644 --- a/crates/web-sys/src/features/gen_BlobEventInit.rs +++ b/crates/web-sys/src/features/gen_BlobEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] pub type BlobEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &BlobEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &BlobEventInit, val: bool); + fn set_bubbles_shim(this: &BlobEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &BlobEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &BlobEventInit, val: bool); + fn set_cancelable_shim(this: &BlobEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &BlobEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &BlobEventInit, val: bool); + fn set_composed_shim(this: &BlobEventInit, val: bool); + #[cfg(feature = "Blob")] + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &BlobEventInit) -> Option; #[cfg(feature = "Blob")] #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &BlobEventInit, val: Option<&Blob>); + fn set_data_shim(this: &BlobEventInit, val: Option<&Blob>); +} +#[doc = "The trait to access properties on the `BlobEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] +pub trait BlobEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "Blob")] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEventInit`*"] + fn data(&self) -> Option; +} +impl BlobEventInitGetters for BlobEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "Blob")] + fn data(&self) -> Option { + self.data_shim() + } } impl BlobEventInit { #[doc = "Construct a new `BlobEventInit`."] @@ -33,21 +79,21 @@ impl BlobEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "Blob")] @@ -55,7 +101,7 @@ impl BlobEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Blob`, `BlobEventInit`*"] pub fn data(&mut self, val: Option<&Blob>) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BlobPropertyBag.rs b/crates/web-sys/src/features/gen_BlobPropertyBag.rs index 0adf9be4ac0..637dcb27589 100644 --- a/crates/web-sys/src/features/gen_BlobPropertyBag.rs +++ b/crates/web-sys/src/features/gen_BlobPropertyBag.rs @@ -11,10 +11,38 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] pub type BlobPropertyBag; #[cfg(feature = "EndingTypes")] + #[wasm_bindgen(method, getter = "endings")] + fn endings_shim(this: &BlobPropertyBag) -> EndingTypes; + #[cfg(feature = "EndingTypes")] #[wasm_bindgen(method, setter = "endings")] - fn endings_shim(this: &BlobPropertyBag, val: EndingTypes); + fn set_endings_shim(this: &BlobPropertyBag, val: EndingTypes); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &BlobPropertyBag) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &BlobPropertyBag, val: &str); + fn set_type__shim(this: &BlobPropertyBag, val: &str); +} +#[doc = "The trait to access properties on the `BlobPropertyBag` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] +pub trait BlobPropertyBagGetters { + #[cfg(feature = "EndingTypes")] + #[doc = "Get the `endings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"] + fn endings(&self) -> EndingTypes; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] + fn type_(&self) -> String; +} +impl BlobPropertyBagGetters for BlobPropertyBag { + #[cfg(feature = "EndingTypes")] + fn endings(&self) -> EndingTypes { + self.endings_shim() + } + fn type_(&self) -> String { + self.type__shim() + } } impl BlobPropertyBag { #[doc = "Construct a new `BlobPropertyBag`."] @@ -30,14 +58,14 @@ impl BlobPropertyBag { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`, `EndingTypes`*"] pub fn endings(&mut self, val: EndingTypes) -> &mut Self { - self.endings_shim(val); + self.set_endings_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlobPropertyBag`*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BlockParsingOptions.rs b/crates/web-sys/src/features/gen_BlockParsingOptions.rs index f46a8c184bc..215d48a3cc7 100644 --- a/crates/web-sys/src/features/gen_BlockParsingOptions.rs +++ b/crates/web-sys/src/features/gen_BlockParsingOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] pub type BlockParsingOptions; + #[wasm_bindgen(method, getter = "blockScriptCreated")] + fn block_script_created_shim(this: &BlockParsingOptions) -> bool; #[wasm_bindgen(method, setter = "blockScriptCreated")] - fn block_script_created_shim(this: &BlockParsingOptions, val: bool); + fn set_block_script_created_shim(this: &BlockParsingOptions, val: bool); +} +#[doc = "The trait to access properties on the `BlockParsingOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] +pub trait BlockParsingOptionsGetters { + #[doc = "Get the `blockScriptCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] + fn block_script_created(&self) -> bool; +} +impl BlockParsingOptionsGetters for BlockParsingOptions { + fn block_script_created(&self) -> bool { + self.block_script_created_shim() + } } impl BlockParsingOptions { #[doc = "Construct a new `BlockParsingOptions`."] @@ -26,7 +42,7 @@ impl BlockParsingOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BlockParsingOptions`*"] pub fn block_script_created(&mut self, val: bool) -> &mut Self { - self.block_script_created_shim(val); + self.set_block_script_created_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs b/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs index 3b357d47883..d9358eb1fac 100644 --- a/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs +++ b/crates/web-sys/src/features/gen_BluetoothAdvertisingEventInit.rs @@ -14,34 +14,207 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothAdvertisingEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &BluetoothAdvertisingEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &BluetoothAdvertisingEventInit, val: bool); + fn set_bubbles_shim(this: &BluetoothAdvertisingEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &BluetoothAdvertisingEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &BluetoothAdvertisingEventInit, val: bool); + fn set_cancelable_shim(this: &BluetoothAdvertisingEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &BluetoothAdvertisingEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &BluetoothAdvertisingEventInit, val: bool); + fn set_composed_shim(this: &BluetoothAdvertisingEventInit, val: bool); + #[wasm_bindgen(method, getter = "appearance")] + fn appearance_shim(this: &BluetoothAdvertisingEventInit) -> u16; #[wasm_bindgen(method, setter = "appearance")] - fn appearance_shim(this: &BluetoothAdvertisingEventInit, val: u16); + fn set_appearance_shim(this: &BluetoothAdvertisingEventInit, val: u16); + #[cfg(feature = "BluetoothDevice")] + #[wasm_bindgen(method, getter = "device")] + fn device_shim(this: &BluetoothAdvertisingEventInit) -> BluetoothDevice; #[cfg(feature = "BluetoothDevice")] #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &BluetoothAdvertisingEventInit, val: &BluetoothDevice); + fn set_device_shim(this: &BluetoothAdvertisingEventInit, val: &BluetoothDevice); + #[cfg(feature = "BluetoothManufacturerDataMap")] + #[wasm_bindgen(method, getter = "manufacturerData")] + fn manufacturer_data_shim(this: &BluetoothAdvertisingEventInit) + -> BluetoothManufacturerDataMap; #[cfg(feature = "BluetoothManufacturerDataMap")] #[wasm_bindgen(method, setter = "manufacturerData")] - fn manufacturer_data_shim( + fn set_manufacturer_data_shim( this: &BluetoothAdvertisingEventInit, val: &BluetoothManufacturerDataMap, ); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &BluetoothAdvertisingEventInit) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &BluetoothAdvertisingEventInit, val: &str); + fn set_name_shim(this: &BluetoothAdvertisingEventInit, val: &str); + #[wasm_bindgen(method, getter = "rssi")] + fn rssi_shim(this: &BluetoothAdvertisingEventInit) -> i8; #[wasm_bindgen(method, setter = "rssi")] - fn rssi_shim(this: &BluetoothAdvertisingEventInit, val: i8); + fn set_rssi_shim(this: &BluetoothAdvertisingEventInit, val: i8); + #[cfg(feature = "BluetoothServiceDataMap")] + #[wasm_bindgen(method, getter = "serviceData")] + fn service_data_shim(this: &BluetoothAdvertisingEventInit) -> BluetoothServiceDataMap; #[cfg(feature = "BluetoothServiceDataMap")] #[wasm_bindgen(method, setter = "serviceData")] - fn service_data_shim(this: &BluetoothAdvertisingEventInit, val: &BluetoothServiceDataMap); + fn set_service_data_shim(this: &BluetoothAdvertisingEventInit, val: &BluetoothServiceDataMap); + #[wasm_bindgen(method, getter = "txPower")] + fn tx_power_shim(this: &BluetoothAdvertisingEventInit) -> i8; #[wasm_bindgen(method, setter = "txPower")] - fn tx_power_shim(this: &BluetoothAdvertisingEventInit, val: i8); + fn set_tx_power_shim(this: &BluetoothAdvertisingEventInit, val: i8); + #[wasm_bindgen(method, getter = "uuids")] + fn uuids_shim(this: &BluetoothAdvertisingEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "uuids")] - fn uuids_shim(this: &BluetoothAdvertisingEventInit, val: &::wasm_bindgen::JsValue); + fn set_uuids_shim(this: &BluetoothAdvertisingEventInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `BluetoothAdvertisingEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] +pub trait BluetoothAdvertisingEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `appearance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn appearance(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn device(&self) -> BluetoothDevice; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothManufacturerDataMap")] + #[doc = "Get the `manufacturerData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothManufacturerDataMap`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn manufacturer_data(&self) -> BluetoothManufacturerDataMap; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `rssi` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn rssi(&self) -> i8; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothServiceDataMap")] + #[doc = "Get the `serviceData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`, `BluetoothServiceDataMap`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn service_data(&self) -> BluetoothServiceDataMap; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `txPower` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn tx_power(&self) -> i8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `uuids` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothAdvertisingEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn uuids(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl BluetoothAdvertisingEventInitGetters for BluetoothAdvertisingEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + fn appearance(&self) -> u16 { + self.appearance_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothDevice")] + fn device(&self) -> BluetoothDevice { + self.device_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothManufacturerDataMap")] + fn manufacturer_data(&self) -> BluetoothManufacturerDataMap { + self.manufacturer_data_shim() + } + #[cfg(web_sys_unstable_apis)] + fn name(&self) -> String { + self.name_shim() + } + #[cfg(web_sys_unstable_apis)] + fn rssi(&self) -> i8 { + self.rssi_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "BluetoothServiceDataMap")] + fn service_data(&self) -> BluetoothServiceDataMap { + self.service_data_shim() + } + #[cfg(web_sys_unstable_apis)] + fn tx_power(&self) -> i8 { + self.tx_power_shim() + } + #[cfg(web_sys_unstable_apis)] + fn uuids(&self) -> ::js_sys::Array { + self.uuids_shim() + } } #[cfg(web_sys_unstable_apis)] impl BluetoothAdvertisingEventInit { @@ -55,7 +228,7 @@ impl BluetoothAdvertisingEventInit { pub fn new(device: &BluetoothDevice) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.device(device); + Self::device(&mut ret, device); ret } #[cfg(web_sys_unstable_apis)] @@ -66,7 +239,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +250,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -88,7 +261,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -99,7 +272,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn appearance(&mut self, val: u16) -> &mut Self { - self.appearance_shim(val); + self.set_appearance_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -111,7 +284,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn device(&mut self, val: &BluetoothDevice) -> &mut Self { - self.device_shim(val); + self.set_device_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -123,7 +296,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn manufacturer_data(&mut self, val: &BluetoothManufacturerDataMap) -> &mut Self { - self.manufacturer_data_shim(val); + self.set_manufacturer_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -134,7 +307,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -145,7 +318,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn rssi(&mut self, val: i8) -> &mut Self { - self.rssi_shim(val); + self.set_rssi_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -157,7 +330,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn service_data(&mut self, val: &BluetoothServiceDataMap) -> &mut Self { - self.service_data_shim(val); + self.set_service_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -168,7 +341,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn tx_power(&mut self, val: i8) -> &mut Self { - self.tx_power_shim(val); + self.set_tx_power_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -179,7 +352,7 @@ impl BluetoothAdvertisingEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn uuids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.uuids_shim(val); + self.set_uuids_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs b/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs index c5ced6819f6..f84a44789e2 100644 --- a/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs +++ b/crates/web-sys/src/features/gen_BluetoothDataFilterInit.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothDataFilterInit; + #[wasm_bindgen(method, getter = "dataPrefix")] + fn data_prefix_shim(this: &BluetoothDataFilterInit) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "dataPrefix")] - fn data_prefix_shim(this: &BluetoothDataFilterInit, val: &::js_sys::Object); + fn set_data_prefix_shim(this: &BluetoothDataFilterInit, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "mask")] + fn mask_shim(this: &BluetoothDataFilterInit) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "mask")] - fn mask_shim(this: &BluetoothDataFilterInit, val: &::js_sys::Object); + fn set_mask_shim(this: &BluetoothDataFilterInit, val: &::js_sys::Object); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `BluetoothDataFilterInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] +pub trait BluetoothDataFilterInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataPrefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data_prefix(&self) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothDataFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mask(&self) -> ::js_sys::Object; +} +#[cfg(web_sys_unstable_apis)] +impl BluetoothDataFilterInitGetters for BluetoothDataFilterInit { + #[cfg(web_sys_unstable_apis)] + fn data_prefix(&self) -> ::js_sys::Object { + self.data_prefix_shim() + } + #[cfg(web_sys_unstable_apis)] + fn mask(&self) -> ::js_sys::Object { + self.mask_shim() + } } #[cfg(web_sys_unstable_apis)] impl BluetoothDataFilterInit { @@ -40,7 +77,7 @@ impl BluetoothDataFilterInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data_prefix(&mut self, val: &::js_sys::Object) -> &mut Self { - self.data_prefix_shim(val); + self.set_data_prefix_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl BluetoothDataFilterInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mask(&mut self, val: &::js_sys::Object) -> &mut Self { - self.mask_shim(val); + self.set_mask_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs b/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs index e70ea5d2c1c..721355f4779 100644 --- a/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs +++ b/crates/web-sys/src/features/gen_BluetoothLeScanFilterInit.rs @@ -14,16 +14,95 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothLeScanFilterInit; + #[wasm_bindgen(method, getter = "manufacturerData")] + fn manufacturer_data_shim(this: &BluetoothLeScanFilterInit) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "manufacturerData")] - fn manufacturer_data_shim(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); + fn set_manufacturer_data_shim(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &BluetoothLeScanFilterInit) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &BluetoothLeScanFilterInit, val: &str); + fn set_name_shim(this: &BluetoothLeScanFilterInit, val: &str); + #[wasm_bindgen(method, getter = "namePrefix")] + fn name_prefix_shim(this: &BluetoothLeScanFilterInit) -> String; #[wasm_bindgen(method, setter = "namePrefix")] - fn name_prefix_shim(this: &BluetoothLeScanFilterInit, val: &str); + fn set_name_prefix_shim(this: &BluetoothLeScanFilterInit, val: &str); + #[wasm_bindgen(method, getter = "serviceData")] + fn service_data_shim(this: &BluetoothLeScanFilterInit) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "serviceData")] - fn service_data_shim(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); + fn set_service_data_shim(this: &BluetoothLeScanFilterInit, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "services")] + fn services_shim(this: &BluetoothLeScanFilterInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "services")] - fn services_shim(this: &BluetoothLeScanFilterInit, val: &::wasm_bindgen::JsValue); + fn set_services_shim(this: &BluetoothLeScanFilterInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `BluetoothLeScanFilterInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] +pub trait BluetoothLeScanFilterInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `manufacturerData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn manufacturer_data(&self) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `namePrefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name_prefix(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `serviceData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn service_data(&self) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `services` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothLeScanFilterInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn services(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl BluetoothLeScanFilterInitGetters for BluetoothLeScanFilterInit { + #[cfg(web_sys_unstable_apis)] + fn manufacturer_data(&self) -> ::js_sys::Object { + self.manufacturer_data_shim() + } + #[cfg(web_sys_unstable_apis)] + fn name(&self) -> String { + self.name_shim() + } + #[cfg(web_sys_unstable_apis)] + fn name_prefix(&self) -> String { + self.name_prefix_shim() + } + #[cfg(web_sys_unstable_apis)] + fn service_data(&self) -> ::js_sys::Object { + self.service_data_shim() + } + #[cfg(web_sys_unstable_apis)] + fn services(&self) -> ::js_sys::Array { + self.services_shim() + } } #[cfg(web_sys_unstable_apis)] impl BluetoothLeScanFilterInit { @@ -46,7 +125,7 @@ impl BluetoothLeScanFilterInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn manufacturer_data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.manufacturer_data_shim(val); + self.set_manufacturer_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +136,7 @@ impl BluetoothLeScanFilterInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +147,7 @@ impl BluetoothLeScanFilterInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name_prefix(&mut self, val: &str) -> &mut Self { - self.name_prefix_shim(val); + self.set_name_prefix_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -79,7 +158,7 @@ impl BluetoothLeScanFilterInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn service_data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.service_data_shim(val); + self.set_service_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -90,7 +169,7 @@ impl BluetoothLeScanFilterInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.services_shim(val); + self.set_services_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs b/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs index 3159b4567b3..4901a4449a3 100644 --- a/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_BluetoothPermissionDescriptor.rs @@ -15,16 +15,101 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothPermissionDescriptor; #[cfg(feature = "PermissionName")] + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &BluetoothPermissionDescriptor) -> PermissionName; + #[cfg(feature = "PermissionName")] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &BluetoothPermissionDescriptor, val: PermissionName); + fn set_name_shim(this: &BluetoothPermissionDescriptor, val: PermissionName); + #[wasm_bindgen(method, getter = "acceptAllDevices")] + fn accept_all_devices_shim(this: &BluetoothPermissionDescriptor) -> bool; #[wasm_bindgen(method, setter = "acceptAllDevices")] - fn accept_all_devices_shim(this: &BluetoothPermissionDescriptor, val: bool); + fn set_accept_all_devices_shim(this: &BluetoothPermissionDescriptor, val: bool); + #[wasm_bindgen(method, getter = "deviceId")] + fn device_id_shim(this: &BluetoothPermissionDescriptor) -> String; #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &BluetoothPermissionDescriptor, val: &str); + fn set_device_id_shim(this: &BluetoothPermissionDescriptor, val: &str); + #[wasm_bindgen(method, getter = "filters")] + fn filters_shim(this: &BluetoothPermissionDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &BluetoothPermissionDescriptor, val: &::wasm_bindgen::JsValue); + fn set_filters_shim(this: &BluetoothPermissionDescriptor, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "optionalServices")] + fn optional_services_shim(this: &BluetoothPermissionDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "optionalServices")] - fn optional_services_shim(this: &BluetoothPermissionDescriptor, val: &::wasm_bindgen::JsValue); + fn set_optional_services_shim( + this: &BluetoothPermissionDescriptor, + val: &::wasm_bindgen::JsValue, + ); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `BluetoothPermissionDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] +pub trait BluetoothPermissionDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name(&self) -> PermissionName; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `acceptAllDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn accept_all_devices(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn device_id(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn filters(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optionalServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn optional_services(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl BluetoothPermissionDescriptorGetters for BluetoothPermissionDescriptor { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + fn name(&self) -> PermissionName { + self.name_shim() + } + #[cfg(web_sys_unstable_apis)] + fn accept_all_devices(&self) -> bool { + self.accept_all_devices_shim() + } + #[cfg(web_sys_unstable_apis)] + fn device_id(&self) -> String { + self.device_id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn filters(&self) -> ::js_sys::Array { + self.filters_shim() + } + #[cfg(web_sys_unstable_apis)] + fn optional_services(&self) -> ::js_sys::Array { + self.optional_services_shim() + } } #[cfg(web_sys_unstable_apis)] impl BluetoothPermissionDescriptor { @@ -38,7 +123,7 @@ impl BluetoothPermissionDescriptor { pub fn new(name: PermissionName) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[cfg(web_sys_unstable_apis)] @@ -50,7 +135,7 @@ impl BluetoothPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -61,7 +146,7 @@ impl BluetoothPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn accept_all_devices(&mut self, val: bool) -> &mut Self { - self.accept_all_devices_shim(val); + self.set_accept_all_devices_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -72,7 +157,7 @@ impl BluetoothPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn device_id(&mut self, val: &str) -> &mut Self { - self.device_id_shim(val); + self.set_device_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -83,7 +168,7 @@ impl BluetoothPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -94,7 +179,7 @@ impl BluetoothPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn optional_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.optional_services_shim(val); + self.set_optional_services_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs b/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs index 0ef0d117cde..9bc392f32db 100644 --- a/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs +++ b/crates/web-sys/src/features/gen_BluetoothPermissionStorage.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type BluetoothPermissionStorage; + #[wasm_bindgen(method, getter = "allowedDevices")] + fn allowed_devices_shim(this: &BluetoothPermissionStorage) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "allowedDevices")] - fn allowed_devices_shim(this: &BluetoothPermissionStorage, val: &::wasm_bindgen::JsValue); + fn set_allowed_devices_shim(this: &BluetoothPermissionStorage, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `BluetoothPermissionStorage` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionStorage`*"] +pub trait BluetoothPermissionStorageGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowedDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BluetoothPermissionStorage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn allowed_devices(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl BluetoothPermissionStorageGetters for BluetoothPermissionStorage { + #[cfg(web_sys_unstable_apis)] + fn allowed_devices(&self) -> ::js_sys::Array { + self.allowed_devices_shim() + } } #[cfg(web_sys_unstable_apis)] impl BluetoothPermissionStorage { @@ -28,7 +51,7 @@ impl BluetoothPermissionStorage { pub fn new(allowed_devices: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.allowed_devices(allowed_devices); + Self::allowed_devices(&mut ret, allowed_devices); ret } #[cfg(web_sys_unstable_apis)] @@ -39,7 +62,7 @@ impl BluetoothPermissionStorage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn allowed_devices(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.allowed_devices_shim(val); + self.set_allowed_devices_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BoxQuadOptions.rs b/crates/web-sys/src/features/gen_BoxQuadOptions.rs index 6000d877f7c..12dc3c76131 100644 --- a/crates/web-sys/src/features/gen_BoxQuadOptions.rs +++ b/crates/web-sys/src/features/gen_BoxQuadOptions.rs @@ -11,10 +11,38 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] pub type BoxQuadOptions; #[cfg(feature = "CssBoxType")] + #[wasm_bindgen(method, getter = "box")] + fn box__shim(this: &BoxQuadOptions) -> CssBoxType; + #[cfg(feature = "CssBoxType")] #[wasm_bindgen(method, setter = "box")] - fn box__shim(this: &BoxQuadOptions, val: CssBoxType); + fn set_box__shim(this: &BoxQuadOptions, val: CssBoxType); + #[wasm_bindgen(method, getter = "relativeTo")] + fn relative_to_shim(this: &BoxQuadOptions) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "relativeTo")] - fn relative_to_shim(this: &BoxQuadOptions, val: &::js_sys::Object); + fn set_relative_to_shim(this: &BoxQuadOptions, val: &::js_sys::Object); +} +#[doc = "The trait to access properties on the `BoxQuadOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] +pub trait BoxQuadOptionsGetters { + #[cfg(feature = "CssBoxType")] + #[doc = "Get the `box` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"] + fn box_(&self) -> CssBoxType; + #[doc = "Get the `relativeTo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] + fn relative_to(&self) -> ::js_sys::Object; +} +impl BoxQuadOptionsGetters for BoxQuadOptions { + #[cfg(feature = "CssBoxType")] + fn box_(&self) -> CssBoxType { + self.box__shim() + } + fn relative_to(&self) -> ::js_sys::Object { + self.relative_to_shim() + } } impl BoxQuadOptions { #[doc = "Construct a new `BoxQuadOptions`."] @@ -30,14 +58,14 @@ impl BoxQuadOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`, `CssBoxType`*"] pub fn box_(&mut self, val: CssBoxType) -> &mut Self { - self.box__shim(val); + self.set_box__shim(val); self } #[doc = "Change the `relativeTo` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BoxQuadOptions`*"] pub fn relative_to(&mut self, val: &::js_sys::Object) -> &mut Self { - self.relative_to_shim(val); + self.set_relative_to_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs b/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs index 2b5f6f187b8..9c6136521ce 100644 --- a/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs +++ b/crates/web-sys/src/features/gen_BrowserElementDownloadOptions.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] pub type BrowserElementDownloadOptions; + #[wasm_bindgen(method, getter = "filename")] + fn filename_shim(this: &BrowserElementDownloadOptions) -> Option; #[wasm_bindgen(method, setter = "filename")] - fn filename_shim(this: &BrowserElementDownloadOptions, val: Option<&str>); + fn set_filename_shim(this: &BrowserElementDownloadOptions, val: Option<&str>); + #[wasm_bindgen(method, getter = "referrer")] + fn referrer_shim(this: &BrowserElementDownloadOptions) -> Option; #[wasm_bindgen(method, setter = "referrer")] - fn referrer_shim(this: &BrowserElementDownloadOptions, val: Option<&str>); + fn set_referrer_shim(this: &BrowserElementDownloadOptions, val: Option<&str>); +} +#[doc = "The trait to access properties on the `BrowserElementDownloadOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] +pub trait BrowserElementDownloadOptionsGetters { + #[doc = "Get the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] + fn filename(&self) -> Option; + #[doc = "Get the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] + fn referrer(&self) -> Option; +} +impl BrowserElementDownloadOptionsGetters for BrowserElementDownloadOptions { + fn filename(&self) -> Option { + self.filename_shim() + } + fn referrer(&self) -> Option { + self.referrer_shim() + } } impl BrowserElementDownloadOptions { #[doc = "Construct a new `BrowserElementDownloadOptions`."] @@ -28,14 +53,14 @@ impl BrowserElementDownloadOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] pub fn filename(&mut self, val: Option<&str>) -> &mut Self { - self.filename_shim(val); + self.set_filename_shim(val); self } #[doc = "Change the `referrer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementDownloadOptions`*"] pub fn referrer(&mut self, val: Option<&str>) -> &mut Self { - self.referrer_shim(val); + self.set_referrer_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs b/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs index 8a63b96bae3..cb355415278 100644 --- a/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs +++ b/crates/web-sys/src/features/gen_BrowserElementExecuteScriptOptions.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] pub type BrowserElementExecuteScriptOptions; + #[wasm_bindgen(method, getter = "origin")] + fn origin_shim(this: &BrowserElementExecuteScriptOptions) -> Option; #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); + fn set_origin_shim(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); + #[wasm_bindgen(method, getter = "url")] + fn url_shim(this: &BrowserElementExecuteScriptOptions) -> Option; #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); + fn set_url_shim(this: &BrowserElementExecuteScriptOptions, val: Option<&str>); +} +#[doc = "The trait to access properties on the `BrowserElementExecuteScriptOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] +pub trait BrowserElementExecuteScriptOptionsGetters { + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] + fn origin(&self) -> Option; + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] + fn url(&self) -> Option; +} +impl BrowserElementExecuteScriptOptionsGetters for BrowserElementExecuteScriptOptions { + fn origin(&self) -> Option { + self.origin_shim() + } + fn url(&self) -> Option { + self.url_shim() + } } impl BrowserElementExecuteScriptOptions { #[doc = "Construct a new `BrowserElementExecuteScriptOptions`."] @@ -28,14 +53,14 @@ impl BrowserElementExecuteScriptOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] pub fn origin(&mut self, val: Option<&str>) -> &mut Self { - self.origin_shim(val); + self.set_origin_shim(val); self } #[doc = "Change the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `BrowserElementExecuteScriptOptions`*"] pub fn url(&mut self, val: Option<&str>) -> &mut Self { - self.url_shim(val); + self.set_url_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CacheBatchOperation.rs b/crates/web-sys/src/features/gen_CacheBatchOperation.rs index 706019c1794..4f890522237 100644 --- a/crates/web-sys/src/features/gen_CacheBatchOperation.rs +++ b/crates/web-sys/src/features/gen_CacheBatchOperation.rs @@ -11,16 +11,68 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] pub type CacheBatchOperation; #[cfg(feature = "CacheQueryOptions")] + #[wasm_bindgen(method, getter = "options")] + fn options_shim(this: &CacheBatchOperation) -> CacheQueryOptions; + #[cfg(feature = "CacheQueryOptions")] #[wasm_bindgen(method, setter = "options")] - fn options_shim(this: &CacheBatchOperation, val: &CacheQueryOptions); + fn set_options_shim(this: &CacheBatchOperation, val: &CacheQueryOptions); + #[cfg(feature = "Request")] + #[wasm_bindgen(method, getter = "request")] + fn request_shim(this: &CacheBatchOperation) -> Request; #[cfg(feature = "Request")] #[wasm_bindgen(method, setter = "request")] - fn request_shim(this: &CacheBatchOperation, val: &Request); + fn set_request_shim(this: &CacheBatchOperation, val: &Request); + #[cfg(feature = "Response")] + #[wasm_bindgen(method, getter = "response")] + fn response_shim(this: &CacheBatchOperation) -> Response; #[cfg(feature = "Response")] #[wasm_bindgen(method, setter = "response")] - fn response_shim(this: &CacheBatchOperation, val: &Response); + fn set_response_shim(this: &CacheBatchOperation, val: &Response); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &CacheBatchOperation) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &CacheBatchOperation, val: &str); + fn set_type__shim(this: &CacheBatchOperation, val: &str); +} +#[doc = "The trait to access properties on the `CacheBatchOperation` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] +pub trait CacheBatchOperationGetters { + #[cfg(feature = "CacheQueryOptions")] + #[doc = "Get the `options` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"] + fn options(&self) -> CacheQueryOptions; + #[cfg(feature = "Request")] + #[doc = "Get the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"] + fn request(&self) -> Request; + #[cfg(feature = "Response")] + #[doc = "Get the `response` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"] + fn response(&self) -> Response; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] + fn type_(&self) -> String; +} +impl CacheBatchOperationGetters for CacheBatchOperation { + #[cfg(feature = "CacheQueryOptions")] + fn options(&self) -> CacheQueryOptions { + self.options_shim() + } + #[cfg(feature = "Request")] + fn request(&self) -> Request { + self.request_shim() + } + #[cfg(feature = "Response")] + fn response(&self) -> Response { + self.response_shim() + } + fn type_(&self) -> String { + self.type__shim() + } } impl CacheBatchOperation { #[doc = "Construct a new `CacheBatchOperation`."] @@ -36,7 +88,7 @@ impl CacheBatchOperation { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `CacheQueryOptions`*"] pub fn options(&mut self, val: &CacheQueryOptions) -> &mut Self { - self.options_shim(val); + self.set_options_shim(val); self } #[cfg(feature = "Request")] @@ -44,7 +96,7 @@ impl CacheBatchOperation { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Request`*"] pub fn request(&mut self, val: &Request) -> &mut Self { - self.request_shim(val); + self.set_request_shim(val); self } #[cfg(feature = "Response")] @@ -52,14 +104,14 @@ impl CacheBatchOperation { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`, `Response`*"] pub fn response(&mut self, val: &Response) -> &mut Self { - self.response_shim(val); + self.set_response_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheBatchOperation`*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CacheQueryOptions.rs b/crates/web-sys/src/features/gen_CacheQueryOptions.rs index f7b0bdf77e8..a2f5952f51a 100644 --- a/crates/web-sys/src/features/gen_CacheQueryOptions.rs +++ b/crates/web-sys/src/features/gen_CacheQueryOptions.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] pub type CacheQueryOptions; + #[wasm_bindgen(method, getter = "cacheName")] + fn cache_name_shim(this: &CacheQueryOptions) -> String; #[wasm_bindgen(method, setter = "cacheName")] - fn cache_name_shim(this: &CacheQueryOptions, val: &str); + fn set_cache_name_shim(this: &CacheQueryOptions, val: &str); + #[wasm_bindgen(method, getter = "ignoreMethod")] + fn ignore_method_shim(this: &CacheQueryOptions) -> bool; #[wasm_bindgen(method, setter = "ignoreMethod")] - fn ignore_method_shim(this: &CacheQueryOptions, val: bool); + fn set_ignore_method_shim(this: &CacheQueryOptions, val: bool); + #[wasm_bindgen(method, getter = "ignoreSearch")] + fn ignore_search_shim(this: &CacheQueryOptions) -> bool; #[wasm_bindgen(method, setter = "ignoreSearch")] - fn ignore_search_shim(this: &CacheQueryOptions, val: bool); + fn set_ignore_search_shim(this: &CacheQueryOptions, val: bool); + #[wasm_bindgen(method, getter = "ignoreVary")] + fn ignore_vary_shim(this: &CacheQueryOptions) -> bool; #[wasm_bindgen(method, setter = "ignoreVary")] - fn ignore_vary_shim(this: &CacheQueryOptions, val: bool); + fn set_ignore_vary_shim(this: &CacheQueryOptions, val: bool); +} +#[doc = "The trait to access properties on the `CacheQueryOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] +pub trait CacheQueryOptionsGetters { + #[doc = "Get the `cacheName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + fn cache_name(&self) -> String; + #[doc = "Get the `ignoreMethod` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + fn ignore_method(&self) -> bool; + #[doc = "Get the `ignoreSearch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + fn ignore_search(&self) -> bool; + #[doc = "Get the `ignoreVary` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] + fn ignore_vary(&self) -> bool; +} +impl CacheQueryOptionsGetters for CacheQueryOptions { + fn cache_name(&self) -> String { + self.cache_name_shim() + } + fn ignore_method(&self) -> bool { + self.ignore_method_shim() + } + fn ignore_search(&self) -> bool { + self.ignore_search_shim() + } + fn ignore_vary(&self) -> bool { + self.ignore_vary_shim() + } } impl CacheQueryOptions { #[doc = "Construct a new `CacheQueryOptions`."] @@ -32,28 +75,28 @@ impl CacheQueryOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] pub fn cache_name(&mut self, val: &str) -> &mut Self { - self.cache_name_shim(val); + self.set_cache_name_shim(val); self } #[doc = "Change the `ignoreMethod` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] pub fn ignore_method(&mut self, val: bool) -> &mut Self { - self.ignore_method_shim(val); + self.set_ignore_method_shim(val); self } #[doc = "Change the `ignoreSearch` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] pub fn ignore_search(&mut self, val: bool) -> &mut Self { - self.ignore_search_shim(val); + self.set_ignore_search_shim(val); self } #[doc = "Change the `ignoreVary` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CacheQueryOptions`*"] pub fn ignore_vary(&mut self, val: bool) -> &mut Self { - self.ignore_vary_shim(val); + self.set_ignore_vary_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs b/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs index 1a7a53e1ea7..f278d640228 100644 --- a/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs +++ b/crates/web-sys/src/features/gen_CaretStateChangedEventInit.rs @@ -10,30 +10,145 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub type CaretStateChangedEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &CaretStateChangedEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &CaretStateChangedEventInit, val: bool); + fn set_bubbles_shim(this: &CaretStateChangedEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &CaretStateChangedEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &CaretStateChangedEventInit, val: bool); + fn set_cancelable_shim(this: &CaretStateChangedEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &CaretStateChangedEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &CaretStateChangedEventInit, val: bool); + fn set_composed_shim(this: &CaretStateChangedEventInit, val: bool); + #[cfg(feature = "DomRectReadOnly")] + #[wasm_bindgen(method, getter = "boundingClientRect")] + fn bounding_client_rect_shim(this: &CaretStateChangedEventInit) -> Option; #[cfg(feature = "DomRectReadOnly")] #[wasm_bindgen(method, setter = "boundingClientRect")] - fn bounding_client_rect_shim(this: &CaretStateChangedEventInit, val: Option<&DomRectReadOnly>); + fn set_bounding_client_rect_shim( + this: &CaretStateChangedEventInit, + val: Option<&DomRectReadOnly>, + ); + #[wasm_bindgen(method, getter = "caretVisible")] + fn caret_visible_shim(this: &CaretStateChangedEventInit) -> bool; #[wasm_bindgen(method, setter = "caretVisible")] - fn caret_visible_shim(this: &CaretStateChangedEventInit, val: bool); + fn set_caret_visible_shim(this: &CaretStateChangedEventInit, val: bool); + #[wasm_bindgen(method, getter = "caretVisuallyVisible")] + fn caret_visually_visible_shim(this: &CaretStateChangedEventInit) -> bool; #[wasm_bindgen(method, setter = "caretVisuallyVisible")] - fn caret_visually_visible_shim(this: &CaretStateChangedEventInit, val: bool); + fn set_caret_visually_visible_shim(this: &CaretStateChangedEventInit, val: bool); + #[wasm_bindgen(method, getter = "collapsed")] + fn collapsed_shim(this: &CaretStateChangedEventInit) -> bool; #[wasm_bindgen(method, setter = "collapsed")] - fn collapsed_shim(this: &CaretStateChangedEventInit, val: bool); + fn set_collapsed_shim(this: &CaretStateChangedEventInit, val: bool); + #[cfg(feature = "CaretChangedReason")] + #[wasm_bindgen(method, getter = "reason")] + fn reason_shim(this: &CaretStateChangedEventInit) -> CaretChangedReason; #[cfg(feature = "CaretChangedReason")] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &CaretStateChangedEventInit, val: CaretChangedReason); + fn set_reason_shim(this: &CaretStateChangedEventInit, val: CaretChangedReason); + #[wasm_bindgen(method, getter = "selectedTextContent")] + fn selected_text_content_shim(this: &CaretStateChangedEventInit) -> String; #[wasm_bindgen(method, setter = "selectedTextContent")] - fn selected_text_content_shim(this: &CaretStateChangedEventInit, val: &str); + fn set_selected_text_content_shim(this: &CaretStateChangedEventInit, val: &str); + #[wasm_bindgen(method, getter = "selectionEditable")] + fn selection_editable_shim(this: &CaretStateChangedEventInit) -> bool; #[wasm_bindgen(method, setter = "selectionEditable")] - fn selection_editable_shim(this: &CaretStateChangedEventInit, val: bool); + fn set_selection_editable_shim(this: &CaretStateChangedEventInit, val: bool); + #[wasm_bindgen(method, getter = "selectionVisible")] + fn selection_visible_shim(this: &CaretStateChangedEventInit) -> bool; #[wasm_bindgen(method, setter = "selectionVisible")] - fn selection_visible_shim(this: &CaretStateChangedEventInit, val: bool); + fn set_selection_visible_shim(this: &CaretStateChangedEventInit, val: bool); +} +#[doc = "The trait to access properties on the `CaretStateChangedEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] +pub trait CaretStateChangedEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "DomRectReadOnly")] + #[doc = "Get the `boundingClientRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"] + fn bounding_client_rect(&self) -> Option; + #[doc = "Get the `caretVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + fn caret_visible(&self) -> bool; + #[doc = "Get the `caretVisuallyVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + fn caret_visually_visible(&self) -> bool; + #[doc = "Get the `collapsed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + fn collapsed(&self) -> bool; + #[cfg(feature = "CaretChangedReason")] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"] + fn reason(&self) -> CaretChangedReason; + #[doc = "Get the `selectedTextContent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + fn selected_text_content(&self) -> String; + #[doc = "Get the `selectionEditable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + fn selection_editable(&self) -> bool; + #[doc = "Get the `selectionVisible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] + fn selection_visible(&self) -> bool; +} +impl CaretStateChangedEventInitGetters for CaretStateChangedEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "DomRectReadOnly")] + fn bounding_client_rect(&self) -> Option { + self.bounding_client_rect_shim() + } + fn caret_visible(&self) -> bool { + self.caret_visible_shim() + } + fn caret_visually_visible(&self) -> bool { + self.caret_visually_visible_shim() + } + fn collapsed(&self) -> bool { + self.collapsed_shim() + } + #[cfg(feature = "CaretChangedReason")] + fn reason(&self) -> CaretChangedReason { + self.reason_shim() + } + fn selected_text_content(&self) -> String { + self.selected_text_content_shim() + } + fn selection_editable(&self) -> bool { + self.selection_editable_shim() + } + fn selection_visible(&self) -> bool { + self.selection_visible_shim() + } } impl CaretStateChangedEventInit { #[doc = "Construct a new `CaretStateChangedEventInit`."] @@ -48,21 +163,21 @@ impl CaretStateChangedEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "DomRectReadOnly")] @@ -70,28 +185,28 @@ impl CaretStateChangedEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`, `DomRectReadOnly`*"] pub fn bounding_client_rect(&mut self, val: Option<&DomRectReadOnly>) -> &mut Self { - self.bounding_client_rect_shim(val); + self.set_bounding_client_rect_shim(val); self } #[doc = "Change the `caretVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn caret_visible(&mut self, val: bool) -> &mut Self { - self.caret_visible_shim(val); + self.set_caret_visible_shim(val); self } #[doc = "Change the `caretVisuallyVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn caret_visually_visible(&mut self, val: bool) -> &mut Self { - self.caret_visually_visible_shim(val); + self.set_caret_visually_visible_shim(val); self } #[doc = "Change the `collapsed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn collapsed(&mut self, val: bool) -> &mut Self { - self.collapsed_shim(val); + self.set_collapsed_shim(val); self } #[cfg(feature = "CaretChangedReason")] @@ -99,28 +214,28 @@ impl CaretStateChangedEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretChangedReason`, `CaretStateChangedEventInit`*"] pub fn reason(&mut self, val: CaretChangedReason) -> &mut Self { - self.reason_shim(val); + self.set_reason_shim(val); self } #[doc = "Change the `selectedTextContent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn selected_text_content(&mut self, val: &str) -> &mut Self { - self.selected_text_content_shim(val); + self.set_selected_text_content_shim(val); self } #[doc = "Change the `selectionEditable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn selection_editable(&mut self, val: bool) -> &mut Self { - self.selection_editable_shim(val); + self.set_selection_editable_shim(val); self } #[doc = "Change the `selectionVisible` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CaretStateChangedEventInit`*"] pub fn selection_visible(&mut self, val: bool) -> &mut Self { - self.selection_visible_shim(val); + self.set_selection_visible_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ChannelMergerOptions.rs b/crates/web-sys/src/features/gen_ChannelMergerOptions.rs index 2a0566f3bcc..6a314e44e49 100644 --- a/crates/web-sys/src/features/gen_ChannelMergerOptions.rs +++ b/crates/web-sys/src/features/gen_ChannelMergerOptions.rs @@ -10,16 +10,65 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] pub type ChannelMergerOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &ChannelMergerOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &ChannelMergerOptions, val: u32); + fn set_channel_count_shim(this: &ChannelMergerOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &ChannelMergerOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &ChannelMergerOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &ChannelMergerOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &ChannelMergerOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &ChannelMergerOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &ChannelMergerOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "numberOfInputs")] + fn number_of_inputs_shim(this: &ChannelMergerOptions) -> u32; #[wasm_bindgen(method, setter = "numberOfInputs")] - fn number_of_inputs_shim(this: &ChannelMergerOptions, val: u32); + fn set_number_of_inputs_shim(this: &ChannelMergerOptions, val: u32); +} +#[doc = "The trait to access properties on the `ChannelMergerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] +pub trait ChannelMergerOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `numberOfInputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] + fn number_of_inputs(&self) -> u32; +} +impl ChannelMergerOptionsGetters for ChannelMergerOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn number_of_inputs(&self) -> u32 { + self.number_of_inputs_shim() + } } impl ChannelMergerOptions { #[doc = "Construct a new `ChannelMergerOptions`."] @@ -34,7 +83,7 @@ impl ChannelMergerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -42,7 +91,7 @@ impl ChannelMergerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelMergerOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -50,14 +99,14 @@ impl ChannelMergerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelMergerOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `numberOfInputs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelMergerOptions`*"] pub fn number_of_inputs(&mut self, val: u32) -> &mut Self { - self.number_of_inputs_shim(val); + self.set_number_of_inputs_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs b/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs index a70a522b224..8335658c116 100644 --- a/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs +++ b/crates/web-sys/src/features/gen_ChannelSplitterOptions.rs @@ -10,16 +10,65 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] pub type ChannelSplitterOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &ChannelSplitterOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &ChannelSplitterOptions, val: u32); + fn set_channel_count_shim(this: &ChannelSplitterOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &ChannelSplitterOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &ChannelSplitterOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &ChannelSplitterOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &ChannelSplitterOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &ChannelSplitterOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &ChannelSplitterOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "numberOfOutputs")] + fn number_of_outputs_shim(this: &ChannelSplitterOptions) -> u32; #[wasm_bindgen(method, setter = "numberOfOutputs")] - fn number_of_outputs_shim(this: &ChannelSplitterOptions, val: u32); + fn set_number_of_outputs_shim(this: &ChannelSplitterOptions, val: u32); +} +#[doc = "The trait to access properties on the `ChannelSplitterOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] +pub trait ChannelSplitterOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelSplitterOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelSplitterOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `numberOfOutputs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] + fn number_of_outputs(&self) -> u32; +} +impl ChannelSplitterOptionsGetters for ChannelSplitterOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn number_of_outputs(&self) -> u32 { + self.number_of_outputs_shim() + } } impl ChannelSplitterOptions { #[doc = "Construct a new `ChannelSplitterOptions`."] @@ -34,7 +83,7 @@ impl ChannelSplitterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -42,7 +91,7 @@ impl ChannelSplitterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ChannelSplitterOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -50,14 +99,14 @@ impl ChannelSplitterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ChannelSplitterOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `numberOfOutputs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelSplitterOptions`*"] pub fn number_of_outputs(&mut self, val: u32) -> &mut Self { - self.number_of_outputs_shim(val); + self.set_number_of_outputs_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CheckerboardReport.rs b/crates/web-sys/src/features/gen_CheckerboardReport.rs index 636544b6152..41738b1c0df 100644 --- a/crates/web-sys/src/features/gen_CheckerboardReport.rs +++ b/crates/web-sys/src/features/gen_CheckerboardReport.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] pub type CheckerboardReport; + #[wasm_bindgen(method, getter = "log")] + fn log_shim(this: &CheckerboardReport) -> String; #[wasm_bindgen(method, setter = "log")] - fn log_shim(this: &CheckerboardReport, val: &str); + fn set_log_shim(this: &CheckerboardReport, val: &str); + #[cfg(feature = "CheckerboardReason")] + #[wasm_bindgen(method, getter = "reason")] + fn reason_shim(this: &CheckerboardReport) -> CheckerboardReason; #[cfg(feature = "CheckerboardReason")] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &CheckerboardReport, val: CheckerboardReason); + fn set_reason_shim(this: &CheckerboardReport, val: CheckerboardReason); + #[wasm_bindgen(method, getter = "severity")] + fn severity_shim(this: &CheckerboardReport) -> u32; #[wasm_bindgen(method, setter = "severity")] - fn severity_shim(this: &CheckerboardReport, val: u32); + fn set_severity_shim(this: &CheckerboardReport, val: u32); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &CheckerboardReport) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &CheckerboardReport, val: f64); + fn set_timestamp_shim(this: &CheckerboardReport, val: f64); +} +#[doc = "The trait to access properties on the `CheckerboardReport` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] +pub trait CheckerboardReportGetters { + #[doc = "Get the `log` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + fn log(&self) -> String; + #[cfg(feature = "CheckerboardReason")] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"] + fn reason(&self) -> CheckerboardReason; + #[doc = "Get the `severity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + fn severity(&self) -> u32; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] + fn timestamp(&self) -> f64; +} +impl CheckerboardReportGetters for CheckerboardReport { + fn log(&self) -> String { + self.log_shim() + } + #[cfg(feature = "CheckerboardReason")] + fn reason(&self) -> CheckerboardReason { + self.reason_shim() + } + fn severity(&self) -> u32 { + self.severity_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } } impl CheckerboardReport { #[doc = "Construct a new `CheckerboardReport`."] @@ -33,7 +79,7 @@ impl CheckerboardReport { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] pub fn log(&mut self, val: &str) -> &mut Self { - self.log_shim(val); + self.set_log_shim(val); self } #[cfg(feature = "CheckerboardReason")] @@ -41,21 +87,21 @@ impl CheckerboardReport { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CheckerboardReason`, `CheckerboardReport`*"] pub fn reason(&mut self, val: CheckerboardReason) -> &mut Self { - self.reason_shim(val); + self.set_reason_shim(val); self } #[doc = "Change the `severity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] pub fn severity(&mut self, val: u32) -> &mut Self { - self.severity_shim(val); + self.set_severity_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CheckerboardReport`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs b/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs index b7ec7502649..313876fb46a 100644 --- a/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs +++ b/crates/web-sys/src/features/gen_ChromeFilePropertyBag.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] pub type ChromeFilePropertyBag; + #[wasm_bindgen(method, getter = "lastModified")] + fn last_modified_shim(this: &ChromeFilePropertyBag) -> f64; #[wasm_bindgen(method, setter = "lastModified")] - fn last_modified_shim(this: &ChromeFilePropertyBag, val: f64); + fn set_last_modified_shim(this: &ChromeFilePropertyBag, val: f64); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &ChromeFilePropertyBag) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ChromeFilePropertyBag, val: &str); + fn set_type__shim(this: &ChromeFilePropertyBag, val: &str); + #[wasm_bindgen(method, getter = "existenceCheck")] + fn existence_check_shim(this: &ChromeFilePropertyBag) -> bool; #[wasm_bindgen(method, setter = "existenceCheck")] - fn existence_check_shim(this: &ChromeFilePropertyBag, val: bool); + fn set_existence_check_shim(this: &ChromeFilePropertyBag, val: bool); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &ChromeFilePropertyBag) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ChromeFilePropertyBag, val: &str); + fn set_name_shim(this: &ChromeFilePropertyBag, val: &str); +} +#[doc = "The trait to access properties on the `ChromeFilePropertyBag` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] +pub trait ChromeFilePropertyBagGetters { + #[doc = "Get the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + fn last_modified(&self) -> f64; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + fn type_(&self) -> String; + #[doc = "Get the `existenceCheck` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + fn existence_check(&self) -> bool; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] + fn name(&self) -> String; +} +impl ChromeFilePropertyBagGetters for ChromeFilePropertyBag { + fn last_modified(&self) -> f64 { + self.last_modified_shim() + } + fn type_(&self) -> String { + self.type__shim() + } + fn existence_check(&self) -> bool { + self.existence_check_shim() + } + fn name(&self) -> String { + self.name_shim() + } } impl ChromeFilePropertyBag { #[doc = "Construct a new `ChromeFilePropertyBag`."] @@ -32,28 +75,28 @@ impl ChromeFilePropertyBag { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] pub fn last_modified(&mut self, val: f64) -> &mut Self { - self.last_modified_shim(val); + self.set_last_modified_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `existenceCheck` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] pub fn existence_check(&mut self, val: bool) -> &mut Self { - self.existence_check_shim(val); + self.set_existence_check_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChromeFilePropertyBag`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ClientQueryOptions.rs b/crates/web-sys/src/features/gen_ClientQueryOptions.rs index 79f6f0913c6..ea207be2793 100644 --- a/crates/web-sys/src/features/gen_ClientQueryOptions.rs +++ b/crates/web-sys/src/features/gen_ClientQueryOptions.rs @@ -10,11 +10,39 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] pub type ClientQueryOptions; + #[wasm_bindgen(method, getter = "includeUncontrolled")] + fn include_uncontrolled_shim(this: &ClientQueryOptions) -> bool; #[wasm_bindgen(method, setter = "includeUncontrolled")] - fn include_uncontrolled_shim(this: &ClientQueryOptions, val: bool); + fn set_include_uncontrolled_shim(this: &ClientQueryOptions, val: bool); + #[cfg(feature = "ClientType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &ClientQueryOptions) -> ClientType; #[cfg(feature = "ClientType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ClientQueryOptions, val: ClientType); + fn set_type__shim(this: &ClientQueryOptions, val: ClientType); +} +#[doc = "The trait to access properties on the `ClientQueryOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] +pub trait ClientQueryOptionsGetters { + #[doc = "Get the `includeUncontrolled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] + fn include_uncontrolled(&self) -> bool; + #[cfg(feature = "ClientType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"] + fn type_(&self) -> ClientType; +} +impl ClientQueryOptionsGetters for ClientQueryOptions { + fn include_uncontrolled(&self) -> bool { + self.include_uncontrolled_shim() + } + #[cfg(feature = "ClientType")] + fn type_(&self) -> ClientType { + self.type__shim() + } } impl ClientQueryOptions { #[doc = "Construct a new `ClientQueryOptions`."] @@ -29,7 +57,7 @@ impl ClientQueryOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`*"] pub fn include_uncontrolled(&mut self, val: bool) -> &mut Self { - self.include_uncontrolled_shim(val); + self.set_include_uncontrolled_shim(val); self } #[cfg(feature = "ClientType")] @@ -37,7 +65,7 @@ impl ClientQueryOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClientQueryOptions`, `ClientType`*"] pub fn type_(&mut self, val: ClientType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs b/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs index 151fd20d628..c68a7edcdb3 100644 --- a/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs +++ b/crates/web-sys/src/features/gen_ClientRectsAndTexts.rs @@ -11,10 +11,38 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] pub type ClientRectsAndTexts; #[cfg(feature = "DomRectList")] + #[wasm_bindgen(method, getter = "rectList")] + fn rect_list_shim(this: &ClientRectsAndTexts) -> DomRectList; + #[cfg(feature = "DomRectList")] #[wasm_bindgen(method, setter = "rectList")] - fn rect_list_shim(this: &ClientRectsAndTexts, val: &DomRectList); + fn set_rect_list_shim(this: &ClientRectsAndTexts, val: &DomRectList); + #[wasm_bindgen(method, getter = "textList")] + fn text_list_shim(this: &ClientRectsAndTexts) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "textList")] - fn text_list_shim(this: &ClientRectsAndTexts, val: &::wasm_bindgen::JsValue); + fn set_text_list_shim(this: &ClientRectsAndTexts, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `ClientRectsAndTexts` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] +pub trait ClientRectsAndTextsGetters { + #[cfg(feature = "DomRectList")] + #[doc = "Get the `rectList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"] + fn rect_list(&self) -> DomRectList; + #[doc = "Get the `textList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] + fn text_list(&self) -> ::js_sys::Array; +} +impl ClientRectsAndTextsGetters for ClientRectsAndTexts { + #[cfg(feature = "DomRectList")] + fn rect_list(&self) -> DomRectList { + self.rect_list_shim() + } + fn text_list(&self) -> ::js_sys::Array { + self.text_list_shim() + } } impl ClientRectsAndTexts { #[cfg(feature = "DomRectList")] @@ -24,8 +52,8 @@ impl ClientRectsAndTexts { pub fn new(rect_list: &DomRectList, text_list: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.rect_list(rect_list); - ret.text_list(text_list); + Self::rect_list(&mut ret, rect_list); + Self::text_list(&mut ret, text_list); ret } #[cfg(feature = "DomRectList")] @@ -33,14 +61,14 @@ impl ClientRectsAndTexts { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`, `DomRectList`*"] pub fn rect_list(&mut self, val: &DomRectList) -> &mut Self { - self.rect_list_shim(val); + self.set_rect_list_shim(val); self } #[doc = "Change the `textList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClientRectsAndTexts`*"] pub fn text_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.text_list_shim(val); + self.set_text_list_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ClipboardEventInit.rs b/crates/web-sys/src/features/gen_ClipboardEventInit.rs index 57fae5e2914..6a33d02e5ff 100644 --- a/crates/web-sys/src/features/gen_ClipboardEventInit.rs +++ b/crates/web-sys/src/features/gen_ClipboardEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] pub type ClipboardEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &ClipboardEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ClipboardEventInit, val: bool); + fn set_bubbles_shim(this: &ClipboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &ClipboardEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ClipboardEventInit, val: bool); + fn set_cancelable_shim(this: &ClipboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &ClipboardEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ClipboardEventInit, val: bool); + fn set_composed_shim(this: &ClipboardEventInit, val: bool); + #[cfg(feature = "DataTransfer")] + #[wasm_bindgen(method, getter = "clipboardData")] + fn clipboard_data_shim(this: &ClipboardEventInit) -> Option; #[cfg(feature = "DataTransfer")] #[wasm_bindgen(method, setter = "clipboardData")] - fn clipboard_data_shim(this: &ClipboardEventInit, val: Option<&DataTransfer>); + fn set_clipboard_data_shim(this: &ClipboardEventInit, val: Option<&DataTransfer>); +} +#[doc = "The trait to access properties on the `ClipboardEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] +pub trait ClipboardEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "DataTransfer")] + #[doc = "Get the `clipboardData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`, `DataTransfer`*"] + fn clipboard_data(&self) -> Option; +} +impl ClipboardEventInitGetters for ClipboardEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "DataTransfer")] + fn clipboard_data(&self) -> Option { + self.clipboard_data_shim() + } } impl ClipboardEventInit { #[doc = "Construct a new `ClipboardEventInit`."] @@ -33,21 +79,21 @@ impl ClipboardEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "DataTransfer")] @@ -55,7 +101,7 @@ impl ClipboardEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ClipboardEventInit`, `DataTransfer`*"] pub fn clipboard_data(&mut self, val: Option<&DataTransfer>) -> &mut Self { - self.clipboard_data_shim(val); + self.set_clipboard_data_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ClipboardItemOptions.rs b/crates/web-sys/src/features/gen_ClipboardItemOptions.rs index 5930f6d857a..354d6b4d640 100644 --- a/crates/web-sys/src/features/gen_ClipboardItemOptions.rs +++ b/crates/web-sys/src/features/gen_ClipboardItemOptions.rs @@ -15,8 +15,34 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ClipboardItemOptions; #[cfg(feature = "PresentationStyle")] + #[wasm_bindgen(method, getter = "presentationStyle")] + fn presentation_style_shim(this: &ClipboardItemOptions) -> PresentationStyle; + #[cfg(feature = "PresentationStyle")] #[wasm_bindgen(method, setter = "presentationStyle")] - fn presentation_style_shim(this: &ClipboardItemOptions, val: PresentationStyle); + fn set_presentation_style_shim(this: &ClipboardItemOptions, val: PresentationStyle); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `ClipboardItemOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ClipboardItemOptions`*"] +pub trait ClipboardItemOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PresentationStyle")] + #[doc = "Get the `presentationStyle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardItemOptions`, `PresentationStyle`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn presentation_style(&self) -> PresentationStyle; +} +#[cfg(web_sys_unstable_apis)] +impl ClipboardItemOptionsGetters for ClipboardItemOptions { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PresentationStyle")] + fn presentation_style(&self) -> PresentationStyle { + self.presentation_style_shim() + } } #[cfg(web_sys_unstable_apis)] impl ClipboardItemOptions { @@ -40,7 +66,7 @@ impl ClipboardItemOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn presentation_style(&mut self, val: PresentationStyle) -> &mut Self { - self.presentation_style_shim(val); + self.set_presentation_style_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs b/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs index 5c8ac6e004d..5a88644c250 100644 --- a/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_ClipboardPermissionDescriptor.rs @@ -15,10 +15,50 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ClipboardPermissionDescriptor; #[cfg(feature = "PermissionName")] + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &ClipboardPermissionDescriptor) -> PermissionName; + #[cfg(feature = "PermissionName")] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ClipboardPermissionDescriptor, val: PermissionName); + fn set_name_shim(this: &ClipboardPermissionDescriptor, val: PermissionName); + #[wasm_bindgen(method, getter = "allowWithoutGesture")] + fn allow_without_gesture_shim(this: &ClipboardPermissionDescriptor) -> bool; #[wasm_bindgen(method, setter = "allowWithoutGesture")] - fn allow_without_gesture_shim(this: &ClipboardPermissionDescriptor, val: bool); + fn set_allow_without_gesture_shim(this: &ClipboardPermissionDescriptor, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `ClipboardPermissionDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`*"] +pub trait ClipboardPermissionDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name(&self) -> PermissionName; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowWithoutGesture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ClipboardPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn allow_without_gesture(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl ClipboardPermissionDescriptorGetters for ClipboardPermissionDescriptor { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + fn name(&self) -> PermissionName { + self.name_shim() + } + #[cfg(web_sys_unstable_apis)] + fn allow_without_gesture(&self) -> bool { + self.allow_without_gesture_shim() + } } #[cfg(web_sys_unstable_apis)] impl ClipboardPermissionDescriptor { @@ -32,7 +72,7 @@ impl ClipboardPermissionDescriptor { pub fn new(name: PermissionName) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[cfg(web_sys_unstable_apis)] @@ -44,7 +84,7 @@ impl ClipboardPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +95,7 @@ impl ClipboardPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn allow_without_gesture(&mut self, val: bool) -> &mut Self { - self.allow_without_gesture_shim(val); + self.set_allow_without_gesture_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CloseEventInit.rs b/crates/web-sys/src/features/gen_CloseEventInit.rs index 16b73d6cd89..bb907a17941 100644 --- a/crates/web-sys/src/features/gen_CloseEventInit.rs +++ b/crates/web-sys/src/features/gen_CloseEventInit.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] pub type CloseEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &CloseEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &CloseEventInit, val: bool); + fn set_bubbles_shim(this: &CloseEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &CloseEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &CloseEventInit, val: bool); + fn set_cancelable_shim(this: &CloseEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &CloseEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &CloseEventInit, val: bool); + fn set_composed_shim(this: &CloseEventInit, val: bool); + #[wasm_bindgen(method, getter = "code")] + fn code_shim(this: &CloseEventInit) -> u16; #[wasm_bindgen(method, setter = "code")] - fn code_shim(this: &CloseEventInit, val: u16); + fn set_code_shim(this: &CloseEventInit, val: u16); + #[wasm_bindgen(method, getter = "reason")] + fn reason_shim(this: &CloseEventInit) -> String; #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &CloseEventInit, val: &str); + fn set_reason_shim(this: &CloseEventInit, val: &str); + #[wasm_bindgen(method, getter = "wasClean")] + fn was_clean_shim(this: &CloseEventInit) -> bool; #[wasm_bindgen(method, setter = "wasClean")] - fn was_clean_shim(this: &CloseEventInit, val: bool); + fn set_was_clean_shim(this: &CloseEventInit, val: bool); +} +#[doc = "The trait to access properties on the `CloseEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] +pub trait CloseEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + fn code(&self) -> u16; + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + fn reason(&self) -> String; + #[doc = "Get the `wasClean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] + fn was_clean(&self) -> bool; +} +impl CloseEventInitGetters for CloseEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn code(&self) -> u16 { + self.code_shim() + } + fn reason(&self) -> String { + self.reason_shim() + } + fn was_clean(&self) -> bool { + self.was_clean_shim() + } } impl CloseEventInit { #[doc = "Construct a new `CloseEventInit`."] @@ -36,42 +97,42 @@ impl CloseEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `code` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] pub fn code(&mut self, val: u16) -> &mut Self { - self.code_shim(val); + self.set_code_shim(val); self } #[doc = "Change the `reason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] pub fn reason(&mut self, val: &str) -> &mut Self { - self.reason_shim(val); + self.set_reason_shim(val); self } #[doc = "Change the `wasClean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CloseEventInit`*"] pub fn was_clean(&mut self, val: bool) -> &mut Self { - self.was_clean_shim(val); + self.set_was_clean_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CollectedClientData.rs b/crates/web-sys/src/features/gen_CollectedClientData.rs index 96b9b4a5d0e..44f321cbbc3 100644 --- a/crates/web-sys/src/features/gen_CollectedClientData.rs +++ b/crates/web-sys/src/features/gen_CollectedClientData.rs @@ -10,22 +10,86 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] pub type CollectedClientData; + #[wasm_bindgen(method, getter = "challenge")] + fn challenge_shim(this: &CollectedClientData) -> String; #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &CollectedClientData, val: &str); + fn set_challenge_shim(this: &CollectedClientData, val: &str); + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[wasm_bindgen(method, getter = "clientExtensions")] + fn client_extensions_shim(this: &CollectedClientData) -> AuthenticationExtensionsClientInputs; #[cfg(feature = "AuthenticationExtensionsClientInputs")] #[wasm_bindgen(method, setter = "clientExtensions")] - fn client_extensions_shim( + fn set_client_extensions_shim( this: &CollectedClientData, val: &AuthenticationExtensionsClientInputs, ); + #[wasm_bindgen(method, getter = "hashAlgorithm")] + fn hash_algorithm_shim(this: &CollectedClientData) -> String; #[wasm_bindgen(method, setter = "hashAlgorithm")] - fn hash_algorithm_shim(this: &CollectedClientData, val: &str); + fn set_hash_algorithm_shim(this: &CollectedClientData, val: &str); + #[wasm_bindgen(method, getter = "origin")] + fn origin_shim(this: &CollectedClientData) -> String; #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &CollectedClientData, val: &str); + fn set_origin_shim(this: &CollectedClientData, val: &str); + #[wasm_bindgen(method, getter = "tokenBindingId")] + fn token_binding_id_shim(this: &CollectedClientData) -> String; #[wasm_bindgen(method, setter = "tokenBindingId")] - fn token_binding_id_shim(this: &CollectedClientData, val: &str); + fn set_token_binding_id_shim(this: &CollectedClientData, val: &str); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &CollectedClientData) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &CollectedClientData, val: &str); + fn set_type__shim(this: &CollectedClientData, val: &str); +} +#[doc = "The trait to access properties on the `CollectedClientData` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] +pub trait CollectedClientDataGetters { + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + fn challenge(&self) -> String; + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Get the `clientExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"] + fn client_extensions(&self) -> AuthenticationExtensionsClientInputs; + #[doc = "Get the `hashAlgorithm` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + fn hash_algorithm(&self) -> String; + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + fn origin(&self) -> String; + #[doc = "Get the `tokenBindingId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + fn token_binding_id(&self) -> String; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] + fn type_(&self) -> String; +} +impl CollectedClientDataGetters for CollectedClientData { + fn challenge(&self) -> String { + self.challenge_shim() + } + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + fn client_extensions(&self) -> AuthenticationExtensionsClientInputs { + self.client_extensions_shim() + } + fn hash_algorithm(&self) -> String { + self.hash_algorithm_shim() + } + fn origin(&self) -> String { + self.origin_shim() + } + fn token_binding_id(&self) -> String { + self.token_binding_id_shim() + } + fn type_(&self) -> String { + self.type__shim() + } } impl CollectedClientData { #[doc = "Construct a new `CollectedClientData`."] @@ -34,17 +98,17 @@ impl CollectedClientData { pub fn new(challenge: &str, hash_algorithm: &str, origin: &str, type_: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.challenge(challenge); - ret.hash_algorithm(hash_algorithm); - ret.origin(origin); - ret.type_(type_); + Self::challenge(&mut ret, challenge); + Self::hash_algorithm(&mut ret, hash_algorithm); + Self::origin(&mut ret, origin); + Self::type_(&mut ret, type_); ret } #[doc = "Change the `challenge` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] pub fn challenge(&mut self, val: &str) -> &mut Self { - self.challenge_shim(val); + self.set_challenge_shim(val); self } #[cfg(feature = "AuthenticationExtensionsClientInputs")] @@ -52,35 +116,35 @@ impl CollectedClientData { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `CollectedClientData`*"] pub fn client_extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self { - self.client_extensions_shim(val); + self.set_client_extensions_shim(val); self } #[doc = "Change the `hashAlgorithm` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] pub fn hash_algorithm(&mut self, val: &str) -> &mut Self { - self.hash_algorithm_shim(val); + self.set_hash_algorithm_shim(val); self } #[doc = "Change the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin_shim(val); self } #[doc = "Change the `tokenBindingId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] pub fn token_binding_id(&mut self, val: &str) -> &mut Self { - self.token_binding_id_shim(val); + self.set_token_binding_id_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CollectedClientData`*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CompositionEventInit.rs b/crates/web-sys/src/features/gen_CompositionEventInit.rs index 8f2ec5a6b48..c6073c97a49 100644 --- a/crates/web-sys/src/features/gen_CompositionEventInit.rs +++ b/crates/web-sys/src/features/gen_CompositionEventInit.rs @@ -10,19 +10,83 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] pub type CompositionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &CompositionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &CompositionEventInit, val: bool); + fn set_bubbles_shim(this: &CompositionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &CompositionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &CompositionEventInit, val: bool); + fn set_cancelable_shim(this: &CompositionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &CompositionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &CompositionEventInit, val: bool); + fn set_composed_shim(this: &CompositionEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &CompositionEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &CompositionEventInit, val: i32); + fn set_detail_shim(this: &CompositionEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &CompositionEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &CompositionEventInit, val: Option<&Window>); + fn set_view_shim(this: &CompositionEventInit, val: Option<&Window>); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &CompositionEventInit) -> String; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &CompositionEventInit, val: &str); + fn set_data_shim(this: &CompositionEventInit, val: &str); +} +#[doc = "The trait to access properties on the `CompositionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] +pub trait CompositionEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"] + fn view(&self) -> Option; + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] + fn data(&self) -> String; +} +impl CompositionEventInitGetters for CompositionEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + fn data(&self) -> String { + self.data_shim() + } } impl CompositionEventInit { #[doc = "Construct a new `CompositionEventInit`."] @@ -37,28 +101,28 @@ impl CompositionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -66,14 +130,14 @@ impl CompositionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositionEventInit`*"] pub fn data(&mut self, val: &str) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ComputedEffectTiming.rs b/crates/web-sys/src/features/gen_ComputedEffectTiming.rs index 8d55c2533ea..d0e11815f3a 100644 --- a/crates/web-sys/src/features/gen_ComputedEffectTiming.rs +++ b/crates/web-sys/src/features/gen_ComputedEffectTiming.rs @@ -10,34 +10,164 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub type ComputedEffectTiming; + #[wasm_bindgen(method, getter = "delay")] + fn delay_shim(this: &ComputedEffectTiming) -> f64; #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &ComputedEffectTiming, val: f64); + fn set_delay_shim(this: &ComputedEffectTiming, val: f64); + #[cfg(feature = "PlaybackDirection")] + #[wasm_bindgen(method, getter = "direction")] + fn direction_shim(this: &ComputedEffectTiming) -> PlaybackDirection; #[cfg(feature = "PlaybackDirection")] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &ComputedEffectTiming, val: PlaybackDirection); + fn set_direction_shim(this: &ComputedEffectTiming, val: PlaybackDirection); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &ComputedEffectTiming) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &ComputedEffectTiming, val: &::wasm_bindgen::JsValue); + fn set_duration_shim(this: &ComputedEffectTiming, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "easing")] + fn easing_shim(this: &ComputedEffectTiming) -> String; #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &ComputedEffectTiming, val: &str); + fn set_easing_shim(this: &ComputedEffectTiming, val: &str); + #[wasm_bindgen(method, getter = "endDelay")] + fn end_delay_shim(this: &ComputedEffectTiming) -> f64; #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &ComputedEffectTiming, val: f64); + fn set_end_delay_shim(this: &ComputedEffectTiming, val: f64); + #[cfg(feature = "FillMode")] + #[wasm_bindgen(method, getter = "fill")] + fn fill_shim(this: &ComputedEffectTiming) -> FillMode; #[cfg(feature = "FillMode")] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &ComputedEffectTiming, val: FillMode); + fn set_fill_shim(this: &ComputedEffectTiming, val: FillMode); + #[wasm_bindgen(method, getter = "iterationStart")] + fn iteration_start_shim(this: &ComputedEffectTiming) -> f64; #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &ComputedEffectTiming, val: f64); + fn set_iteration_start_shim(this: &ComputedEffectTiming, val: f64); + #[wasm_bindgen(method, getter = "iterations")] + fn iterations_shim(this: &ComputedEffectTiming) -> f64; #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &ComputedEffectTiming, val: f64); + fn set_iterations_shim(this: &ComputedEffectTiming, val: f64); + #[wasm_bindgen(method, getter = "activeDuration")] + fn active_duration_shim(this: &ComputedEffectTiming) -> f64; #[wasm_bindgen(method, setter = "activeDuration")] - fn active_duration_shim(this: &ComputedEffectTiming, val: f64); + fn set_active_duration_shim(this: &ComputedEffectTiming, val: f64); + #[wasm_bindgen(method, getter = "currentIteration")] + fn current_iteration_shim(this: &ComputedEffectTiming) -> Option; #[wasm_bindgen(method, setter = "currentIteration")] - fn current_iteration_shim(this: &ComputedEffectTiming, val: Option); + fn set_current_iteration_shim(this: &ComputedEffectTiming, val: Option); + #[wasm_bindgen(method, getter = "endTime")] + fn end_time_shim(this: &ComputedEffectTiming) -> f64; #[wasm_bindgen(method, setter = "endTime")] - fn end_time_shim(this: &ComputedEffectTiming, val: f64); + fn set_end_time_shim(this: &ComputedEffectTiming, val: f64); + #[wasm_bindgen(method, getter = "localTime")] + fn local_time_shim(this: &ComputedEffectTiming) -> Option; #[wasm_bindgen(method, setter = "localTime")] - fn local_time_shim(this: &ComputedEffectTiming, val: Option); + fn set_local_time_shim(this: &ComputedEffectTiming, val: Option); + #[wasm_bindgen(method, getter = "progress")] + fn progress_shim(this: &ComputedEffectTiming) -> Option; #[wasm_bindgen(method, setter = "progress")] - fn progress_shim(this: &ComputedEffectTiming, val: Option); + fn set_progress_shim(this: &ComputedEffectTiming, val: Option); +} +#[doc = "The trait to access properties on the `ComputedEffectTiming` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] +pub trait ComputedEffectTimingGetters { + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn delay(&self) -> f64; + #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `PlaybackDirection`*"] + fn direction(&self) -> PlaybackDirection; + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn duration(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn easing(&self) -> String; + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn end_delay(&self) -> f64; + #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `FillMode`*"] + fn fill(&self) -> FillMode; + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn iteration_start(&self) -> f64; + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn iterations(&self) -> f64; + #[doc = "Get the `activeDuration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn active_duration(&self) -> f64; + #[doc = "Get the `currentIteration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn current_iteration(&self) -> Option; + #[doc = "Get the `endTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn end_time(&self) -> f64; + #[doc = "Get the `localTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn local_time(&self) -> Option; + #[doc = "Get the `progress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] + fn progress(&self) -> Option; +} +impl ComputedEffectTimingGetters for ComputedEffectTiming { + fn delay(&self) -> f64 { + self.delay_shim() + } + #[cfg(feature = "PlaybackDirection")] + fn direction(&self) -> PlaybackDirection { + self.direction_shim() + } + fn duration(&self) -> ::wasm_bindgen::JsValue { + self.duration_shim() + } + fn easing(&self) -> String { + self.easing_shim() + } + fn end_delay(&self) -> f64 { + self.end_delay_shim() + } + #[cfg(feature = "FillMode")] + fn fill(&self) -> FillMode { + self.fill_shim() + } + fn iteration_start(&self) -> f64 { + self.iteration_start_shim() + } + fn iterations(&self) -> f64 { + self.iterations_shim() + } + fn active_duration(&self) -> f64 { + self.active_duration_shim() + } + fn current_iteration(&self) -> Option { + self.current_iteration_shim() + } + fn end_time(&self) -> f64 { + self.end_time_shim() + } + fn local_time(&self) -> Option { + self.local_time_shim() + } + fn progress(&self) -> Option { + self.progress_shim() + } } impl ComputedEffectTiming { #[doc = "Construct a new `ComputedEffectTiming`."] @@ -52,7 +182,7 @@ impl ComputedEffectTiming { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay_shim(val); self } #[cfg(feature = "PlaybackDirection")] @@ -60,28 +190,28 @@ impl ComputedEffectTiming { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `PlaybackDirection`*"] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction_shim(val); self } #[doc = "Change the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[doc = "Change the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing_shim(val); self } #[doc = "Change the `endDelay` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); + self.set_end_delay_shim(val); self } #[cfg(feature = "FillMode")] @@ -89,56 +219,56 @@ impl ComputedEffectTiming { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`, `FillMode`*"] pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); + self.set_fill_shim(val); self } #[doc = "Change the `iterationStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); + self.set_iteration_start_shim(val); self } #[doc = "Change the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); + self.set_iterations_shim(val); self } #[doc = "Change the `activeDuration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn active_duration(&mut self, val: f64) -> &mut Self { - self.active_duration_shim(val); + self.set_active_duration_shim(val); self } #[doc = "Change the `currentIteration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn current_iteration(&mut self, val: Option) -> &mut Self { - self.current_iteration_shim(val); + self.set_current_iteration_shim(val); self } #[doc = "Change the `endTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn end_time(&mut self, val: f64) -> &mut Self { - self.end_time_shim(val); + self.set_end_time_shim(val); self } #[doc = "Change the `localTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn local_time(&mut self, val: Option) -> &mut Self { - self.local_time_shim(val); + self.set_local_time_shim(val); self } #[doc = "Change the `progress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ComputedEffectTiming`*"] pub fn progress(&mut self, val: Option) -> &mut Self { - self.progress_shim(val); + self.set_progress_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConnStatusDict.rs b/crates/web-sys/src/features/gen_ConnStatusDict.rs index be5540fc998..3344b711cd0 100644 --- a/crates/web-sys/src/features/gen_ConnStatusDict.rs +++ b/crates/web-sys/src/features/gen_ConnStatusDict.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] pub type ConnStatusDict; + #[wasm_bindgen(method, getter = "status")] + fn status_shim(this: &ConnStatusDict) -> String; #[wasm_bindgen(method, setter = "status")] - fn status_shim(this: &ConnStatusDict, val: &str); + fn set_status_shim(this: &ConnStatusDict, val: &str); +} +#[doc = "The trait to access properties on the `ConnStatusDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] +pub trait ConnStatusDictGetters { + #[doc = "Get the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] + fn status(&self) -> String; +} +impl ConnStatusDictGetters for ConnStatusDict { + fn status(&self) -> String { + self.status_shim() + } } impl ConnStatusDict { #[doc = "Construct a new `ConnStatusDict`."] @@ -26,7 +42,7 @@ impl ConnStatusDict { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConnStatusDict`*"] pub fn status(&mut self, val: &str) -> &mut Self { - self.status_shim(val); + self.set_status_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleCounter.rs b/crates/web-sys/src/features/gen_ConsoleCounter.rs index be0416a4baf..8724b936774 100644 --- a/crates/web-sys/src/features/gen_ConsoleCounter.rs +++ b/crates/web-sys/src/features/gen_ConsoleCounter.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] pub type ConsoleCounter; + #[wasm_bindgen(method, getter = "count")] + fn count_shim(this: &ConsoleCounter) -> u32; #[wasm_bindgen(method, setter = "count")] - fn count_shim(this: &ConsoleCounter, val: u32); + fn set_count_shim(this: &ConsoleCounter, val: u32); + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &ConsoleCounter) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &ConsoleCounter, val: &str); + fn set_label_shim(this: &ConsoleCounter, val: &str); +} +#[doc = "The trait to access properties on the `ConsoleCounter` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] +pub trait ConsoleCounterGetters { + #[doc = "Get the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] + fn count(&self) -> u32; + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] + fn label(&self) -> String; +} +impl ConsoleCounterGetters for ConsoleCounter { + fn count(&self) -> u32 { + self.count_shim() + } + fn label(&self) -> String { + self.label_shim() + } } impl ConsoleCounter { #[doc = "Construct a new `ConsoleCounter`."] @@ -28,14 +53,14 @@ impl ConsoleCounter { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] pub fn count(&mut self, val: u32) -> &mut Self { - self.count_shim(val); + self.set_count_shim(val); self } #[doc = "Change the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounter`*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleCounterError.rs b/crates/web-sys/src/features/gen_ConsoleCounterError.rs index 69738146c54..f5b778d2063 100644 --- a/crates/web-sys/src/features/gen_ConsoleCounterError.rs +++ b/crates/web-sys/src/features/gen_ConsoleCounterError.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] pub type ConsoleCounterError; + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &ConsoleCounterError) -> String; #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &ConsoleCounterError, val: &str); + fn set_error_shim(this: &ConsoleCounterError, val: &str); + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &ConsoleCounterError) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &ConsoleCounterError, val: &str); + fn set_label_shim(this: &ConsoleCounterError, val: &str); +} +#[doc = "The trait to access properties on the `ConsoleCounterError` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] +pub trait ConsoleCounterErrorGetters { + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] + fn error(&self) -> String; + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] + fn label(&self) -> String; +} +impl ConsoleCounterErrorGetters for ConsoleCounterError { + fn error(&self) -> String { + self.error_shim() + } + fn label(&self) -> String { + self.label_shim() + } } impl ConsoleCounterError { #[doc = "Construct a new `ConsoleCounterError`."] @@ -28,14 +53,14 @@ impl ConsoleCounterError { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] pub fn error(&mut self, val: &str) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } #[doc = "Change the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleCounterError`*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleEvent.rs b/crates/web-sys/src/features/gen_ConsoleEvent.rs index d88d063f088..52b952154eb 100644 --- a/crates/web-sys/src/features/gen_ConsoleEvent.rs +++ b/crates/web-sys/src/features/gen_ConsoleEvent.rs @@ -10,40 +10,200 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub type ConsoleEvent; + #[wasm_bindgen(method, getter = "ID")] + fn id_shim(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "ID")] - fn id_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + fn set_id_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "addonId")] + fn addon_id_shim(this: &ConsoleEvent) -> String; #[wasm_bindgen(method, setter = "addonId")] - fn addon_id_shim(this: &ConsoleEvent, val: &str); + fn set_addon_id_shim(this: &ConsoleEvent, val: &str); + #[wasm_bindgen(method, getter = "arguments")] + fn arguments_shim(this: &ConsoleEvent) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "arguments")] - fn arguments_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + fn set_arguments_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "columnNumber")] + fn column_number_shim(this: &ConsoleEvent) -> u32; #[wasm_bindgen(method, setter = "columnNumber")] - fn column_number_shim(this: &ConsoleEvent, val: u32); + fn set_column_number_shim(this: &ConsoleEvent, val: u32); + #[wasm_bindgen(method, getter = "consoleID")] + fn console_id_shim(this: &ConsoleEvent) -> String; #[wasm_bindgen(method, setter = "consoleID")] - fn console_id_shim(this: &ConsoleEvent, val: &str); + fn set_console_id_shim(this: &ConsoleEvent, val: &str); + #[wasm_bindgen(method, getter = "counter")] + fn counter_shim(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "counter")] - fn counter_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + fn set_counter_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "filename")] + fn filename_shim(this: &ConsoleEvent) -> String; #[wasm_bindgen(method, setter = "filename")] - fn filename_shim(this: &ConsoleEvent, val: &str); + fn set_filename_shim(this: &ConsoleEvent, val: &str); + #[wasm_bindgen(method, getter = "functionName")] + fn function_name_shim(this: &ConsoleEvent) -> String; #[wasm_bindgen(method, setter = "functionName")] - fn function_name_shim(this: &ConsoleEvent, val: &str); + fn set_function_name_shim(this: &ConsoleEvent, val: &str); + #[wasm_bindgen(method, getter = "groupName")] + fn group_name_shim(this: &ConsoleEvent) -> String; #[wasm_bindgen(method, setter = "groupName")] - fn group_name_shim(this: &ConsoleEvent, val: &str); + fn set_group_name_shim(this: &ConsoleEvent, val: &str); + #[wasm_bindgen(method, getter = "innerID")] + fn inner_id_shim(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "innerID")] - fn inner_id_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + fn set_inner_id_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "level")] + fn level_shim(this: &ConsoleEvent) -> String; #[wasm_bindgen(method, setter = "level")] - fn level_shim(this: &ConsoleEvent, val: &str); + fn set_level_shim(this: &ConsoleEvent, val: &str); + #[wasm_bindgen(method, getter = "lineNumber")] + fn line_number_shim(this: &ConsoleEvent) -> u32; #[wasm_bindgen(method, setter = "lineNumber")] - fn line_number_shim(this: &ConsoleEvent, val: u32); + fn set_line_number_shim(this: &ConsoleEvent, val: u32); + #[wasm_bindgen(method, getter = "prefix")] + fn prefix_shim(this: &ConsoleEvent) -> String; #[wasm_bindgen(method, setter = "prefix")] - fn prefix_shim(this: &ConsoleEvent, val: &str); + fn set_prefix_shim(this: &ConsoleEvent, val: &str); + #[wasm_bindgen(method, getter = "private")] + fn private_shim(this: &ConsoleEvent) -> bool; #[wasm_bindgen(method, setter = "private")] - fn private_shim(this: &ConsoleEvent, val: bool); + fn set_private_shim(this: &ConsoleEvent, val: bool); + #[wasm_bindgen(method, getter = "styles")] + fn styles_shim(this: &ConsoleEvent) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "styles")] - fn styles_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + fn set_styles_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "timeStamp")] + fn time_stamp_shim(this: &ConsoleEvent) -> f64; #[wasm_bindgen(method, setter = "timeStamp")] - fn time_stamp_shim(this: &ConsoleEvent, val: f64); + fn set_time_stamp_shim(this: &ConsoleEvent, val: f64); + #[wasm_bindgen(method, getter = "timer")] + fn timer_shim(this: &ConsoleEvent) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "timer")] - fn timer_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); + fn set_timer_shim(this: &ConsoleEvent, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `ConsoleEvent` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] +pub trait ConsoleEventGetters { + #[doc = "Get the `ID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn id(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `addonId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn addon_id(&self) -> String; + #[doc = "Get the `arguments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn arguments(&self) -> ::js_sys::Array; + #[doc = "Get the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn column_number(&self) -> u32; + #[doc = "Get the `consoleID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn console_id(&self) -> String; + #[doc = "Get the `counter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn counter(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn filename(&self) -> String; + #[doc = "Get the `functionName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn function_name(&self) -> String; + #[doc = "Get the `groupName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn group_name(&self) -> String; + #[doc = "Get the `innerID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn inner_id(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `level` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn level(&self) -> String; + #[doc = "Get the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn line_number(&self) -> u32; + #[doc = "Get the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn prefix(&self) -> String; + #[doc = "Get the `private` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn private(&self) -> bool; + #[doc = "Get the `styles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn styles(&self) -> ::js_sys::Array; + #[doc = "Get the `timeStamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn time_stamp(&self) -> f64; + #[doc = "Get the `timer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] + fn timer(&self) -> ::wasm_bindgen::JsValue; +} +impl ConsoleEventGetters for ConsoleEvent { + fn id(&self) -> ::wasm_bindgen::JsValue { + self.id_shim() + } + fn addon_id(&self) -> String { + self.addon_id_shim() + } + fn arguments(&self) -> ::js_sys::Array { + self.arguments_shim() + } + fn column_number(&self) -> u32 { + self.column_number_shim() + } + fn console_id(&self) -> String { + self.console_id_shim() + } + fn counter(&self) -> ::wasm_bindgen::JsValue { + self.counter_shim() + } + fn filename(&self) -> String { + self.filename_shim() + } + fn function_name(&self) -> String { + self.function_name_shim() + } + fn group_name(&self) -> String { + self.group_name_shim() + } + fn inner_id(&self) -> ::wasm_bindgen::JsValue { + self.inner_id_shim() + } + fn level(&self) -> String { + self.level_shim() + } + fn line_number(&self) -> u32 { + self.line_number_shim() + } + fn prefix(&self) -> String { + self.prefix_shim() + } + fn private(&self) -> bool { + self.private_shim() + } + fn styles(&self) -> ::js_sys::Array { + self.styles_shim() + } + fn time_stamp(&self) -> f64 { + self.time_stamp_shim() + } + fn timer(&self) -> ::wasm_bindgen::JsValue { + self.timer_shim() + } } impl ConsoleEvent { #[doc = "Construct a new `ConsoleEvent`."] @@ -58,119 +218,119 @@ impl ConsoleEvent { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `addonId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn addon_id(&mut self, val: &str) -> &mut Self { - self.addon_id_shim(val); + self.set_addon_id_shim(val); self } #[doc = "Change the `arguments` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn arguments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.arguments_shim(val); + self.set_arguments_shim(val); self } #[doc = "Change the `columnNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn column_number(&mut self, val: u32) -> &mut Self { - self.column_number_shim(val); + self.set_column_number_shim(val); self } #[doc = "Change the `consoleID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn console_id(&mut self, val: &str) -> &mut Self { - self.console_id_shim(val); + self.set_console_id_shim(val); self } #[doc = "Change the `counter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn counter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.counter_shim(val); + self.set_counter_shim(val); self } #[doc = "Change the `filename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn filename(&mut self, val: &str) -> &mut Self { - self.filename_shim(val); + self.set_filename_shim(val); self } #[doc = "Change the `functionName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn function_name(&mut self, val: &str) -> &mut Self { - self.function_name_shim(val); + self.set_function_name_shim(val); self } #[doc = "Change the `groupName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn group_name(&mut self, val: &str) -> &mut Self { - self.group_name_shim(val); + self.set_group_name_shim(val); self } #[doc = "Change the `innerID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn inner_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.inner_id_shim(val); + self.set_inner_id_shim(val); self } #[doc = "Change the `level` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn level(&mut self, val: &str) -> &mut Self { - self.level_shim(val); + self.set_level_shim(val); self } #[doc = "Change the `lineNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn line_number(&mut self, val: u32) -> &mut Self { - self.line_number_shim(val); + self.set_line_number_shim(val); self } #[doc = "Change the `prefix` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn prefix(&mut self, val: &str) -> &mut Self { - self.prefix_shim(val); + self.set_prefix_shim(val); self } #[doc = "Change the `private` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn private(&mut self, val: bool) -> &mut Self { - self.private_shim(val); + self.set_private_shim(val); self } #[doc = "Change the `styles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn styles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.styles_shim(val); + self.set_styles_shim(val); self } #[doc = "Change the `timeStamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn time_stamp(&mut self, val: f64) -> &mut Self { - self.time_stamp_shim(val); + self.set_time_stamp_shim(val); self } #[doc = "Change the `timer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleEvent`*"] pub fn timer(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.timer_shim(val); + self.set_timer_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs b/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs index 2b807509ef7..001d87ea362 100644 --- a/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs +++ b/crates/web-sys/src/features/gen_ConsoleInstanceOptions.rs @@ -10,19 +10,83 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub type ConsoleInstanceOptions; + #[wasm_bindgen(method, getter = "consoleID")] + fn console_id_shim(this: &ConsoleInstanceOptions) -> String; #[wasm_bindgen(method, setter = "consoleID")] - fn console_id_shim(this: &ConsoleInstanceOptions, val: &str); + fn set_console_id_shim(this: &ConsoleInstanceOptions, val: &str); + #[wasm_bindgen(method, getter = "dump")] + fn dump_shim(this: &ConsoleInstanceOptions) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "dump")] - fn dump_shim(this: &ConsoleInstanceOptions, val: &::js_sys::Function); + fn set_dump_shim(this: &ConsoleInstanceOptions, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "innerID")] + fn inner_id_shim(this: &ConsoleInstanceOptions) -> String; #[wasm_bindgen(method, setter = "innerID")] - fn inner_id_shim(this: &ConsoleInstanceOptions, val: &str); + fn set_inner_id_shim(this: &ConsoleInstanceOptions, val: &str); + #[cfg(feature = "ConsoleLogLevel")] + #[wasm_bindgen(method, getter = "maxLogLevel")] + fn max_log_level_shim(this: &ConsoleInstanceOptions) -> ConsoleLogLevel; #[cfg(feature = "ConsoleLogLevel")] #[wasm_bindgen(method, setter = "maxLogLevel")] - fn max_log_level_shim(this: &ConsoleInstanceOptions, val: ConsoleLogLevel); + fn set_max_log_level_shim(this: &ConsoleInstanceOptions, val: ConsoleLogLevel); + #[wasm_bindgen(method, getter = "maxLogLevelPref")] + fn max_log_level_pref_shim(this: &ConsoleInstanceOptions) -> String; #[wasm_bindgen(method, setter = "maxLogLevelPref")] - fn max_log_level_pref_shim(this: &ConsoleInstanceOptions, val: &str); + fn set_max_log_level_pref_shim(this: &ConsoleInstanceOptions, val: &str); + #[wasm_bindgen(method, getter = "prefix")] + fn prefix_shim(this: &ConsoleInstanceOptions) -> String; #[wasm_bindgen(method, setter = "prefix")] - fn prefix_shim(this: &ConsoleInstanceOptions, val: &str); + fn set_prefix_shim(this: &ConsoleInstanceOptions, val: &str); +} +#[doc = "The trait to access properties on the `ConsoleInstanceOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] +pub trait ConsoleInstanceOptionsGetters { + #[doc = "Get the `consoleID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + fn console_id(&self) -> String; + #[doc = "Get the `dump` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + fn dump(&self) -> ::js_sys::Function; + #[doc = "Get the `innerID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + fn inner_id(&self) -> String; + #[cfg(feature = "ConsoleLogLevel")] + #[doc = "Get the `maxLogLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"] + fn max_log_level(&self) -> ConsoleLogLevel; + #[doc = "Get the `maxLogLevelPref` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + fn max_log_level_pref(&self) -> String; + #[doc = "Get the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] + fn prefix(&self) -> String; +} +impl ConsoleInstanceOptionsGetters for ConsoleInstanceOptions { + fn console_id(&self) -> String { + self.console_id_shim() + } + fn dump(&self) -> ::js_sys::Function { + self.dump_shim() + } + fn inner_id(&self) -> String { + self.inner_id_shim() + } + #[cfg(feature = "ConsoleLogLevel")] + fn max_log_level(&self) -> ConsoleLogLevel { + self.max_log_level_shim() + } + fn max_log_level_pref(&self) -> String { + self.max_log_level_pref_shim() + } + fn prefix(&self) -> String { + self.prefix_shim() + } } impl ConsoleInstanceOptions { #[doc = "Construct a new `ConsoleInstanceOptions`."] @@ -37,21 +101,21 @@ impl ConsoleInstanceOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub fn console_id(&mut self, val: &str) -> &mut Self { - self.console_id_shim(val); + self.set_console_id_shim(val); self } #[doc = "Change the `dump` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub fn dump(&mut self, val: &::js_sys::Function) -> &mut Self { - self.dump_shim(val); + self.set_dump_shim(val); self } #[doc = "Change the `innerID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub fn inner_id(&mut self, val: &str) -> &mut Self { - self.inner_id_shim(val); + self.set_inner_id_shim(val); self } #[cfg(feature = "ConsoleLogLevel")] @@ -59,21 +123,21 @@ impl ConsoleInstanceOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`, `ConsoleLogLevel`*"] pub fn max_log_level(&mut self, val: ConsoleLogLevel) -> &mut Self { - self.max_log_level_shim(val); + self.set_max_log_level_shim(val); self } #[doc = "Change the `maxLogLevelPref` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub fn max_log_level_pref(&mut self, val: &str) -> &mut Self { - self.max_log_level_pref_shim(val); + self.set_max_log_level_pref_shim(val); self } #[doc = "Change the `prefix` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub fn prefix(&mut self, val: &str) -> &mut Self { - self.prefix_shim(val); + self.set_prefix_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs b/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs index 833b5be4d40..67f0d592e2e 100644 --- a/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs +++ b/crates/web-sys/src/features/gen_ConsoleProfileEvent.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] pub type ConsoleProfileEvent; + #[wasm_bindgen(method, getter = "action")] + fn action_shim(this: &ConsoleProfileEvent) -> String; #[wasm_bindgen(method, setter = "action")] - fn action_shim(this: &ConsoleProfileEvent, val: &str); + fn set_action_shim(this: &ConsoleProfileEvent, val: &str); + #[wasm_bindgen(method, getter = "arguments")] + fn arguments_shim(this: &ConsoleProfileEvent) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "arguments")] - fn arguments_shim(this: &ConsoleProfileEvent, val: &::wasm_bindgen::JsValue); + fn set_arguments_shim(this: &ConsoleProfileEvent, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `ConsoleProfileEvent` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] +pub trait ConsoleProfileEventGetters { + #[doc = "Get the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] + fn action(&self) -> String; + #[doc = "Get the `arguments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] + fn arguments(&self) -> ::js_sys::Array; +} +impl ConsoleProfileEventGetters for ConsoleProfileEvent { + fn action(&self) -> String { + self.action_shim() + } + fn arguments(&self) -> ::js_sys::Array { + self.arguments_shim() + } } impl ConsoleProfileEvent { #[doc = "Construct a new `ConsoleProfileEvent`."] @@ -28,14 +53,14 @@ impl ConsoleProfileEvent { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] pub fn action(&mut self, val: &str) -> &mut Self { - self.action_shim(val); + self.set_action_shim(val); self } #[doc = "Change the `arguments` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleProfileEvent`*"] pub fn arguments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.arguments_shim(val); + self.set_arguments_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleStackEntry.rs b/crates/web-sys/src/features/gen_ConsoleStackEntry.rs index 12555018b78..b791b919de7 100644 --- a/crates/web-sys/src/features/gen_ConsoleStackEntry.rs +++ b/crates/web-sys/src/features/gen_ConsoleStackEntry.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] pub type ConsoleStackEntry; + #[wasm_bindgen(method, getter = "asyncCause")] + fn async_cause_shim(this: &ConsoleStackEntry) -> Option; #[wasm_bindgen(method, setter = "asyncCause")] - fn async_cause_shim(this: &ConsoleStackEntry, val: Option<&str>); + fn set_async_cause_shim(this: &ConsoleStackEntry, val: Option<&str>); + #[wasm_bindgen(method, getter = "columnNumber")] + fn column_number_shim(this: &ConsoleStackEntry) -> u32; #[wasm_bindgen(method, setter = "columnNumber")] - fn column_number_shim(this: &ConsoleStackEntry, val: u32); + fn set_column_number_shim(this: &ConsoleStackEntry, val: u32); + #[wasm_bindgen(method, getter = "filename")] + fn filename_shim(this: &ConsoleStackEntry) -> String; #[wasm_bindgen(method, setter = "filename")] - fn filename_shim(this: &ConsoleStackEntry, val: &str); + fn set_filename_shim(this: &ConsoleStackEntry, val: &str); + #[wasm_bindgen(method, getter = "functionName")] + fn function_name_shim(this: &ConsoleStackEntry) -> String; #[wasm_bindgen(method, setter = "functionName")] - fn function_name_shim(this: &ConsoleStackEntry, val: &str); + fn set_function_name_shim(this: &ConsoleStackEntry, val: &str); + #[wasm_bindgen(method, getter = "lineNumber")] + fn line_number_shim(this: &ConsoleStackEntry) -> u32; #[wasm_bindgen(method, setter = "lineNumber")] - fn line_number_shim(this: &ConsoleStackEntry, val: u32); + fn set_line_number_shim(this: &ConsoleStackEntry, val: u32); +} +#[doc = "The trait to access properties on the `ConsoleStackEntry` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] +pub trait ConsoleStackEntryGetters { + #[doc = "Get the `asyncCause` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + fn async_cause(&self) -> Option; + #[doc = "Get the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + fn column_number(&self) -> u32; + #[doc = "Get the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + fn filename(&self) -> String; + #[doc = "Get the `functionName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + fn function_name(&self) -> String; + #[doc = "Get the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] + fn line_number(&self) -> u32; +} +impl ConsoleStackEntryGetters for ConsoleStackEntry { + fn async_cause(&self) -> Option { + self.async_cause_shim() + } + fn column_number(&self) -> u32 { + self.column_number_shim() + } + fn filename(&self) -> String { + self.filename_shim() + } + fn function_name(&self) -> String { + self.function_name_shim() + } + fn line_number(&self) -> u32 { + self.line_number_shim() + } } impl ConsoleStackEntry { #[doc = "Construct a new `ConsoleStackEntry`."] @@ -34,35 +86,35 @@ impl ConsoleStackEntry { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] pub fn async_cause(&mut self, val: Option<&str>) -> &mut Self { - self.async_cause_shim(val); + self.set_async_cause_shim(val); self } #[doc = "Change the `columnNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] pub fn column_number(&mut self, val: u32) -> &mut Self { - self.column_number_shim(val); + self.set_column_number_shim(val); self } #[doc = "Change the `filename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] pub fn filename(&mut self, val: &str) -> &mut Self { - self.filename_shim(val); + self.set_filename_shim(val); self } #[doc = "Change the `functionName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] pub fn function_name(&mut self, val: &str) -> &mut Self { - self.function_name_shim(val); + self.set_function_name_shim(val); self } #[doc = "Change the `lineNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleStackEntry`*"] pub fn line_number(&mut self, val: u32) -> &mut Self { - self.line_number_shim(val); + self.set_line_number_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleTimerError.rs b/crates/web-sys/src/features/gen_ConsoleTimerError.rs index 9455aff12d3..64c492cbe10 100644 --- a/crates/web-sys/src/features/gen_ConsoleTimerError.rs +++ b/crates/web-sys/src/features/gen_ConsoleTimerError.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] pub type ConsoleTimerError; + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &ConsoleTimerError) -> String; #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &ConsoleTimerError, val: &str); + fn set_error_shim(this: &ConsoleTimerError, val: &str); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &ConsoleTimerError) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ConsoleTimerError, val: &str); + fn set_name_shim(this: &ConsoleTimerError, val: &str); +} +#[doc = "The trait to access properties on the `ConsoleTimerError` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] +pub trait ConsoleTimerErrorGetters { + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] + fn error(&self) -> String; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] + fn name(&self) -> String; +} +impl ConsoleTimerErrorGetters for ConsoleTimerError { + fn error(&self) -> String { + self.error_shim() + } + fn name(&self) -> String { + self.name_shim() + } } impl ConsoleTimerError { #[doc = "Construct a new `ConsoleTimerError`."] @@ -28,14 +53,14 @@ impl ConsoleTimerError { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] pub fn error(&mut self, val: &str) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerError`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs b/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs index 0d3b294a926..efc267f7104 100644 --- a/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs +++ b/crates/web-sys/src/features/gen_ConsoleTimerLogOrEnd.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] pub type ConsoleTimerLogOrEnd; + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &ConsoleTimerLogOrEnd) -> f64; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &ConsoleTimerLogOrEnd, val: f64); + fn set_duration_shim(this: &ConsoleTimerLogOrEnd, val: f64); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &ConsoleTimerLogOrEnd) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ConsoleTimerLogOrEnd, val: &str); + fn set_name_shim(this: &ConsoleTimerLogOrEnd, val: &str); +} +#[doc = "The trait to access properties on the `ConsoleTimerLogOrEnd` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] +pub trait ConsoleTimerLogOrEndGetters { + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] + fn duration(&self) -> f64; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] + fn name(&self) -> String; +} +impl ConsoleTimerLogOrEndGetters for ConsoleTimerLogOrEnd { + fn duration(&self) -> f64 { + self.duration_shim() + } + fn name(&self) -> String { + self.name_shim() + } } impl ConsoleTimerLogOrEnd { #[doc = "Construct a new `ConsoleTimerLogOrEnd`."] @@ -28,14 +53,14 @@ impl ConsoleTimerLogOrEnd { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerLogOrEnd`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConsoleTimerStart.rs b/crates/web-sys/src/features/gen_ConsoleTimerStart.rs index d4e2a17d04c..fa43ed289bb 100644 --- a/crates/web-sys/src/features/gen_ConsoleTimerStart.rs +++ b/crates/web-sys/src/features/gen_ConsoleTimerStart.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] pub type ConsoleTimerStart; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &ConsoleTimerStart) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ConsoleTimerStart, val: &str); + fn set_name_shim(this: &ConsoleTimerStart, val: &str); +} +#[doc = "The trait to access properties on the `ConsoleTimerStart` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] +pub trait ConsoleTimerStartGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] + fn name(&self) -> String; +} +impl ConsoleTimerStartGetters for ConsoleTimerStart { + fn name(&self) -> String { + self.name_shim() + } } impl ConsoleTimerStart { #[doc = "Construct a new `ConsoleTimerStart`."] @@ -26,7 +42,7 @@ impl ConsoleTimerStart { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleTimerStart`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstantSourceOptions.rs b/crates/web-sys/src/features/gen_ConstantSourceOptions.rs index 206ed0a76af..a1ba2216b41 100644 --- a/crates/web-sys/src/features/gen_ConstantSourceOptions.rs +++ b/crates/web-sys/src/features/gen_ConstantSourceOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] pub type ConstantSourceOptions; + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &ConstantSourceOptions) -> f32; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &ConstantSourceOptions, val: f32); + fn set_offset_shim(this: &ConstantSourceOptions, val: f32); +} +#[doc = "The trait to access properties on the `ConstantSourceOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] +pub trait ConstantSourceOptionsGetters { + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] + fn offset(&self) -> f32; +} +impl ConstantSourceOptionsGetters for ConstantSourceOptions { + fn offset(&self) -> f32 { + self.offset_shim() + } } impl ConstantSourceOptions { #[doc = "Construct a new `ConstantSourceOptions`."] @@ -26,7 +42,7 @@ impl ConstantSourceOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstantSourceOptions`*"] pub fn offset(&mut self, val: f32) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs b/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs index 6885925daa3..6e2f80920e5 100644 --- a/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs +++ b/crates/web-sys/src/features/gen_ConstrainBooleanParameters.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] pub type ConstrainBooleanParameters; + #[wasm_bindgen(method, getter = "exact")] + fn exact_shim(this: &ConstrainBooleanParameters) -> bool; #[wasm_bindgen(method, setter = "exact")] - fn exact_shim(this: &ConstrainBooleanParameters, val: bool); + fn set_exact_shim(this: &ConstrainBooleanParameters, val: bool); + #[wasm_bindgen(method, getter = "ideal")] + fn ideal_shim(this: &ConstrainBooleanParameters) -> bool; #[wasm_bindgen(method, setter = "ideal")] - fn ideal_shim(this: &ConstrainBooleanParameters, val: bool); + fn set_ideal_shim(this: &ConstrainBooleanParameters, val: bool); +} +#[doc = "The trait to access properties on the `ConstrainBooleanParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] +pub trait ConstrainBooleanParametersGetters { + #[doc = "Get the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] + fn exact(&self) -> bool; + #[doc = "Get the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] + fn ideal(&self) -> bool; +} +impl ConstrainBooleanParametersGetters for ConstrainBooleanParameters { + fn exact(&self) -> bool { + self.exact_shim() + } + fn ideal(&self) -> bool { + self.ideal_shim() + } } impl ConstrainBooleanParameters { #[doc = "Construct a new `ConstrainBooleanParameters`."] @@ -28,14 +53,14 @@ impl ConstrainBooleanParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] pub fn exact(&mut self, val: bool) -> &mut Self { - self.exact_shim(val); + self.set_exact_shim(val); self } #[doc = "Change the `ideal` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainBooleanParameters`*"] pub fn ideal(&mut self, val: bool) -> &mut Self { - self.ideal_shim(val); + self.set_ideal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs b/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs index 71f3bf16b92..2650efe0c31 100644 --- a/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs +++ b/crates/web-sys/src/features/gen_ConstrainDomStringParameters.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] pub type ConstrainDomStringParameters; + #[wasm_bindgen(method, getter = "exact")] + fn exact_shim(this: &ConstrainDomStringParameters) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "exact")] - fn exact_shim(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); + fn set_exact_shim(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "ideal")] + fn ideal_shim(this: &ConstrainDomStringParameters) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "ideal")] - fn ideal_shim(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); + fn set_ideal_shim(this: &ConstrainDomStringParameters, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `ConstrainDomStringParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] +pub trait ConstrainDomStringParametersGetters { + #[doc = "Get the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] + fn exact(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] + fn ideal(&self) -> ::wasm_bindgen::JsValue; +} +impl ConstrainDomStringParametersGetters for ConstrainDomStringParameters { + fn exact(&self) -> ::wasm_bindgen::JsValue { + self.exact_shim() + } + fn ideal(&self) -> ::wasm_bindgen::JsValue { + self.ideal_shim() + } } impl ConstrainDomStringParameters { #[doc = "Construct a new `ConstrainDomStringParameters`."] @@ -28,14 +53,14 @@ impl ConstrainDomStringParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] pub fn exact(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.exact_shim(val); + self.set_exact_shim(val); self } #[doc = "Change the `ideal` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDomStringParameters`*"] pub fn ideal(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ideal_shim(val); + self.set_ideal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs b/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs index ac4e0ccb31f..8af305e7fd7 100644 --- a/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs +++ b/crates/web-sys/src/features/gen_ConstrainDoubleRange.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] pub type ConstrainDoubleRange; + #[wasm_bindgen(method, getter = "exact")] + fn exact_shim(this: &ConstrainDoubleRange) -> f64; #[wasm_bindgen(method, setter = "exact")] - fn exact_shim(this: &ConstrainDoubleRange, val: f64); + fn set_exact_shim(this: &ConstrainDoubleRange, val: f64); + #[wasm_bindgen(method, getter = "ideal")] + fn ideal_shim(this: &ConstrainDoubleRange) -> f64; #[wasm_bindgen(method, setter = "ideal")] - fn ideal_shim(this: &ConstrainDoubleRange, val: f64); + fn set_ideal_shim(this: &ConstrainDoubleRange, val: f64); + #[wasm_bindgen(method, getter = "max")] + fn max_shim(this: &ConstrainDoubleRange) -> f64; #[wasm_bindgen(method, setter = "max")] - fn max_shim(this: &ConstrainDoubleRange, val: f64); + fn set_max_shim(this: &ConstrainDoubleRange, val: f64); + #[wasm_bindgen(method, getter = "min")] + fn min_shim(this: &ConstrainDoubleRange) -> f64; #[wasm_bindgen(method, setter = "min")] - fn min_shim(this: &ConstrainDoubleRange, val: f64); + fn set_min_shim(this: &ConstrainDoubleRange, val: f64); +} +#[doc = "The trait to access properties on the `ConstrainDoubleRange` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] +pub trait ConstrainDoubleRangeGetters { + #[doc = "Get the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + fn exact(&self) -> f64; + #[doc = "Get the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + fn ideal(&self) -> f64; + #[doc = "Get the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + fn max(&self) -> f64; + #[doc = "Get the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] + fn min(&self) -> f64; +} +impl ConstrainDoubleRangeGetters for ConstrainDoubleRange { + fn exact(&self) -> f64 { + self.exact_shim() + } + fn ideal(&self) -> f64 { + self.ideal_shim() + } + fn max(&self) -> f64 { + self.max_shim() + } + fn min(&self) -> f64 { + self.min_shim() + } } impl ConstrainDoubleRange { #[doc = "Construct a new `ConstrainDoubleRange`."] @@ -32,28 +75,28 @@ impl ConstrainDoubleRange { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] pub fn exact(&mut self, val: f64) -> &mut Self { - self.exact_shim(val); + self.set_exact_shim(val); self } #[doc = "Change the `ideal` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] pub fn ideal(&mut self, val: f64) -> &mut Self { - self.ideal_shim(val); + self.set_ideal_shim(val); self } #[doc = "Change the `max` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] pub fn max(&mut self, val: f64) -> &mut Self { - self.max_shim(val); + self.set_max_shim(val); self } #[doc = "Change the `min` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainDoubleRange`*"] pub fn min(&mut self, val: f64) -> &mut Self { - self.min_shim(val); + self.set_min_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConstrainLongRange.rs b/crates/web-sys/src/features/gen_ConstrainLongRange.rs index 58deaf0f387..76065188335 100644 --- a/crates/web-sys/src/features/gen_ConstrainLongRange.rs +++ b/crates/web-sys/src/features/gen_ConstrainLongRange.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] pub type ConstrainLongRange; + #[wasm_bindgen(method, getter = "exact")] + fn exact_shim(this: &ConstrainLongRange) -> i32; #[wasm_bindgen(method, setter = "exact")] - fn exact_shim(this: &ConstrainLongRange, val: i32); + fn set_exact_shim(this: &ConstrainLongRange, val: i32); + #[wasm_bindgen(method, getter = "ideal")] + fn ideal_shim(this: &ConstrainLongRange) -> i32; #[wasm_bindgen(method, setter = "ideal")] - fn ideal_shim(this: &ConstrainLongRange, val: i32); + fn set_ideal_shim(this: &ConstrainLongRange, val: i32); + #[wasm_bindgen(method, getter = "max")] + fn max_shim(this: &ConstrainLongRange) -> i32; #[wasm_bindgen(method, setter = "max")] - fn max_shim(this: &ConstrainLongRange, val: i32); + fn set_max_shim(this: &ConstrainLongRange, val: i32); + #[wasm_bindgen(method, getter = "min")] + fn min_shim(this: &ConstrainLongRange) -> i32; #[wasm_bindgen(method, setter = "min")] - fn min_shim(this: &ConstrainLongRange, val: i32); + fn set_min_shim(this: &ConstrainLongRange, val: i32); +} +#[doc = "The trait to access properties on the `ConstrainLongRange` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] +pub trait ConstrainLongRangeGetters { + #[doc = "Get the `exact` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + fn exact(&self) -> i32; + #[doc = "Get the `ideal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + fn ideal(&self) -> i32; + #[doc = "Get the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + fn max(&self) -> i32; + #[doc = "Get the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] + fn min(&self) -> i32; +} +impl ConstrainLongRangeGetters for ConstrainLongRange { + fn exact(&self) -> i32 { + self.exact_shim() + } + fn ideal(&self) -> i32 { + self.ideal_shim() + } + fn max(&self) -> i32 { + self.max_shim() + } + fn min(&self) -> i32 { + self.min_shim() + } } impl ConstrainLongRange { #[doc = "Construct a new `ConstrainLongRange`."] @@ -32,28 +75,28 @@ impl ConstrainLongRange { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] pub fn exact(&mut self, val: i32) -> &mut Self { - self.exact_shim(val); + self.set_exact_shim(val); self } #[doc = "Change the `ideal` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] pub fn ideal(&mut self, val: i32) -> &mut Self { - self.ideal_shim(val); + self.set_ideal_shim(val); self } #[doc = "Change the `max` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] pub fn max(&mut self, val: i32) -> &mut Self { - self.max_shim(val); + self.set_max_shim(val); self } #[doc = "Change the `min` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConstrainLongRange`*"] pub fn min(&mut self, val: i32) -> &mut Self { - self.min_shim(val); + self.set_min_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ContextAttributes2d.rs b/crates/web-sys/src/features/gen_ContextAttributes2d.rs index 6e46206dd2a..5a82e432de3 100644 --- a/crates/web-sys/src/features/gen_ContextAttributes2d.rs +++ b/crates/web-sys/src/features/gen_ContextAttributes2d.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] pub type ContextAttributes2d; + #[wasm_bindgen(method, getter = "alpha")] + fn alpha_shim(this: &ContextAttributes2d) -> bool; #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &ContextAttributes2d, val: bool); + fn set_alpha_shim(this: &ContextAttributes2d, val: bool); + #[wasm_bindgen(method, getter = "willReadFrequently")] + fn will_read_frequently_shim(this: &ContextAttributes2d) -> bool; #[wasm_bindgen(method, setter = "willReadFrequently")] - fn will_read_frequently_shim(this: &ContextAttributes2d, val: bool); + fn set_will_read_frequently_shim(this: &ContextAttributes2d, val: bool); +} +#[doc = "The trait to access properties on the `ContextAttributes2d` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] +pub trait ContextAttributes2dGetters { + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] + fn alpha(&self) -> bool; + #[doc = "Get the `willReadFrequently` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] + fn will_read_frequently(&self) -> bool; +} +impl ContextAttributes2dGetters for ContextAttributes2d { + fn alpha(&self) -> bool { + self.alpha_shim() + } + fn will_read_frequently(&self) -> bool { + self.will_read_frequently_shim() + } } impl ContextAttributes2d { #[doc = "Construct a new `ContextAttributes2d`."] @@ -28,14 +53,14 @@ impl ContextAttributes2d { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] pub fn alpha(&mut self, val: bool) -> &mut Self { - self.alpha_shim(val); + self.set_alpha_shim(val); self } #[doc = "Change the `willReadFrequently` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ContextAttributes2d`*"] pub fn will_read_frequently(&mut self, val: bool) -> &mut Self { - self.will_read_frequently_shim(val); + self.set_will_read_frequently_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs b/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs index 0e1493f0a85..0b72eeda649 100644 --- a/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs +++ b/crates/web-sys/src/features/gen_ConvertCoordinateOptions.rs @@ -11,11 +11,42 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`*"] pub type ConvertCoordinateOptions; #[cfg(feature = "CssBoxType")] + #[wasm_bindgen(method, getter = "fromBox")] + fn from_box_shim(this: &ConvertCoordinateOptions) -> CssBoxType; + #[cfg(feature = "CssBoxType")] #[wasm_bindgen(method, setter = "fromBox")] - fn from_box_shim(this: &ConvertCoordinateOptions, val: CssBoxType); + fn set_from_box_shim(this: &ConvertCoordinateOptions, val: CssBoxType); + #[cfg(feature = "CssBoxType")] + #[wasm_bindgen(method, getter = "toBox")] + fn to_box_shim(this: &ConvertCoordinateOptions) -> CssBoxType; #[cfg(feature = "CssBoxType")] #[wasm_bindgen(method, setter = "toBox")] - fn to_box_shim(this: &ConvertCoordinateOptions, val: CssBoxType); + fn set_to_box_shim(this: &ConvertCoordinateOptions, val: CssBoxType); +} +#[doc = "The trait to access properties on the `ConvertCoordinateOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`*"] +pub trait ConvertCoordinateOptionsGetters { + #[cfg(feature = "CssBoxType")] + #[doc = "Get the `fromBox` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] + fn from_box(&self) -> CssBoxType; + #[cfg(feature = "CssBoxType")] + #[doc = "Get the `toBox` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] + fn to_box(&self) -> CssBoxType; +} +impl ConvertCoordinateOptionsGetters for ConvertCoordinateOptions { + #[cfg(feature = "CssBoxType")] + fn from_box(&self) -> CssBoxType { + self.from_box_shim() + } + #[cfg(feature = "CssBoxType")] + fn to_box(&self) -> CssBoxType { + self.to_box_shim() + } } impl ConvertCoordinateOptions { #[doc = "Construct a new `ConvertCoordinateOptions`."] @@ -31,7 +62,7 @@ impl ConvertCoordinateOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] pub fn from_box(&mut self, val: CssBoxType) -> &mut Self { - self.from_box_shim(val); + self.set_from_box_shim(val); self } #[cfg(feature = "CssBoxType")] @@ -39,7 +70,7 @@ impl ConvertCoordinateOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConvertCoordinateOptions`, `CssBoxType`*"] pub fn to_box(&mut self, val: CssBoxType) -> &mut Self { - self.to_box_shim(val); + self.set_to_box_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ConvolverOptions.rs b/crates/web-sys/src/features/gen_ConvolverOptions.rs index db3fe68d2f5..fb2b3de8285 100644 --- a/crates/web-sys/src/features/gen_ConvolverOptions.rs +++ b/crates/web-sys/src/features/gen_ConvolverOptions.rs @@ -10,19 +10,80 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] pub type ConvolverOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &ConvolverOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &ConvolverOptions, val: u32); + fn set_channel_count_shim(this: &ConvolverOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &ConvolverOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &ConvolverOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &ConvolverOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &ConvolverOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &ConvolverOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &ConvolverOptions, val: ChannelInterpretation); + #[cfg(feature = "AudioBuffer")] + #[wasm_bindgen(method, getter = "buffer")] + fn buffer_shim(this: &ConvolverOptions) -> Option; #[cfg(feature = "AudioBuffer")] #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &ConvolverOptions, val: Option<&AudioBuffer>); + fn set_buffer_shim(this: &ConvolverOptions, val: Option<&AudioBuffer>); + #[wasm_bindgen(method, getter = "disableNormalization")] + fn disable_normalization_shim(this: &ConvolverOptions) -> bool; #[wasm_bindgen(method, setter = "disableNormalization")] - fn disable_normalization_shim(this: &ConvolverOptions, val: bool); + fn set_disable_normalization_shim(this: &ConvolverOptions, val: bool); +} +#[doc = "The trait to access properties on the `ConvolverOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] +pub trait ConvolverOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ConvolverOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ConvolverOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[cfg(feature = "AudioBuffer")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverOptions`*"] + fn buffer(&self) -> Option; + #[doc = "Get the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] + fn disable_normalization(&self) -> bool; +} +impl ConvolverOptionsGetters for ConvolverOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + #[cfg(feature = "AudioBuffer")] + fn buffer(&self) -> Option { + self.buffer_shim() + } + fn disable_normalization(&self) -> bool { + self.disable_normalization_shim() + } } impl ConvolverOptions { #[doc = "Construct a new `ConvolverOptions`."] @@ -37,7 +98,7 @@ impl ConvolverOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -45,7 +106,7 @@ impl ConvolverOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `ConvolverOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -53,7 +114,7 @@ impl ConvolverOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `ConvolverOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[cfg(feature = "AudioBuffer")] @@ -61,14 +122,14 @@ impl ConvolverOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `ConvolverOptions`*"] pub fn buffer(&mut self, val: Option<&AudioBuffer>) -> &mut Self { - self.buffer_shim(val); + self.set_buffer_shim(val); self } #[doc = "Change the `disableNormalization` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConvolverOptions`*"] pub fn disable_normalization(&mut self, val: bool) -> &mut Self { - self.disable_normalization_shim(val); + self.set_disable_normalization_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CredentialCreationOptions.rs b/crates/web-sys/src/features/gen_CredentialCreationOptions.rs index f9366322156..7e080cec4d3 100644 --- a/crates/web-sys/src/features/gen_CredentialCreationOptions.rs +++ b/crates/web-sys/src/features/gen_CredentialCreationOptions.rs @@ -11,11 +11,45 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`*"] pub type CredentialCreationOptions; #[cfg(feature = "PublicKeyCredentialCreationOptions")] + #[wasm_bindgen(method, getter = "publicKey")] + fn public_key_shim(this: &CredentialCreationOptions) -> PublicKeyCredentialCreationOptions; + #[cfg(feature = "PublicKeyCredentialCreationOptions")] #[wasm_bindgen(method, setter = "publicKey")] - fn public_key_shim(this: &CredentialCreationOptions, val: &PublicKeyCredentialCreationOptions); + fn set_public_key_shim( + this: &CredentialCreationOptions, + val: &PublicKeyCredentialCreationOptions, + ); + #[cfg(feature = "AbortSignal")] + #[wasm_bindgen(method, getter = "signal")] + fn signal_shim(this: &CredentialCreationOptions) -> AbortSignal; #[cfg(feature = "AbortSignal")] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &CredentialCreationOptions, val: &AbortSignal); + fn set_signal_shim(this: &CredentialCreationOptions, val: &AbortSignal); +} +#[doc = "The trait to access properties on the `CredentialCreationOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`*"] +pub trait CredentialCreationOptionsGetters { + #[cfg(feature = "PublicKeyCredentialCreationOptions")] + #[doc = "Get the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"] + fn public_key(&self) -> PublicKeyCredentialCreationOptions; + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"] + fn signal(&self) -> AbortSignal; +} +impl CredentialCreationOptionsGetters for CredentialCreationOptions { + #[cfg(feature = "PublicKeyCredentialCreationOptions")] + fn public_key(&self) -> PublicKeyCredentialCreationOptions { + self.public_key_shim() + } + #[cfg(feature = "AbortSignal")] + fn signal(&self) -> AbortSignal { + self.signal_shim() + } } impl CredentialCreationOptions { #[doc = "Construct a new `CredentialCreationOptions`."] @@ -31,7 +65,7 @@ impl CredentialCreationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CredentialCreationOptions`, `PublicKeyCredentialCreationOptions`*"] pub fn public_key(&mut self, val: &PublicKeyCredentialCreationOptions) -> &mut Self { - self.public_key_shim(val); + self.set_public_key_shim(val); self } #[cfg(feature = "AbortSignal")] @@ -39,7 +73,7 @@ impl CredentialCreationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialCreationOptions`*"] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CredentialRequestOptions.rs b/crates/web-sys/src/features/gen_CredentialRequestOptions.rs index 6df51ff0ab1..dfb7a06feb3 100644 --- a/crates/web-sys/src/features/gen_CredentialRequestOptions.rs +++ b/crates/web-sys/src/features/gen_CredentialRequestOptions.rs @@ -11,11 +11,45 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`*"] pub type CredentialRequestOptions; #[cfg(feature = "PublicKeyCredentialRequestOptions")] + #[wasm_bindgen(method, getter = "publicKey")] + fn public_key_shim(this: &CredentialRequestOptions) -> PublicKeyCredentialRequestOptions; + #[cfg(feature = "PublicKeyCredentialRequestOptions")] #[wasm_bindgen(method, setter = "publicKey")] - fn public_key_shim(this: &CredentialRequestOptions, val: &PublicKeyCredentialRequestOptions); + fn set_public_key_shim( + this: &CredentialRequestOptions, + val: &PublicKeyCredentialRequestOptions, + ); + #[cfg(feature = "AbortSignal")] + #[wasm_bindgen(method, getter = "signal")] + fn signal_shim(this: &CredentialRequestOptions) -> AbortSignal; #[cfg(feature = "AbortSignal")] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &CredentialRequestOptions, val: &AbortSignal); + fn set_signal_shim(this: &CredentialRequestOptions, val: &AbortSignal); +} +#[doc = "The trait to access properties on the `CredentialRequestOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`*"] +pub trait CredentialRequestOptionsGetters { + #[cfg(feature = "PublicKeyCredentialRequestOptions")] + #[doc = "Get the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`, `PublicKeyCredentialRequestOptions`*"] + fn public_key(&self) -> PublicKeyCredentialRequestOptions; + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialRequestOptions`*"] + fn signal(&self) -> AbortSignal; +} +impl CredentialRequestOptionsGetters for CredentialRequestOptions { + #[cfg(feature = "PublicKeyCredentialRequestOptions")] + fn public_key(&self) -> PublicKeyCredentialRequestOptions { + self.public_key_shim() + } + #[cfg(feature = "AbortSignal")] + fn signal(&self) -> AbortSignal { + self.signal_shim() + } } impl CredentialRequestOptions { #[doc = "Construct a new `CredentialRequestOptions`."] @@ -31,7 +65,7 @@ impl CredentialRequestOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CredentialRequestOptions`, `PublicKeyCredentialRequestOptions`*"] pub fn public_key(&mut self, val: &PublicKeyCredentialRequestOptions) -> &mut Self { - self.public_key_shim(val); + self.set_public_key_shim(val); self } #[cfg(feature = "AbortSignal")] @@ -39,7 +73,7 @@ impl CredentialRequestOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `CredentialRequestOptions`*"] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CryptoKeyPair.rs b/crates/web-sys/src/features/gen_CryptoKeyPair.rs index 2edbf68355b..8a3b1cdb3a7 100644 --- a/crates/web-sys/src/features/gen_CryptoKeyPair.rs +++ b/crates/web-sys/src/features/gen_CryptoKeyPair.rs @@ -11,11 +11,42 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `CryptoKeyPair`*"] pub type CryptoKeyPair; #[cfg(feature = "CryptoKey")] + #[wasm_bindgen(method, getter = "privateKey")] + fn private_key_shim(this: &CryptoKeyPair) -> CryptoKey; + #[cfg(feature = "CryptoKey")] #[wasm_bindgen(method, setter = "privateKey")] - fn private_key_shim(this: &CryptoKeyPair, val: &CryptoKey); + fn set_private_key_shim(this: &CryptoKeyPair, val: &CryptoKey); + #[cfg(feature = "CryptoKey")] + #[wasm_bindgen(method, getter = "publicKey")] + fn public_key_shim(this: &CryptoKeyPair) -> CryptoKey; #[cfg(feature = "CryptoKey")] #[wasm_bindgen(method, setter = "publicKey")] - fn public_key_shim(this: &CryptoKeyPair, val: &CryptoKey); + fn set_public_key_shim(this: &CryptoKeyPair, val: &CryptoKey); +} +#[doc = "The trait to access properties on the `CryptoKeyPair` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CryptoKeyPair`*"] +pub trait CryptoKeyPairGetters { + #[cfg(feature = "CryptoKey")] + #[doc = "Get the `privateKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] + fn private_key(&self) -> CryptoKey; + #[cfg(feature = "CryptoKey")] + #[doc = "Get the `publicKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] + fn public_key(&self) -> CryptoKey; +} +impl CryptoKeyPairGetters for CryptoKeyPair { + #[cfg(feature = "CryptoKey")] + fn private_key(&self) -> CryptoKey { + self.private_key_shim() + } + #[cfg(feature = "CryptoKey")] + fn public_key(&self) -> CryptoKey { + self.public_key_shim() + } } impl CryptoKeyPair { #[cfg(feature = "CryptoKey")] @@ -25,8 +56,8 @@ impl CryptoKeyPair { pub fn new(private_key: &CryptoKey, public_key: &CryptoKey) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.private_key(private_key); - ret.public_key(public_key); + Self::private_key(&mut ret, private_key); + Self::public_key(&mut ret, public_key); ret } #[cfg(feature = "CryptoKey")] @@ -34,7 +65,7 @@ impl CryptoKeyPair { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] pub fn private_key(&mut self, val: &CryptoKey) -> &mut Self { - self.private_key_shim(val); + self.set_private_key_shim(val); self } #[cfg(feature = "CryptoKey")] @@ -42,7 +73,7 @@ impl CryptoKeyPair { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `CryptoKeyPair`*"] pub fn public_key(&mut self, val: &CryptoKey) -> &mut Self { - self.public_key_shim(val); + self.set_public_key_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_CustomEventInit.rs b/crates/web-sys/src/features/gen_CustomEventInit.rs index aaeb6d7a4d7..cd23edeaa91 100644 --- a/crates/web-sys/src/features/gen_CustomEventInit.rs +++ b/crates/web-sys/src/features/gen_CustomEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] pub type CustomEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &CustomEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &CustomEventInit, val: bool); + fn set_bubbles_shim(this: &CustomEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &CustomEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &CustomEventInit, val: bool); + fn set_cancelable_shim(this: &CustomEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &CustomEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &CustomEventInit, val: bool); + fn set_composed_shim(this: &CustomEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &CustomEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &CustomEventInit, val: &::wasm_bindgen::JsValue); + fn set_detail_shim(this: &CustomEventInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `CustomEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] +pub trait CustomEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] + fn detail(&self) -> ::wasm_bindgen::JsValue; +} +impl CustomEventInitGetters for CustomEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> ::wasm_bindgen::JsValue { + self.detail_shim() + } } impl CustomEventInit { #[doc = "Construct a new `CustomEventInit`."] @@ -32,28 +75,28 @@ impl CustomEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CustomEventInit`*"] pub fn detail(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DateTimeValue.rs b/crates/web-sys/src/features/gen_DateTimeValue.rs index e156222ec16..d95a6f3faf1 100644 --- a/crates/web-sys/src/features/gen_DateTimeValue.rs +++ b/crates/web-sys/src/features/gen_DateTimeValue.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] pub type DateTimeValue; + #[wasm_bindgen(method, getter = "day")] + fn day_shim(this: &DateTimeValue) -> i32; #[wasm_bindgen(method, setter = "day")] - fn day_shim(this: &DateTimeValue, val: i32); + fn set_day_shim(this: &DateTimeValue, val: i32); + #[wasm_bindgen(method, getter = "hour")] + fn hour_shim(this: &DateTimeValue) -> i32; #[wasm_bindgen(method, setter = "hour")] - fn hour_shim(this: &DateTimeValue, val: i32); + fn set_hour_shim(this: &DateTimeValue, val: i32); + #[wasm_bindgen(method, getter = "minute")] + fn minute_shim(this: &DateTimeValue) -> i32; #[wasm_bindgen(method, setter = "minute")] - fn minute_shim(this: &DateTimeValue, val: i32); + fn set_minute_shim(this: &DateTimeValue, val: i32); + #[wasm_bindgen(method, getter = "month")] + fn month_shim(this: &DateTimeValue) -> i32; #[wasm_bindgen(method, setter = "month")] - fn month_shim(this: &DateTimeValue, val: i32); + fn set_month_shim(this: &DateTimeValue, val: i32); + #[wasm_bindgen(method, getter = "year")] + fn year_shim(this: &DateTimeValue) -> i32; #[wasm_bindgen(method, setter = "year")] - fn year_shim(this: &DateTimeValue, val: i32); + fn set_year_shim(this: &DateTimeValue, val: i32); +} +#[doc = "The trait to access properties on the `DateTimeValue` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] +pub trait DateTimeValueGetters { + #[doc = "Get the `day` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + fn day(&self) -> i32; + #[doc = "Get the `hour` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + fn hour(&self) -> i32; + #[doc = "Get the `minute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + fn minute(&self) -> i32; + #[doc = "Get the `month` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + fn month(&self) -> i32; + #[doc = "Get the `year` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] + fn year(&self) -> i32; +} +impl DateTimeValueGetters for DateTimeValue { + fn day(&self) -> i32 { + self.day_shim() + } + fn hour(&self) -> i32 { + self.hour_shim() + } + fn minute(&self) -> i32 { + self.minute_shim() + } + fn month(&self) -> i32 { + self.month_shim() + } + fn year(&self) -> i32 { + self.year_shim() + } } impl DateTimeValue { #[doc = "Construct a new `DateTimeValue`."] @@ -34,35 +86,35 @@ impl DateTimeValue { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] pub fn day(&mut self, val: i32) -> &mut Self { - self.day_shim(val); + self.set_day_shim(val); self } #[doc = "Change the `hour` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] pub fn hour(&mut self, val: i32) -> &mut Self { - self.hour_shim(val); + self.set_hour_shim(val); self } #[doc = "Change the `minute` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] pub fn minute(&mut self, val: i32) -> &mut Self { - self.minute_shim(val); + self.set_minute_shim(val); self } #[doc = "Change the `month` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] pub fn month(&mut self, val: i32) -> &mut Self { - self.month_shim(val); + self.set_month_shim(val); self } #[doc = "Change the `year` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DateTimeValue`*"] pub fn year(&mut self, val: i32) -> &mut Self { - self.year_shim(val); + self.set_year_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs b/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs index ff00d5bc28a..7bc99021194 100644 --- a/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs +++ b/crates/web-sys/src/features/gen_DecoderDoctorNotification.rs @@ -10,21 +10,94 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] pub type DecoderDoctorNotification; + #[wasm_bindgen(method, getter = "decodeIssue")] + fn decode_issue_shim(this: &DecoderDoctorNotification) -> String; #[wasm_bindgen(method, setter = "decodeIssue")] - fn decode_issue_shim(this: &DecoderDoctorNotification, val: &str); + fn set_decode_issue_shim(this: &DecoderDoctorNotification, val: &str); + #[wasm_bindgen(method, getter = "decoderDoctorReportId")] + fn decoder_doctor_report_id_shim(this: &DecoderDoctorNotification) -> String; #[wasm_bindgen(method, setter = "decoderDoctorReportId")] - fn decoder_doctor_report_id_shim(this: &DecoderDoctorNotification, val: &str); + fn set_decoder_doctor_report_id_shim(this: &DecoderDoctorNotification, val: &str); + #[wasm_bindgen(method, getter = "docURL")] + fn doc_url_shim(this: &DecoderDoctorNotification) -> String; #[wasm_bindgen(method, setter = "docURL")] - fn doc_url_shim(this: &DecoderDoctorNotification, val: &str); + fn set_doc_url_shim(this: &DecoderDoctorNotification, val: &str); + #[wasm_bindgen(method, getter = "formats")] + fn formats_shim(this: &DecoderDoctorNotification) -> String; #[wasm_bindgen(method, setter = "formats")] - fn formats_shim(this: &DecoderDoctorNotification, val: &str); + fn set_formats_shim(this: &DecoderDoctorNotification, val: &str); + #[wasm_bindgen(method, getter = "isSolved")] + fn is_solved_shim(this: &DecoderDoctorNotification) -> bool; #[wasm_bindgen(method, setter = "isSolved")] - fn is_solved_shim(this: &DecoderDoctorNotification, val: bool); + fn set_is_solved_shim(this: &DecoderDoctorNotification, val: bool); + #[wasm_bindgen(method, getter = "resourceURL")] + fn resource_url_shim(this: &DecoderDoctorNotification) -> String; #[wasm_bindgen(method, setter = "resourceURL")] - fn resource_url_shim(this: &DecoderDoctorNotification, val: &str); + fn set_resource_url_shim(this: &DecoderDoctorNotification, val: &str); + #[cfg(feature = "DecoderDoctorNotificationType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &DecoderDoctorNotification) -> DecoderDoctorNotificationType; #[cfg(feature = "DecoderDoctorNotificationType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &DecoderDoctorNotification, val: DecoderDoctorNotificationType); + fn set_type__shim(this: &DecoderDoctorNotification, val: DecoderDoctorNotificationType); +} +#[doc = "The trait to access properties on the `DecoderDoctorNotification` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] +pub trait DecoderDoctorNotificationGetters { + #[doc = "Get the `decodeIssue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + fn decode_issue(&self) -> String; + #[doc = "Get the `decoderDoctorReportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + fn decoder_doctor_report_id(&self) -> String; + #[doc = "Get the `docURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + fn doc_url(&self) -> String; + #[doc = "Get the `formats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + fn formats(&self) -> String; + #[doc = "Get the `isSolved` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + fn is_solved(&self) -> bool; + #[doc = "Get the `resourceURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] + fn resource_url(&self) -> String; + #[cfg(feature = "DecoderDoctorNotificationType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`, `DecoderDoctorNotificationType`*"] + fn type_(&self) -> DecoderDoctorNotificationType; +} +impl DecoderDoctorNotificationGetters for DecoderDoctorNotification { + fn decode_issue(&self) -> String { + self.decode_issue_shim() + } + fn decoder_doctor_report_id(&self) -> String { + self.decoder_doctor_report_id_shim() + } + fn doc_url(&self) -> String { + self.doc_url_shim() + } + fn formats(&self) -> String { + self.formats_shim() + } + fn is_solved(&self) -> bool { + self.is_solved_shim() + } + fn resource_url(&self) -> String { + self.resource_url_shim() + } + #[cfg(feature = "DecoderDoctorNotificationType")] + fn type_(&self) -> DecoderDoctorNotificationType { + self.type__shim() + } } impl DecoderDoctorNotification { #[cfg(feature = "DecoderDoctorNotificationType")] @@ -38,51 +111,51 @@ impl DecoderDoctorNotification { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.decoder_doctor_report_id(decoder_doctor_report_id); - ret.is_solved(is_solved); - ret.type_(type_); + Self::decoder_doctor_report_id(&mut ret, decoder_doctor_report_id); + Self::is_solved(&mut ret, is_solved); + Self::type_(&mut ret, type_); ret } #[doc = "Change the `decodeIssue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] pub fn decode_issue(&mut self, val: &str) -> &mut Self { - self.decode_issue_shim(val); + self.set_decode_issue_shim(val); self } #[doc = "Change the `decoderDoctorReportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] pub fn decoder_doctor_report_id(&mut self, val: &str) -> &mut Self { - self.decoder_doctor_report_id_shim(val); + self.set_decoder_doctor_report_id_shim(val); self } #[doc = "Change the `docURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] pub fn doc_url(&mut self, val: &str) -> &mut Self { - self.doc_url_shim(val); + self.set_doc_url_shim(val); self } #[doc = "Change the `formats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] pub fn formats(&mut self, val: &str) -> &mut Self { - self.formats_shim(val); + self.set_formats_shim(val); self } #[doc = "Change the `isSolved` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] pub fn is_solved(&mut self, val: bool) -> &mut Self { - self.is_solved_shim(val); + self.set_is_solved_shim(val); self } #[doc = "Change the `resourceURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`*"] pub fn resource_url(&mut self, val: &str) -> &mut Self { - self.resource_url_shim(val); + self.set_resource_url_shim(val); self } #[cfg(feature = "DecoderDoctorNotificationType")] @@ -90,7 +163,7 @@ impl DecoderDoctorNotification { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DecoderDoctorNotification`, `DecoderDoctorNotificationType`*"] pub fn type_(&mut self, val: DecoderDoctorNotificationType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DelayOptions.rs b/crates/web-sys/src/features/gen_DelayOptions.rs index 02afb9d4bf3..dceb6ea2ab1 100644 --- a/crates/web-sys/src/features/gen_DelayOptions.rs +++ b/crates/web-sys/src/features/gen_DelayOptions.rs @@ -10,18 +10,76 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] pub type DelayOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &DelayOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &DelayOptions, val: u32); + fn set_channel_count_shim(this: &DelayOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &DelayOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &DelayOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &DelayOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &DelayOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &DelayOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &DelayOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "delayTime")] + fn delay_time_shim(this: &DelayOptions) -> f64; #[wasm_bindgen(method, setter = "delayTime")] - fn delay_time_shim(this: &DelayOptions, val: f64); + fn set_delay_time_shim(this: &DelayOptions, val: f64); + #[wasm_bindgen(method, getter = "maxDelayTime")] + fn max_delay_time_shim(this: &DelayOptions) -> f64; #[wasm_bindgen(method, setter = "maxDelayTime")] - fn max_delay_time_shim(this: &DelayOptions, val: f64); + fn set_max_delay_time_shim(this: &DelayOptions, val: f64); +} +#[doc = "The trait to access properties on the `DelayOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] +pub trait DelayOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `delayTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + fn delay_time(&self) -> f64; + #[doc = "Get the `maxDelayTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] + fn max_delay_time(&self) -> f64; +} +impl DelayOptionsGetters for DelayOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn delay_time(&self) -> f64 { + self.delay_time_shim() + } + fn max_delay_time(&self) -> f64 { + self.max_delay_time_shim() + } } impl DelayOptions { #[doc = "Construct a new `DelayOptions`."] @@ -36,7 +94,7 @@ impl DelayOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -44,7 +102,7 @@ impl DelayOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DelayOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -52,21 +110,21 @@ impl DelayOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DelayOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `delayTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] pub fn delay_time(&mut self, val: f64) -> &mut Self { - self.delay_time_shim(val); + self.set_delay_time_shim(val); self } #[doc = "Change the `maxDelayTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DelayOptions`*"] pub fn max_delay_time(&mut self, val: f64) -> &mut Self { - self.max_delay_time_shim(val); + self.set_max_delay_time_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs b/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs index f94475e8d2e..084694cf61a 100644 --- a/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs +++ b/crates/web-sys/src/features/gen_DeviceAccelerationInit.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] pub type DeviceAccelerationInit; + #[wasm_bindgen(method, getter = "x")] + fn x_shim(this: &DeviceAccelerationInit) -> Option; #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &DeviceAccelerationInit, val: Option); + fn set_x_shim(this: &DeviceAccelerationInit, val: Option); + #[wasm_bindgen(method, getter = "y")] + fn y_shim(this: &DeviceAccelerationInit) -> Option; #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &DeviceAccelerationInit, val: Option); + fn set_y_shim(this: &DeviceAccelerationInit, val: Option); + #[wasm_bindgen(method, getter = "z")] + fn z_shim(this: &DeviceAccelerationInit) -> Option; #[wasm_bindgen(method, setter = "z")] - fn z_shim(this: &DeviceAccelerationInit, val: Option); + fn set_z_shim(this: &DeviceAccelerationInit, val: Option); +} +#[doc = "The trait to access properties on the `DeviceAccelerationInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] +pub trait DeviceAccelerationInitGetters { + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + fn x(&self) -> Option; + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + fn y(&self) -> Option; + #[doc = "Get the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] + fn z(&self) -> Option; +} +impl DeviceAccelerationInitGetters for DeviceAccelerationInit { + fn x(&self) -> Option { + self.x_shim() + } + fn y(&self) -> Option { + self.y_shim() + } + fn z(&self) -> Option { + self.z_shim() + } } impl DeviceAccelerationInit { #[doc = "Construct a new `DeviceAccelerationInit`."] @@ -30,21 +64,21 @@ impl DeviceAccelerationInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] pub fn x(&mut self, val: Option) -> &mut Self { - self.x_shim(val); + self.set_x_shim(val); self } #[doc = "Change the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] pub fn y(&mut self, val: Option) -> &mut Self { - self.y_shim(val); + self.set_y_shim(val); self } #[doc = "Change the `z` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`*"] pub fn z(&mut self, val: Option) -> &mut Self { - self.z_shim(val); + self.set_z_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceLightEventInit.rs b/crates/web-sys/src/features/gen_DeviceLightEventInit.rs index 61ab42345bb..cf442c7a461 100644 --- a/crates/web-sys/src/features/gen_DeviceLightEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceLightEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] pub type DeviceLightEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &DeviceLightEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DeviceLightEventInit, val: bool); + fn set_bubbles_shim(this: &DeviceLightEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &DeviceLightEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DeviceLightEventInit, val: bool); + fn set_cancelable_shim(this: &DeviceLightEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &DeviceLightEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DeviceLightEventInit, val: bool); + fn set_composed_shim(this: &DeviceLightEventInit, val: bool); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &DeviceLightEventInit) -> f64; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &DeviceLightEventInit, val: f64); + fn set_value_shim(this: &DeviceLightEventInit, val: f64); +} +#[doc = "The trait to access properties on the `DeviceLightEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] +pub trait DeviceLightEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] + fn value(&self) -> f64; +} +impl DeviceLightEventInitGetters for DeviceLightEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn value(&self) -> f64 { + self.value_shim() + } } impl DeviceLightEventInit { #[doc = "Construct a new `DeviceLightEventInit`."] @@ -32,28 +75,28 @@ impl DeviceLightEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceLightEventInit`*"] pub fn value(&mut self, val: f64) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs b/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs index 43ed16d21fe..eb67d4aa1ae 100644 --- a/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceMotionEventInit.rs @@ -10,26 +10,105 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] pub type DeviceMotionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &DeviceMotionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DeviceMotionEventInit, val: bool); + fn set_bubbles_shim(this: &DeviceMotionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &DeviceMotionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DeviceMotionEventInit, val: bool); + fn set_cancelable_shim(this: &DeviceMotionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &DeviceMotionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DeviceMotionEventInit, val: bool); + fn set_composed_shim(this: &DeviceMotionEventInit, val: bool); + #[cfg(feature = "DeviceAccelerationInit")] + #[wasm_bindgen(method, getter = "acceleration")] + fn acceleration_shim(this: &DeviceMotionEventInit) -> DeviceAccelerationInit; #[cfg(feature = "DeviceAccelerationInit")] #[wasm_bindgen(method, setter = "acceleration")] - fn acceleration_shim(this: &DeviceMotionEventInit, val: &DeviceAccelerationInit); + fn set_acceleration_shim(this: &DeviceMotionEventInit, val: &DeviceAccelerationInit); + #[cfg(feature = "DeviceAccelerationInit")] + #[wasm_bindgen(method, getter = "accelerationIncludingGravity")] + fn acceleration_including_gravity_shim(this: &DeviceMotionEventInit) -> DeviceAccelerationInit; #[cfg(feature = "DeviceAccelerationInit")] #[wasm_bindgen(method, setter = "accelerationIncludingGravity")] - fn acceleration_including_gravity_shim( + fn set_acceleration_including_gravity_shim( this: &DeviceMotionEventInit, val: &DeviceAccelerationInit, ); + #[wasm_bindgen(method, getter = "interval")] + fn interval_shim(this: &DeviceMotionEventInit) -> Option; #[wasm_bindgen(method, setter = "interval")] - fn interval_shim(this: &DeviceMotionEventInit, val: Option); + fn set_interval_shim(this: &DeviceMotionEventInit, val: Option); + #[cfg(feature = "DeviceRotationRateInit")] + #[wasm_bindgen(method, getter = "rotationRate")] + fn rotation_rate_shim(this: &DeviceMotionEventInit) -> DeviceRotationRateInit; #[cfg(feature = "DeviceRotationRateInit")] #[wasm_bindgen(method, setter = "rotationRate")] - fn rotation_rate_shim(this: &DeviceMotionEventInit, val: &DeviceRotationRateInit); + fn set_rotation_rate_shim(this: &DeviceMotionEventInit, val: &DeviceRotationRateInit); +} +#[doc = "The trait to access properties on the `DeviceMotionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] +pub trait DeviceMotionEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "DeviceAccelerationInit")] + #[doc = "Get the `acceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] + fn acceleration(&self) -> DeviceAccelerationInit; + #[cfg(feature = "DeviceAccelerationInit")] + #[doc = "Get the `accelerationIncludingGravity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] + fn acceleration_including_gravity(&self) -> DeviceAccelerationInit; + #[doc = "Get the `interval` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] + fn interval(&self) -> Option; + #[cfg(feature = "DeviceRotationRateInit")] + #[doc = "Get the `rotationRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`, `DeviceRotationRateInit`*"] + fn rotation_rate(&self) -> DeviceRotationRateInit; +} +impl DeviceMotionEventInitGetters for DeviceMotionEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "DeviceAccelerationInit")] + fn acceleration(&self) -> DeviceAccelerationInit { + self.acceleration_shim() + } + #[cfg(feature = "DeviceAccelerationInit")] + fn acceleration_including_gravity(&self) -> DeviceAccelerationInit { + self.acceleration_including_gravity_shim() + } + fn interval(&self) -> Option { + self.interval_shim() + } + #[cfg(feature = "DeviceRotationRateInit")] + fn rotation_rate(&self) -> DeviceRotationRateInit { + self.rotation_rate_shim() + } } impl DeviceMotionEventInit { #[doc = "Construct a new `DeviceMotionEventInit`."] @@ -44,21 +123,21 @@ impl DeviceMotionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "DeviceAccelerationInit")] @@ -66,7 +145,7 @@ impl DeviceMotionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] pub fn acceleration(&mut self, val: &DeviceAccelerationInit) -> &mut Self { - self.acceleration_shim(val); + self.set_acceleration_shim(val); self } #[cfg(feature = "DeviceAccelerationInit")] @@ -74,14 +153,14 @@ impl DeviceMotionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceAccelerationInit`, `DeviceMotionEventInit`*"] pub fn acceleration_including_gravity(&mut self, val: &DeviceAccelerationInit) -> &mut Self { - self.acceleration_including_gravity_shim(val); + self.set_acceleration_including_gravity_shim(val); self } #[doc = "Change the `interval` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`*"] pub fn interval(&mut self, val: Option) -> &mut Self { - self.interval_shim(val); + self.set_interval_shim(val); self } #[cfg(feature = "DeviceRotationRateInit")] @@ -89,7 +168,7 @@ impl DeviceMotionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceMotionEventInit`, `DeviceRotationRateInit`*"] pub fn rotation_rate(&mut self, val: &DeviceRotationRateInit) -> &mut Self { - self.rotation_rate_shim(val); + self.set_rotation_rate_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs b/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs index 0baef9e2c32..d5562245f72 100644 --- a/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceOrientationEventInit.rs @@ -10,20 +10,90 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] pub type DeviceOrientationEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &DeviceOrientationEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DeviceOrientationEventInit, val: bool); + fn set_bubbles_shim(this: &DeviceOrientationEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &DeviceOrientationEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DeviceOrientationEventInit, val: bool); + fn set_cancelable_shim(this: &DeviceOrientationEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &DeviceOrientationEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DeviceOrientationEventInit, val: bool); + fn set_composed_shim(this: &DeviceOrientationEventInit, val: bool); + #[wasm_bindgen(method, getter = "absolute")] + fn absolute_shim(this: &DeviceOrientationEventInit) -> bool; #[wasm_bindgen(method, setter = "absolute")] - fn absolute_shim(this: &DeviceOrientationEventInit, val: bool); + fn set_absolute_shim(this: &DeviceOrientationEventInit, val: bool); + #[wasm_bindgen(method, getter = "alpha")] + fn alpha_shim(this: &DeviceOrientationEventInit) -> Option; #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &DeviceOrientationEventInit, val: Option); + fn set_alpha_shim(this: &DeviceOrientationEventInit, val: Option); + #[wasm_bindgen(method, getter = "beta")] + fn beta_shim(this: &DeviceOrientationEventInit) -> Option; #[wasm_bindgen(method, setter = "beta")] - fn beta_shim(this: &DeviceOrientationEventInit, val: Option); + fn set_beta_shim(this: &DeviceOrientationEventInit, val: Option); + #[wasm_bindgen(method, getter = "gamma")] + fn gamma_shim(this: &DeviceOrientationEventInit) -> Option; #[wasm_bindgen(method, setter = "gamma")] - fn gamma_shim(this: &DeviceOrientationEventInit, val: Option); + fn set_gamma_shim(this: &DeviceOrientationEventInit, val: Option); +} +#[doc = "The trait to access properties on the `DeviceOrientationEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] +pub trait DeviceOrientationEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `absolute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + fn absolute(&self) -> bool; + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + fn alpha(&self) -> Option; + #[doc = "Get the `beta` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + fn beta(&self) -> Option; + #[doc = "Get the `gamma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] + fn gamma(&self) -> Option; +} +impl DeviceOrientationEventInitGetters for DeviceOrientationEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn absolute(&self) -> bool { + self.absolute_shim() + } + fn alpha(&self) -> Option { + self.alpha_shim() + } + fn beta(&self) -> Option { + self.beta_shim() + } + fn gamma(&self) -> Option { + self.gamma_shim() + } } impl DeviceOrientationEventInit { #[doc = "Construct a new `DeviceOrientationEventInit`."] @@ -38,49 +108,49 @@ impl DeviceOrientationEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `absolute` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] pub fn absolute(&mut self, val: bool) -> &mut Self { - self.absolute_shim(val); + self.set_absolute_shim(val); self } #[doc = "Change the `alpha` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] pub fn alpha(&mut self, val: Option) -> &mut Self { - self.alpha_shim(val); + self.set_alpha_shim(val); self } #[doc = "Change the `beta` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] pub fn beta(&mut self, val: Option) -> &mut Self { - self.beta_shim(val); + self.set_beta_shim(val); self } #[doc = "Change the `gamma` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceOrientationEventInit`*"] pub fn gamma(&mut self, val: Option) -> &mut Self { - self.gamma_shim(val); + self.set_gamma_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs b/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs index f93f58341f8..30151beb8d0 100644 --- a/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs +++ b/crates/web-sys/src/features/gen_DeviceProximityEventInit.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] pub type DeviceProximityEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &DeviceProximityEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DeviceProximityEventInit, val: bool); + fn set_bubbles_shim(this: &DeviceProximityEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &DeviceProximityEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DeviceProximityEventInit, val: bool); + fn set_cancelable_shim(this: &DeviceProximityEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &DeviceProximityEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DeviceProximityEventInit, val: bool); + fn set_composed_shim(this: &DeviceProximityEventInit, val: bool); + #[wasm_bindgen(method, getter = "max")] + fn max_shim(this: &DeviceProximityEventInit) -> f64; #[wasm_bindgen(method, setter = "max")] - fn max_shim(this: &DeviceProximityEventInit, val: f64); + fn set_max_shim(this: &DeviceProximityEventInit, val: f64); + #[wasm_bindgen(method, getter = "min")] + fn min_shim(this: &DeviceProximityEventInit) -> f64; #[wasm_bindgen(method, setter = "min")] - fn min_shim(this: &DeviceProximityEventInit, val: f64); + fn set_min_shim(this: &DeviceProximityEventInit, val: f64); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &DeviceProximityEventInit) -> f64; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &DeviceProximityEventInit, val: f64); + fn set_value_shim(this: &DeviceProximityEventInit, val: f64); +} +#[doc = "The trait to access properties on the `DeviceProximityEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] +pub trait DeviceProximityEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `max` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + fn max(&self) -> f64; + #[doc = "Get the `min` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + fn min(&self) -> f64; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] + fn value(&self) -> f64; +} +impl DeviceProximityEventInitGetters for DeviceProximityEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn max(&self) -> f64 { + self.max_shim() + } + fn min(&self) -> f64 { + self.min_shim() + } + fn value(&self) -> f64 { + self.value_shim() + } } impl DeviceProximityEventInit { #[doc = "Construct a new `DeviceProximityEventInit`."] @@ -36,42 +97,42 @@ impl DeviceProximityEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `max` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] pub fn max(&mut self, val: f64) -> &mut Self { - self.max_shim(val); + self.set_max_shim(val); self } #[doc = "Change the `min` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] pub fn min(&mut self, val: f64) -> &mut Self { - self.min_shim(val); + self.set_min_shim(val); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEventInit`*"] pub fn value(&mut self, val: f64) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs b/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs index 5f8cf0a712a..fa7211556ac 100644 --- a/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs +++ b/crates/web-sys/src/features/gen_DeviceRotationRateInit.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] pub type DeviceRotationRateInit; + #[wasm_bindgen(method, getter = "alpha")] + fn alpha_shim(this: &DeviceRotationRateInit) -> Option; #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &DeviceRotationRateInit, val: Option); + fn set_alpha_shim(this: &DeviceRotationRateInit, val: Option); + #[wasm_bindgen(method, getter = "beta")] + fn beta_shim(this: &DeviceRotationRateInit) -> Option; #[wasm_bindgen(method, setter = "beta")] - fn beta_shim(this: &DeviceRotationRateInit, val: Option); + fn set_beta_shim(this: &DeviceRotationRateInit, val: Option); + #[wasm_bindgen(method, getter = "gamma")] + fn gamma_shim(this: &DeviceRotationRateInit) -> Option; #[wasm_bindgen(method, setter = "gamma")] - fn gamma_shim(this: &DeviceRotationRateInit, val: Option); + fn set_gamma_shim(this: &DeviceRotationRateInit, val: Option); +} +#[doc = "The trait to access properties on the `DeviceRotationRateInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] +pub trait DeviceRotationRateInitGetters { + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + fn alpha(&self) -> Option; + #[doc = "Get the `beta` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + fn beta(&self) -> Option; + #[doc = "Get the `gamma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] + fn gamma(&self) -> Option; +} +impl DeviceRotationRateInitGetters for DeviceRotationRateInit { + fn alpha(&self) -> Option { + self.alpha_shim() + } + fn beta(&self) -> Option { + self.beta_shim() + } + fn gamma(&self) -> Option { + self.gamma_shim() + } } impl DeviceRotationRateInit { #[doc = "Construct a new `DeviceRotationRateInit`."] @@ -30,21 +64,21 @@ impl DeviceRotationRateInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] pub fn alpha(&mut self, val: Option) -> &mut Self { - self.alpha_shim(val); + self.set_alpha_shim(val); self } #[doc = "Change the `beta` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] pub fn beta(&mut self, val: Option) -> &mut Self { - self.beta_shim(val); + self.set_beta_shim(val); self } #[doc = "Change the `gamma` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DeviceRotationRateInit`*"] pub fn gamma(&mut self, val: Option) -> &mut Self { - self.gamma_shim(val); + self.set_gamma_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs b/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs index a72d6f55817..ac805faad02 100644 --- a/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs +++ b/crates/web-sys/src/features/gen_DhKeyDeriveParams.rs @@ -10,11 +10,39 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] pub type DhKeyDeriveParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &DhKeyDeriveParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &DhKeyDeriveParams, val: &str); + fn set_name_shim(this: &DhKeyDeriveParams, val: &str); + #[cfg(feature = "CryptoKey")] + #[wasm_bindgen(method, getter = "public")] + fn public_shim(this: &DhKeyDeriveParams) -> CryptoKey; #[cfg(feature = "CryptoKey")] #[wasm_bindgen(method, setter = "public")] - fn public_shim(this: &DhKeyDeriveParams, val: &CryptoKey); + fn set_public_shim(this: &DhKeyDeriveParams, val: &CryptoKey); +} +#[doc = "The trait to access properties on the `DhKeyDeriveParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] +pub trait DhKeyDeriveParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] + fn name(&self) -> String; + #[cfg(feature = "CryptoKey")] + #[doc = "Get the `public` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `DhKeyDeriveParams`*"] + fn public(&self) -> CryptoKey; +} +impl DhKeyDeriveParamsGetters for DhKeyDeriveParams { + fn name(&self) -> String { + self.name_shim() + } + #[cfg(feature = "CryptoKey")] + fn public(&self) -> CryptoKey { + self.public_shim() + } } impl DhKeyDeriveParams { #[cfg(feature = "CryptoKey")] @@ -24,15 +52,15 @@ impl DhKeyDeriveParams { pub fn new(name: &str, public: &CryptoKey) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.public(public); + Self::name(&mut ret, name); + Self::public(&mut ret, public); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DhKeyDeriveParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(feature = "CryptoKey")] @@ -40,7 +68,7 @@ impl DhKeyDeriveParams { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `DhKeyDeriveParams`*"] pub fn public(&mut self, val: &CryptoKey) -> &mut Self { - self.public_shim(val); + self.set_public_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs b/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs index 5abcb4cedb6..047b90a33b2 100644 --- a/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs +++ b/crates/web-sys/src/features/gen_DirectoryPickerOptions.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type DirectoryPickerOptions; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &DirectoryPickerOptions) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &DirectoryPickerOptions, val: &str); + fn set_id_shim(this: &DirectoryPickerOptions, val: &str); + #[cfg(feature = "FileSystemPermissionMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &DirectoryPickerOptions) -> FileSystemPermissionMode; #[cfg(feature = "FileSystemPermissionMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &DirectoryPickerOptions, val: FileSystemPermissionMode); + fn set_mode_shim(this: &DirectoryPickerOptions, val: FileSystemPermissionMode); + #[wasm_bindgen(method, getter = "startIn")] + fn start_in_shim(this: &DirectoryPickerOptions) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "startIn")] - fn start_in_shim(this: &DirectoryPickerOptions, val: &::wasm_bindgen::JsValue); + fn set_start_in_shim(this: &DirectoryPickerOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `DirectoryPickerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] +pub trait DirectoryPickerOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn id(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mode(&self) -> FileSystemPermissionMode; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DirectoryPickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn start_in(&self) -> ::wasm_bindgen::JsValue; +} +#[cfg(web_sys_unstable_apis)] +impl DirectoryPickerOptionsGetters for DirectoryPickerOptions { + #[cfg(web_sys_unstable_apis)] + fn id(&self) -> String { + self.id_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemPermissionMode")] + fn mode(&self) -> FileSystemPermissionMode { + self.mode_shim() + } + #[cfg(web_sys_unstable_apis)] + fn start_in(&self) -> ::wasm_bindgen::JsValue { + self.start_in_shim() + } } #[cfg(web_sys_unstable_apis)] impl DirectoryPickerOptions { @@ -43,7 +97,7 @@ impl DirectoryPickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +109,7 @@ impl DirectoryPickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +120,7 @@ impl DirectoryPickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.start_in_shim(val); + self.set_start_in_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs b/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs index 993d493b46d..bbd19024e26 100644 --- a/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs +++ b/crates/web-sys/src/features/gen_DisplayMediaStreamConstraints.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] pub type DisplayMediaStreamConstraints; + #[wasm_bindgen(method, getter = "audio")] + fn audio_shim(this: &DisplayMediaStreamConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); + fn set_audio_shim(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "video")] + fn video_shim(this: &DisplayMediaStreamConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); + fn set_video_shim(this: &DisplayMediaStreamConstraints, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `DisplayMediaStreamConstraints` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] +pub trait DisplayMediaStreamConstraintsGetters { + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] + fn audio(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] + fn video(&self) -> ::wasm_bindgen::JsValue; +} +impl DisplayMediaStreamConstraintsGetters for DisplayMediaStreamConstraints { + fn audio(&self) -> ::wasm_bindgen::JsValue { + self.audio_shim() + } + fn video(&self) -> ::wasm_bindgen::JsValue { + self.video_shim() + } } impl DisplayMediaStreamConstraints { #[doc = "Construct a new `DisplayMediaStreamConstraints`."] @@ -28,14 +53,14 @@ impl DisplayMediaStreamConstraints { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] pub fn audio(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.audio_shim(val); + self.set_audio_shim(val); self } #[doc = "Change the `video` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayMediaStreamConstraints`*"] pub fn video(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.video_shim(val); + self.set_video_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DisplayNameOptions.rs b/crates/web-sys/src/features/gen_DisplayNameOptions.rs index bddb9923a34..15d83219536 100644 --- a/crates/web-sys/src/features/gen_DisplayNameOptions.rs +++ b/crates/web-sys/src/features/gen_DisplayNameOptions.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] pub type DisplayNameOptions; + #[wasm_bindgen(method, getter = "keys")] + fn keys_shim(this: &DisplayNameOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "keys")] - fn keys_shim(this: &DisplayNameOptions, val: &::wasm_bindgen::JsValue); + fn set_keys_shim(this: &DisplayNameOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "style")] + fn style_shim(this: &DisplayNameOptions) -> String; #[wasm_bindgen(method, setter = "style")] - fn style_shim(this: &DisplayNameOptions, val: &str); + fn set_style_shim(this: &DisplayNameOptions, val: &str); +} +#[doc = "The trait to access properties on the `DisplayNameOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] +pub trait DisplayNameOptionsGetters { + #[doc = "Get the `keys` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] + fn keys(&self) -> ::js_sys::Array; + #[doc = "Get the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] + fn style(&self) -> String; +} +impl DisplayNameOptionsGetters for DisplayNameOptions { + fn keys(&self) -> ::js_sys::Array { + self.keys_shim() + } + fn style(&self) -> String { + self.style_shim() + } } impl DisplayNameOptions { #[doc = "Construct a new `DisplayNameOptions`."] @@ -28,14 +53,14 @@ impl DisplayNameOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] pub fn keys(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.keys_shim(val); + self.set_keys_shim(val); self } #[doc = "Change the `style` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameOptions`*"] pub fn style(&mut self, val: &str) -> &mut Self { - self.style_shim(val); + self.set_style_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DisplayNameResult.rs b/crates/web-sys/src/features/gen_DisplayNameResult.rs index fcee8ccffb2..ff6cedf4fd8 100644 --- a/crates/web-sys/src/features/gen_DisplayNameResult.rs +++ b/crates/web-sys/src/features/gen_DisplayNameResult.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] pub type DisplayNameResult; + #[wasm_bindgen(method, getter = "locale")] + fn locale_shim(this: &DisplayNameResult) -> String; #[wasm_bindgen(method, setter = "locale")] - fn locale_shim(this: &DisplayNameResult, val: &str); + fn set_locale_shim(this: &DisplayNameResult, val: &str); + #[wasm_bindgen(method, getter = "style")] + fn style_shim(this: &DisplayNameResult) -> String; #[wasm_bindgen(method, setter = "style")] - fn style_shim(this: &DisplayNameResult, val: &str); + fn set_style_shim(this: &DisplayNameResult, val: &str); +} +#[doc = "The trait to access properties on the `DisplayNameResult` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] +pub trait DisplayNameResultGetters { + #[doc = "Get the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] + fn locale(&self) -> String; + #[doc = "Get the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] + fn style(&self) -> String; +} +impl DisplayNameResultGetters for DisplayNameResult { + fn locale(&self) -> String { + self.locale_shim() + } + fn style(&self) -> String { + self.style_shim() + } } impl DisplayNameResult { #[doc = "Construct a new `DisplayNameResult`."] @@ -28,14 +53,14 @@ impl DisplayNameResult { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] pub fn locale(&mut self, val: &str) -> &mut Self { - self.locale_shim(val); + self.set_locale_shim(val); self } #[doc = "Change the `style` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DisplayNameResult`*"] pub fn style(&mut self, val: &str) -> &mut Self { - self.style_shim(val); + self.set_style_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DnsCacheDict.rs b/crates/web-sys/src/features/gen_DnsCacheDict.rs index e16b2c6b833..71691f51e12 100644 --- a/crates/web-sys/src/features/gen_DnsCacheDict.rs +++ b/crates/web-sys/src/features/gen_DnsCacheDict.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] pub type DnsCacheDict; + #[wasm_bindgen(method, getter = "entries")] + fn entries_shim(this: &DnsCacheDict) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "entries")] - fn entries_shim(this: &DnsCacheDict, val: &::wasm_bindgen::JsValue); + fn set_entries_shim(this: &DnsCacheDict, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `DnsCacheDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] +pub trait DnsCacheDictGetters { + #[doc = "Get the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] + fn entries(&self) -> ::js_sys::Array; +} +impl DnsCacheDictGetters for DnsCacheDict { + fn entries(&self) -> ::js_sys::Array { + self.entries_shim() + } } impl DnsCacheDict { #[doc = "Construct a new `DnsCacheDict`."] @@ -26,7 +42,7 @@ impl DnsCacheDict { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheDict`*"] pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.entries_shim(val); + self.set_entries_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DnsCacheEntry.rs b/crates/web-sys/src/features/gen_DnsCacheEntry.rs index ad86c2a5b0e..8ea6d6e591e 100644 --- a/crates/web-sys/src/features/gen_DnsCacheEntry.rs +++ b/crates/web-sys/src/features/gen_DnsCacheEntry.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] pub type DnsCacheEntry; + #[wasm_bindgen(method, getter = "expiration")] + fn expiration_shim(this: &DnsCacheEntry) -> f64; #[wasm_bindgen(method, setter = "expiration")] - fn expiration_shim(this: &DnsCacheEntry, val: f64); + fn set_expiration_shim(this: &DnsCacheEntry, val: f64); + #[wasm_bindgen(method, getter = "family")] + fn family_shim(this: &DnsCacheEntry) -> String; #[wasm_bindgen(method, setter = "family")] - fn family_shim(this: &DnsCacheEntry, val: &str); + fn set_family_shim(this: &DnsCacheEntry, val: &str); + #[wasm_bindgen(method, getter = "hostaddr")] + fn hostaddr_shim(this: &DnsCacheEntry) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "hostaddr")] - fn hostaddr_shim(this: &DnsCacheEntry, val: &::wasm_bindgen::JsValue); + fn set_hostaddr_shim(this: &DnsCacheEntry, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "hostname")] + fn hostname_shim(this: &DnsCacheEntry) -> String; #[wasm_bindgen(method, setter = "hostname")] - fn hostname_shim(this: &DnsCacheEntry, val: &str); + fn set_hostname_shim(this: &DnsCacheEntry, val: &str); + #[wasm_bindgen(method, getter = "trr")] + fn trr_shim(this: &DnsCacheEntry) -> bool; #[wasm_bindgen(method, setter = "trr")] - fn trr_shim(this: &DnsCacheEntry, val: bool); + fn set_trr_shim(this: &DnsCacheEntry, val: bool); +} +#[doc = "The trait to access properties on the `DnsCacheEntry` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] +pub trait DnsCacheEntryGetters { + #[doc = "Get the `expiration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + fn expiration(&self) -> f64; + #[doc = "Get the `family` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + fn family(&self) -> String; + #[doc = "Get the `hostaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + fn hostaddr(&self) -> ::js_sys::Array; + #[doc = "Get the `hostname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + fn hostname(&self) -> String; + #[doc = "Get the `trr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] + fn trr(&self) -> bool; +} +impl DnsCacheEntryGetters for DnsCacheEntry { + fn expiration(&self) -> f64 { + self.expiration_shim() + } + fn family(&self) -> String { + self.family_shim() + } + fn hostaddr(&self) -> ::js_sys::Array { + self.hostaddr_shim() + } + fn hostname(&self) -> String { + self.hostname_shim() + } + fn trr(&self) -> bool { + self.trr_shim() + } } impl DnsCacheEntry { #[doc = "Construct a new `DnsCacheEntry`."] @@ -34,35 +86,35 @@ impl DnsCacheEntry { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] pub fn expiration(&mut self, val: f64) -> &mut Self { - self.expiration_shim(val); + self.set_expiration_shim(val); self } #[doc = "Change the `family` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] pub fn family(&mut self, val: &str) -> &mut Self { - self.family_shim(val); + self.set_family_shim(val); self } #[doc = "Change the `hostaddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] pub fn hostaddr(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hostaddr_shim(val); + self.set_hostaddr_shim(val); self } #[doc = "Change the `hostname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] pub fn hostname(&mut self, val: &str) -> &mut Self { - self.hostname_shim(val); + self.set_hostname_shim(val); self } #[doc = "Change the `trr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsCacheEntry`*"] pub fn trr(&mut self, val: bool) -> &mut Self { - self.trr_shim(val); + self.set_trr_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DnsLookupDict.rs b/crates/web-sys/src/features/gen_DnsLookupDict.rs index 22e646160e8..d41ca6ef820 100644 --- a/crates/web-sys/src/features/gen_DnsLookupDict.rs +++ b/crates/web-sys/src/features/gen_DnsLookupDict.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] pub type DnsLookupDict; + #[wasm_bindgen(method, getter = "address")] + fn address_shim(this: &DnsLookupDict) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "address")] - fn address_shim(this: &DnsLookupDict, val: &::wasm_bindgen::JsValue); + fn set_address_shim(this: &DnsLookupDict, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "answer")] + fn answer_shim(this: &DnsLookupDict) -> bool; #[wasm_bindgen(method, setter = "answer")] - fn answer_shim(this: &DnsLookupDict, val: bool); + fn set_answer_shim(this: &DnsLookupDict, val: bool); + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &DnsLookupDict) -> String; #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &DnsLookupDict, val: &str); + fn set_error_shim(this: &DnsLookupDict, val: &str); +} +#[doc = "The trait to access properties on the `DnsLookupDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] +pub trait DnsLookupDictGetters { + #[doc = "Get the `address` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + fn address(&self) -> ::js_sys::Array; + #[doc = "Get the `answer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + fn answer(&self) -> bool; + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] + fn error(&self) -> String; +} +impl DnsLookupDictGetters for DnsLookupDict { + fn address(&self) -> ::js_sys::Array { + self.address_shim() + } + fn answer(&self) -> bool { + self.answer_shim() + } + fn error(&self) -> String { + self.error_shim() + } } impl DnsLookupDict { #[doc = "Construct a new `DnsLookupDict`."] @@ -30,21 +64,21 @@ impl DnsLookupDict { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] pub fn address(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.address_shim(val); + self.set_address_shim(val); self } #[doc = "Change the `answer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] pub fn answer(&mut self, val: bool) -> &mut Self { - self.answer_shim(val); + self.set_answer_shim(val); self } #[doc = "Change the `error` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DnsLookupDict`*"] pub fn error(&mut self, val: &str) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs b/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs index 5cbf8c1a181..c2f6f2ac3a3 100644 --- a/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs +++ b/crates/web-sys/src/features/gen_DocumentTimelineOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] pub type DocumentTimelineOptions; + #[wasm_bindgen(method, getter = "originTime")] + fn origin_time_shim(this: &DocumentTimelineOptions) -> f64; #[wasm_bindgen(method, setter = "originTime")] - fn origin_time_shim(this: &DocumentTimelineOptions, val: f64); + fn set_origin_time_shim(this: &DocumentTimelineOptions, val: f64); +} +#[doc = "The trait to access properties on the `DocumentTimelineOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] +pub trait DocumentTimelineOptionsGetters { + #[doc = "Get the `originTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] + fn origin_time(&self) -> f64; +} +impl DocumentTimelineOptionsGetters for DocumentTimelineOptions { + fn origin_time(&self) -> f64 { + self.origin_time_shim() + } } impl DocumentTimelineOptions { #[doc = "Construct a new `DocumentTimelineOptions`."] @@ -26,7 +42,7 @@ impl DocumentTimelineOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DocumentTimelineOptions`*"] pub fn origin_time(&mut self, val: f64) -> &mut Self { - self.origin_time_shim(val); + self.set_origin_time_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DomMatrix2dInit.rs b/crates/web-sys/src/features/gen_DomMatrix2dInit.rs index d93e11a0eb9..4b455c23847 100644 --- a/crates/web-sys/src/features/gen_DomMatrix2dInit.rs +++ b/crates/web-sys/src/features/gen_DomMatrix2dInit.rs @@ -10,30 +10,145 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub type DomMatrix2dInit; + #[wasm_bindgen(method, getter = "a")] + fn a_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "a")] - fn a_shim(this: &DomMatrix2dInit, val: f64); + fn set_a_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "b")] + fn b_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "b")] - fn b_shim(this: &DomMatrix2dInit, val: f64); + fn set_b_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "c")] + fn c_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "c")] - fn c_shim(this: &DomMatrix2dInit, val: f64); + fn set_c_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "d")] + fn d_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "d")] - fn d_shim(this: &DomMatrix2dInit, val: f64); + fn set_d_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "e")] + fn e_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "e")] - fn e_shim(this: &DomMatrix2dInit, val: f64); + fn set_e_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "f")] + fn f_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "f")] - fn f_shim(this: &DomMatrix2dInit, val: f64); + fn set_f_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "m11")] + fn m11_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "m11")] - fn m11_shim(this: &DomMatrix2dInit, val: f64); + fn set_m11_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "m12")] + fn m12_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "m12")] - fn m12_shim(this: &DomMatrix2dInit, val: f64); + fn set_m12_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "m21")] + fn m21_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "m21")] - fn m21_shim(this: &DomMatrix2dInit, val: f64); + fn set_m21_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "m22")] + fn m22_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "m22")] - fn m22_shim(this: &DomMatrix2dInit, val: f64); + fn set_m22_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "m41")] + fn m41_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "m41")] - fn m41_shim(this: &DomMatrix2dInit, val: f64); + fn set_m41_shim(this: &DomMatrix2dInit, val: f64); + #[wasm_bindgen(method, getter = "m42")] + fn m42_shim(this: &DomMatrix2dInit) -> f64; #[wasm_bindgen(method, setter = "m42")] - fn m42_shim(this: &DomMatrix2dInit, val: f64); + fn set_m42_shim(this: &DomMatrix2dInit, val: f64); +} +#[doc = "The trait to access properties on the `DomMatrix2dInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] +pub trait DomMatrix2dInitGetters { + #[doc = "Get the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn a(&self) -> f64; + #[doc = "Get the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn b(&self) -> f64; + #[doc = "Get the `c` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn c(&self) -> f64; + #[doc = "Get the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn d(&self) -> f64; + #[doc = "Get the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn e(&self) -> f64; + #[doc = "Get the `f` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn f(&self) -> f64; + #[doc = "Get the `m11` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn m11(&self) -> f64; + #[doc = "Get the `m12` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn m12(&self) -> f64; + #[doc = "Get the `m21` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn m21(&self) -> f64; + #[doc = "Get the `m22` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn m22(&self) -> f64; + #[doc = "Get the `m41` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn m41(&self) -> f64; + #[doc = "Get the `m42` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] + fn m42(&self) -> f64; +} +impl DomMatrix2dInitGetters for DomMatrix2dInit { + fn a(&self) -> f64 { + self.a_shim() + } + fn b(&self) -> f64 { + self.b_shim() + } + fn c(&self) -> f64 { + self.c_shim() + } + fn d(&self) -> f64 { + self.d_shim() + } + fn e(&self) -> f64 { + self.e_shim() + } + fn f(&self) -> f64 { + self.f_shim() + } + fn m11(&self) -> f64 { + self.m11_shim() + } + fn m12(&self) -> f64 { + self.m12_shim() + } + fn m21(&self) -> f64 { + self.m21_shim() + } + fn m22(&self) -> f64 { + self.m22_shim() + } + fn m41(&self) -> f64 { + self.m41_shim() + } + fn m42(&self) -> f64 { + self.m42_shim() + } } impl DomMatrix2dInit { #[doc = "Construct a new `DomMatrix2dInit`."] @@ -48,84 +163,84 @@ impl DomMatrix2dInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn a(&mut self, val: f64) -> &mut Self { - self.a_shim(val); + self.set_a_shim(val); self } #[doc = "Change the `b` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn b(&mut self, val: f64) -> &mut Self { - self.b_shim(val); + self.set_b_shim(val); self } #[doc = "Change the `c` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn c(&mut self, val: f64) -> &mut Self { - self.c_shim(val); + self.set_c_shim(val); self } #[doc = "Change the `d` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn d(&mut self, val: f64) -> &mut Self { - self.d_shim(val); + self.set_d_shim(val); self } #[doc = "Change the `e` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn e(&mut self, val: f64) -> &mut Self { - self.e_shim(val); + self.set_e_shim(val); self } #[doc = "Change the `f` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn f(&mut self, val: f64) -> &mut Self { - self.f_shim(val); + self.set_f_shim(val); self } #[doc = "Change the `m11` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn m11(&mut self, val: f64) -> &mut Self { - self.m11_shim(val); + self.set_m11_shim(val); self } #[doc = "Change the `m12` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn m12(&mut self, val: f64) -> &mut Self { - self.m12_shim(val); + self.set_m12_shim(val); self } #[doc = "Change the `m21` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn m21(&mut self, val: f64) -> &mut Self { - self.m21_shim(val); + self.set_m21_shim(val); self } #[doc = "Change the `m22` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn m22(&mut self, val: f64) -> &mut Self { - self.m22_shim(val); + self.set_m22_shim(val); self } #[doc = "Change the `m41` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn m41(&mut self, val: f64) -> &mut Self { - self.m41_shim(val); + self.set_m41_shim(val); self } #[doc = "Change the `m42` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`*"] pub fn m42(&mut self, val: f64) -> &mut Self { - self.m42_shim(val); + self.set_m42_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DomMatrixInit.rs b/crates/web-sys/src/features/gen_DomMatrixInit.rs index f1dbe993864..e45f2f322e6 100644 --- a/crates/web-sys/src/features/gen_DomMatrixInit.rs +++ b/crates/web-sys/src/features/gen_DomMatrixInit.rs @@ -10,52 +10,266 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub type DomMatrixInit; + #[wasm_bindgen(method, getter = "a")] + fn a_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "a")] - fn a_shim(this: &DomMatrixInit, val: f64); + fn set_a_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "b")] + fn b_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "b")] - fn b_shim(this: &DomMatrixInit, val: f64); + fn set_b_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "c")] + fn c_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "c")] - fn c_shim(this: &DomMatrixInit, val: f64); + fn set_c_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "d")] + fn d_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "d")] - fn d_shim(this: &DomMatrixInit, val: f64); + fn set_d_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "e")] + fn e_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "e")] - fn e_shim(this: &DomMatrixInit, val: f64); + fn set_e_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "f")] + fn f_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "f")] - fn f_shim(this: &DomMatrixInit, val: f64); + fn set_f_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m11")] + fn m11_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m11")] - fn m11_shim(this: &DomMatrixInit, val: f64); + fn set_m11_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m12")] + fn m12_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m12")] - fn m12_shim(this: &DomMatrixInit, val: f64); + fn set_m12_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m21")] + fn m21_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m21")] - fn m21_shim(this: &DomMatrixInit, val: f64); + fn set_m21_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m22")] + fn m22_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m22")] - fn m22_shim(this: &DomMatrixInit, val: f64); + fn set_m22_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m41")] + fn m41_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m41")] - fn m41_shim(this: &DomMatrixInit, val: f64); + fn set_m41_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m42")] + fn m42_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m42")] - fn m42_shim(this: &DomMatrixInit, val: f64); + fn set_m42_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "is2D")] + fn is_2d_shim(this: &DomMatrixInit) -> bool; #[wasm_bindgen(method, setter = "is2D")] - fn is_2d_shim(this: &DomMatrixInit, val: bool); + fn set_is_2d_shim(this: &DomMatrixInit, val: bool); + #[wasm_bindgen(method, getter = "m13")] + fn m13_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m13")] - fn m13_shim(this: &DomMatrixInit, val: f64); + fn set_m13_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m14")] + fn m14_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m14")] - fn m14_shim(this: &DomMatrixInit, val: f64); + fn set_m14_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m23")] + fn m23_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m23")] - fn m23_shim(this: &DomMatrixInit, val: f64); + fn set_m23_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m24")] + fn m24_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m24")] - fn m24_shim(this: &DomMatrixInit, val: f64); + fn set_m24_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m31")] + fn m31_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m31")] - fn m31_shim(this: &DomMatrixInit, val: f64); + fn set_m31_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m32")] + fn m32_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m32")] - fn m32_shim(this: &DomMatrixInit, val: f64); + fn set_m32_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m33")] + fn m33_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m33")] - fn m33_shim(this: &DomMatrixInit, val: f64); + fn set_m33_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m34")] + fn m34_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m34")] - fn m34_shim(this: &DomMatrixInit, val: f64); + fn set_m34_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m43")] + fn m43_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m43")] - fn m43_shim(this: &DomMatrixInit, val: f64); + fn set_m43_shim(this: &DomMatrixInit, val: f64); + #[wasm_bindgen(method, getter = "m44")] + fn m44_shim(this: &DomMatrixInit) -> f64; #[wasm_bindgen(method, setter = "m44")] - fn m44_shim(this: &DomMatrixInit, val: f64); + fn set_m44_shim(this: &DomMatrixInit, val: f64); +} +#[doc = "The trait to access properties on the `DomMatrixInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] +pub trait DomMatrixInitGetters { + #[doc = "Get the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn a(&self) -> f64; + #[doc = "Get the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn b(&self) -> f64; + #[doc = "Get the `c` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn c(&self) -> f64; + #[doc = "Get the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn d(&self) -> f64; + #[doc = "Get the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn e(&self) -> f64; + #[doc = "Get the `f` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn f(&self) -> f64; + #[doc = "Get the `m11` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m11(&self) -> f64; + #[doc = "Get the `m12` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m12(&self) -> f64; + #[doc = "Get the `m21` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m21(&self) -> f64; + #[doc = "Get the `m22` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m22(&self) -> f64; + #[doc = "Get the `m41` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m41(&self) -> f64; + #[doc = "Get the `m42` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m42(&self) -> f64; + #[doc = "Get the `is2D` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn is_2d(&self) -> bool; + #[doc = "Get the `m13` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m13(&self) -> f64; + #[doc = "Get the `m14` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m14(&self) -> f64; + #[doc = "Get the `m23` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m23(&self) -> f64; + #[doc = "Get the `m24` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m24(&self) -> f64; + #[doc = "Get the `m31` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m31(&self) -> f64; + #[doc = "Get the `m32` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m32(&self) -> f64; + #[doc = "Get the `m33` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m33(&self) -> f64; + #[doc = "Get the `m34` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m34(&self) -> f64; + #[doc = "Get the `m43` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m43(&self) -> f64; + #[doc = "Get the `m44` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] + fn m44(&self) -> f64; +} +impl DomMatrixInitGetters for DomMatrixInit { + fn a(&self) -> f64 { + self.a_shim() + } + fn b(&self) -> f64 { + self.b_shim() + } + fn c(&self) -> f64 { + self.c_shim() + } + fn d(&self) -> f64 { + self.d_shim() + } + fn e(&self) -> f64 { + self.e_shim() + } + fn f(&self) -> f64 { + self.f_shim() + } + fn m11(&self) -> f64 { + self.m11_shim() + } + fn m12(&self) -> f64 { + self.m12_shim() + } + fn m21(&self) -> f64 { + self.m21_shim() + } + fn m22(&self) -> f64 { + self.m22_shim() + } + fn m41(&self) -> f64 { + self.m41_shim() + } + fn m42(&self) -> f64 { + self.m42_shim() + } + fn is_2d(&self) -> bool { + self.is_2d_shim() + } + fn m13(&self) -> f64 { + self.m13_shim() + } + fn m14(&self) -> f64 { + self.m14_shim() + } + fn m23(&self) -> f64 { + self.m23_shim() + } + fn m24(&self) -> f64 { + self.m24_shim() + } + fn m31(&self) -> f64 { + self.m31_shim() + } + fn m32(&self) -> f64 { + self.m32_shim() + } + fn m33(&self) -> f64 { + self.m33_shim() + } + fn m34(&self) -> f64 { + self.m34_shim() + } + fn m43(&self) -> f64 { + self.m43_shim() + } + fn m44(&self) -> f64 { + self.m44_shim() + } } impl DomMatrixInit { #[doc = "Construct a new `DomMatrixInit`."] @@ -70,161 +284,161 @@ impl DomMatrixInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn a(&mut self, val: f64) -> &mut Self { - self.a_shim(val); + self.set_a_shim(val); self } #[doc = "Change the `b` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn b(&mut self, val: f64) -> &mut Self { - self.b_shim(val); + self.set_b_shim(val); self } #[doc = "Change the `c` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn c(&mut self, val: f64) -> &mut Self { - self.c_shim(val); + self.set_c_shim(val); self } #[doc = "Change the `d` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn d(&mut self, val: f64) -> &mut Self { - self.d_shim(val); + self.set_d_shim(val); self } #[doc = "Change the `e` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn e(&mut self, val: f64) -> &mut Self { - self.e_shim(val); + self.set_e_shim(val); self } #[doc = "Change the `f` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn f(&mut self, val: f64) -> &mut Self { - self.f_shim(val); + self.set_f_shim(val); self } #[doc = "Change the `m11` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m11(&mut self, val: f64) -> &mut Self { - self.m11_shim(val); + self.set_m11_shim(val); self } #[doc = "Change the `m12` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m12(&mut self, val: f64) -> &mut Self { - self.m12_shim(val); + self.set_m12_shim(val); self } #[doc = "Change the `m21` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m21(&mut self, val: f64) -> &mut Self { - self.m21_shim(val); + self.set_m21_shim(val); self } #[doc = "Change the `m22` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m22(&mut self, val: f64) -> &mut Self { - self.m22_shim(val); + self.set_m22_shim(val); self } #[doc = "Change the `m41` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m41(&mut self, val: f64) -> &mut Self { - self.m41_shim(val); + self.set_m41_shim(val); self } #[doc = "Change the `m42` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m42(&mut self, val: f64) -> &mut Self { - self.m42_shim(val); + self.set_m42_shim(val); self } #[doc = "Change the `is2D` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn is_2d(&mut self, val: bool) -> &mut Self { - self.is_2d_shim(val); + self.set_is_2d_shim(val); self } #[doc = "Change the `m13` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m13(&mut self, val: f64) -> &mut Self { - self.m13_shim(val); + self.set_m13_shim(val); self } #[doc = "Change the `m14` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m14(&mut self, val: f64) -> &mut Self { - self.m14_shim(val); + self.set_m14_shim(val); self } #[doc = "Change the `m23` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m23(&mut self, val: f64) -> &mut Self { - self.m23_shim(val); + self.set_m23_shim(val); self } #[doc = "Change the `m24` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m24(&mut self, val: f64) -> &mut Self { - self.m24_shim(val); + self.set_m24_shim(val); self } #[doc = "Change the `m31` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m31(&mut self, val: f64) -> &mut Self { - self.m31_shim(val); + self.set_m31_shim(val); self } #[doc = "Change the `m32` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m32(&mut self, val: f64) -> &mut Self { - self.m32_shim(val); + self.set_m32_shim(val); self } #[doc = "Change the `m33` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m33(&mut self, val: f64) -> &mut Self { - self.m33_shim(val); + self.set_m33_shim(val); self } #[doc = "Change the `m34` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m34(&mut self, val: f64) -> &mut Self { - self.m34_shim(val); + self.set_m34_shim(val); self } #[doc = "Change the `m43` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m43(&mut self, val: f64) -> &mut Self { - self.m43_shim(val); + self.set_m43_shim(val); self } #[doc = "Change the `m44` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomMatrixInit`*"] pub fn m44(&mut self, val: f64) -> &mut Self { - self.m44_shim(val); + self.set_m44_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DomPointInit.rs b/crates/web-sys/src/features/gen_DomPointInit.rs index 37f3064eb47..d8f1637f44a 100644 --- a/crates/web-sys/src/features/gen_DomPointInit.rs +++ b/crates/web-sys/src/features/gen_DomPointInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] pub type DomPointInit; + #[wasm_bindgen(method, getter = "w")] + fn w_shim(this: &DomPointInit) -> f64; #[wasm_bindgen(method, setter = "w")] - fn w_shim(this: &DomPointInit, val: f64); + fn set_w_shim(this: &DomPointInit, val: f64); + #[wasm_bindgen(method, getter = "x")] + fn x_shim(this: &DomPointInit) -> f64; #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &DomPointInit, val: f64); + fn set_x_shim(this: &DomPointInit, val: f64); + #[wasm_bindgen(method, getter = "y")] + fn y_shim(this: &DomPointInit) -> f64; #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &DomPointInit, val: f64); + fn set_y_shim(this: &DomPointInit, val: f64); + #[wasm_bindgen(method, getter = "z")] + fn z_shim(this: &DomPointInit) -> f64; #[wasm_bindgen(method, setter = "z")] - fn z_shim(this: &DomPointInit, val: f64); + fn set_z_shim(this: &DomPointInit, val: f64); +} +#[doc = "The trait to access properties on the `DomPointInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] +pub trait DomPointInitGetters { + #[doc = "Get the `w` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + fn w(&self) -> f64; + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + fn x(&self) -> f64; + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + fn y(&self) -> f64; + #[doc = "Get the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] + fn z(&self) -> f64; +} +impl DomPointInitGetters for DomPointInit { + fn w(&self) -> f64 { + self.w_shim() + } + fn x(&self) -> f64 { + self.x_shim() + } + fn y(&self) -> f64 { + self.y_shim() + } + fn z(&self) -> f64 { + self.z_shim() + } } impl DomPointInit { #[doc = "Construct a new `DomPointInit`."] @@ -32,28 +75,28 @@ impl DomPointInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] pub fn w(&mut self, val: f64) -> &mut Self { - self.w_shim(val); + self.set_w_shim(val); self } #[doc = "Change the `x` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] pub fn x(&mut self, val: f64) -> &mut Self { - self.x_shim(val); + self.set_x_shim(val); self } #[doc = "Change the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] pub fn y(&mut self, val: f64) -> &mut Self { - self.y_shim(val); + self.set_y_shim(val); self } #[doc = "Change the `z` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`*"] pub fn z(&mut self, val: f64) -> &mut Self { - self.z_shim(val); + self.set_z_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DomQuadInit.rs b/crates/web-sys/src/features/gen_DomQuadInit.rs index b9af8996627..26ae1f5d69b 100644 --- a/crates/web-sys/src/features/gen_DomQuadInit.rs +++ b/crates/web-sys/src/features/gen_DomQuadInit.rs @@ -11,17 +11,72 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DomQuadInit`*"] pub type DomQuadInit; #[cfg(feature = "DomPointInit")] + #[wasm_bindgen(method, getter = "p1")] + fn p1_shim(this: &DomQuadInit) -> DomPointInit; + #[cfg(feature = "DomPointInit")] #[wasm_bindgen(method, setter = "p1")] - fn p1_shim(this: &DomQuadInit, val: &DomPointInit); + fn set_p1_shim(this: &DomQuadInit, val: &DomPointInit); + #[cfg(feature = "DomPointInit")] + #[wasm_bindgen(method, getter = "p2")] + fn p2_shim(this: &DomQuadInit) -> DomPointInit; #[cfg(feature = "DomPointInit")] #[wasm_bindgen(method, setter = "p2")] - fn p2_shim(this: &DomQuadInit, val: &DomPointInit); + fn set_p2_shim(this: &DomQuadInit, val: &DomPointInit); + #[cfg(feature = "DomPointInit")] + #[wasm_bindgen(method, getter = "p3")] + fn p3_shim(this: &DomQuadInit) -> DomPointInit; #[cfg(feature = "DomPointInit")] #[wasm_bindgen(method, setter = "p3")] - fn p3_shim(this: &DomQuadInit, val: &DomPointInit); + fn set_p3_shim(this: &DomQuadInit, val: &DomPointInit); + #[cfg(feature = "DomPointInit")] + #[wasm_bindgen(method, getter = "p4")] + fn p4_shim(this: &DomQuadInit) -> DomPointInit; #[cfg(feature = "DomPointInit")] #[wasm_bindgen(method, setter = "p4")] - fn p4_shim(this: &DomQuadInit, val: &DomPointInit); + fn set_p4_shim(this: &DomQuadInit, val: &DomPointInit); +} +#[doc = "The trait to access properties on the `DomQuadInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DomQuadInit`*"] +pub trait DomQuadInitGetters { + #[cfg(feature = "DomPointInit")] + #[doc = "Get the `p1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + fn p1(&self) -> DomPointInit; + #[cfg(feature = "DomPointInit")] + #[doc = "Get the `p2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + fn p2(&self) -> DomPointInit; + #[cfg(feature = "DomPointInit")] + #[doc = "Get the `p3` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + fn p3(&self) -> DomPointInit; + #[cfg(feature = "DomPointInit")] + #[doc = "Get the `p4` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] + fn p4(&self) -> DomPointInit; +} +impl DomQuadInitGetters for DomQuadInit { + #[cfg(feature = "DomPointInit")] + fn p1(&self) -> DomPointInit { + self.p1_shim() + } + #[cfg(feature = "DomPointInit")] + fn p2(&self) -> DomPointInit { + self.p2_shim() + } + #[cfg(feature = "DomPointInit")] + fn p3(&self) -> DomPointInit { + self.p3_shim() + } + #[cfg(feature = "DomPointInit")] + fn p4(&self) -> DomPointInit { + self.p4_shim() + } } impl DomQuadInit { #[doc = "Construct a new `DomQuadInit`."] @@ -37,7 +92,7 @@ impl DomQuadInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] pub fn p1(&mut self, val: &DomPointInit) -> &mut Self { - self.p1_shim(val); + self.set_p1_shim(val); self } #[cfg(feature = "DomPointInit")] @@ -45,7 +100,7 @@ impl DomQuadInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] pub fn p2(&mut self, val: &DomPointInit) -> &mut Self { - self.p2_shim(val); + self.set_p2_shim(val); self } #[cfg(feature = "DomPointInit")] @@ -53,7 +108,7 @@ impl DomQuadInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] pub fn p3(&mut self, val: &DomPointInit) -> &mut Self { - self.p3_shim(val); + self.set_p3_shim(val); self } #[cfg(feature = "DomPointInit")] @@ -61,7 +116,7 @@ impl DomQuadInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"] pub fn p4(&mut self, val: &DomPointInit) -> &mut Self { - self.p4_shim(val); + self.set_p4_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DomQuadJson.rs b/crates/web-sys/src/features/gen_DomQuadJson.rs index d02f9daa85d..822dd762499 100644 --- a/crates/web-sys/src/features/gen_DomQuadJson.rs +++ b/crates/web-sys/src/features/gen_DomQuadJson.rs @@ -11,17 +11,72 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `DomQuadJson`*"] pub type DomQuadJson; #[cfg(feature = "DomPoint")] + #[wasm_bindgen(method, getter = "p1")] + fn p1_shim(this: &DomQuadJson) -> DomPoint; + #[cfg(feature = "DomPoint")] #[wasm_bindgen(method, setter = "p1")] - fn p1_shim(this: &DomQuadJson, val: &DomPoint); + fn set_p1_shim(this: &DomQuadJson, val: &DomPoint); + #[cfg(feature = "DomPoint")] + #[wasm_bindgen(method, getter = "p2")] + fn p2_shim(this: &DomQuadJson) -> DomPoint; #[cfg(feature = "DomPoint")] #[wasm_bindgen(method, setter = "p2")] - fn p2_shim(this: &DomQuadJson, val: &DomPoint); + fn set_p2_shim(this: &DomQuadJson, val: &DomPoint); + #[cfg(feature = "DomPoint")] + #[wasm_bindgen(method, getter = "p3")] + fn p3_shim(this: &DomQuadJson) -> DomPoint; #[cfg(feature = "DomPoint")] #[wasm_bindgen(method, setter = "p3")] - fn p3_shim(this: &DomQuadJson, val: &DomPoint); + fn set_p3_shim(this: &DomQuadJson, val: &DomPoint); + #[cfg(feature = "DomPoint")] + #[wasm_bindgen(method, getter = "p4")] + fn p4_shim(this: &DomQuadJson) -> DomPoint; #[cfg(feature = "DomPoint")] #[wasm_bindgen(method, setter = "p4")] - fn p4_shim(this: &DomQuadJson, val: &DomPoint); + fn set_p4_shim(this: &DomQuadJson, val: &DomPoint); +} +#[doc = "The trait to access properties on the `DomQuadJson` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DomQuadJson`*"] +pub trait DomQuadJsonGetters { + #[cfg(feature = "DomPoint")] + #[doc = "Get the `p1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + fn p1(&self) -> DomPoint; + #[cfg(feature = "DomPoint")] + #[doc = "Get the `p2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + fn p2(&self) -> DomPoint; + #[cfg(feature = "DomPoint")] + #[doc = "Get the `p3` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + fn p3(&self) -> DomPoint; + #[cfg(feature = "DomPoint")] + #[doc = "Get the `p4` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] + fn p4(&self) -> DomPoint; +} +impl DomQuadJsonGetters for DomQuadJson { + #[cfg(feature = "DomPoint")] + fn p1(&self) -> DomPoint { + self.p1_shim() + } + #[cfg(feature = "DomPoint")] + fn p2(&self) -> DomPoint { + self.p2_shim() + } + #[cfg(feature = "DomPoint")] + fn p3(&self) -> DomPoint { + self.p3_shim() + } + #[cfg(feature = "DomPoint")] + fn p4(&self) -> DomPoint { + self.p4_shim() + } } impl DomQuadJson { #[doc = "Construct a new `DomQuadJson`."] @@ -37,7 +92,7 @@ impl DomQuadJson { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] pub fn p1(&mut self, val: &DomPoint) -> &mut Self { - self.p1_shim(val); + self.set_p1_shim(val); self } #[cfg(feature = "DomPoint")] @@ -45,7 +100,7 @@ impl DomQuadJson { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] pub fn p2(&mut self, val: &DomPoint) -> &mut Self { - self.p2_shim(val); + self.set_p2_shim(val); self } #[cfg(feature = "DomPoint")] @@ -53,7 +108,7 @@ impl DomQuadJson { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] pub fn p3(&mut self, val: &DomPoint) -> &mut Self { - self.p3_shim(val); + self.set_p3_shim(val); self } #[cfg(feature = "DomPoint")] @@ -61,7 +116,7 @@ impl DomQuadJson { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomPoint`, `DomQuadJson`*"] pub fn p4(&mut self, val: &DomPoint) -> &mut Self { - self.p4_shim(val); + self.set_p4_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DomRectInit.rs b/crates/web-sys/src/features/gen_DomRectInit.rs index 2124c443bc8..cd50e765454 100644 --- a/crates/web-sys/src/features/gen_DomRectInit.rs +++ b/crates/web-sys/src/features/gen_DomRectInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] pub type DomRectInit; + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &DomRectInit) -> f64; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &DomRectInit, val: f64); + fn set_height_shim(this: &DomRectInit, val: f64); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &DomRectInit) -> f64; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &DomRectInit, val: f64); + fn set_width_shim(this: &DomRectInit, val: f64); + #[wasm_bindgen(method, getter = "x")] + fn x_shim(this: &DomRectInit) -> f64; #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &DomRectInit, val: f64); + fn set_x_shim(this: &DomRectInit, val: f64); + #[wasm_bindgen(method, getter = "y")] + fn y_shim(this: &DomRectInit) -> f64; #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &DomRectInit, val: f64); + fn set_y_shim(this: &DomRectInit, val: f64); +} +#[doc = "The trait to access properties on the `DomRectInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] +pub trait DomRectInitGetters { + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + fn height(&self) -> f64; + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + fn width(&self) -> f64; + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + fn x(&self) -> f64; + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] + fn y(&self) -> f64; +} +impl DomRectInitGetters for DomRectInit { + fn height(&self) -> f64 { + self.height_shim() + } + fn width(&self) -> f64 { + self.width_shim() + } + fn x(&self) -> f64 { + self.x_shim() + } + fn y(&self) -> f64 { + self.y_shim() + } } impl DomRectInit { #[doc = "Construct a new `DomRectInit`."] @@ -32,28 +75,28 @@ impl DomRectInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] pub fn height(&mut self, val: f64) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[doc = "Change the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] pub fn width(&mut self, val: f64) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } #[doc = "Change the `x` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] pub fn x(&mut self, val: f64) -> &mut Self { - self.x_shim(val); + self.set_x_shim(val); self } #[doc = "Change the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`*"] pub fn y(&mut self, val: f64) -> &mut Self { - self.y_shim(val); + self.set_y_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs b/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs index 584b0f9acc1..1df91cc3a91 100644 --- a/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs +++ b/crates/web-sys/src/features/gen_DomWindowResizeEventDetail.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] pub type DomWindowResizeEventDetail; + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &DomWindowResizeEventDetail) -> i32; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &DomWindowResizeEventDetail, val: i32); + fn set_height_shim(this: &DomWindowResizeEventDetail, val: i32); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &DomWindowResizeEventDetail) -> i32; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &DomWindowResizeEventDetail, val: i32); + fn set_width_shim(this: &DomWindowResizeEventDetail, val: i32); +} +#[doc = "The trait to access properties on the `DomWindowResizeEventDetail` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] +pub trait DomWindowResizeEventDetailGetters { + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] + fn height(&self) -> i32; + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] + fn width(&self) -> i32; +} +impl DomWindowResizeEventDetailGetters for DomWindowResizeEventDetail { + fn height(&self) -> i32 { + self.height_shim() + } + fn width(&self) -> i32 { + self.width_shim() + } } impl DomWindowResizeEventDetail { #[doc = "Construct a new `DomWindowResizeEventDetail`."] @@ -28,14 +53,14 @@ impl DomWindowResizeEventDetail { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] pub fn height(&mut self, val: i32) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[doc = "Change the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomWindowResizeEventDetail`*"] pub fn width(&mut self, val: i32) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DragEventInit.rs b/crates/web-sys/src/features/gen_DragEventInit.rs index 0b50bf3a4b9..2d688e98136 100644 --- a/crates/web-sys/src/features/gen_DragEventInit.rs +++ b/crates/web-sys/src/features/gen_DragEventInit.rs @@ -10,65 +10,333 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub type DragEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &DragEventInit, val: bool); + fn set_bubbles_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &DragEventInit, val: bool); + fn set_cancelable_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &DragEventInit, val: bool); + fn set_composed_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &DragEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &DragEventInit, val: i32); + fn set_detail_shim(this: &DragEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &DragEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &DragEventInit, val: Option<&Window>); + fn set_view_shim(this: &DragEventInit, val: Option<&Window>); + #[wasm_bindgen(method, getter = "altKey")] + fn alt_key_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &DragEventInit, val: bool); + fn set_alt_key_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "ctrlKey")] + fn ctrl_key_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &DragEventInit, val: bool); + fn set_ctrl_key_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "metaKey")] + fn meta_key_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &DragEventInit, val: bool); + fn set_meta_key_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierAltGraph")] + fn modifier_alt_graph_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &DragEventInit, val: bool); + fn set_modifier_alt_graph_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierCapsLock")] + fn modifier_caps_lock_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &DragEventInit, val: bool); + fn set_modifier_caps_lock_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFn")] + fn modifier_fn_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &DragEventInit, val: bool); + fn set_modifier_fn_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFnLock")] + fn modifier_fn_lock_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &DragEventInit, val: bool); + fn set_modifier_fn_lock_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierNumLock")] + fn modifier_num_lock_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &DragEventInit, val: bool); + fn set_modifier_num_lock_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierOS")] + fn modifier_os_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &DragEventInit, val: bool); + fn set_modifier_os_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierScrollLock")] + fn modifier_scroll_lock_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &DragEventInit, val: bool); + fn set_modifier_scroll_lock_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbol")] + fn modifier_symbol_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &DragEventInit, val: bool); + fn set_modifier_symbol_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + fn modifier_symbol_lock_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &DragEventInit, val: bool); + fn set_modifier_symbol_lock_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "shiftKey")] + fn shift_key_shim(this: &DragEventInit) -> bool; #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &DragEventInit, val: bool); + fn set_shift_key_shim(this: &DragEventInit, val: bool); + #[wasm_bindgen(method, getter = "button")] + fn button_shim(this: &DragEventInit) -> i16; #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &DragEventInit, val: i16); + fn set_button_shim(this: &DragEventInit, val: i16); + #[wasm_bindgen(method, getter = "buttons")] + fn buttons_shim(this: &DragEventInit) -> u16; #[wasm_bindgen(method, setter = "buttons")] - fn buttons_shim(this: &DragEventInit, val: u16); + fn set_buttons_shim(this: &DragEventInit, val: u16); + #[wasm_bindgen(method, getter = "clientX")] + fn client_x_shim(this: &DragEventInit) -> i32; #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &DragEventInit, val: i32); + fn set_client_x_shim(this: &DragEventInit, val: i32); + #[wasm_bindgen(method, getter = "clientY")] + fn client_y_shim(this: &DragEventInit) -> i32; #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &DragEventInit, val: i32); + fn set_client_y_shim(this: &DragEventInit, val: i32); + #[wasm_bindgen(method, getter = "movementX")] + fn movement_x_shim(this: &DragEventInit) -> i32; #[wasm_bindgen(method, setter = "movementX")] - fn movement_x_shim(this: &DragEventInit, val: i32); + fn set_movement_x_shim(this: &DragEventInit, val: i32); + #[wasm_bindgen(method, getter = "movementY")] + fn movement_y_shim(this: &DragEventInit) -> i32; #[wasm_bindgen(method, setter = "movementY")] - fn movement_y_shim(this: &DragEventInit, val: i32); + fn set_movement_y_shim(this: &DragEventInit, val: i32); + #[cfg(feature = "EventTarget")] + #[wasm_bindgen(method, getter = "relatedTarget")] + fn related_target_shim(this: &DragEventInit) -> Option; #[cfg(feature = "EventTarget")] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &DragEventInit, val: Option<&EventTarget>); + fn set_related_target_shim(this: &DragEventInit, val: Option<&EventTarget>); + #[wasm_bindgen(method, getter = "screenX")] + fn screen_x_shim(this: &DragEventInit) -> i32; #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &DragEventInit, val: i32); + fn set_screen_x_shim(this: &DragEventInit, val: i32); + #[wasm_bindgen(method, getter = "screenY")] + fn screen_y_shim(this: &DragEventInit) -> i32; #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &DragEventInit, val: i32); + fn set_screen_y_shim(this: &DragEventInit, val: i32); + #[cfg(feature = "DataTransfer")] + #[wasm_bindgen(method, getter = "dataTransfer")] + fn data_transfer_shim(this: &DragEventInit) -> Option; #[cfg(feature = "DataTransfer")] #[wasm_bindgen(method, setter = "dataTransfer")] - fn data_transfer_shim(this: &DragEventInit, val: Option<&DataTransfer>); + fn set_data_transfer_shim(this: &DragEventInit, val: Option<&DataTransfer>); +} +#[doc = "The trait to access properties on the `DragEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] +pub trait DragEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `Window`*"] + fn view(&self) -> Option; + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn alt_key(&self) -> bool; + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn ctrl_key(&self) -> bool; + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn meta_key(&self) -> bool; + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn modifier_alt_graph(&self) -> bool; + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn modifier_caps_lock(&self) -> bool; + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn modifier_fn(&self) -> bool; + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn modifier_fn_lock(&self) -> bool; + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn modifier_num_lock(&self) -> bool; + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn modifier_os(&self) -> bool; + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn modifier_scroll_lock(&self) -> bool; + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn modifier_symbol(&self) -> bool; + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn modifier_symbol_lock(&self) -> bool; + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn shift_key(&self) -> bool; + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn button(&self) -> i16; + #[doc = "Get the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn buttons(&self) -> u16; + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn client_x(&self) -> i32; + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn client_y(&self) -> i32; + #[doc = "Get the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn movement_x(&self) -> i32; + #[doc = "Get the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn movement_y(&self) -> i32; + #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `EventTarget`*"] + fn related_target(&self) -> Option; + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn screen_x(&self) -> i32; + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] + fn screen_y(&self) -> i32; + #[cfg(feature = "DataTransfer")] + #[doc = "Get the `dataTransfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEventInit`*"] + fn data_transfer(&self) -> Option; +} +impl DragEventInitGetters for DragEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + fn alt_key(&self) -> bool { + self.alt_key_shim() + } + fn ctrl_key(&self) -> bool { + self.ctrl_key_shim() + } + fn meta_key(&self) -> bool { + self.meta_key_shim() + } + fn modifier_alt_graph(&self) -> bool { + self.modifier_alt_graph_shim() + } + fn modifier_caps_lock(&self) -> bool { + self.modifier_caps_lock_shim() + } + fn modifier_fn(&self) -> bool { + self.modifier_fn_shim() + } + fn modifier_fn_lock(&self) -> bool { + self.modifier_fn_lock_shim() + } + fn modifier_num_lock(&self) -> bool { + self.modifier_num_lock_shim() + } + fn modifier_os(&self) -> bool { + self.modifier_os_shim() + } + fn modifier_scroll_lock(&self) -> bool { + self.modifier_scroll_lock_shim() + } + fn modifier_symbol(&self) -> bool { + self.modifier_symbol_shim() + } + fn modifier_symbol_lock(&self) -> bool { + self.modifier_symbol_lock_shim() + } + fn shift_key(&self) -> bool { + self.shift_key_shim() + } + fn button(&self) -> i16 { + self.button_shim() + } + fn buttons(&self) -> u16 { + self.buttons_shim() + } + fn client_x(&self) -> i32 { + self.client_x_shim() + } + fn client_y(&self) -> i32 { + self.client_y_shim() + } + fn movement_x(&self) -> i32 { + self.movement_x_shim() + } + fn movement_y(&self) -> i32 { + self.movement_y_shim() + } + #[cfg(feature = "EventTarget")] + fn related_target(&self) -> Option { + self.related_target_shim() + } + fn screen_x(&self) -> i32 { + self.screen_x_shim() + } + fn screen_y(&self) -> i32 { + self.screen_y_shim() + } + #[cfg(feature = "DataTransfer")] + fn data_transfer(&self) -> Option { + self.data_transfer_shim() + } } impl DragEventInit { #[doc = "Construct a new `DragEventInit`."] @@ -83,28 +351,28 @@ impl DragEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -112,140 +380,140 @@ impl DragEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[doc = "Change the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key_shim(val); self } #[doc = "Change the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key_shim(val); self } #[doc = "Change the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key_shim(val); self } #[doc = "Change the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph_shim(val); self } #[doc = "Change the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock_shim(val); self } #[doc = "Change the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn_shim(val); self } #[doc = "Change the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock_shim(val); self } #[doc = "Change the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock_shim(val); self } #[doc = "Change the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os_shim(val); self } #[doc = "Change the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock_shim(val); self } #[doc = "Change the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol_shim(val); self } #[doc = "Change the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock_shim(val); self } #[doc = "Change the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key_shim(val); self } #[doc = "Change the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn button(&mut self, val: i16) -> &mut Self { - self.button_shim(val); + self.set_button_shim(val); self } #[doc = "Change the `buttons` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn buttons(&mut self, val: u16) -> &mut Self { - self.buttons_shim(val); + self.set_buttons_shim(val); self } #[doc = "Change the `clientX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x_shim(val); self } #[doc = "Change the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y_shim(val); self } #[doc = "Change the `movementX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn movement_x(&mut self, val: i32) -> &mut Self { - self.movement_x_shim(val); + self.set_movement_x_shim(val); self } #[doc = "Change the `movementY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn movement_y(&mut self, val: i32) -> &mut Self { - self.movement_y_shim(val); + self.set_movement_y_shim(val); self } #[cfg(feature = "EventTarget")] @@ -253,21 +521,21 @@ impl DragEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`, `EventTarget`*"] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target_shim(val); self } #[doc = "Change the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x_shim(val); self } #[doc = "Change the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DragEventInit`*"] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y_shim(val); self } #[cfg(feature = "DataTransfer")] @@ -275,7 +543,7 @@ impl DragEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `DragEventInit`*"] pub fn data_transfer(&mut self, val: Option<&DataTransfer>) -> &mut Self { - self.data_transfer_shim(val); + self.set_data_transfer_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs b/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs index 494ed0224eb..c07984188fb 100644 --- a/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs +++ b/crates/web-sys/src/features/gen_DynamicsCompressorOptions.rs @@ -10,24 +10,112 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] pub type DynamicsCompressorOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &DynamicsCompressorOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &DynamicsCompressorOptions, val: u32); + fn set_channel_count_shim(this: &DynamicsCompressorOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &DynamicsCompressorOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &DynamicsCompressorOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &DynamicsCompressorOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &DynamicsCompressorOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &DynamicsCompressorOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim( + this: &DynamicsCompressorOptions, + val: ChannelInterpretation, + ); + #[wasm_bindgen(method, getter = "attack")] + fn attack_shim(this: &DynamicsCompressorOptions) -> f32; #[wasm_bindgen(method, setter = "attack")] - fn attack_shim(this: &DynamicsCompressorOptions, val: f32); + fn set_attack_shim(this: &DynamicsCompressorOptions, val: f32); + #[wasm_bindgen(method, getter = "knee")] + fn knee_shim(this: &DynamicsCompressorOptions) -> f32; #[wasm_bindgen(method, setter = "knee")] - fn knee_shim(this: &DynamicsCompressorOptions, val: f32); + fn set_knee_shim(this: &DynamicsCompressorOptions, val: f32); + #[wasm_bindgen(method, getter = "ratio")] + fn ratio_shim(this: &DynamicsCompressorOptions) -> f32; #[wasm_bindgen(method, setter = "ratio")] - fn ratio_shim(this: &DynamicsCompressorOptions, val: f32); + fn set_ratio_shim(this: &DynamicsCompressorOptions, val: f32); + #[wasm_bindgen(method, getter = "release")] + fn release_shim(this: &DynamicsCompressorOptions) -> f32; #[wasm_bindgen(method, setter = "release")] - fn release_shim(this: &DynamicsCompressorOptions, val: f32); + fn set_release_shim(this: &DynamicsCompressorOptions, val: f32); + #[wasm_bindgen(method, getter = "threshold")] + fn threshold_shim(this: &DynamicsCompressorOptions) -> f32; #[wasm_bindgen(method, setter = "threshold")] - fn threshold_shim(this: &DynamicsCompressorOptions, val: f32); + fn set_threshold_shim(this: &DynamicsCompressorOptions, val: f32); +} +#[doc = "The trait to access properties on the `DynamicsCompressorOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] +pub trait DynamicsCompressorOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DynamicsCompressorOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DynamicsCompressorOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `attack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + fn attack(&self) -> f32; + #[doc = "Get the `knee` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + fn knee(&self) -> f32; + #[doc = "Get the `ratio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + fn ratio(&self) -> f32; + #[doc = "Get the `release` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + fn release(&self) -> f32; + #[doc = "Get the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] + fn threshold(&self) -> f32; +} +impl DynamicsCompressorOptionsGetters for DynamicsCompressorOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn attack(&self) -> f32 { + self.attack_shim() + } + fn knee(&self) -> f32 { + self.knee_shim() + } + fn ratio(&self) -> f32 { + self.ratio_shim() + } + fn release(&self) -> f32 { + self.release_shim() + } + fn threshold(&self) -> f32 { + self.threshold_shim() + } } impl DynamicsCompressorOptions { #[doc = "Construct a new `DynamicsCompressorOptions`."] @@ -42,7 +130,7 @@ impl DynamicsCompressorOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -50,7 +138,7 @@ impl DynamicsCompressorOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `DynamicsCompressorOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -58,42 +146,42 @@ impl DynamicsCompressorOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `DynamicsCompressorOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `attack` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] pub fn attack(&mut self, val: f32) -> &mut Self { - self.attack_shim(val); + self.set_attack_shim(val); self } #[doc = "Change the `knee` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] pub fn knee(&mut self, val: f32) -> &mut Self { - self.knee_shim(val); + self.set_knee_shim(val); self } #[doc = "Change the `ratio` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] pub fn ratio(&mut self, val: f32) -> &mut Self { - self.ratio_shim(val); + self.set_ratio_shim(val); self } #[doc = "Change the `release` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] pub fn release(&mut self, val: f32) -> &mut Self { - self.release_shim(val); + self.set_release_shim(val); self } #[doc = "Change the `threshold` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DynamicsCompressorOptions`*"] pub fn threshold(&mut self, val: f32) -> &mut Self { - self.threshold_shim(val); + self.set_threshold_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs b/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs index 82ca2870a12..8a020a280e3 100644 --- a/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_EcKeyAlgorithm.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] pub type EcKeyAlgorithm; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &EcKeyAlgorithm) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcKeyAlgorithm, val: &str); + fn set_name_shim(this: &EcKeyAlgorithm, val: &str); + #[wasm_bindgen(method, getter = "namedCurve")] + fn named_curve_shim(this: &EcKeyAlgorithm) -> String; #[wasm_bindgen(method, setter = "namedCurve")] - fn named_curve_shim(this: &EcKeyAlgorithm, val: &str); + fn set_named_curve_shim(this: &EcKeyAlgorithm, val: &str); +} +#[doc = "The trait to access properties on the `EcKeyAlgorithm` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] +pub trait EcKeyAlgorithmGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] + fn name(&self) -> String; + #[doc = "Get the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] + fn named_curve(&self) -> String; +} +impl EcKeyAlgorithmGetters for EcKeyAlgorithm { + fn name(&self) -> String { + self.name_shim() + } + fn named_curve(&self) -> String { + self.named_curve_shim() + } } impl EcKeyAlgorithm { #[doc = "Construct a new `EcKeyAlgorithm`."] @@ -22,22 +47,22 @@ impl EcKeyAlgorithm { pub fn new(name: &str, named_curve: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.named_curve(named_curve); + Self::name(&mut ret, name); + Self::named_curve(&mut ret, named_curve); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `namedCurve` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyAlgorithm`*"] pub fn named_curve(&mut self, val: &str) -> &mut Self { - self.named_curve_shim(val); + self.set_named_curve_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EcKeyGenParams.rs b/crates/web-sys/src/features/gen_EcKeyGenParams.rs index 08ffc99e257..be9f88160fd 100644 --- a/crates/web-sys/src/features/gen_EcKeyGenParams.rs +++ b/crates/web-sys/src/features/gen_EcKeyGenParams.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] pub type EcKeyGenParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &EcKeyGenParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcKeyGenParams, val: &str); + fn set_name_shim(this: &EcKeyGenParams, val: &str); + #[wasm_bindgen(method, getter = "namedCurve")] + fn named_curve_shim(this: &EcKeyGenParams) -> String; #[wasm_bindgen(method, setter = "namedCurve")] - fn named_curve_shim(this: &EcKeyGenParams, val: &str); + fn set_named_curve_shim(this: &EcKeyGenParams, val: &str); +} +#[doc = "The trait to access properties on the `EcKeyGenParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] +pub trait EcKeyGenParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] + fn name(&self) -> String; + #[doc = "Get the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] + fn named_curve(&self) -> String; +} +impl EcKeyGenParamsGetters for EcKeyGenParams { + fn name(&self) -> String { + self.name_shim() + } + fn named_curve(&self) -> String { + self.named_curve_shim() + } } impl EcKeyGenParams { #[doc = "Construct a new `EcKeyGenParams`."] @@ -22,22 +47,22 @@ impl EcKeyGenParams { pub fn new(name: &str, named_curve: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.named_curve(named_curve); + Self::name(&mut ret, name); + Self::named_curve(&mut ret, named_curve); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `namedCurve` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyGenParams`*"] pub fn named_curve(&mut self, val: &str) -> &mut Self { - self.named_curve_shim(val); + self.set_named_curve_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EcKeyImportParams.rs b/crates/web-sys/src/features/gen_EcKeyImportParams.rs index 512dee8819d..4c768fff799 100644 --- a/crates/web-sys/src/features/gen_EcKeyImportParams.rs +++ b/crates/web-sys/src/features/gen_EcKeyImportParams.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] pub type EcKeyImportParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &EcKeyImportParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcKeyImportParams, val: &str); + fn set_name_shim(this: &EcKeyImportParams, val: &str); + #[wasm_bindgen(method, getter = "namedCurve")] + fn named_curve_shim(this: &EcKeyImportParams) -> String; #[wasm_bindgen(method, setter = "namedCurve")] - fn named_curve_shim(this: &EcKeyImportParams, val: &str); + fn set_named_curve_shim(this: &EcKeyImportParams, val: &str); +} +#[doc = "The trait to access properties on the `EcKeyImportParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] +pub trait EcKeyImportParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] + fn name(&self) -> String; + #[doc = "Get the `namedCurve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] + fn named_curve(&self) -> String; +} +impl EcKeyImportParamsGetters for EcKeyImportParams { + fn name(&self) -> String { + self.name_shim() + } + fn named_curve(&self) -> String { + self.named_curve_shim() + } } impl EcKeyImportParams { #[doc = "Construct a new `EcKeyImportParams`."] @@ -22,21 +47,21 @@ impl EcKeyImportParams { pub fn new(name: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `namedCurve` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcKeyImportParams`*"] pub fn named_curve(&mut self, val: &str) -> &mut Self { - self.named_curve_shim(val); + self.set_named_curve_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs b/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs index c01ec76a8e2..4f28a89235e 100644 --- a/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs +++ b/crates/web-sys/src/features/gen_EcdhKeyDeriveParams.rs @@ -10,11 +10,39 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] pub type EcdhKeyDeriveParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &EcdhKeyDeriveParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcdhKeyDeriveParams, val: &str); + fn set_name_shim(this: &EcdhKeyDeriveParams, val: &str); + #[cfg(feature = "CryptoKey")] + #[wasm_bindgen(method, getter = "public")] + fn public_shim(this: &EcdhKeyDeriveParams) -> CryptoKey; #[cfg(feature = "CryptoKey")] #[wasm_bindgen(method, setter = "public")] - fn public_shim(this: &EcdhKeyDeriveParams, val: &CryptoKey); + fn set_public_shim(this: &EcdhKeyDeriveParams, val: &CryptoKey); +} +#[doc = "The trait to access properties on the `EcdhKeyDeriveParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] +pub trait EcdhKeyDeriveParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] + fn name(&self) -> String; + #[cfg(feature = "CryptoKey")] + #[doc = "Get the `public` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `EcdhKeyDeriveParams`*"] + fn public(&self) -> CryptoKey; +} +impl EcdhKeyDeriveParamsGetters for EcdhKeyDeriveParams { + fn name(&self) -> String { + self.name_shim() + } + #[cfg(feature = "CryptoKey")] + fn public(&self) -> CryptoKey { + self.public_shim() + } } impl EcdhKeyDeriveParams { #[cfg(feature = "CryptoKey")] @@ -24,15 +52,15 @@ impl EcdhKeyDeriveParams { pub fn new(name: &str, public: &CryptoKey) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.public(public); + Self::name(&mut ret, name); + Self::public(&mut ret, public); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcdhKeyDeriveParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(feature = "CryptoKey")] @@ -40,7 +68,7 @@ impl EcdhKeyDeriveParams { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `EcdhKeyDeriveParams`*"] pub fn public(&mut self, val: &CryptoKey) -> &mut Self { - self.public_shim(val); + self.set_public_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EcdsaParams.rs b/crates/web-sys/src/features/gen_EcdsaParams.rs index bfc9fe093fc..4053a15f15b 100644 --- a/crates/web-sys/src/features/gen_EcdsaParams.rs +++ b/crates/web-sys/src/features/gen_EcdsaParams.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] pub type EcdsaParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &EcdsaParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &EcdsaParams, val: &str); + fn set_name_shim(this: &EcdsaParams, val: &str); + #[wasm_bindgen(method, getter = "hash")] + fn hash_shim(this: &EcdsaParams) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &EcdsaParams, val: &::wasm_bindgen::JsValue); + fn set_hash_shim(this: &EcdsaParams, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `EcdsaParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] +pub trait EcdsaParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] + fn name(&self) -> String; + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] + fn hash(&self) -> ::wasm_bindgen::JsValue; +} +impl EcdsaParamsGetters for EcdsaParams { + fn name(&self) -> String { + self.name_shim() + } + fn hash(&self) -> ::wasm_bindgen::JsValue { + self.hash_shim() + } } impl EcdsaParams { #[doc = "Construct a new `EcdsaParams`."] @@ -22,22 +47,22 @@ impl EcdsaParams { pub fn new(name: &str, hash: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.hash(hash); + Self::name(&mut ret, name); + Self::hash(&mut ret, hash); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EcdsaParams`*"] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EffectTiming.rs b/crates/web-sys/src/features/gen_EffectTiming.rs index cd1b84ecfb7..225e51e4c86 100644 --- a/crates/web-sys/src/features/gen_EffectTiming.rs +++ b/crates/web-sys/src/features/gen_EffectTiming.rs @@ -10,24 +10,109 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] pub type EffectTiming; + #[wasm_bindgen(method, getter = "delay")] + fn delay_shim(this: &EffectTiming) -> f64; #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &EffectTiming, val: f64); + fn set_delay_shim(this: &EffectTiming, val: f64); + #[cfg(feature = "PlaybackDirection")] + #[wasm_bindgen(method, getter = "direction")] + fn direction_shim(this: &EffectTiming) -> PlaybackDirection; #[cfg(feature = "PlaybackDirection")] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &EffectTiming, val: PlaybackDirection); + fn set_direction_shim(this: &EffectTiming, val: PlaybackDirection); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &EffectTiming) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &EffectTiming, val: &::wasm_bindgen::JsValue); + fn set_duration_shim(this: &EffectTiming, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "easing")] + fn easing_shim(this: &EffectTiming) -> String; #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &EffectTiming, val: &str); + fn set_easing_shim(this: &EffectTiming, val: &str); + #[wasm_bindgen(method, getter = "endDelay")] + fn end_delay_shim(this: &EffectTiming) -> f64; #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &EffectTiming, val: f64); + fn set_end_delay_shim(this: &EffectTiming, val: f64); + #[cfg(feature = "FillMode")] + #[wasm_bindgen(method, getter = "fill")] + fn fill_shim(this: &EffectTiming) -> FillMode; #[cfg(feature = "FillMode")] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &EffectTiming, val: FillMode); + fn set_fill_shim(this: &EffectTiming, val: FillMode); + #[wasm_bindgen(method, getter = "iterationStart")] + fn iteration_start_shim(this: &EffectTiming) -> f64; #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &EffectTiming, val: f64); + fn set_iteration_start_shim(this: &EffectTiming, val: f64); + #[wasm_bindgen(method, getter = "iterations")] + fn iterations_shim(this: &EffectTiming) -> f64; #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &EffectTiming, val: f64); + fn set_iterations_shim(this: &EffectTiming, val: f64); +} +#[doc = "The trait to access properties on the `EffectTiming` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] +pub trait EffectTimingGetters { + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + fn delay(&self) -> f64; + #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `PlaybackDirection`*"] + fn direction(&self) -> PlaybackDirection; + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + fn duration(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + fn easing(&self) -> String; + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + fn end_delay(&self) -> f64; + #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `FillMode`*"] + fn fill(&self) -> FillMode; + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + fn iteration_start(&self) -> f64; + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] + fn iterations(&self) -> f64; +} +impl EffectTimingGetters for EffectTiming { + fn delay(&self) -> f64 { + self.delay_shim() + } + #[cfg(feature = "PlaybackDirection")] + fn direction(&self) -> PlaybackDirection { + self.direction_shim() + } + fn duration(&self) -> ::wasm_bindgen::JsValue { + self.duration_shim() + } + fn easing(&self) -> String { + self.easing_shim() + } + fn end_delay(&self) -> f64 { + self.end_delay_shim() + } + #[cfg(feature = "FillMode")] + fn fill(&self) -> FillMode { + self.fill_shim() + } + fn iteration_start(&self) -> f64 { + self.iteration_start_shim() + } + fn iterations(&self) -> f64 { + self.iterations_shim() + } } impl EffectTiming { #[doc = "Construct a new `EffectTiming`."] @@ -42,7 +127,7 @@ impl EffectTiming { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay_shim(val); self } #[cfg(feature = "PlaybackDirection")] @@ -50,28 +135,28 @@ impl EffectTiming { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `PlaybackDirection`*"] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction_shim(val); self } #[doc = "Change the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[doc = "Change the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing_shim(val); self } #[doc = "Change the `endDelay` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); + self.set_end_delay_shim(val); self } #[cfg(feature = "FillMode")] @@ -79,21 +164,21 @@ impl EffectTiming { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`, `FillMode`*"] pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); + self.set_fill_shim(val); self } #[doc = "Change the `iterationStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); + self.set_iteration_start_shim(val); self } #[doc = "Change the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EffectTiming`*"] pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); + self.set_iterations_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ElementCreationOptions.rs b/crates/web-sys/src/features/gen_ElementCreationOptions.rs index 59bd3c85d11..a1020a34e2d 100644 --- a/crates/web-sys/src/features/gen_ElementCreationOptions.rs +++ b/crates/web-sys/src/features/gen_ElementCreationOptions.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] pub type ElementCreationOptions; + #[wasm_bindgen(method, getter = "is")] + fn is_shim(this: &ElementCreationOptions) -> String; #[wasm_bindgen(method, setter = "is")] - fn is_shim(this: &ElementCreationOptions, val: &str); + fn set_is_shim(this: &ElementCreationOptions, val: &str); + #[wasm_bindgen(method, getter = "pseudo")] + fn pseudo_shim(this: &ElementCreationOptions) -> String; #[wasm_bindgen(method, setter = "pseudo")] - fn pseudo_shim(this: &ElementCreationOptions, val: &str); + fn set_pseudo_shim(this: &ElementCreationOptions, val: &str); +} +#[doc = "The trait to access properties on the `ElementCreationOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] +pub trait ElementCreationOptionsGetters { + #[doc = "Get the `is` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] + fn is(&self) -> String; + #[doc = "Get the `pseudo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] + fn pseudo(&self) -> String; +} +impl ElementCreationOptionsGetters for ElementCreationOptions { + fn is(&self) -> String { + self.is_shim() + } + fn pseudo(&self) -> String { + self.pseudo_shim() + } } impl ElementCreationOptions { #[doc = "Construct a new `ElementCreationOptions`."] @@ -28,14 +53,14 @@ impl ElementCreationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] pub fn is(&mut self, val: &str) -> &mut Self { - self.is_shim(val); + self.set_is_shim(val); self } #[doc = "Change the `pseudo` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ElementCreationOptions`*"] pub fn pseudo(&mut self, val: &str) -> &mut Self { - self.pseudo_shim(val); + self.set_pseudo_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs b/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs index 0c551a1c06f..d1b96138218 100644 --- a/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs +++ b/crates/web-sys/src/features/gen_ElementDefinitionOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] pub type ElementDefinitionOptions; + #[wasm_bindgen(method, getter = "extends")] + fn extends_shim(this: &ElementDefinitionOptions) -> String; #[wasm_bindgen(method, setter = "extends")] - fn extends_shim(this: &ElementDefinitionOptions, val: &str); + fn set_extends_shim(this: &ElementDefinitionOptions, val: &str); +} +#[doc = "The trait to access properties on the `ElementDefinitionOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] +pub trait ElementDefinitionOptionsGetters { + #[doc = "Get the `extends` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] + fn extends(&self) -> String; +} +impl ElementDefinitionOptionsGetters for ElementDefinitionOptions { + fn extends(&self) -> String { + self.extends_shim() + } } impl ElementDefinitionOptions { #[doc = "Construct a new `ElementDefinitionOptions`."] @@ -26,7 +42,7 @@ impl ElementDefinitionOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ElementDefinitionOptions`*"] pub fn extends(&mut self, val: &str) -> &mut Self { - self.extends_shim(val); + self.set_extends_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs b/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs index 089dd9bb426..e3ec296059f 100644 --- a/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs +++ b/crates/web-sys/src/features/gen_EncodedAudioChunkInit.rs @@ -14,15 +14,83 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type EncodedAudioChunkInit; + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &EncodedAudioChunkInit) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &EncodedAudioChunkInit, val: &::js_sys::Object); + fn set_data_shim(this: &EncodedAudioChunkInit, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &EncodedAudioChunkInit) -> f64; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &EncodedAudioChunkInit, val: f64); + fn set_duration_shim(this: &EncodedAudioChunkInit, val: f64); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &EncodedAudioChunkInit) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &EncodedAudioChunkInit, val: f64); + fn set_timestamp_shim(this: &EncodedAudioChunkInit, val: f64); + #[cfg(feature = "EncodedAudioChunkType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &EncodedAudioChunkInit) -> EncodedAudioChunkType; #[cfg(feature = "EncodedAudioChunkType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &EncodedAudioChunkInit, val: EncodedAudioChunkType); + fn set_type__shim(this: &EncodedAudioChunkInit, val: EncodedAudioChunkType); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `EncodedAudioChunkInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] +pub trait EncodedAudioChunkInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data(&self) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn duration(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "EncodedAudioChunkType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkInit`, `EncodedAudioChunkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn type_(&self) -> EncodedAudioChunkType; +} +#[cfg(web_sys_unstable_apis)] +impl EncodedAudioChunkInitGetters for EncodedAudioChunkInit { + #[cfg(web_sys_unstable_apis)] + fn data(&self) -> ::js_sys::Object { + self.data_shim() + } + #[cfg(web_sys_unstable_apis)] + fn duration(&self) -> f64 { + self.duration_shim() + } + #[cfg(web_sys_unstable_apis)] + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "EncodedAudioChunkType")] + fn type_(&self) -> EncodedAudioChunkType { + self.type__shim() + } } #[cfg(web_sys_unstable_apis)] impl EncodedAudioChunkInit { @@ -36,9 +104,9 @@ impl EncodedAudioChunkInit { pub fn new(data: &::js_sys::Object, timestamp: f64, type_: EncodedAudioChunkType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.data(data); - ret.timestamp(timestamp); - ret.type_(type_); + Self::data(&mut ret, data); + Self::timestamp(&mut ret, timestamp); + Self::type_(&mut ret, type_); ret } #[cfg(web_sys_unstable_apis)] @@ -49,7 +117,7 @@ impl EncodedAudioChunkInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -60,7 +128,7 @@ impl EncodedAudioChunkInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -71,7 +139,7 @@ impl EncodedAudioChunkInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -83,7 +151,7 @@ impl EncodedAudioChunkInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn type_(&mut self, val: EncodedAudioChunkType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs b/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs index a5da12d42dd..12ea84c0310 100644 --- a/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs +++ b/crates/web-sys/src/features/gen_EncodedAudioChunkMetadata.rs @@ -15,8 +15,34 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type EncodedAudioChunkMetadata; #[cfg(feature = "AudioDecoderConfig")] + #[wasm_bindgen(method, getter = "decoderConfig")] + fn decoder_config_shim(this: &EncodedAudioChunkMetadata) -> AudioDecoderConfig; + #[cfg(feature = "AudioDecoderConfig")] #[wasm_bindgen(method, setter = "decoderConfig")] - fn decoder_config_shim(this: &EncodedAudioChunkMetadata, val: &AudioDecoderConfig); + fn set_decoder_config_shim(this: &EncodedAudioChunkMetadata, val: &AudioDecoderConfig); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `EncodedAudioChunkMetadata` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkMetadata`*"] +pub trait EncodedAudioChunkMetadataGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioDecoderConfig")] + #[doc = "Get the `decoderConfig` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `EncodedAudioChunkMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn decoder_config(&self) -> AudioDecoderConfig; +} +#[cfg(web_sys_unstable_apis)] +impl EncodedAudioChunkMetadataGetters for EncodedAudioChunkMetadata { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AudioDecoderConfig")] + fn decoder_config(&self) -> AudioDecoderConfig { + self.decoder_config_shim() + } } #[cfg(web_sys_unstable_apis)] impl EncodedAudioChunkMetadata { @@ -40,7 +66,7 @@ impl EncodedAudioChunkMetadata { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn decoder_config(&mut self, val: &AudioDecoderConfig) -> &mut Self { - self.decoder_config_shim(val); + self.set_decoder_config_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs b/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs index 7d8da29fee1..8819ff00ad0 100644 --- a/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs +++ b/crates/web-sys/src/features/gen_EncodedVideoChunkInit.rs @@ -14,15 +14,83 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type EncodedVideoChunkInit; + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &EncodedVideoChunkInit) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &EncodedVideoChunkInit, val: &::js_sys::Object); + fn set_data_shim(this: &EncodedVideoChunkInit, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &EncodedVideoChunkInit) -> f64; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &EncodedVideoChunkInit, val: f64); + fn set_duration_shim(this: &EncodedVideoChunkInit, val: f64); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &EncodedVideoChunkInit) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &EncodedVideoChunkInit, val: f64); + fn set_timestamp_shim(this: &EncodedVideoChunkInit, val: f64); + #[cfg(feature = "EncodedVideoChunkType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &EncodedVideoChunkInit) -> EncodedVideoChunkType; #[cfg(feature = "EncodedVideoChunkType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &EncodedVideoChunkInit, val: EncodedVideoChunkType); + fn set_type__shim(this: &EncodedVideoChunkInit, val: EncodedVideoChunkType); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `EncodedVideoChunkInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] +pub trait EncodedVideoChunkInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data(&self) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn duration(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "EncodedVideoChunkType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkInit`, `EncodedVideoChunkType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn type_(&self) -> EncodedVideoChunkType; +} +#[cfg(web_sys_unstable_apis)] +impl EncodedVideoChunkInitGetters for EncodedVideoChunkInit { + #[cfg(web_sys_unstable_apis)] + fn data(&self) -> ::js_sys::Object { + self.data_shim() + } + #[cfg(web_sys_unstable_apis)] + fn duration(&self) -> f64 { + self.duration_shim() + } + #[cfg(web_sys_unstable_apis)] + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "EncodedVideoChunkType")] + fn type_(&self) -> EncodedVideoChunkType { + self.type__shim() + } } #[cfg(web_sys_unstable_apis)] impl EncodedVideoChunkInit { @@ -36,9 +104,9 @@ impl EncodedVideoChunkInit { pub fn new(data: &::js_sys::Object, timestamp: f64, type_: EncodedVideoChunkType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.data(data); - ret.timestamp(timestamp); - ret.type_(type_); + Self::data(&mut ret, data); + Self::timestamp(&mut ret, timestamp); + Self::type_(&mut ret, type_); ret } #[cfg(web_sys_unstable_apis)] @@ -49,7 +117,7 @@ impl EncodedVideoChunkInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -60,7 +128,7 @@ impl EncodedVideoChunkInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -71,7 +139,7 @@ impl EncodedVideoChunkInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -83,7 +151,7 @@ impl EncodedVideoChunkInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn type_(&mut self, val: EncodedVideoChunkType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs b/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs index 354fb8dc070..8d23e025b8c 100644 --- a/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs +++ b/crates/web-sys/src/features/gen_EncodedVideoChunkMetadata.rs @@ -14,14 +14,71 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type EncodedVideoChunkMetadata; + #[wasm_bindgen(method, getter = "alphaSideData")] + fn alpha_side_data_shim(this: &EncodedVideoChunkMetadata) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "alphaSideData")] - fn alpha_side_data_shim(this: &EncodedVideoChunkMetadata, val: &::js_sys::Object); + fn set_alpha_side_data_shim(this: &EncodedVideoChunkMetadata, val: &::js_sys::Object); + #[cfg(feature = "VideoDecoderConfig")] + #[wasm_bindgen(method, getter = "decoderConfig")] + fn decoder_config_shim(this: &EncodedVideoChunkMetadata) -> VideoDecoderConfig; #[cfg(feature = "VideoDecoderConfig")] #[wasm_bindgen(method, setter = "decoderConfig")] - fn decoder_config_shim(this: &EncodedVideoChunkMetadata, val: &VideoDecoderConfig); + fn set_decoder_config_shim(this: &EncodedVideoChunkMetadata, val: &VideoDecoderConfig); + #[cfg(feature = "SvcOutputMetadata")] + #[wasm_bindgen(method, getter = "svc")] + fn svc_shim(this: &EncodedVideoChunkMetadata) -> SvcOutputMetadata; #[cfg(feature = "SvcOutputMetadata")] #[wasm_bindgen(method, setter = "svc")] - fn svc_shim(this: &EncodedVideoChunkMetadata, val: &SvcOutputMetadata); + fn set_svc_shim(this: &EncodedVideoChunkMetadata, val: &SvcOutputMetadata); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `EncodedVideoChunkMetadata` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"] +pub trait EncodedVideoChunkMetadataGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `alphaSideData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn alpha_side_data(&self) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoDecoderConfig")] + #[doc = "Get the `decoderConfig` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn decoder_config(&self) -> VideoDecoderConfig; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "SvcOutputMetadata")] + #[doc = "Get the `svc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn svc(&self) -> SvcOutputMetadata; +} +#[cfg(web_sys_unstable_apis)] +impl EncodedVideoChunkMetadataGetters for EncodedVideoChunkMetadata { + #[cfg(web_sys_unstable_apis)] + fn alpha_side_data(&self) -> ::js_sys::Object { + self.alpha_side_data_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoDecoderConfig")] + fn decoder_config(&self) -> VideoDecoderConfig { + self.decoder_config_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "SvcOutputMetadata")] + fn svc(&self) -> SvcOutputMetadata { + self.svc_shim() + } } #[cfg(web_sys_unstable_apis)] impl EncodedVideoChunkMetadata { @@ -44,7 +101,7 @@ impl EncodedVideoChunkMetadata { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn alpha_side_data(&mut self, val: &::js_sys::Object) -> &mut Self { - self.alpha_side_data_shim(val); + self.set_alpha_side_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -56,7 +113,7 @@ impl EncodedVideoChunkMetadata { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn decoder_config(&mut self, val: &VideoDecoderConfig) -> &mut Self { - self.decoder_config_shim(val); + self.set_decoder_config_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +125,7 @@ impl EncodedVideoChunkMetadata { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn svc(&mut self, val: &SvcOutputMetadata) -> &mut Self { - self.svc_shim(val); + self.set_svc_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ErrorCallback.rs b/crates/web-sys/src/features/gen_ErrorCallback.rs index e14346d2eae..8b9f42098d9 100644 --- a/crates/web-sys/src/features/gen_ErrorCallback.rs +++ b/crates/web-sys/src/features/gen_ErrorCallback.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] pub type ErrorCallback; + #[wasm_bindgen(method, getter = "handleEvent")] + fn handle_event_shim(this: &ErrorCallback) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &ErrorCallback, val: &::js_sys::Function); + fn set_handle_event_shim(this: &ErrorCallback, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `ErrorCallback` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] +pub trait ErrorCallbackGetters { + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] + fn handle_event(&self) -> ::js_sys::Function; +} +impl ErrorCallbackGetters for ErrorCallback { + fn handle_event(&self) -> ::js_sys::Function { + self.handle_event_shim() + } } impl ErrorCallback { #[doc = "Construct a new `ErrorCallback`."] @@ -26,7 +42,7 @@ impl ErrorCallback { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorCallback`*"] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ErrorEventInit.rs b/crates/web-sys/src/features/gen_ErrorEventInit.rs index 42369ecc8a4..7e8f696d7ea 100644 --- a/crates/web-sys/src/features/gen_ErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_ErrorEventInit.rs @@ -10,22 +10,101 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub type ErrorEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &ErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ErrorEventInit, val: bool); + fn set_bubbles_shim(this: &ErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &ErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ErrorEventInit, val: bool); + fn set_cancelable_shim(this: &ErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &ErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ErrorEventInit, val: bool); + fn set_composed_shim(this: &ErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "colno")] + fn colno_shim(this: &ErrorEventInit) -> u32; #[wasm_bindgen(method, setter = "colno")] - fn colno_shim(this: &ErrorEventInit, val: u32); + fn set_colno_shim(this: &ErrorEventInit, val: u32); + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &ErrorEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &ErrorEventInit, val: &::wasm_bindgen::JsValue); + fn set_error_shim(this: &ErrorEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "filename")] + fn filename_shim(this: &ErrorEventInit) -> String; #[wasm_bindgen(method, setter = "filename")] - fn filename_shim(this: &ErrorEventInit, val: &str); + fn set_filename_shim(this: &ErrorEventInit, val: &str); + #[wasm_bindgen(method, getter = "lineno")] + fn lineno_shim(this: &ErrorEventInit) -> u32; #[wasm_bindgen(method, setter = "lineno")] - fn lineno_shim(this: &ErrorEventInit, val: u32); + fn set_lineno_shim(this: &ErrorEventInit, val: u32); + #[wasm_bindgen(method, getter = "message")] + fn message_shim(this: &ErrorEventInit) -> String; #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &ErrorEventInit, val: &str); + fn set_message_shim(this: &ErrorEventInit, val: &str); +} +#[doc = "The trait to access properties on the `ErrorEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] +pub trait ErrorEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `colno` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + fn colno(&self) -> u32; + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + fn error(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `filename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + fn filename(&self) -> String; + #[doc = "Get the `lineno` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + fn lineno(&self) -> u32; + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] + fn message(&self) -> String; +} +impl ErrorEventInitGetters for ErrorEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn colno(&self) -> u32 { + self.colno_shim() + } + fn error(&self) -> ::wasm_bindgen::JsValue { + self.error_shim() + } + fn filename(&self) -> String { + self.filename_shim() + } + fn lineno(&self) -> u32 { + self.lineno_shim() + } + fn message(&self) -> String { + self.message_shim() + } } impl ErrorEventInit { #[doc = "Construct a new `ErrorEventInit`."] @@ -40,56 +119,56 @@ impl ErrorEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `colno` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub fn colno(&mut self, val: u32) -> &mut Self { - self.colno_shim(val); + self.set_colno_shim(val); self } #[doc = "Change the `error` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub fn error(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } #[doc = "Change the `filename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub fn filename(&mut self, val: &str) -> &mut Self { - self.filename_shim(val); + self.set_filename_shim(val); self } #[doc = "Change the `lineno` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub fn lineno(&mut self, val: u32) -> &mut Self { - self.lineno_shim(val); + self.set_lineno_shim(val); self } #[doc = "Change the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ErrorEventInit`*"] pub fn message(&mut self, val: &str) -> &mut Self { - self.message_shim(val); + self.set_message_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EventInit.rs b/crates/web-sys/src/features/gen_EventInit.rs index de8e524324e..8b5b337e7a2 100644 --- a/crates/web-sys/src/features/gen_EventInit.rs +++ b/crates/web-sys/src/features/gen_EventInit.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] pub type EventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &EventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &EventInit, val: bool); + fn set_bubbles_shim(this: &EventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &EventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &EventInit, val: bool); + fn set_cancelable_shim(this: &EventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &EventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &EventInit, val: bool); + fn set_composed_shim(this: &EventInit, val: bool); +} +#[doc = "The trait to access properties on the `EventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EventInit`*"] +pub trait EventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] + fn composed(&self) -> bool; +} +impl EventInitGetters for EventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } } impl EventInit { #[doc = "Construct a new `EventInit`."] @@ -30,21 +64,21 @@ impl EventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EventListener.rs b/crates/web-sys/src/features/gen_EventListener.rs index 8a17381cb56..0b0d786892b 100644 --- a/crates/web-sys/src/features/gen_EventListener.rs +++ b/crates/web-sys/src/features/gen_EventListener.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] pub type EventListener; + #[wasm_bindgen(method, getter = "handleEvent")] + fn handle_event_shim(this: &EventListener) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &EventListener, val: &::js_sys::Function); + fn set_handle_event_shim(this: &EventListener, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `EventListener` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EventListener`*"] +pub trait EventListenerGetters { + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] + fn handle_event(&self) -> ::js_sys::Function; +} +impl EventListenerGetters for EventListener { + fn handle_event(&self) -> ::js_sys::Function { + self.handle_event_shim() + } } impl EventListener { #[doc = "Construct a new `EventListener`."] @@ -26,7 +42,7 @@ impl EventListener { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventListener`*"] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EventListenerOptions.rs b/crates/web-sys/src/features/gen_EventListenerOptions.rs index 05b771d7084..070b6819bd7 100644 --- a/crates/web-sys/src/features/gen_EventListenerOptions.rs +++ b/crates/web-sys/src/features/gen_EventListenerOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] pub type EventListenerOptions; + #[wasm_bindgen(method, getter = "capture")] + fn capture_shim(this: &EventListenerOptions) -> bool; #[wasm_bindgen(method, setter = "capture")] - fn capture_shim(this: &EventListenerOptions, val: bool); + fn set_capture_shim(this: &EventListenerOptions, val: bool); +} +#[doc = "The trait to access properties on the `EventListenerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] +pub trait EventListenerOptionsGetters { + #[doc = "Get the `capture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] + fn capture(&self) -> bool; +} +impl EventListenerOptionsGetters for EventListenerOptions { + fn capture(&self) -> bool { + self.capture_shim() + } } impl EventListenerOptions { #[doc = "Construct a new `EventListenerOptions`."] @@ -26,7 +42,7 @@ impl EventListenerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventListenerOptions`*"] pub fn capture(&mut self, val: bool) -> &mut Self { - self.capture_shim(val); + self.set_capture_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EventModifierInit.rs b/crates/web-sys/src/features/gen_EventModifierInit.rs index 373609a21ec..da14b6df4df 100644 --- a/crates/web-sys/src/features/gen_EventModifierInit.rs +++ b/crates/web-sys/src/features/gen_EventModifierInit.rs @@ -10,43 +10,215 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub type EventModifierInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &EventModifierInit, val: bool); + fn set_bubbles_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &EventModifierInit, val: bool); + fn set_cancelable_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &EventModifierInit, val: bool); + fn set_composed_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &EventModifierInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &EventModifierInit, val: i32); + fn set_detail_shim(this: &EventModifierInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &EventModifierInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &EventModifierInit, val: Option<&Window>); + fn set_view_shim(this: &EventModifierInit, val: Option<&Window>); + #[wasm_bindgen(method, getter = "altKey")] + fn alt_key_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &EventModifierInit, val: bool); + fn set_alt_key_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "ctrlKey")] + fn ctrl_key_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &EventModifierInit, val: bool); + fn set_ctrl_key_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "metaKey")] + fn meta_key_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &EventModifierInit, val: bool); + fn set_meta_key_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "modifierAltGraph")] + fn modifier_alt_graph_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &EventModifierInit, val: bool); + fn set_modifier_alt_graph_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "modifierCapsLock")] + fn modifier_caps_lock_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &EventModifierInit, val: bool); + fn set_modifier_caps_lock_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFn")] + fn modifier_fn_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &EventModifierInit, val: bool); + fn set_modifier_fn_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFnLock")] + fn modifier_fn_lock_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &EventModifierInit, val: bool); + fn set_modifier_fn_lock_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "modifierNumLock")] + fn modifier_num_lock_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &EventModifierInit, val: bool); + fn set_modifier_num_lock_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "modifierOS")] + fn modifier_os_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &EventModifierInit, val: bool); + fn set_modifier_os_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "modifierScrollLock")] + fn modifier_scroll_lock_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &EventModifierInit, val: bool); + fn set_modifier_scroll_lock_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbol")] + fn modifier_symbol_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &EventModifierInit, val: bool); + fn set_modifier_symbol_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + fn modifier_symbol_lock_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &EventModifierInit, val: bool); + fn set_modifier_symbol_lock_shim(this: &EventModifierInit, val: bool); + #[wasm_bindgen(method, getter = "shiftKey")] + fn shift_key_shim(this: &EventModifierInit) -> bool; #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &EventModifierInit, val: bool); + fn set_shift_key_shim(this: &EventModifierInit, val: bool); +} +#[doc = "The trait to access properties on the `EventModifierInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] +pub trait EventModifierInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`, `Window`*"] + fn view(&self) -> Option; + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn alt_key(&self) -> bool; + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn ctrl_key(&self) -> bool; + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn meta_key(&self) -> bool; + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn modifier_alt_graph(&self) -> bool; + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn modifier_caps_lock(&self) -> bool; + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn modifier_fn(&self) -> bool; + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn modifier_fn_lock(&self) -> bool; + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn modifier_num_lock(&self) -> bool; + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn modifier_os(&self) -> bool; + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn modifier_scroll_lock(&self) -> bool; + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn modifier_symbol(&self) -> bool; + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn modifier_symbol_lock(&self) -> bool; + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] + fn shift_key(&self) -> bool; +} +impl EventModifierInitGetters for EventModifierInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + fn alt_key(&self) -> bool { + self.alt_key_shim() + } + fn ctrl_key(&self) -> bool { + self.ctrl_key_shim() + } + fn meta_key(&self) -> bool { + self.meta_key_shim() + } + fn modifier_alt_graph(&self) -> bool { + self.modifier_alt_graph_shim() + } + fn modifier_caps_lock(&self) -> bool { + self.modifier_caps_lock_shim() + } + fn modifier_fn(&self) -> bool { + self.modifier_fn_shim() + } + fn modifier_fn_lock(&self) -> bool { + self.modifier_fn_lock_shim() + } + fn modifier_num_lock(&self) -> bool { + self.modifier_num_lock_shim() + } + fn modifier_os(&self) -> bool { + self.modifier_os_shim() + } + fn modifier_scroll_lock(&self) -> bool { + self.modifier_scroll_lock_shim() + } + fn modifier_symbol(&self) -> bool { + self.modifier_symbol_shim() + } + fn modifier_symbol_lock(&self) -> bool { + self.modifier_symbol_lock_shim() + } + fn shift_key(&self) -> bool { + self.shift_key_shim() + } } impl EventModifierInit { #[doc = "Construct a new `EventModifierInit`."] @@ -61,28 +233,28 @@ impl EventModifierInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -90,98 +262,98 @@ impl EventModifierInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[doc = "Change the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key_shim(val); self } #[doc = "Change the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key_shim(val); self } #[doc = "Change the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key_shim(val); self } #[doc = "Change the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph_shim(val); self } #[doc = "Change the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock_shim(val); self } #[doc = "Change the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn_shim(val); self } #[doc = "Change the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock_shim(val); self } #[doc = "Change the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock_shim(val); self } #[doc = "Change the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os_shim(val); self } #[doc = "Change the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock_shim(val); self } #[doc = "Change the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol_shim(val); self } #[doc = "Change the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock_shim(val); self } #[doc = "Change the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventModifierInit`*"] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_EventSourceInit.rs b/crates/web-sys/src/features/gen_EventSourceInit.rs index 61761803dee..f3a2c61842c 100644 --- a/crates/web-sys/src/features/gen_EventSourceInit.rs +++ b/crates/web-sys/src/features/gen_EventSourceInit.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] pub type EventSourceInit; + #[wasm_bindgen(method, getter = "withCredentials")] + fn with_credentials_shim(this: &EventSourceInit) -> bool; #[wasm_bindgen(method, setter = "withCredentials")] - fn with_credentials_shim(this: &EventSourceInit, val: bool); + fn set_with_credentials_shim(this: &EventSourceInit, val: bool); +} +#[doc = "The trait to access properties on the `EventSourceInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] +pub trait EventSourceInitGetters { + #[doc = "Get the `withCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] + fn with_credentials(&self) -> bool; +} +impl EventSourceInitGetters for EventSourceInit { + fn with_credentials(&self) -> bool { + self.with_credentials_shim() + } } impl EventSourceInit { #[doc = "Construct a new `EventSourceInit`."] @@ -26,7 +42,7 @@ impl EventSourceInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventSourceInit`*"] pub fn with_credentials(&mut self, val: bool) -> &mut Self { - self.with_credentials_shim(val); + self.set_with_credentials_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ExtendableEventInit.rs b/crates/web-sys/src/features/gen_ExtendableEventInit.rs index 1dbc56a64f7..cc630aa841b 100644 --- a/crates/web-sys/src/features/gen_ExtendableEventInit.rs +++ b/crates/web-sys/src/features/gen_ExtendableEventInit.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] pub type ExtendableEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &ExtendableEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ExtendableEventInit, val: bool); + fn set_bubbles_shim(this: &ExtendableEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &ExtendableEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ExtendableEventInit, val: bool); + fn set_cancelable_shim(this: &ExtendableEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &ExtendableEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ExtendableEventInit, val: bool); + fn set_composed_shim(this: &ExtendableEventInit, val: bool); +} +#[doc = "The trait to access properties on the `ExtendableEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] +pub trait ExtendableEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] + fn composed(&self) -> bool; +} +impl ExtendableEventInitGetters for ExtendableEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } } impl ExtendableEventInit { #[doc = "Construct a new `ExtendableEventInit`."] @@ -30,21 +64,21 @@ impl ExtendableEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs b/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs index 32c11651574..fedffcbb86b 100644 --- a/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_ExtendableMessageEventInit.rs @@ -10,22 +10,101 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub type ExtendableMessageEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &ExtendableMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ExtendableMessageEventInit, val: bool); + fn set_bubbles_shim(this: &ExtendableMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &ExtendableMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ExtendableMessageEventInit, val: bool); + fn set_cancelable_shim(this: &ExtendableMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &ExtendableMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ExtendableMessageEventInit, val: bool); + fn set_composed_shim(this: &ExtendableMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &ExtendableMessageEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + fn set_data_shim(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "lastEventId")] + fn last_event_id_shim(this: &ExtendableMessageEventInit) -> String; #[wasm_bindgen(method, setter = "lastEventId")] - fn last_event_id_shim(this: &ExtendableMessageEventInit, val: &str); + fn set_last_event_id_shim(this: &ExtendableMessageEventInit, val: &str); + #[wasm_bindgen(method, getter = "origin")] + fn origin_shim(this: &ExtendableMessageEventInit) -> String; #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &ExtendableMessageEventInit, val: &str); + fn set_origin_shim(this: &ExtendableMessageEventInit, val: &str); + #[wasm_bindgen(method, getter = "ports")] + fn ports_shim(this: &ExtendableMessageEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "ports")] - fn ports_shim(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + fn set_ports_shim(this: &ExtendableMessageEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &ExtendableMessageEventInit) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &ExtendableMessageEventInit, val: Option<&::js_sys::Object>); + fn set_source_shim(this: &ExtendableMessageEventInit, val: Option<&::js_sys::Object>); +} +#[doc = "The trait to access properties on the `ExtendableMessageEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] +pub trait ExtendableMessageEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + fn data(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `lastEventId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + fn last_event_id(&self) -> String; + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + fn origin(&self) -> String; + #[doc = "Get the `ports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + fn ports(&self) -> ::js_sys::Array; + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] + fn source(&self) -> Option<::js_sys::Object>; +} +impl ExtendableMessageEventInitGetters for ExtendableMessageEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn data(&self) -> ::wasm_bindgen::JsValue { + self.data_shim() + } + fn last_event_id(&self) -> String { + self.last_event_id_shim() + } + fn origin(&self) -> String { + self.origin_shim() + } + fn ports(&self) -> ::js_sys::Array { + self.ports_shim() + } + fn source(&self) -> Option<::js_sys::Object> { + self.source_shim() + } } impl ExtendableMessageEventInit { #[doc = "Construct a new `ExtendableMessageEventInit`."] @@ -40,56 +119,56 @@ impl ExtendableMessageEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[doc = "Change the `lastEventId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub fn last_event_id(&mut self, val: &str) -> &mut Self { - self.last_event_id_shim(val); + self.set_last_event_id_shim(val); self } #[doc = "Change the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin_shim(val); self } #[doc = "Change the `ports` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub fn ports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ports_shim(val); + self.set_ports_shim(val); self } #[doc = "Change the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ExtendableMessageEventInit`*"] pub fn source(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs b/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs index 2d3e8407ce1..cf77f975f95 100644 --- a/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs +++ b/crates/web-sys/src/features/gen_FakePluginMimeEntry.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] pub type FakePluginMimeEntry; + #[wasm_bindgen(method, getter = "description")] + fn description_shim(this: &FakePluginMimeEntry) -> String; #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &FakePluginMimeEntry, val: &str); + fn set_description_shim(this: &FakePluginMimeEntry, val: &str); + #[wasm_bindgen(method, getter = "extension")] + fn extension_shim(this: &FakePluginMimeEntry) -> String; #[wasm_bindgen(method, setter = "extension")] - fn extension_shim(this: &FakePluginMimeEntry, val: &str); + fn set_extension_shim(this: &FakePluginMimeEntry, val: &str); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &FakePluginMimeEntry) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &FakePluginMimeEntry, val: &str); + fn set_type__shim(this: &FakePluginMimeEntry, val: &str); +} +#[doc = "The trait to access properties on the `FakePluginMimeEntry` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] +pub trait FakePluginMimeEntryGetters { + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + fn description(&self) -> String; + #[doc = "Get the `extension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + fn extension(&self) -> String; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] + fn type_(&self) -> String; +} +impl FakePluginMimeEntryGetters for FakePluginMimeEntry { + fn description(&self) -> String { + self.description_shim() + } + fn extension(&self) -> String { + self.extension_shim() + } + fn type_(&self) -> String { + self.type__shim() + } } impl FakePluginMimeEntry { #[doc = "Construct a new `FakePluginMimeEntry`."] @@ -24,28 +58,28 @@ impl FakePluginMimeEntry { pub fn new(type_: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.type_(type_); + Self::type_(&mut ret, type_); ret } #[doc = "Change the `description` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] pub fn description(&mut self, val: &str) -> &mut Self { - self.description_shim(val); + self.set_description_shim(val); self } #[doc = "Change the `extension` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] pub fn extension(&mut self, val: &str) -> &mut Self { - self.extension_shim(val); + self.set_extension_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginMimeEntry`*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FakePluginTagInit.rs b/crates/web-sys/src/features/gen_FakePluginTagInit.rs index 83d998c2dde..e4801ed9bd4 100644 --- a/crates/web-sys/src/features/gen_FakePluginTagInit.rs +++ b/crates/web-sys/src/features/gen_FakePluginTagInit.rs @@ -10,24 +10,112 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub type FakePluginTagInit; + #[wasm_bindgen(method, getter = "description")] + fn description_shim(this: &FakePluginTagInit) -> String; #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &FakePluginTagInit, val: &str); + fn set_description_shim(this: &FakePluginTagInit, val: &str); + #[wasm_bindgen(method, getter = "fileName")] + fn file_name_shim(this: &FakePluginTagInit) -> String; #[wasm_bindgen(method, setter = "fileName")] - fn file_name_shim(this: &FakePluginTagInit, val: &str); + fn set_file_name_shim(this: &FakePluginTagInit, val: &str); + #[wasm_bindgen(method, getter = "fullPath")] + fn full_path_shim(this: &FakePluginTagInit) -> String; #[wasm_bindgen(method, setter = "fullPath")] - fn full_path_shim(this: &FakePluginTagInit, val: &str); + fn set_full_path_shim(this: &FakePluginTagInit, val: &str); + #[wasm_bindgen(method, getter = "handlerURI")] + fn handler_uri_shim(this: &FakePluginTagInit) -> String; #[wasm_bindgen(method, setter = "handlerURI")] - fn handler_uri_shim(this: &FakePluginTagInit, val: &str); + fn set_handler_uri_shim(this: &FakePluginTagInit, val: &str); + #[wasm_bindgen(method, getter = "mimeEntries")] + fn mime_entries_shim(this: &FakePluginTagInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "mimeEntries")] - fn mime_entries_shim(this: &FakePluginTagInit, val: &::wasm_bindgen::JsValue); + fn set_mime_entries_shim(this: &FakePluginTagInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &FakePluginTagInit) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &FakePluginTagInit, val: &str); + fn set_name_shim(this: &FakePluginTagInit, val: &str); + #[wasm_bindgen(method, getter = "niceName")] + fn nice_name_shim(this: &FakePluginTagInit) -> String; #[wasm_bindgen(method, setter = "niceName")] - fn nice_name_shim(this: &FakePluginTagInit, val: &str); + fn set_nice_name_shim(this: &FakePluginTagInit, val: &str); + #[wasm_bindgen(method, getter = "sandboxScript")] + fn sandbox_script_shim(this: &FakePluginTagInit) -> String; #[wasm_bindgen(method, setter = "sandboxScript")] - fn sandbox_script_shim(this: &FakePluginTagInit, val: &str); + fn set_sandbox_script_shim(this: &FakePluginTagInit, val: &str); + #[wasm_bindgen(method, getter = "version")] + fn version_shim(this: &FakePluginTagInit) -> String; #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &FakePluginTagInit, val: &str); + fn set_version_shim(this: &FakePluginTagInit, val: &str); +} +#[doc = "The trait to access properties on the `FakePluginTagInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] +pub trait FakePluginTagInitGetters { + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + fn description(&self) -> String; + #[doc = "Get the `fileName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + fn file_name(&self) -> String; + #[doc = "Get the `fullPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + fn full_path(&self) -> String; + #[doc = "Get the `handlerURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + fn handler_uri(&self) -> String; + #[doc = "Get the `mimeEntries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + fn mime_entries(&self) -> ::js_sys::Array; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + fn name(&self) -> String; + #[doc = "Get the `niceName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + fn nice_name(&self) -> String; + #[doc = "Get the `sandboxScript` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + fn sandbox_script(&self) -> String; + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] + fn version(&self) -> String; +} +impl FakePluginTagInitGetters for FakePluginTagInit { + fn description(&self) -> String { + self.description_shim() + } + fn file_name(&self) -> String { + self.file_name_shim() + } + fn full_path(&self) -> String { + self.full_path_shim() + } + fn handler_uri(&self) -> String { + self.handler_uri_shim() + } + fn mime_entries(&self) -> ::js_sys::Array { + self.mime_entries_shim() + } + fn name(&self) -> String { + self.name_shim() + } + fn nice_name(&self) -> String { + self.nice_name_shim() + } + fn sandbox_script(&self) -> String { + self.sandbox_script_shim() + } + fn version(&self) -> String { + self.version_shim() + } } impl FakePluginTagInit { #[doc = "Construct a new `FakePluginTagInit`."] @@ -36,71 +124,71 @@ impl FakePluginTagInit { pub fn new(handler_uri: &str, mime_entries: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.handler_uri(handler_uri); - ret.mime_entries(mime_entries); + Self::handler_uri(&mut ret, handler_uri); + Self::mime_entries(&mut ret, mime_entries); ret } #[doc = "Change the `description` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub fn description(&mut self, val: &str) -> &mut Self { - self.description_shim(val); + self.set_description_shim(val); self } #[doc = "Change the `fileName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub fn file_name(&mut self, val: &str) -> &mut Self { - self.file_name_shim(val); + self.set_file_name_shim(val); self } #[doc = "Change the `fullPath` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub fn full_path(&mut self, val: &str) -> &mut Self { - self.full_path_shim(val); + self.set_full_path_shim(val); self } #[doc = "Change the `handlerURI` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub fn handler_uri(&mut self, val: &str) -> &mut Self { - self.handler_uri_shim(val); + self.set_handler_uri_shim(val); self } #[doc = "Change the `mimeEntries` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub fn mime_entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.mime_entries_shim(val); + self.set_mime_entries_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `niceName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub fn nice_name(&mut self, val: &str) -> &mut Self { - self.nice_name_shim(val); + self.set_nice_name_shim(val); self } #[doc = "Change the `sandboxScript` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub fn sandbox_script(&mut self, val: &str) -> &mut Self { - self.sandbox_script_shim(val); + self.set_sandbox_script_shim(val); self } #[doc = "Change the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FakePluginTagInit`*"] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FetchEventInit.rs b/crates/web-sys/src/features/gen_FetchEventInit.rs index 4259035f3d0..e5ba479d65e 100644 --- a/crates/web-sys/src/features/gen_FetchEventInit.rs +++ b/crates/web-sys/src/features/gen_FetchEventInit.rs @@ -10,19 +10,83 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] pub type FetchEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &FetchEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &FetchEventInit, val: bool); + fn set_bubbles_shim(this: &FetchEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &FetchEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &FetchEventInit, val: bool); + fn set_cancelable_shim(this: &FetchEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &FetchEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &FetchEventInit, val: bool); + fn set_composed_shim(this: &FetchEventInit, val: bool); + #[wasm_bindgen(method, getter = "clientId")] + fn client_id_shim(this: &FetchEventInit) -> Option; #[wasm_bindgen(method, setter = "clientId")] - fn client_id_shim(this: &FetchEventInit, val: Option<&str>); + fn set_client_id_shim(this: &FetchEventInit, val: Option<&str>); + #[wasm_bindgen(method, getter = "isReload")] + fn is_reload_shim(this: &FetchEventInit) -> bool; #[wasm_bindgen(method, setter = "isReload")] - fn is_reload_shim(this: &FetchEventInit, val: bool); + fn set_is_reload_shim(this: &FetchEventInit, val: bool); + #[cfg(feature = "Request")] + #[wasm_bindgen(method, getter = "request")] + fn request_shim(this: &FetchEventInit) -> Request; #[cfg(feature = "Request")] #[wasm_bindgen(method, setter = "request")] - fn request_shim(this: &FetchEventInit, val: &Request); + fn set_request_shim(this: &FetchEventInit, val: &Request); +} +#[doc = "The trait to access properties on the `FetchEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] +pub trait FetchEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `clientId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + fn client_id(&self) -> Option; + #[doc = "Get the `isReload` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] + fn is_reload(&self) -> bool; + #[cfg(feature = "Request")] + #[doc = "Get the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"] + fn request(&self) -> Request; +} +impl FetchEventInitGetters for FetchEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn client_id(&self) -> Option { + self.client_id_shim() + } + fn is_reload(&self) -> bool { + self.is_reload_shim() + } + #[cfg(feature = "Request")] + fn request(&self) -> Request { + self.request_shim() + } } impl FetchEventInit { #[cfg(feature = "Request")] @@ -32,42 +96,42 @@ impl FetchEventInit { pub fn new(request: &Request) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.request(request); + Self::request(&mut ret, request); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `clientId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] pub fn client_id(&mut self, val: Option<&str>) -> &mut Self { - self.client_id_shim(val); + self.set_client_id_shim(val); self } #[doc = "Change the `isReload` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"] pub fn is_reload(&mut self, val: bool) -> &mut Self { - self.is_reload_shim(val); + self.set_is_reload_shim(val); self } #[cfg(feature = "Request")] @@ -75,7 +139,7 @@ impl FetchEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"] pub fn request(&mut self, val: &Request) -> &mut Self { - self.request_shim(val); + self.set_request_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FetchReadableStreamReadDataArray.rs b/crates/web-sys/src/features/gen_FetchReadableStreamReadDataArray.rs index 42499f45b31..841d0b87cfa 100644 --- a/crates/web-sys/src/features/gen_FetchReadableStreamReadDataArray.rs +++ b/crates/web-sys/src/features/gen_FetchReadableStreamReadDataArray.rs @@ -11,6 +11,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataArray`*"] pub type FetchReadableStreamReadDataArray; } +#[doc = "The trait to access properties on the `FetchReadableStreamReadDataArray` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataArray`*"] +pub trait FetchReadableStreamReadDataArrayGetters {} +impl FetchReadableStreamReadDataArrayGetters for FetchReadableStreamReadDataArray {} impl FetchReadableStreamReadDataArray { #[doc = "Construct a new `FetchReadableStreamReadDataArray`."] #[doc = ""] diff --git a/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs b/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs index 3205e8c2b0b..30a2ed1f757 100644 --- a/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs +++ b/crates/web-sys/src/features/gen_FetchReadableStreamReadDataDone.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] pub type FetchReadableStreamReadDataDone; + #[wasm_bindgen(method, getter = "done")] + fn done_shim(this: &FetchReadableStreamReadDataDone) -> bool; #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &FetchReadableStreamReadDataDone, val: bool); + fn set_done_shim(this: &FetchReadableStreamReadDataDone, val: bool); +} +#[doc = "The trait to access properties on the `FetchReadableStreamReadDataDone` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] +pub trait FetchReadableStreamReadDataDoneGetters { + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] + fn done(&self) -> bool; +} +impl FetchReadableStreamReadDataDoneGetters for FetchReadableStreamReadDataDone { + fn done(&self) -> bool { + self.done_shim() + } } impl FetchReadableStreamReadDataDone { #[doc = "Construct a new `FetchReadableStreamReadDataDone`."] @@ -26,7 +42,7 @@ impl FetchReadableStreamReadDataDone { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FetchReadableStreamReadDataDone`*"] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileCallback.rs b/crates/web-sys/src/features/gen_FileCallback.rs index 17beb74983c..6bd956b71a0 100644 --- a/crates/web-sys/src/features/gen_FileCallback.rs +++ b/crates/web-sys/src/features/gen_FileCallback.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] pub type FileCallback; + #[wasm_bindgen(method, getter = "handleEvent")] + fn handle_event_shim(this: &FileCallback) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &FileCallback, val: &::js_sys::Function); + fn set_handle_event_shim(this: &FileCallback, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `FileCallback` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] +pub trait FileCallbackGetters { + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] + fn handle_event(&self) -> ::js_sys::Function; +} +impl FileCallbackGetters for FileCallback { + fn handle_event(&self) -> ::js_sys::Function { + self.handle_event_shim() + } } impl FileCallback { #[doc = "Construct a new `FileCallback`."] @@ -26,7 +42,7 @@ impl FileCallback { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileCallback`*"] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FilePickerAcceptType.rs b/crates/web-sys/src/features/gen_FilePickerAcceptType.rs index 196fd6f0a79..72d1eb3b7ee 100644 --- a/crates/web-sys/src/features/gen_FilePickerAcceptType.rs +++ b/crates/web-sys/src/features/gen_FilePickerAcceptType.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type FilePickerAcceptType; + #[wasm_bindgen(method, getter = "description")] + fn description_shim(this: &FilePickerAcceptType) -> String; #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &FilePickerAcceptType, val: &str); + fn set_description_shim(this: &FilePickerAcceptType, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `FilePickerAcceptType` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"] +pub trait FilePickerAcceptTypeGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerAcceptType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn description(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl FilePickerAcceptTypeGetters for FilePickerAcceptType { + #[cfg(web_sys_unstable_apis)] + fn description(&self) -> String { + self.description_shim() + } } #[cfg(web_sys_unstable_apis)] impl FilePickerAcceptType { @@ -38,7 +61,7 @@ impl FilePickerAcceptType { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn description(&mut self, val: &str) -> &mut Self { - self.description_shim(val); + self.set_description_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FilePickerOptions.rs b/crates/web-sys/src/features/gen_FilePickerOptions.rs index 639ead2b1ea..4411936fec4 100644 --- a/crates/web-sys/src/features/gen_FilePickerOptions.rs +++ b/crates/web-sys/src/features/gen_FilePickerOptions.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type FilePickerOptions; + #[wasm_bindgen(method, getter = "excludeAcceptAllOption")] + fn exclude_accept_all_option_shim(this: &FilePickerOptions) -> bool; #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] - fn exclude_accept_all_option_shim(this: &FilePickerOptions, val: bool); + fn set_exclude_accept_all_option_shim(this: &FilePickerOptions, val: bool); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &FilePickerOptions) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &FilePickerOptions, val: &str); + fn set_id_shim(this: &FilePickerOptions, val: &str); + #[wasm_bindgen(method, getter = "startIn")] + fn start_in_shim(this: &FilePickerOptions) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "startIn")] - fn start_in_shim(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); + fn set_start_in_shim(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "types")] + fn types_shim(this: &FilePickerOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "types")] - fn types_shim(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); + fn set_types_shim(this: &FilePickerOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `FilePickerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] +pub trait FilePickerOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `excludeAcceptAllOption` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn exclude_accept_all_option(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn id(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn start_in(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn types(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl FilePickerOptionsGetters for FilePickerOptions { + #[cfg(web_sys_unstable_apis)] + fn exclude_accept_all_option(&self) -> bool { + self.exclude_accept_all_option_shim() + } + #[cfg(web_sys_unstable_apis)] + fn id(&self) -> String { + self.id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn start_in(&self) -> ::wasm_bindgen::JsValue { + self.start_in_shim() + } + #[cfg(web_sys_unstable_apis)] + fn types(&self) -> ::js_sys::Array { + self.types_shim() + } } #[cfg(web_sys_unstable_apis)] impl FilePickerOptions { @@ -44,7 +109,7 @@ impl FilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { - self.exclude_accept_all_option_shim(val); + self.set_exclude_accept_all_option_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +120,7 @@ impl FilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +131,7 @@ impl FilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.start_in_shim(val); + self.set_start_in_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +142,7 @@ impl FilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.types_shim(val); + self.set_types_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FilePropertyBag.rs b/crates/web-sys/src/features/gen_FilePropertyBag.rs index 99ecc5bb920..577962ba1e1 100644 --- a/crates/web-sys/src/features/gen_FilePropertyBag.rs +++ b/crates/web-sys/src/features/gen_FilePropertyBag.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] pub type FilePropertyBag; + #[wasm_bindgen(method, getter = "lastModified")] + fn last_modified_shim(this: &FilePropertyBag) -> f64; #[wasm_bindgen(method, setter = "lastModified")] - fn last_modified_shim(this: &FilePropertyBag, val: f64); + fn set_last_modified_shim(this: &FilePropertyBag, val: f64); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &FilePropertyBag) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &FilePropertyBag, val: &str); + fn set_type__shim(this: &FilePropertyBag, val: &str); +} +#[doc = "The trait to access properties on the `FilePropertyBag` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] +pub trait FilePropertyBagGetters { + #[doc = "Get the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] + fn last_modified(&self) -> f64; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] + fn type_(&self) -> String; +} +impl FilePropertyBagGetters for FilePropertyBag { + fn last_modified(&self) -> f64 { + self.last_modified_shim() + } + fn type_(&self) -> String { + self.type__shim() + } } impl FilePropertyBag { #[doc = "Construct a new `FilePropertyBag`."] @@ -28,14 +53,14 @@ impl FilePropertyBag { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] pub fn last_modified(&mut self, val: f64) -> &mut Self { - self.last_modified_shim(val); + self.set_last_modified_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FilePropertyBag`*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs b/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs index ae33bfeb6de..9808d00dce8 100644 --- a/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemCreateWritableOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] pub type FileSystemCreateWritableOptions; + #[wasm_bindgen(method, getter = "keepExistingData")] + fn keep_existing_data_shim(this: &FileSystemCreateWritableOptions) -> bool; #[wasm_bindgen(method, setter = "keepExistingData")] - fn keep_existing_data_shim(this: &FileSystemCreateWritableOptions, val: bool); + fn set_keep_existing_data_shim(this: &FileSystemCreateWritableOptions, val: bool); +} +#[doc = "The trait to access properties on the `FileSystemCreateWritableOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] +pub trait FileSystemCreateWritableOptionsGetters { + #[doc = "Get the `keepExistingData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] + fn keep_existing_data(&self) -> bool; +} +impl FileSystemCreateWritableOptionsGetters for FileSystemCreateWritableOptions { + fn keep_existing_data(&self) -> bool { + self.keep_existing_data_shim() + } } impl FileSystemCreateWritableOptions { #[doc = "Construct a new `FileSystemCreateWritableOptions`."] @@ -26,7 +42,7 @@ impl FileSystemCreateWritableOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemCreateWritableOptions`*"] pub fn keep_existing_data(&mut self, val: bool) -> &mut Self { - self.keep_existing_data_shim(val); + self.set_keep_existing_data_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs b/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs index 6cb0cfb560d..62affe22358 100644 --- a/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs +++ b/crates/web-sys/src/features/gen_FileSystemEntriesCallback.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] pub type FileSystemEntriesCallback; + #[wasm_bindgen(method, getter = "handleEvent")] + fn handle_event_shim(this: &FileSystemEntriesCallback) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &FileSystemEntriesCallback, val: &::js_sys::Function); + fn set_handle_event_shim(this: &FileSystemEntriesCallback, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `FileSystemEntriesCallback` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] +pub trait FileSystemEntriesCallbackGetters { + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] + fn handle_event(&self) -> ::js_sys::Function; +} +impl FileSystemEntriesCallbackGetters for FileSystemEntriesCallback { + fn handle_event(&self) -> ::js_sys::Function { + self.handle_event_shim() + } } impl FileSystemEntriesCallback { #[doc = "Construct a new `FileSystemEntriesCallback`."] @@ -26,7 +42,7 @@ impl FileSystemEntriesCallback { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemEntriesCallback`*"] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs b/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs index 4a5988ec2b8..459d94f37d1 100644 --- a/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs +++ b/crates/web-sys/src/features/gen_FileSystemEntryCallback.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] pub type FileSystemEntryCallback; + #[wasm_bindgen(method, getter = "handleEvent")] + fn handle_event_shim(this: &FileSystemEntryCallback) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &FileSystemEntryCallback, val: &::js_sys::Function); + fn set_handle_event_shim(this: &FileSystemEntryCallback, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `FileSystemEntryCallback` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] +pub trait FileSystemEntryCallbackGetters { + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] + fn handle_event(&self) -> ::js_sys::Function; +} +impl FileSystemEntryCallbackGetters for FileSystemEntryCallback { + fn handle_event(&self) -> ::js_sys::Function { + self.handle_event_shim() + } } impl FileSystemEntryCallback { #[doc = "Construct a new `FileSystemEntryCallback`."] @@ -26,7 +42,7 @@ impl FileSystemEntryCallback { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemEntryCallback`*"] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemFlags.rs b/crates/web-sys/src/features/gen_FileSystemFlags.rs index bb68735f21e..a8bc394f5c3 100644 --- a/crates/web-sys/src/features/gen_FileSystemFlags.rs +++ b/crates/web-sys/src/features/gen_FileSystemFlags.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] pub type FileSystemFlags; + #[wasm_bindgen(method, getter = "create")] + fn create_shim(this: &FileSystemFlags) -> bool; #[wasm_bindgen(method, setter = "create")] - fn create_shim(this: &FileSystemFlags, val: bool); + fn set_create_shim(this: &FileSystemFlags, val: bool); + #[wasm_bindgen(method, getter = "exclusive")] + fn exclusive_shim(this: &FileSystemFlags) -> bool; #[wasm_bindgen(method, setter = "exclusive")] - fn exclusive_shim(this: &FileSystemFlags, val: bool); + fn set_exclusive_shim(this: &FileSystemFlags, val: bool); +} +#[doc = "The trait to access properties on the `FileSystemFlags` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] +pub trait FileSystemFlagsGetters { + #[doc = "Get the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] + fn create(&self) -> bool; + #[doc = "Get the `exclusive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] + fn exclusive(&self) -> bool; +} +impl FileSystemFlagsGetters for FileSystemFlags { + fn create(&self) -> bool { + self.create_shim() + } + fn exclusive(&self) -> bool { + self.exclusive_shim() + } } impl FileSystemFlags { #[doc = "Construct a new `FileSystemFlags`."] @@ -28,14 +53,14 @@ impl FileSystemFlags { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] pub fn create(&mut self, val: bool) -> &mut Self { - self.create_shim(val); + self.set_create_shim(val); self } #[doc = "Change the `exclusive` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemFlags`*"] pub fn exclusive(&mut self, val: bool) -> &mut Self { - self.exclusive_shim(val); + self.set_exclusive_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs b/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs index b25b6429426..2668388b4cb 100644 --- a/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemGetDirectoryOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] pub type FileSystemGetDirectoryOptions; + #[wasm_bindgen(method, getter = "create")] + fn create_shim(this: &FileSystemGetDirectoryOptions) -> bool; #[wasm_bindgen(method, setter = "create")] - fn create_shim(this: &FileSystemGetDirectoryOptions, val: bool); + fn set_create_shim(this: &FileSystemGetDirectoryOptions, val: bool); +} +#[doc = "The trait to access properties on the `FileSystemGetDirectoryOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] +pub trait FileSystemGetDirectoryOptionsGetters { + #[doc = "Get the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] + fn create(&self) -> bool; +} +impl FileSystemGetDirectoryOptionsGetters for FileSystemGetDirectoryOptions { + fn create(&self) -> bool { + self.create_shim() + } } impl FileSystemGetDirectoryOptions { #[doc = "Construct a new `FileSystemGetDirectoryOptions`."] @@ -26,7 +42,7 @@ impl FileSystemGetDirectoryOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetDirectoryOptions`*"] pub fn create(&mut self, val: bool) -> &mut Self { - self.create_shim(val); + self.set_create_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs b/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs index 78004c0a807..307bfe7eed5 100644 --- a/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemGetFileOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] pub type FileSystemGetFileOptions; + #[wasm_bindgen(method, getter = "create")] + fn create_shim(this: &FileSystemGetFileOptions) -> bool; #[wasm_bindgen(method, setter = "create")] - fn create_shim(this: &FileSystemGetFileOptions, val: bool); + fn set_create_shim(this: &FileSystemGetFileOptions, val: bool); +} +#[doc = "The trait to access properties on the `FileSystemGetFileOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] +pub trait FileSystemGetFileOptionsGetters { + #[doc = "Get the `create` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] + fn create(&self) -> bool; +} +impl FileSystemGetFileOptionsGetters for FileSystemGetFileOptions { + fn create(&self) -> bool { + self.create_shim() + } } impl FileSystemGetFileOptions { #[doc = "Construct a new `FileSystemGetFileOptions`."] @@ -26,7 +42,7 @@ impl FileSystemGetFileOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemGetFileOptions`*"] pub fn create(&mut self, val: bool) -> &mut Self { - self.create_shim(val); + self.set_create_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs b/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs index 042392fed2a..6652416cc47 100644 --- a/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_FileSystemHandlePermissionDescriptor.rs @@ -15,8 +15,34 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type FileSystemHandlePermissionDescriptor; #[cfg(feature = "FileSystemPermissionMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &FileSystemHandlePermissionDescriptor) -> FileSystemPermissionMode; + #[cfg(feature = "FileSystemPermissionMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &FileSystemHandlePermissionDescriptor, val: FileSystemPermissionMode); + fn set_mode_shim(this: &FileSystemHandlePermissionDescriptor, val: FileSystemPermissionMode); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `FileSystemHandlePermissionDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`*"] +pub trait FileSystemHandlePermissionDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemHandlePermissionDescriptor`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mode(&self) -> FileSystemPermissionMode; +} +#[cfg(web_sys_unstable_apis)] +impl FileSystemHandlePermissionDescriptorGetters for FileSystemHandlePermissionDescriptor { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemPermissionMode")] + fn mode(&self) -> FileSystemPermissionMode { + self.mode_shim() + } } #[cfg(web_sys_unstable_apis)] impl FileSystemHandlePermissionDescriptor { @@ -40,7 +66,7 @@ impl FileSystemHandlePermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs b/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs index b777cfe64f3..efc10b09e6a 100644 --- a/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_FileSystemPermissionDescriptor.rs @@ -15,14 +15,74 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type FileSystemPermissionDescriptor; #[cfg(feature = "PermissionName")] + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &FileSystemPermissionDescriptor) -> PermissionName; + #[cfg(feature = "PermissionName")] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &FileSystemPermissionDescriptor, val: PermissionName); + fn set_name_shim(this: &FileSystemPermissionDescriptor, val: PermissionName); + #[cfg(feature = "FileSystemHandle")] + #[wasm_bindgen(method, getter = "handle")] + fn handle_shim(this: &FileSystemPermissionDescriptor) -> FileSystemHandle; #[cfg(feature = "FileSystemHandle")] #[wasm_bindgen(method, setter = "handle")] - fn handle_shim(this: &FileSystemPermissionDescriptor, val: &FileSystemHandle); + fn set_handle_shim(this: &FileSystemPermissionDescriptor, val: &FileSystemHandle); + #[cfg(feature = "FileSystemPermissionMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &FileSystemPermissionDescriptor) -> FileSystemPermissionMode; #[cfg(feature = "FileSystemPermissionMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &FileSystemPermissionDescriptor, val: FileSystemPermissionMode); + fn set_mode_shim(this: &FileSystemPermissionDescriptor, val: FileSystemPermissionMode); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `FileSystemPermissionDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`*"] +pub trait FileSystemPermissionDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `PermissionName`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name(&self) -> PermissionName; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemHandle")] + #[doc = "Get the `handle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemHandle`, `FileSystemPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn handle(&self) -> FileSystemHandle; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemPermissionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemPermissionDescriptor`, `FileSystemPermissionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mode(&self) -> FileSystemPermissionMode; +} +#[cfg(web_sys_unstable_apis)] +impl FileSystemPermissionDescriptorGetters for FileSystemPermissionDescriptor { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + fn name(&self) -> PermissionName { + self.name_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemHandle")] + fn handle(&self) -> FileSystemHandle { + self.handle_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FileSystemPermissionMode")] + fn mode(&self) -> FileSystemPermissionMode { + self.mode_shim() + } } #[cfg(web_sys_unstable_apis)] impl FileSystemPermissionDescriptor { @@ -36,8 +96,8 @@ impl FileSystemPermissionDescriptor { pub fn new(name: PermissionName, handle: &FileSystemHandle) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.handle(handle); + Self::name(&mut ret, name); + Self::handle(&mut ret, handle); ret } #[cfg(web_sys_unstable_apis)] @@ -49,7 +109,7 @@ impl FileSystemPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -61,7 +121,7 @@ impl FileSystemPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn handle(&mut self, val: &FileSystemHandle) -> &mut Self { - self.handle_shim(val); + self.set_handle_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -73,7 +133,7 @@ impl FileSystemPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mode(&mut self, val: FileSystemPermissionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs b/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs index c54fb3a3284..1dd117105ac 100644 --- a/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemReadWriteOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] pub type FileSystemReadWriteOptions; + #[wasm_bindgen(method, getter = "at")] + fn at_shim(this: &FileSystemReadWriteOptions) -> f64; #[wasm_bindgen(method, setter = "at")] - fn at_shim(this: &FileSystemReadWriteOptions, val: f64); + fn set_at_shim(this: &FileSystemReadWriteOptions, val: f64); +} +#[doc = "The trait to access properties on the `FileSystemReadWriteOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] +pub trait FileSystemReadWriteOptionsGetters { + #[doc = "Get the `at` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] + fn at(&self) -> f64; +} +impl FileSystemReadWriteOptionsGetters for FileSystemReadWriteOptions { + fn at(&self) -> f64 { + self.at_shim() + } } impl FileSystemReadWriteOptions { #[doc = "Construct a new `FileSystemReadWriteOptions`."] @@ -26,7 +42,7 @@ impl FileSystemReadWriteOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemReadWriteOptions`*"] pub fn at(&mut self, val: f64) -> &mut Self { - self.at_shim(val); + self.set_at_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs b/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs index fbc6e6fdbc7..0c75af6db0e 100644 --- a/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs +++ b/crates/web-sys/src/features/gen_FileSystemRemoveOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] pub type FileSystemRemoveOptions; + #[wasm_bindgen(method, getter = "recursive")] + fn recursive_shim(this: &FileSystemRemoveOptions) -> bool; #[wasm_bindgen(method, setter = "recursive")] - fn recursive_shim(this: &FileSystemRemoveOptions, val: bool); + fn set_recursive_shim(this: &FileSystemRemoveOptions, val: bool); +} +#[doc = "The trait to access properties on the `FileSystemRemoveOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] +pub trait FileSystemRemoveOptionsGetters { + #[doc = "Get the `recursive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] + fn recursive(&self) -> bool; +} +impl FileSystemRemoveOptionsGetters for FileSystemRemoveOptions { + fn recursive(&self) -> bool { + self.recursive_shim() + } } impl FileSystemRemoveOptions { #[doc = "Construct a new `FileSystemRemoveOptions`."] @@ -26,7 +42,7 @@ impl FileSystemRemoveOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FileSystemRemoveOptions`*"] pub fn recursive(&mut self, val: bool) -> &mut Self { - self.recursive_shim(val); + self.set_recursive_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FocusEventInit.rs b/crates/web-sys/src/features/gen_FocusEventInit.rs index 80ec658083c..1ae0db356d5 100644 --- a/crates/web-sys/src/features/gen_FocusEventInit.rs +++ b/crates/web-sys/src/features/gen_FocusEventInit.rs @@ -10,20 +10,87 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] pub type FocusEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &FocusEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &FocusEventInit, val: bool); + fn set_bubbles_shim(this: &FocusEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &FocusEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &FocusEventInit, val: bool); + fn set_cancelable_shim(this: &FocusEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &FocusEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &FocusEventInit, val: bool); + fn set_composed_shim(this: &FocusEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &FocusEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &FocusEventInit, val: i32); + fn set_detail_shim(this: &FocusEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &FocusEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &FocusEventInit, val: Option<&Window>); + fn set_view_shim(this: &FocusEventInit, val: Option<&Window>); + #[cfg(feature = "EventTarget")] + #[wasm_bindgen(method, getter = "relatedTarget")] + fn related_target_shim(this: &FocusEventInit) -> Option; #[cfg(feature = "EventTarget")] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &FocusEventInit, val: Option<&EventTarget>); + fn set_related_target_shim(this: &FocusEventInit, val: Option<&EventTarget>); +} +#[doc = "The trait to access properties on the `FocusEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] +pub trait FocusEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`, `Window`*"] + fn view(&self) -> Option; + #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `FocusEventInit`*"] + fn related_target(&self) -> Option; +} +impl FocusEventInitGetters for FocusEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + #[cfg(feature = "EventTarget")] + fn related_target(&self) -> Option { + self.related_target_shim() + } } impl FocusEventInit { #[doc = "Construct a new `FocusEventInit`."] @@ -38,28 +105,28 @@ impl FocusEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -67,7 +134,7 @@ impl FocusEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FocusEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[cfg(feature = "EventTarget")] @@ -75,7 +142,7 @@ impl FocusEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `FocusEventInit`*"] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FontFaceDescriptors.rs b/crates/web-sys/src/features/gen_FontFaceDescriptors.rs index 1da0a315c1f..cc0d642a5c5 100644 --- a/crates/web-sys/src/features/gen_FontFaceDescriptors.rs +++ b/crates/web-sys/src/features/gen_FontFaceDescriptors.rs @@ -10,22 +10,101 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub type FontFaceDescriptors; + #[wasm_bindgen(method, getter = "display")] + fn display_shim(this: &FontFaceDescriptors) -> String; #[wasm_bindgen(method, setter = "display")] - fn display_shim(this: &FontFaceDescriptors, val: &str); + fn set_display_shim(this: &FontFaceDescriptors, val: &str); + #[wasm_bindgen(method, getter = "featureSettings")] + fn feature_settings_shim(this: &FontFaceDescriptors) -> String; #[wasm_bindgen(method, setter = "featureSettings")] - fn feature_settings_shim(this: &FontFaceDescriptors, val: &str); + fn set_feature_settings_shim(this: &FontFaceDescriptors, val: &str); + #[wasm_bindgen(method, getter = "stretch")] + fn stretch_shim(this: &FontFaceDescriptors) -> String; #[wasm_bindgen(method, setter = "stretch")] - fn stretch_shim(this: &FontFaceDescriptors, val: &str); + fn set_stretch_shim(this: &FontFaceDescriptors, val: &str); + #[wasm_bindgen(method, getter = "style")] + fn style_shim(this: &FontFaceDescriptors) -> String; #[wasm_bindgen(method, setter = "style")] - fn style_shim(this: &FontFaceDescriptors, val: &str); + fn set_style_shim(this: &FontFaceDescriptors, val: &str); + #[wasm_bindgen(method, getter = "unicodeRange")] + fn unicode_range_shim(this: &FontFaceDescriptors) -> String; #[wasm_bindgen(method, setter = "unicodeRange")] - fn unicode_range_shim(this: &FontFaceDescriptors, val: &str); + fn set_unicode_range_shim(this: &FontFaceDescriptors, val: &str); + #[wasm_bindgen(method, getter = "variant")] + fn variant_shim(this: &FontFaceDescriptors) -> String; #[wasm_bindgen(method, setter = "variant")] - fn variant_shim(this: &FontFaceDescriptors, val: &str); + fn set_variant_shim(this: &FontFaceDescriptors, val: &str); + #[wasm_bindgen(method, getter = "variationSettings")] + fn variation_settings_shim(this: &FontFaceDescriptors) -> String; #[wasm_bindgen(method, setter = "variationSettings")] - fn variation_settings_shim(this: &FontFaceDescriptors, val: &str); + fn set_variation_settings_shim(this: &FontFaceDescriptors, val: &str); + #[wasm_bindgen(method, getter = "weight")] + fn weight_shim(this: &FontFaceDescriptors) -> String; #[wasm_bindgen(method, setter = "weight")] - fn weight_shim(this: &FontFaceDescriptors, val: &str); + fn set_weight_shim(this: &FontFaceDescriptors, val: &str); +} +#[doc = "The trait to access properties on the `FontFaceDescriptors` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] +pub trait FontFaceDescriptorsGetters { + #[doc = "Get the `display` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + fn display(&self) -> String; + #[doc = "Get the `featureSettings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + fn feature_settings(&self) -> String; + #[doc = "Get the `stretch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + fn stretch(&self) -> String; + #[doc = "Get the `style` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + fn style(&self) -> String; + #[doc = "Get the `unicodeRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + fn unicode_range(&self) -> String; + #[doc = "Get the `variant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + fn variant(&self) -> String; + #[doc = "Get the `variationSettings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + fn variation_settings(&self) -> String; + #[doc = "Get the `weight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] + fn weight(&self) -> String; +} +impl FontFaceDescriptorsGetters for FontFaceDescriptors { + fn display(&self) -> String { + self.display_shim() + } + fn feature_settings(&self) -> String { + self.feature_settings_shim() + } + fn stretch(&self) -> String { + self.stretch_shim() + } + fn style(&self) -> String { + self.style_shim() + } + fn unicode_range(&self) -> String { + self.unicode_range_shim() + } + fn variant(&self) -> String { + self.variant_shim() + } + fn variation_settings(&self) -> String { + self.variation_settings_shim() + } + fn weight(&self) -> String { + self.weight_shim() + } } impl FontFaceDescriptors { #[doc = "Construct a new `FontFaceDescriptors`."] @@ -40,56 +119,56 @@ impl FontFaceDescriptors { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub fn display(&mut self, val: &str) -> &mut Self { - self.display_shim(val); + self.set_display_shim(val); self } #[doc = "Change the `featureSettings` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub fn feature_settings(&mut self, val: &str) -> &mut Self { - self.feature_settings_shim(val); + self.set_feature_settings_shim(val); self } #[doc = "Change the `stretch` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub fn stretch(&mut self, val: &str) -> &mut Self { - self.stretch_shim(val); + self.set_stretch_shim(val); self } #[doc = "Change the `style` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub fn style(&mut self, val: &str) -> &mut Self { - self.style_shim(val); + self.set_style_shim(val); self } #[doc = "Change the `unicodeRange` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub fn unicode_range(&mut self, val: &str) -> &mut Self { - self.unicode_range_shim(val); + self.set_unicode_range_shim(val); self } #[doc = "Change the `variant` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub fn variant(&mut self, val: &str) -> &mut Self { - self.variant_shim(val); + self.set_variant_shim(val); self } #[doc = "Change the `variationSettings` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub fn variation_settings(&mut self, val: &str) -> &mut Self { - self.variation_settings_shim(val); + self.set_variation_settings_shim(val); self } #[doc = "Change the `weight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceDescriptors`*"] pub fn weight(&mut self, val: &str) -> &mut Self { - self.weight_shim(val); + self.set_weight_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs b/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs index 2cab9cdfe02..bf1e799860d 100644 --- a/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs +++ b/crates/web-sys/src/features/gen_FontFaceSetIteratorResult.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] pub type FontFaceSetIteratorResult; + #[wasm_bindgen(method, getter = "done")] + fn done_shim(this: &FontFaceSetIteratorResult) -> bool; #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &FontFaceSetIteratorResult, val: bool); + fn set_done_shim(this: &FontFaceSetIteratorResult, val: bool); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &FontFaceSetIteratorResult) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &FontFaceSetIteratorResult, val: &::wasm_bindgen::JsValue); + fn set_value_shim(this: &FontFaceSetIteratorResult, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `FontFaceSetIteratorResult` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] +pub trait FontFaceSetIteratorResultGetters { + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] + fn done(&self) -> bool; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] + fn value(&self) -> ::wasm_bindgen::JsValue; +} +impl FontFaceSetIteratorResultGetters for FontFaceSetIteratorResult { + fn done(&self) -> bool { + self.done_shim() + } + fn value(&self) -> ::wasm_bindgen::JsValue { + self.value_shim() + } } impl FontFaceSetIteratorResult { #[doc = "Construct a new `FontFaceSetIteratorResult`."] @@ -22,22 +47,22 @@ impl FontFaceSetIteratorResult { pub fn new(done: bool, value: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.done(done); - ret.value(value); + Self::done(&mut ret, done); + Self::value(&mut ret, value); ret } #[doc = "Change the `done` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done_shim(val); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetIteratorResult`*"] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs b/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs index 994c5e291e8..7a284ba8ac3 100644 --- a/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs +++ b/crates/web-sys/src/features/gen_FontFaceSetLoadEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] pub type FontFaceSetLoadEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &FontFaceSetLoadEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &FontFaceSetLoadEventInit, val: bool); + fn set_bubbles_shim(this: &FontFaceSetLoadEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &FontFaceSetLoadEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &FontFaceSetLoadEventInit, val: bool); + fn set_cancelable_shim(this: &FontFaceSetLoadEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &FontFaceSetLoadEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &FontFaceSetLoadEventInit, val: bool); + fn set_composed_shim(this: &FontFaceSetLoadEventInit, val: bool); + #[wasm_bindgen(method, getter = "fontfaces")] + fn fontfaces_shim(this: &FontFaceSetLoadEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "fontfaces")] - fn fontfaces_shim(this: &FontFaceSetLoadEventInit, val: &::wasm_bindgen::JsValue); + fn set_fontfaces_shim(this: &FontFaceSetLoadEventInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `FontFaceSetLoadEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] +pub trait FontFaceSetLoadEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `fontfaces` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] + fn fontfaces(&self) -> ::js_sys::Array; +} +impl FontFaceSetLoadEventInitGetters for FontFaceSetLoadEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn fontfaces(&self) -> ::js_sys::Array { + self.fontfaces_shim() + } } impl FontFaceSetLoadEventInit { #[doc = "Construct a new `FontFaceSetLoadEventInit`."] @@ -32,28 +75,28 @@ impl FontFaceSetLoadEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `fontfaces` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FontFaceSetLoadEventInit`*"] pub fn fontfaces(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.fontfaces_shim(val); + self.set_fontfaces_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GainOptions.rs b/crates/web-sys/src/features/gen_GainOptions.rs index a6f06048e20..52af702bc49 100644 --- a/crates/web-sys/src/features/gen_GainOptions.rs +++ b/crates/web-sys/src/features/gen_GainOptions.rs @@ -10,16 +10,65 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] pub type GainOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &GainOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &GainOptions, val: u32); + fn set_channel_count_shim(this: &GainOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &GainOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &GainOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &GainOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &GainOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &GainOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &GainOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "gain")] + fn gain_shim(this: &GainOptions) -> f32; #[wasm_bindgen(method, setter = "gain")] - fn gain_shim(this: &GainOptions, val: f32); + fn set_gain_shim(this: &GainOptions, val: f32); +} +#[doc = "The trait to access properties on the `GainOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] +pub trait GainOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `GainOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `GainOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `gain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] + fn gain(&self) -> f32; +} +impl GainOptionsGetters for GainOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn gain(&self) -> f32 { + self.gain_shim() + } } impl GainOptions { #[doc = "Construct a new `GainOptions`."] @@ -34,7 +83,7 @@ impl GainOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -42,7 +91,7 @@ impl GainOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `GainOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -50,14 +99,14 @@ impl GainOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `GainOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `gain` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GainOptions`*"] pub fn gain(&mut self, val: f32) -> &mut Self { - self.gain_shim(val); + self.set_gain_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs b/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs index 039b25d0ea0..1882d6f562c 100644 --- a/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs +++ b/crates/web-sys/src/features/gen_GamepadAxisMoveEventInit.rs @@ -10,19 +10,83 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] pub type GamepadAxisMoveEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &GamepadAxisMoveEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GamepadAxisMoveEventInit, val: bool); + fn set_bubbles_shim(this: &GamepadAxisMoveEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &GamepadAxisMoveEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GamepadAxisMoveEventInit, val: bool); + fn set_cancelable_shim(this: &GamepadAxisMoveEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &GamepadAxisMoveEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GamepadAxisMoveEventInit, val: bool); + fn set_composed_shim(this: &GamepadAxisMoveEventInit, val: bool); + #[cfg(feature = "Gamepad")] + #[wasm_bindgen(method, getter = "gamepad")] + fn gamepad_shim(this: &GamepadAxisMoveEventInit) -> Option; #[cfg(feature = "Gamepad")] #[wasm_bindgen(method, setter = "gamepad")] - fn gamepad_shim(this: &GamepadAxisMoveEventInit, val: Option<&Gamepad>); + fn set_gamepad_shim(this: &GamepadAxisMoveEventInit, val: Option<&Gamepad>); + #[wasm_bindgen(method, getter = "axis")] + fn axis_shim(this: &GamepadAxisMoveEventInit) -> u32; #[wasm_bindgen(method, setter = "axis")] - fn axis_shim(this: &GamepadAxisMoveEventInit, val: u32); + fn set_axis_shim(this: &GamepadAxisMoveEventInit, val: u32); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &GamepadAxisMoveEventInit) -> f64; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &GamepadAxisMoveEventInit, val: f64); + fn set_value_shim(this: &GamepadAxisMoveEventInit, val: f64); +} +#[doc = "The trait to access properties on the `GamepadAxisMoveEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] +pub trait GamepadAxisMoveEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "Gamepad")] + #[doc = "Get the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadAxisMoveEventInit`*"] + fn gamepad(&self) -> Option; + #[doc = "Get the `axis` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + fn axis(&self) -> u32; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] + fn value(&self) -> f64; +} +impl GamepadAxisMoveEventInitGetters for GamepadAxisMoveEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "Gamepad")] + fn gamepad(&self) -> Option { + self.gamepad_shim() + } + fn axis(&self) -> u32 { + self.axis_shim() + } + fn value(&self) -> f64 { + self.value_shim() + } } impl GamepadAxisMoveEventInit { #[doc = "Construct a new `GamepadAxisMoveEventInit`."] @@ -37,21 +101,21 @@ impl GamepadAxisMoveEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "Gamepad")] @@ -59,21 +123,21 @@ impl GamepadAxisMoveEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadAxisMoveEventInit`*"] pub fn gamepad(&mut self, val: Option<&Gamepad>) -> &mut Self { - self.gamepad_shim(val); + self.set_gamepad_shim(val); self } #[doc = "Change the `axis` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] pub fn axis(&mut self, val: u32) -> &mut Self { - self.axis_shim(val); + self.set_axis_shim(val); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadAxisMoveEventInit`*"] pub fn value(&mut self, val: f64) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs b/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs index dfe076a66ba..41b688b5003 100644 --- a/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs +++ b/crates/web-sys/src/features/gen_GamepadButtonEventInit.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] pub type GamepadButtonEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &GamepadButtonEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GamepadButtonEventInit, val: bool); + fn set_bubbles_shim(this: &GamepadButtonEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &GamepadButtonEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GamepadButtonEventInit, val: bool); + fn set_cancelable_shim(this: &GamepadButtonEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &GamepadButtonEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GamepadButtonEventInit, val: bool); + fn set_composed_shim(this: &GamepadButtonEventInit, val: bool); + #[cfg(feature = "Gamepad")] + #[wasm_bindgen(method, getter = "gamepad")] + fn gamepad_shim(this: &GamepadButtonEventInit) -> Option; #[cfg(feature = "Gamepad")] #[wasm_bindgen(method, setter = "gamepad")] - fn gamepad_shim(this: &GamepadButtonEventInit, val: Option<&Gamepad>); + fn set_gamepad_shim(this: &GamepadButtonEventInit, val: Option<&Gamepad>); + #[wasm_bindgen(method, getter = "button")] + fn button_shim(this: &GamepadButtonEventInit) -> u32; #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &GamepadButtonEventInit, val: u32); + fn set_button_shim(this: &GamepadButtonEventInit, val: u32); +} +#[doc = "The trait to access properties on the `GamepadButtonEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] +pub trait GamepadButtonEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "Gamepad")] + #[doc = "Get the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadButtonEventInit`*"] + fn gamepad(&self) -> Option; + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] + fn button(&self) -> u32; +} +impl GamepadButtonEventInitGetters for GamepadButtonEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "Gamepad")] + fn gamepad(&self) -> Option { + self.gamepad_shim() + } + fn button(&self) -> u32 { + self.button_shim() + } } impl GamepadButtonEventInit { #[doc = "Construct a new `GamepadButtonEventInit`."] @@ -35,21 +90,21 @@ impl GamepadButtonEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "Gamepad")] @@ -57,14 +112,14 @@ impl GamepadButtonEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadButtonEventInit`*"] pub fn gamepad(&mut self, val: Option<&Gamepad>) -> &mut Self { - self.gamepad_shim(val); + self.set_gamepad_shim(val); self } #[doc = "Change the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadButtonEventInit`*"] pub fn button(&mut self, val: u32) -> &mut Self { - self.button_shim(val); + self.set_button_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GamepadEventInit.rs b/crates/web-sys/src/features/gen_GamepadEventInit.rs index 13ee954f335..b3f1ea58bb9 100644 --- a/crates/web-sys/src/features/gen_GamepadEventInit.rs +++ b/crates/web-sys/src/features/gen_GamepadEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] pub type GamepadEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &GamepadEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GamepadEventInit, val: bool); + fn set_bubbles_shim(this: &GamepadEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &GamepadEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GamepadEventInit, val: bool); + fn set_cancelable_shim(this: &GamepadEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &GamepadEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GamepadEventInit, val: bool); + fn set_composed_shim(this: &GamepadEventInit, val: bool); + #[cfg(feature = "Gamepad")] + #[wasm_bindgen(method, getter = "gamepad")] + fn gamepad_shim(this: &GamepadEventInit) -> Option; #[cfg(feature = "Gamepad")] #[wasm_bindgen(method, setter = "gamepad")] - fn gamepad_shim(this: &GamepadEventInit, val: Option<&Gamepad>); + fn set_gamepad_shim(this: &GamepadEventInit, val: Option<&Gamepad>); +} +#[doc = "The trait to access properties on the `GamepadEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] +pub trait GamepadEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "Gamepad")] + #[doc = "Get the `gamepad` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadEventInit`*"] + fn gamepad(&self) -> Option; +} +impl GamepadEventInitGetters for GamepadEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "Gamepad")] + fn gamepad(&self) -> Option { + self.gamepad_shim() + } } impl GamepadEventInit { #[doc = "Construct a new `GamepadEventInit`."] @@ -33,21 +79,21 @@ impl GamepadEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GamepadEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "Gamepad")] @@ -55,7 +101,7 @@ impl GamepadEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Gamepad`, `GamepadEventInit`*"] pub fn gamepad(&mut self, val: Option<&Gamepad>) -> &mut Self { - self.gamepad_shim(val); + self.set_gamepad_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GetAnimationsOptions.rs b/crates/web-sys/src/features/gen_GetAnimationsOptions.rs index 7f2774c308b..eaf768e2643 100644 --- a/crates/web-sys/src/features/gen_GetAnimationsOptions.rs +++ b/crates/web-sys/src/features/gen_GetAnimationsOptions.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GetAnimationsOptions; + #[wasm_bindgen(method, getter = "subtree")] + fn subtree_shim(this: &GetAnimationsOptions) -> bool; #[wasm_bindgen(method, setter = "subtree")] - fn subtree_shim(this: &GetAnimationsOptions, val: bool); + fn set_subtree_shim(this: &GetAnimationsOptions, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GetAnimationsOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GetAnimationsOptions`*"] +pub trait GetAnimationsOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GetAnimationsOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn subtree(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl GetAnimationsOptionsGetters for GetAnimationsOptions { + #[cfg(web_sys_unstable_apis)] + fn subtree(&self) -> bool { + self.subtree_shim() + } } #[cfg(web_sys_unstable_apis)] impl GetAnimationsOptions { @@ -38,7 +61,7 @@ impl GetAnimationsOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn subtree(&mut self, val: bool) -> &mut Self { - self.subtree_shim(val); + self.set_subtree_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GetRootNodeOptions.rs b/crates/web-sys/src/features/gen_GetRootNodeOptions.rs index ba387240e5d..77373ce8c29 100644 --- a/crates/web-sys/src/features/gen_GetRootNodeOptions.rs +++ b/crates/web-sys/src/features/gen_GetRootNodeOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] pub type GetRootNodeOptions; + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &GetRootNodeOptions) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GetRootNodeOptions, val: bool); + fn set_composed_shim(this: &GetRootNodeOptions, val: bool); +} +#[doc = "The trait to access properties on the `GetRootNodeOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] +pub trait GetRootNodeOptionsGetters { + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] + fn composed(&self) -> bool; +} +impl GetRootNodeOptionsGetters for GetRootNodeOptions { + fn composed(&self) -> bool { + self.composed_shim() + } } impl GetRootNodeOptions { #[doc = "Construct a new `GetRootNodeOptions`."] @@ -26,7 +42,7 @@ impl GetRootNodeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GetRootNodeOptions`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs b/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs index c5594b85ad3..c08084b2dcf 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupDescriptor.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBindGroupDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuBindGroupDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuBindGroupDescriptor, val: &str); + fn set_label_shim(this: &GpuBindGroupDescriptor, val: &str); + #[wasm_bindgen(method, getter = "entries")] + fn entries_shim(this: &GpuBindGroupDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "entries")] - fn entries_shim(this: &GpuBindGroupDescriptor, val: &::wasm_bindgen::JsValue); + fn set_entries_shim(this: &GpuBindGroupDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "GpuBindGroupLayout")] + #[wasm_bindgen(method, getter = "layout")] + fn layout_shim(this: &GpuBindGroupDescriptor) -> GpuBindGroupLayout; #[cfg(feature = "GpuBindGroupLayout")] #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuBindGroupDescriptor, val: &GpuBindGroupLayout); + fn set_layout_shim(this: &GpuBindGroupDescriptor, val: &GpuBindGroupLayout); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuBindGroupDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] +pub trait GpuBindGroupDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn entries(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBindGroupLayout")] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupDescriptor`, `GpuBindGroupLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn layout(&self) -> GpuBindGroupLayout; +} +#[cfg(web_sys_unstable_apis)] +impl GpuBindGroupDescriptorGetters for GpuBindGroupDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn entries(&self) -> ::js_sys::Array { + self.entries_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBindGroupLayout")] + fn layout(&self) -> GpuBindGroupLayout { + self.layout_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupDescriptor { @@ -34,8 +88,8 @@ impl GpuBindGroupDescriptor { pub fn new(entries: &::wasm_bindgen::JsValue, layout: &GpuBindGroupLayout) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.entries(entries); - ret.layout(layout); + Self::entries(&mut ret, entries); + Self::layout(&mut ret, layout); ret } #[cfg(web_sys_unstable_apis)] @@ -46,7 +100,7 @@ impl GpuBindGroupDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +111,7 @@ impl GpuBindGroupDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.entries_shim(val); + self.set_entries_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +123,7 @@ impl GpuBindGroupDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn layout(&mut self, val: &GpuBindGroupLayout) -> &mut Self { - self.layout_shim(val); + self.set_layout_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs b/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs index e41ab563eba..36c6843e18d 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupEntry.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBindGroupEntry; + #[wasm_bindgen(method, getter = "binding")] + fn binding_shim(this: &GpuBindGroupEntry) -> u32; #[wasm_bindgen(method, setter = "binding")] - fn binding_shim(this: &GpuBindGroupEntry, val: u32); + fn set_binding_shim(this: &GpuBindGroupEntry, val: u32); + #[wasm_bindgen(method, getter = "resource")] + fn resource_shim(this: &GpuBindGroupEntry) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "resource")] - fn resource_shim(this: &GpuBindGroupEntry, val: &::wasm_bindgen::JsValue); + fn set_resource_shim(this: &GpuBindGroupEntry, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuBindGroupEntry` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] +pub trait GpuBindGroupEntryGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `binding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn binding(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `resource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn resource(&self) -> ::wasm_bindgen::JsValue; +} +#[cfg(web_sys_unstable_apis)] +impl GpuBindGroupEntryGetters for GpuBindGroupEntry { + #[cfg(web_sys_unstable_apis)] + fn binding(&self) -> u32 { + self.binding_shim() + } + #[cfg(web_sys_unstable_apis)] + fn resource(&self) -> ::wasm_bindgen::JsValue { + self.resource_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupEntry { @@ -30,8 +67,8 @@ impl GpuBindGroupEntry { pub fn new(binding: u32, resource: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.binding(binding); - ret.resource(resource); + Self::binding(&mut ret, binding); + Self::resource(&mut ret, resource); ret } #[cfg(web_sys_unstable_apis)] @@ -42,7 +79,7 @@ impl GpuBindGroupEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn binding(&mut self, val: u32) -> &mut Self { - self.binding_shim(val); + self.set_binding_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +90,7 @@ impl GpuBindGroupEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn resource(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.resource_shim(val); + self.set_resource_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs b/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs index 2ca1218a16e..af54e7daa99 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupLayoutDescriptor.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBindGroupLayoutDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuBindGroupLayoutDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuBindGroupLayoutDescriptor, val: &str); + fn set_label_shim(this: &GpuBindGroupLayoutDescriptor, val: &str); + #[wasm_bindgen(method, getter = "entries")] + fn entries_shim(this: &GpuBindGroupLayoutDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "entries")] - fn entries_shim(this: &GpuBindGroupLayoutDescriptor, val: &::wasm_bindgen::JsValue); + fn set_entries_shim(this: &GpuBindGroupLayoutDescriptor, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuBindGroupLayoutDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] +pub trait GpuBindGroupLayoutDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn entries(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl GpuBindGroupLayoutDescriptorGetters for GpuBindGroupLayoutDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn entries(&self) -> ::js_sys::Array { + self.entries_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupLayoutDescriptor { @@ -30,7 +67,7 @@ impl GpuBindGroupLayoutDescriptor { pub fn new(entries: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.entries(entries); + Self::entries(&mut ret, entries); ret } #[cfg(web_sys_unstable_apis)] @@ -41,7 +78,7 @@ impl GpuBindGroupLayoutDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -52,7 +89,7 @@ impl GpuBindGroupLayoutDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn entries(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.entries_shim(val); + self.set_entries_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs b/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs index 87e1e46d5c9..1d73c423bf6 100644 --- a/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs +++ b/crates/web-sys/src/features/gen_GpuBindGroupLayoutEntry.rs @@ -14,25 +14,153 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBindGroupLayoutEntry; + #[wasm_bindgen(method, getter = "binding")] + fn binding_shim(this: &GpuBindGroupLayoutEntry) -> u32; #[wasm_bindgen(method, setter = "binding")] - fn binding_shim(this: &GpuBindGroupLayoutEntry, val: u32); + fn set_binding_shim(this: &GpuBindGroupLayoutEntry, val: u32); + #[cfg(feature = "GpuBufferBindingLayout")] + #[wasm_bindgen(method, getter = "buffer")] + fn buffer_shim(this: &GpuBindGroupLayoutEntry) -> GpuBufferBindingLayout; #[cfg(feature = "GpuBufferBindingLayout")] #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &GpuBindGroupLayoutEntry, val: &GpuBufferBindingLayout); + fn set_buffer_shim(this: &GpuBindGroupLayoutEntry, val: &GpuBufferBindingLayout); + #[cfg(feature = "GpuExternalTextureBindingLayout")] + #[wasm_bindgen(method, getter = "externalTexture")] + fn external_texture_shim(this: &GpuBindGroupLayoutEntry) -> GpuExternalTextureBindingLayout; #[cfg(feature = "GpuExternalTextureBindingLayout")] #[wasm_bindgen(method, setter = "externalTexture")] - fn external_texture_shim(this: &GpuBindGroupLayoutEntry, val: &GpuExternalTextureBindingLayout); + fn set_external_texture_shim( + this: &GpuBindGroupLayoutEntry, + val: &GpuExternalTextureBindingLayout, + ); + #[cfg(feature = "GpuSamplerBindingLayout")] + #[wasm_bindgen(method, getter = "sampler")] + fn sampler_shim(this: &GpuBindGroupLayoutEntry) -> GpuSamplerBindingLayout; #[cfg(feature = "GpuSamplerBindingLayout")] #[wasm_bindgen(method, setter = "sampler")] - fn sampler_shim(this: &GpuBindGroupLayoutEntry, val: &GpuSamplerBindingLayout); + fn set_sampler_shim(this: &GpuBindGroupLayoutEntry, val: &GpuSamplerBindingLayout); + #[cfg(feature = "GpuStorageTextureBindingLayout")] + #[wasm_bindgen(method, getter = "storageTexture")] + fn storage_texture_shim(this: &GpuBindGroupLayoutEntry) -> GpuStorageTextureBindingLayout; #[cfg(feature = "GpuStorageTextureBindingLayout")] #[wasm_bindgen(method, setter = "storageTexture")] - fn storage_texture_shim(this: &GpuBindGroupLayoutEntry, val: &GpuStorageTextureBindingLayout); + fn set_storage_texture_shim( + this: &GpuBindGroupLayoutEntry, + val: &GpuStorageTextureBindingLayout, + ); + #[cfg(feature = "GpuTextureBindingLayout")] + #[wasm_bindgen(method, getter = "texture")] + fn texture_shim(this: &GpuBindGroupLayoutEntry) -> GpuTextureBindingLayout; #[cfg(feature = "GpuTextureBindingLayout")] #[wasm_bindgen(method, setter = "texture")] - fn texture_shim(this: &GpuBindGroupLayoutEntry, val: &GpuTextureBindingLayout); + fn set_texture_shim(this: &GpuBindGroupLayoutEntry, val: &GpuTextureBindingLayout); + #[wasm_bindgen(method, getter = "visibility")] + fn visibility_shim(this: &GpuBindGroupLayoutEntry) -> u32; #[wasm_bindgen(method, setter = "visibility")] - fn visibility_shim(this: &GpuBindGroupLayoutEntry, val: u32); + fn set_visibility_shim(this: &GpuBindGroupLayoutEntry, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuBindGroupLayoutEntry` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] +pub trait GpuBindGroupLayoutEntryGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `binding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn binding(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBufferBindingLayout")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn buffer(&self) -> GpuBufferBindingLayout; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuExternalTextureBindingLayout")] + #[doc = "Get the `externalTexture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuExternalTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn external_texture(&self) -> GpuExternalTextureBindingLayout; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuSamplerBindingLayout")] + #[doc = "Get the `sampler` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuSamplerBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sampler(&self) -> GpuSamplerBindingLayout; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStorageTextureBindingLayout")] + #[doc = "Get the `storageTexture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuStorageTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn storage_texture(&self) -> GpuStorageTextureBindingLayout; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureBindingLayout")] + #[doc = "Get the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`, `GpuTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn texture(&self) -> GpuTextureBindingLayout; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `visibility` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBindGroupLayoutEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn visibility(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuBindGroupLayoutEntryGetters for GpuBindGroupLayoutEntry { + #[cfg(web_sys_unstable_apis)] + fn binding(&self) -> u32 { + self.binding_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBufferBindingLayout")] + fn buffer(&self) -> GpuBufferBindingLayout { + self.buffer_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuExternalTextureBindingLayout")] + fn external_texture(&self) -> GpuExternalTextureBindingLayout { + self.external_texture_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuSamplerBindingLayout")] + fn sampler(&self) -> GpuSamplerBindingLayout { + self.sampler_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStorageTextureBindingLayout")] + fn storage_texture(&self) -> GpuStorageTextureBindingLayout { + self.storage_texture_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureBindingLayout")] + fn texture(&self) -> GpuTextureBindingLayout { + self.texture_shim() + } + #[cfg(web_sys_unstable_apis)] + fn visibility(&self) -> u32 { + self.visibility_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuBindGroupLayoutEntry { @@ -45,8 +173,8 @@ impl GpuBindGroupLayoutEntry { pub fn new(binding: u32, visibility: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.binding(binding); - ret.visibility(visibility); + Self::binding(&mut ret, binding); + Self::visibility(&mut ret, visibility); ret } #[cfg(web_sys_unstable_apis)] @@ -57,7 +185,7 @@ impl GpuBindGroupLayoutEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn binding(&mut self, val: u32) -> &mut Self { - self.binding_shim(val); + self.set_binding_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +197,7 @@ impl GpuBindGroupLayoutEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn buffer(&mut self, val: &GpuBufferBindingLayout) -> &mut Self { - self.buffer_shim(val); + self.set_buffer_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +209,7 @@ impl GpuBindGroupLayoutEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn external_texture(&mut self, val: &GpuExternalTextureBindingLayout) -> &mut Self { - self.external_texture_shim(val); + self.set_external_texture_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -93,7 +221,7 @@ impl GpuBindGroupLayoutEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sampler(&mut self, val: &GpuSamplerBindingLayout) -> &mut Self { - self.sampler_shim(val); + self.set_sampler_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -105,7 +233,7 @@ impl GpuBindGroupLayoutEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn storage_texture(&mut self, val: &GpuStorageTextureBindingLayout) -> &mut Self { - self.storage_texture_shim(val); + self.set_storage_texture_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -117,7 +245,7 @@ impl GpuBindGroupLayoutEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn texture(&mut self, val: &GpuTextureBindingLayout) -> &mut Self { - self.texture_shim(val); + self.set_texture_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -128,7 +256,7 @@ impl GpuBindGroupLayoutEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn visibility(&mut self, val: u32) -> &mut Self { - self.visibility_shim(val); + self.set_visibility_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBlendComponent.rs b/crates/web-sys/src/features/gen_GpuBlendComponent.rs index 03ed104e2f1..e48519df12b 100644 --- a/crates/web-sys/src/features/gen_GpuBlendComponent.rs +++ b/crates/web-sys/src/features/gen_GpuBlendComponent.rs @@ -15,14 +15,74 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBlendComponent; #[cfg(feature = "GpuBlendFactor")] + #[wasm_bindgen(method, getter = "dstFactor")] + fn dst_factor_shim(this: &GpuBlendComponent) -> GpuBlendFactor; + #[cfg(feature = "GpuBlendFactor")] #[wasm_bindgen(method, setter = "dstFactor")] - fn dst_factor_shim(this: &GpuBlendComponent, val: GpuBlendFactor); + fn set_dst_factor_shim(this: &GpuBlendComponent, val: GpuBlendFactor); + #[cfg(feature = "GpuBlendOperation")] + #[wasm_bindgen(method, getter = "operation")] + fn operation_shim(this: &GpuBlendComponent) -> GpuBlendOperation; #[cfg(feature = "GpuBlendOperation")] #[wasm_bindgen(method, setter = "operation")] - fn operation_shim(this: &GpuBlendComponent, val: GpuBlendOperation); + fn set_operation_shim(this: &GpuBlendComponent, val: GpuBlendOperation); + #[cfg(feature = "GpuBlendFactor")] + #[wasm_bindgen(method, getter = "srcFactor")] + fn src_factor_shim(this: &GpuBlendComponent) -> GpuBlendFactor; #[cfg(feature = "GpuBlendFactor")] #[wasm_bindgen(method, setter = "srcFactor")] - fn src_factor_shim(this: &GpuBlendComponent, val: GpuBlendFactor); + fn set_src_factor_shim(this: &GpuBlendComponent, val: GpuBlendFactor); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuBlendComponent` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`*"] +pub trait GpuBlendComponentGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendFactor")] + #[doc = "Get the `dstFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn dst_factor(&self) -> GpuBlendFactor; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendOperation")] + #[doc = "Get the `operation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn operation(&self) -> GpuBlendOperation; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendFactor")] + #[doc = "Get the `srcFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendFactor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn src_factor(&self) -> GpuBlendFactor; +} +#[cfg(web_sys_unstable_apis)] +impl GpuBlendComponentGetters for GpuBlendComponent { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendFactor")] + fn dst_factor(&self) -> GpuBlendFactor { + self.dst_factor_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendOperation")] + fn operation(&self) -> GpuBlendOperation { + self.operation_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendFactor")] + fn src_factor(&self) -> GpuBlendFactor { + self.src_factor_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuBlendComponent { @@ -46,7 +106,7 @@ impl GpuBlendComponent { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn dst_factor(&mut self, val: GpuBlendFactor) -> &mut Self { - self.dst_factor_shim(val); + self.set_dst_factor_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +118,7 @@ impl GpuBlendComponent { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn operation(&mut self, val: GpuBlendOperation) -> &mut Self { - self.operation_shim(val); + self.set_operation_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +130,7 @@ impl GpuBlendComponent { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn src_factor(&mut self, val: GpuBlendFactor) -> &mut Self { - self.src_factor_shim(val); + self.set_src_factor_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBlendState.rs b/crates/web-sys/src/features/gen_GpuBlendState.rs index 80b609acd5d..b0a8056a13d 100644 --- a/crates/web-sys/src/features/gen_GpuBlendState.rs +++ b/crates/web-sys/src/features/gen_GpuBlendState.rs @@ -15,11 +15,54 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBlendState; #[cfg(feature = "GpuBlendComponent")] + #[wasm_bindgen(method, getter = "alpha")] + fn alpha_shim(this: &GpuBlendState) -> GpuBlendComponent; + #[cfg(feature = "GpuBlendComponent")] #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &GpuBlendState, val: &GpuBlendComponent); + fn set_alpha_shim(this: &GpuBlendState, val: &GpuBlendComponent); + #[cfg(feature = "GpuBlendComponent")] + #[wasm_bindgen(method, getter = "color")] + fn color_shim(this: &GpuBlendState) -> GpuBlendComponent; #[cfg(feature = "GpuBlendComponent")] #[wasm_bindgen(method, setter = "color")] - fn color_shim(this: &GpuBlendState, val: &GpuBlendComponent); + fn set_color_shim(this: &GpuBlendState, val: &GpuBlendComponent); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuBlendState` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuBlendState`*"] +pub trait GpuBlendStateGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendComponent")] + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn alpha(&self) -> GpuBlendComponent; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendComponent")] + #[doc = "Get the `color` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendComponent`, `GpuBlendState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn color(&self) -> GpuBlendComponent; +} +#[cfg(web_sys_unstable_apis)] +impl GpuBlendStateGetters for GpuBlendState { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendComponent")] + fn alpha(&self) -> GpuBlendComponent { + self.alpha_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendComponent")] + fn color(&self) -> GpuBlendComponent { + self.color_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuBlendState { @@ -33,8 +76,8 @@ impl GpuBlendState { pub fn new(alpha: &GpuBlendComponent, color: &GpuBlendComponent) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.alpha(alpha); - ret.color(color); + Self::alpha(&mut ret, alpha); + Self::color(&mut ret, color); ret } #[cfg(web_sys_unstable_apis)] @@ -46,7 +89,7 @@ impl GpuBlendState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn alpha(&mut self, val: &GpuBlendComponent) -> &mut Self { - self.alpha_shim(val); + self.set_alpha_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +101,7 @@ impl GpuBlendState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn color(&mut self, val: &GpuBlendComponent) -> &mut Self { - self.color_shim(val); + self.set_color_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBufferBinding.rs b/crates/web-sys/src/features/gen_GpuBufferBinding.rs index 170abfdb707..bcb06cee4a7 100644 --- a/crates/web-sys/src/features/gen_GpuBufferBinding.rs +++ b/crates/web-sys/src/features/gen_GpuBufferBinding.rs @@ -15,12 +15,66 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBufferBinding; #[cfg(feature = "GpuBuffer")] + #[wasm_bindgen(method, getter = "buffer")] + fn buffer_shim(this: &GpuBufferBinding) -> GpuBuffer; + #[cfg(feature = "GpuBuffer")] #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &GpuBufferBinding, val: &GpuBuffer); + fn set_buffer_shim(this: &GpuBufferBinding, val: &GpuBuffer); + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &GpuBufferBinding) -> f64; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &GpuBufferBinding, val: f64); + fn set_offset_shim(this: &GpuBufferBinding, val: f64); + #[wasm_bindgen(method, getter = "size")] + fn size_shim(this: &GpuBufferBinding) -> f64; #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &GpuBufferBinding, val: f64); + fn set_size_shim(this: &GpuBufferBinding, val: f64); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuBufferBinding` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] +pub trait GpuBufferBindingGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBuffer")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn buffer(&self) -> GpuBuffer; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn offset(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBinding`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn size(&self) -> f64; +} +#[cfg(web_sys_unstable_apis)] +impl GpuBufferBindingGetters for GpuBufferBinding { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBuffer")] + fn buffer(&self) -> GpuBuffer { + self.buffer_shim() + } + #[cfg(web_sys_unstable_apis)] + fn offset(&self) -> f64 { + self.offset_shim() + } + #[cfg(web_sys_unstable_apis)] + fn size(&self) -> f64 { + self.size_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuBufferBinding { @@ -34,7 +88,7 @@ impl GpuBufferBinding { pub fn new(buffer: &GpuBuffer) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.buffer(buffer); + Self::buffer(&mut ret, buffer); ret } #[cfg(web_sys_unstable_apis)] @@ -46,7 +100,7 @@ impl GpuBufferBinding { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn buffer(&mut self, val: &GpuBuffer) -> &mut Self { - self.buffer_shim(val); + self.set_buffer_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +111,7 @@ impl GpuBufferBinding { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +122,7 @@ impl GpuBufferBinding { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn size(&mut self, val: f64) -> &mut Self { - self.size_shim(val); + self.set_size_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs b/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs index b78b7a4c753..e6707654028 100644 --- a/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuBufferBindingLayout.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBufferBindingLayout; + #[wasm_bindgen(method, getter = "hasDynamicOffset")] + fn has_dynamic_offset_shim(this: &GpuBufferBindingLayout) -> bool; #[wasm_bindgen(method, setter = "hasDynamicOffset")] - fn has_dynamic_offset_shim(this: &GpuBufferBindingLayout, val: bool); + fn set_has_dynamic_offset_shim(this: &GpuBufferBindingLayout, val: bool); + #[wasm_bindgen(method, getter = "minBindingSize")] + fn min_binding_size_shim(this: &GpuBufferBindingLayout) -> f64; #[wasm_bindgen(method, setter = "minBindingSize")] - fn min_binding_size_shim(this: &GpuBufferBindingLayout, val: f64); + fn set_min_binding_size_shim(this: &GpuBufferBindingLayout, val: f64); + #[cfg(feature = "GpuBufferBindingType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &GpuBufferBindingLayout) -> GpuBufferBindingType; #[cfg(feature = "GpuBufferBindingType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &GpuBufferBindingLayout, val: GpuBufferBindingType); + fn set_type__shim(this: &GpuBufferBindingLayout, val: GpuBufferBindingType); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuBufferBindingLayout` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] +pub trait GpuBufferBindingLayoutGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `hasDynamicOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn has_dynamic_offset(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `minBindingSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn min_binding_size(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBufferBindingType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferBindingLayout`, `GpuBufferBindingType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn type_(&self) -> GpuBufferBindingType; +} +#[cfg(web_sys_unstable_apis)] +impl GpuBufferBindingLayoutGetters for GpuBufferBindingLayout { + #[cfg(web_sys_unstable_apis)] + fn has_dynamic_offset(&self) -> bool { + self.has_dynamic_offset_shim() + } + #[cfg(web_sys_unstable_apis)] + fn min_binding_size(&self) -> f64 { + self.min_binding_size_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBufferBindingType")] + fn type_(&self) -> GpuBufferBindingType { + self.type__shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuBufferBindingLayout { @@ -43,7 +97,7 @@ impl GpuBufferBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn has_dynamic_offset(&mut self, val: bool) -> &mut Self { - self.has_dynamic_offset_shim(val); + self.set_has_dynamic_offset_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -54,7 +108,7 @@ impl GpuBufferBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn min_binding_size(&mut self, val: f64) -> &mut Self { - self.min_binding_size_shim(val); + self.set_min_binding_size_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +120,7 @@ impl GpuBufferBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn type_(&mut self, val: GpuBufferBindingType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs b/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs index 432a97950b9..cbb5b135d7e 100644 --- a/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuBufferDescriptor.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuBufferDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuBufferDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuBufferDescriptor, val: &str); + fn set_label_shim(this: &GpuBufferDescriptor, val: &str); + #[wasm_bindgen(method, getter = "mappedAtCreation")] + fn mapped_at_creation_shim(this: &GpuBufferDescriptor) -> bool; #[wasm_bindgen(method, setter = "mappedAtCreation")] - fn mapped_at_creation_shim(this: &GpuBufferDescriptor, val: bool); + fn set_mapped_at_creation_shim(this: &GpuBufferDescriptor, val: bool); + #[wasm_bindgen(method, getter = "size")] + fn size_shim(this: &GpuBufferDescriptor) -> f64; #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &GpuBufferDescriptor, val: f64); + fn set_size_shim(this: &GpuBufferDescriptor, val: f64); + #[wasm_bindgen(method, getter = "usage")] + fn usage_shim(this: &GpuBufferDescriptor) -> u32; #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &GpuBufferDescriptor, val: u32); + fn set_usage_shim(this: &GpuBufferDescriptor, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuBufferDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] +pub trait GpuBufferDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mappedAtCreation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mapped_at_creation(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn size(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usage(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuBufferDescriptorGetters for GpuBufferDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn mapped_at_creation(&self) -> bool { + self.mapped_at_creation_shim() + } + #[cfg(web_sys_unstable_apis)] + fn size(&self) -> f64 { + self.size_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usage(&self) -> u32 { + self.usage_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuBufferDescriptor { @@ -34,8 +99,8 @@ impl GpuBufferDescriptor { pub fn new(size: f64, usage: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.size(size); - ret.usage(usage); + Self::size(&mut ret, size); + Self::usage(&mut ret, usage); ret } #[cfg(web_sys_unstable_apis)] @@ -46,7 +111,7 @@ impl GpuBufferDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +122,7 @@ impl GpuBufferDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mapped_at_creation(&mut self, val: bool) -> &mut Self { - self.mapped_at_creation_shim(val); + self.set_mapped_at_creation_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +133,7 @@ impl GpuBufferDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn size(&mut self, val: f64) -> &mut Self { - self.size_shim(val); + self.set_size_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -79,7 +144,7 @@ impl GpuBufferDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage(&mut self, val: u32) -> &mut Self { - self.usage_shim(val); + self.set_usage_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs b/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs index 151e60d979b..53b2f505225 100644 --- a/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs +++ b/crates/web-sys/src/features/gen_GpuCanvasConfiguration.rs @@ -15,18 +15,106 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuCanvasConfiguration; #[cfg(feature = "GpuCanvasAlphaMode")] + #[wasm_bindgen(method, getter = "alphaMode")] + fn alpha_mode_shim(this: &GpuCanvasConfiguration) -> GpuCanvasAlphaMode; + #[cfg(feature = "GpuCanvasAlphaMode")] #[wasm_bindgen(method, setter = "alphaMode")] - fn alpha_mode_shim(this: &GpuCanvasConfiguration, val: GpuCanvasAlphaMode); + fn set_alpha_mode_shim(this: &GpuCanvasConfiguration, val: GpuCanvasAlphaMode); + #[cfg(feature = "GpuDevice")] + #[wasm_bindgen(method, getter = "device")] + fn device_shim(this: &GpuCanvasConfiguration) -> GpuDevice; #[cfg(feature = "GpuDevice")] #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &GpuCanvasConfiguration, val: &GpuDevice); + fn set_device_shim(this: &GpuCanvasConfiguration, val: &GpuDevice); + #[cfg(feature = "GpuTextureFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &GpuCanvasConfiguration) -> GpuTextureFormat; #[cfg(feature = "GpuTextureFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuCanvasConfiguration, val: GpuTextureFormat); + fn set_format_shim(this: &GpuCanvasConfiguration, val: GpuTextureFormat); + #[wasm_bindgen(method, getter = "usage")] + fn usage_shim(this: &GpuCanvasConfiguration) -> u32; #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &GpuCanvasConfiguration, val: u32); + fn set_usage_shim(this: &GpuCanvasConfiguration, val: u32); + #[wasm_bindgen(method, getter = "viewFormats")] + fn view_formats_shim(this: &GpuCanvasConfiguration) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "viewFormats")] - fn view_formats_shim(this: &GpuCanvasConfiguration, val: &::wasm_bindgen::JsValue); + fn set_view_formats_shim(this: &GpuCanvasConfiguration, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuCanvasConfiguration` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] +pub trait GpuCanvasConfigurationGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCanvasAlphaMode")] + #[doc = "Get the `alphaMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasAlphaMode`, `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn alpha_mode(&self) -> GpuCanvasAlphaMode; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn device(&self) -> GpuDevice; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usage(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `viewFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCanvasConfiguration`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn view_formats(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl GpuCanvasConfigurationGetters for GpuCanvasConfiguration { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCanvasAlphaMode")] + fn alpha_mode(&self) -> GpuCanvasAlphaMode { + self.alpha_mode_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuDevice")] + fn device(&self) -> GpuDevice { + self.device_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + fn format(&self) -> GpuTextureFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usage(&self) -> u32 { + self.usage_shim() + } + #[cfg(web_sys_unstable_apis)] + fn view_formats(&self) -> ::js_sys::Array { + self.view_formats_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuCanvasConfiguration { @@ -40,8 +128,8 @@ impl GpuCanvasConfiguration { pub fn new(device: &GpuDevice, format: GpuTextureFormat) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.device(device); - ret.format(format); + Self::device(&mut ret, device); + Self::format(&mut ret, format); ret } #[cfg(web_sys_unstable_apis)] @@ -53,7 +141,7 @@ impl GpuCanvasConfiguration { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn alpha_mode(&mut self, val: GpuCanvasAlphaMode) -> &mut Self { - self.alpha_mode_shim(val); + self.set_alpha_mode_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -65,7 +153,7 @@ impl GpuCanvasConfiguration { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn device(&mut self, val: &GpuDevice) -> &mut Self { - self.device_shim(val); + self.set_device_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +165,7 @@ impl GpuCanvasConfiguration { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -88,7 +176,7 @@ impl GpuCanvasConfiguration { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage(&mut self, val: u32) -> &mut Self { - self.usage_shim(val); + self.set_usage_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -99,7 +187,7 @@ impl GpuCanvasConfiguration { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn view_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.view_formats_shim(val); + self.set_view_formats_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuColorDict.rs b/crates/web-sys/src/features/gen_GpuColorDict.rs index 43041c4c8d6..eaf03ac48d7 100644 --- a/crates/web-sys/src/features/gen_GpuColorDict.rs +++ b/crates/web-sys/src/features/gen_GpuColorDict.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuColorDict; + #[wasm_bindgen(method, getter = "a")] + fn a_shim(this: &GpuColorDict) -> f64; #[wasm_bindgen(method, setter = "a")] - fn a_shim(this: &GpuColorDict, val: f64); + fn set_a_shim(this: &GpuColorDict, val: f64); + #[wasm_bindgen(method, getter = "b")] + fn b_shim(this: &GpuColorDict) -> f64; #[wasm_bindgen(method, setter = "b")] - fn b_shim(this: &GpuColorDict, val: f64); + fn set_b_shim(this: &GpuColorDict, val: f64); + #[wasm_bindgen(method, getter = "g")] + fn g_shim(this: &GpuColorDict) -> f64; #[wasm_bindgen(method, setter = "g")] - fn g_shim(this: &GpuColorDict, val: f64); + fn set_g_shim(this: &GpuColorDict, val: f64); + #[wasm_bindgen(method, getter = "r")] + fn r_shim(this: &GpuColorDict) -> f64; #[wasm_bindgen(method, setter = "r")] - fn r_shim(this: &GpuColorDict, val: f64); + fn set_r_shim(this: &GpuColorDict, val: f64); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuColorDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] +pub trait GpuColorDictGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `a` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn a(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `b` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn b(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `g` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn g(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `r` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn r(&self) -> f64; +} +#[cfg(web_sys_unstable_apis)] +impl GpuColorDictGetters for GpuColorDict { + #[cfg(web_sys_unstable_apis)] + fn a(&self) -> f64 { + self.a_shim() + } + #[cfg(web_sys_unstable_apis)] + fn b(&self) -> f64 { + self.b_shim() + } + #[cfg(web_sys_unstable_apis)] + fn g(&self) -> f64 { + self.g_shim() + } + #[cfg(web_sys_unstable_apis)] + fn r(&self) -> f64 { + self.r_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuColorDict { @@ -34,10 +99,10 @@ impl GpuColorDict { pub fn new(a: f64, b: f64, g: f64, r: f64) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.a(a); - ret.b(b); - ret.g(g); - ret.r(r); + Self::a(&mut ret, a); + Self::b(&mut ret, b); + Self::g(&mut ret, g); + Self::r(&mut ret, r); ret } #[cfg(web_sys_unstable_apis)] @@ -48,7 +113,7 @@ impl GpuColorDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn a(&mut self, val: f64) -> &mut Self { - self.a_shim(val); + self.set_a_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -59,7 +124,7 @@ impl GpuColorDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn b(&mut self, val: f64) -> &mut Self { - self.b_shim(val); + self.set_b_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +135,7 @@ impl GpuColorDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn g(&mut self, val: f64) -> &mut Self { - self.g_shim(val); + self.set_g_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +146,7 @@ impl GpuColorDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn r(&mut self, val: f64) -> &mut Self { - self.r_shim(val); + self.set_r_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuColorTargetState.rs b/crates/web-sys/src/features/gen_GpuColorTargetState.rs index 252c6c88da2..11280ee01a2 100644 --- a/crates/web-sys/src/features/gen_GpuColorTargetState.rs +++ b/crates/web-sys/src/features/gen_GpuColorTargetState.rs @@ -15,13 +15,70 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuColorTargetState; #[cfg(feature = "GpuBlendState")] + #[wasm_bindgen(method, getter = "blend")] + fn blend_shim(this: &GpuColorTargetState) -> GpuBlendState; + #[cfg(feature = "GpuBlendState")] #[wasm_bindgen(method, setter = "blend")] - fn blend_shim(this: &GpuColorTargetState, val: &GpuBlendState); + fn set_blend_shim(this: &GpuColorTargetState, val: &GpuBlendState); + #[cfg(feature = "GpuTextureFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &GpuColorTargetState) -> GpuTextureFormat; #[cfg(feature = "GpuTextureFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuColorTargetState, val: GpuTextureFormat); + fn set_format_shim(this: &GpuColorTargetState, val: GpuTextureFormat); + #[wasm_bindgen(method, getter = "writeMask")] + fn write_mask_shim(this: &GpuColorTargetState) -> u32; #[wasm_bindgen(method, setter = "writeMask")] - fn write_mask_shim(this: &GpuColorTargetState, val: u32); + fn set_write_mask_shim(this: &GpuColorTargetState, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuColorTargetState` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`*"] +pub trait GpuColorTargetStateGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendState")] + #[doc = "Get the `blend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBlendState`, `GpuColorTargetState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn blend(&self) -> GpuBlendState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `writeMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuColorTargetState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn write_mask(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuColorTargetStateGetters for GpuColorTargetState { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBlendState")] + fn blend(&self) -> GpuBlendState { + self.blend_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + fn format(&self) -> GpuTextureFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn write_mask(&self) -> u32 { + self.write_mask_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuColorTargetState { @@ -35,7 +92,7 @@ impl GpuColorTargetState { pub fn new(format: GpuTextureFormat) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.format(format); + Self::format(&mut ret, format); ret } #[cfg(web_sys_unstable_apis)] @@ -47,7 +104,7 @@ impl GpuColorTargetState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn blend(&mut self, val: &GpuBlendState) -> &mut Self { - self.blend_shim(val); + self.set_blend_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -59,7 +116,7 @@ impl GpuColorTargetState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +127,7 @@ impl GpuColorTargetState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn write_mask(&mut self, val: u32) -> &mut Self { - self.write_mask_shim(val); + self.set_write_mask_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs b/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs index 556718c1c69..2b9a955dccb 100644 --- a/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuCommandBufferDescriptor.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuCommandBufferDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuCommandBufferDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuCommandBufferDescriptor, val: &str); + fn set_label_shim(this: &GpuCommandBufferDescriptor, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuCommandBufferDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuCommandBufferDescriptor`*"] +pub trait GpuCommandBufferDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCommandBufferDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl GpuCommandBufferDescriptorGetters for GpuCommandBufferDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuCommandBufferDescriptor { @@ -38,7 +61,7 @@ impl GpuCommandBufferDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs b/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs index 5e6cb5ae4d6..6434f7c0b66 100644 --- a/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuCommandEncoderDescriptor.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuCommandEncoderDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuCommandEncoderDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuCommandEncoderDescriptor, val: &str); + fn set_label_shim(this: &GpuCommandEncoderDescriptor, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuCommandEncoderDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoderDescriptor`*"] +pub trait GpuCommandEncoderDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCommandEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl GpuCommandEncoderDescriptorGetters for GpuCommandEncoderDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuCommandEncoderDescriptor { @@ -38,7 +61,7 @@ impl GpuCommandEncoderDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs b/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs index ba493a46692..c4c4f7dca99 100644 --- a/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuComputePassDescriptor.rs @@ -14,11 +14,54 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuComputePassDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuComputePassDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuComputePassDescriptor, val: &str); + fn set_label_shim(this: &GpuComputePassDescriptor, val: &str); + #[cfg(feature = "GpuComputePassTimestampWrites")] + #[wasm_bindgen(method, getter = "timestampWrites")] + fn timestamp_writes_shim(this: &GpuComputePassDescriptor) -> GpuComputePassTimestampWrites; #[cfg(feature = "GpuComputePassTimestampWrites")] #[wasm_bindgen(method, setter = "timestampWrites")] - fn timestamp_writes_shim(this: &GpuComputePassDescriptor, val: &GpuComputePassTimestampWrites); + fn set_timestamp_writes_shim( + this: &GpuComputePassDescriptor, + val: &GpuComputePassTimestampWrites, + ); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuComputePassDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`*"] +pub trait GpuComputePassDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuComputePassTimestampWrites")] + #[doc = "Get the `timestampWrites` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassDescriptor`, `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp_writes(&self) -> GpuComputePassTimestampWrites; +} +#[cfg(web_sys_unstable_apis)] +impl GpuComputePassDescriptorGetters for GpuComputePassDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuComputePassTimestampWrites")] + fn timestamp_writes(&self) -> GpuComputePassTimestampWrites { + self.timestamp_writes_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuComputePassDescriptor { @@ -41,7 +84,7 @@ impl GpuComputePassDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +96,7 @@ impl GpuComputePassDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp_writes(&mut self, val: &GpuComputePassTimestampWrites) -> &mut Self { - self.timestamp_writes_shim(val); + self.set_timestamp_writes_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs b/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs index fec406f183f..dfc567c1756 100644 --- a/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs +++ b/crates/web-sys/src/features/gen_GpuComputePassTimestampWrites.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuComputePassTimestampWrites; + #[wasm_bindgen(method, getter = "beginningOfPassWriteIndex")] + fn beginning_of_pass_write_index_shim(this: &GpuComputePassTimestampWrites) -> u32; #[wasm_bindgen(method, setter = "beginningOfPassWriteIndex")] - fn beginning_of_pass_write_index_shim(this: &GpuComputePassTimestampWrites, val: u32); + fn set_beginning_of_pass_write_index_shim(this: &GpuComputePassTimestampWrites, val: u32); + #[wasm_bindgen(method, getter = "endOfPassWriteIndex")] + fn end_of_pass_write_index_shim(this: &GpuComputePassTimestampWrites) -> u32; #[wasm_bindgen(method, setter = "endOfPassWriteIndex")] - fn end_of_pass_write_index_shim(this: &GpuComputePassTimestampWrites, val: u32); + fn set_end_of_pass_write_index_shim(this: &GpuComputePassTimestampWrites, val: u32); + #[cfg(feature = "GpuQuerySet")] + #[wasm_bindgen(method, getter = "querySet")] + fn query_set_shim(this: &GpuComputePassTimestampWrites) -> GpuQuerySet; #[cfg(feature = "GpuQuerySet")] #[wasm_bindgen(method, setter = "querySet")] - fn query_set_shim(this: &GpuComputePassTimestampWrites, val: &GpuQuerySet); + fn set_query_set_shim(this: &GpuComputePassTimestampWrites, val: &GpuQuerySet); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuComputePassTimestampWrites` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] +pub trait GpuComputePassTimestampWritesGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `beginningOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn beginning_of_pass_write_index(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `endOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn end_of_pass_write_index(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQuerySet")] + #[doc = "Get the `querySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePassTimestampWrites`, `GpuQuerySet`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn query_set(&self) -> GpuQuerySet; +} +#[cfg(web_sys_unstable_apis)] +impl GpuComputePassTimestampWritesGetters for GpuComputePassTimestampWrites { + #[cfg(web_sys_unstable_apis)] + fn beginning_of_pass_write_index(&self) -> u32 { + self.beginning_of_pass_write_index_shim() + } + #[cfg(web_sys_unstable_apis)] + fn end_of_pass_write_index(&self) -> u32 { + self.end_of_pass_write_index_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQuerySet")] + fn query_set(&self) -> GpuQuerySet { + self.query_set_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuComputePassTimestampWrites { @@ -34,7 +88,7 @@ impl GpuComputePassTimestampWrites { pub fn new(query_set: &GpuQuerySet) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.query_set(query_set); + Self::query_set(&mut ret, query_set); ret } #[cfg(web_sys_unstable_apis)] @@ -45,7 +99,7 @@ impl GpuComputePassTimestampWrites { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn beginning_of_pass_write_index(&mut self, val: u32) -> &mut Self { - self.beginning_of_pass_write_index_shim(val); + self.set_beginning_of_pass_write_index_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -56,7 +110,7 @@ impl GpuComputePassTimestampWrites { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn end_of_pass_write_index(&mut self, val: u32) -> &mut Self { - self.end_of_pass_write_index_shim(val); + self.set_end_of_pass_write_index_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +122,7 @@ impl GpuComputePassTimestampWrites { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn query_set(&mut self, val: &GpuQuerySet) -> &mut Self { - self.query_set_shim(val); + self.set_query_set_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs b/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs index ad49e55c478..0e406ce2a1c 100644 --- a/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuComputePipelineDescriptor.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuComputePipelineDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuComputePipelineDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuComputePipelineDescriptor, val: &str); + fn set_label_shim(this: &GpuComputePipelineDescriptor, val: &str); + #[wasm_bindgen(method, getter = "layout")] + fn layout_shim(this: &GpuComputePipelineDescriptor) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuComputePipelineDescriptor, val: &::wasm_bindgen::JsValue); + fn set_layout_shim(this: &GpuComputePipelineDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "GpuProgrammableStage")] + #[wasm_bindgen(method, getter = "compute")] + fn compute_shim(this: &GpuComputePipelineDescriptor) -> GpuProgrammableStage; #[cfg(feature = "GpuProgrammableStage")] #[wasm_bindgen(method, setter = "compute")] - fn compute_shim(this: &GpuComputePipelineDescriptor, val: &GpuProgrammableStage); + fn set_compute_shim(this: &GpuComputePipelineDescriptor, val: &GpuProgrammableStage); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuComputePipelineDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] +pub trait GpuComputePipelineDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn layout(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuProgrammableStage")] + #[doc = "Get the `compute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuComputePipelineDescriptor`, `GpuProgrammableStage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn compute(&self) -> GpuProgrammableStage; +} +#[cfg(web_sys_unstable_apis)] +impl GpuComputePipelineDescriptorGetters for GpuComputePipelineDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn layout(&self) -> ::wasm_bindgen::JsValue { + self.layout_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuProgrammableStage")] + fn compute(&self) -> GpuProgrammableStage { + self.compute_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuComputePipelineDescriptor { @@ -34,8 +88,8 @@ impl GpuComputePipelineDescriptor { pub fn new(layout: &::wasm_bindgen::JsValue, compute: &GpuProgrammableStage) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.layout(layout); - ret.compute(compute); + Self::layout(&mut ret, layout); + Self::compute(&mut ret, compute); ret } #[cfg(web_sys_unstable_apis)] @@ -46,7 +100,7 @@ impl GpuComputePipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +111,7 @@ impl GpuComputePipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +123,7 @@ impl GpuComputePipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn compute(&mut self, val: &GpuProgrammableStage) -> &mut Self { - self.compute_shim(val); + self.set_compute_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuDepthStencilState.rs b/crates/web-sys/src/features/gen_GpuDepthStencilState.rs index f991cd4c9b4..2d299b008e1 100644 --- a/crates/web-sys/src/features/gen_GpuDepthStencilState.rs +++ b/crates/web-sys/src/features/gen_GpuDepthStencilState.rs @@ -14,30 +14,191 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuDepthStencilState; + #[wasm_bindgen(method, getter = "depthBias")] + fn depth_bias_shim(this: &GpuDepthStencilState) -> i32; #[wasm_bindgen(method, setter = "depthBias")] - fn depth_bias_shim(this: &GpuDepthStencilState, val: i32); + fn set_depth_bias_shim(this: &GpuDepthStencilState, val: i32); + #[wasm_bindgen(method, getter = "depthBiasClamp")] + fn depth_bias_clamp_shim(this: &GpuDepthStencilState) -> f32; #[wasm_bindgen(method, setter = "depthBiasClamp")] - fn depth_bias_clamp_shim(this: &GpuDepthStencilState, val: f32); + fn set_depth_bias_clamp_shim(this: &GpuDepthStencilState, val: f32); + #[wasm_bindgen(method, getter = "depthBiasSlopeScale")] + fn depth_bias_slope_scale_shim(this: &GpuDepthStencilState) -> f32; #[wasm_bindgen(method, setter = "depthBiasSlopeScale")] - fn depth_bias_slope_scale_shim(this: &GpuDepthStencilState, val: f32); + fn set_depth_bias_slope_scale_shim(this: &GpuDepthStencilState, val: f32); + #[cfg(feature = "GpuCompareFunction")] + #[wasm_bindgen(method, getter = "depthCompare")] + fn depth_compare_shim(this: &GpuDepthStencilState) -> GpuCompareFunction; #[cfg(feature = "GpuCompareFunction")] #[wasm_bindgen(method, setter = "depthCompare")] - fn depth_compare_shim(this: &GpuDepthStencilState, val: GpuCompareFunction); + fn set_depth_compare_shim(this: &GpuDepthStencilState, val: GpuCompareFunction); + #[wasm_bindgen(method, getter = "depthWriteEnabled")] + fn depth_write_enabled_shim(this: &GpuDepthStencilState) -> bool; #[wasm_bindgen(method, setter = "depthWriteEnabled")] - fn depth_write_enabled_shim(this: &GpuDepthStencilState, val: bool); + fn set_depth_write_enabled_shim(this: &GpuDepthStencilState, val: bool); + #[cfg(feature = "GpuTextureFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &GpuDepthStencilState) -> GpuTextureFormat; #[cfg(feature = "GpuTextureFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuDepthStencilState, val: GpuTextureFormat); + fn set_format_shim(this: &GpuDepthStencilState, val: GpuTextureFormat); + #[cfg(feature = "GpuStencilFaceState")] + #[wasm_bindgen(method, getter = "stencilBack")] + fn stencil_back_shim(this: &GpuDepthStencilState) -> GpuStencilFaceState; #[cfg(feature = "GpuStencilFaceState")] #[wasm_bindgen(method, setter = "stencilBack")] - fn stencil_back_shim(this: &GpuDepthStencilState, val: &GpuStencilFaceState); + fn set_stencil_back_shim(this: &GpuDepthStencilState, val: &GpuStencilFaceState); + #[cfg(feature = "GpuStencilFaceState")] + #[wasm_bindgen(method, getter = "stencilFront")] + fn stencil_front_shim(this: &GpuDepthStencilState) -> GpuStencilFaceState; #[cfg(feature = "GpuStencilFaceState")] #[wasm_bindgen(method, setter = "stencilFront")] - fn stencil_front_shim(this: &GpuDepthStencilState, val: &GpuStencilFaceState); + fn set_stencil_front_shim(this: &GpuDepthStencilState, val: &GpuStencilFaceState); + #[wasm_bindgen(method, getter = "stencilReadMask")] + fn stencil_read_mask_shim(this: &GpuDepthStencilState) -> u32; #[wasm_bindgen(method, setter = "stencilReadMask")] - fn stencil_read_mask_shim(this: &GpuDepthStencilState, val: u32); + fn set_stencil_read_mask_shim(this: &GpuDepthStencilState, val: u32); + #[wasm_bindgen(method, getter = "stencilWriteMask")] + fn stencil_write_mask_shim(this: &GpuDepthStencilState) -> u32; #[wasm_bindgen(method, setter = "stencilWriteMask")] - fn stencil_write_mask_shim(this: &GpuDepthStencilState, val: u32); + fn set_stencil_write_mask_shim(this: &GpuDepthStencilState, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuDepthStencilState` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] +pub trait GpuDepthStencilStateGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthBias` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_bias(&self) -> i32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthBiasClamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_bias_clamp(&self) -> f32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthBiasSlopeScale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_bias_slope_scale(&self) -> f32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + #[doc = "Get the `depthCompare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_compare(&self) -> GpuCompareFunction; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthWriteEnabled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_write_enabled(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilFaceState")] + #[doc = "Get the `stencilBack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil_back(&self) -> GpuStencilFaceState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilFaceState")] + #[doc = "Get the `stencilFront` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil_front(&self) -> GpuStencilFaceState; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilReadMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil_read_mask(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilWriteMask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil_write_mask(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuDepthStencilStateGetters for GpuDepthStencilState { + #[cfg(web_sys_unstable_apis)] + fn depth_bias(&self) -> i32 { + self.depth_bias_shim() + } + #[cfg(web_sys_unstable_apis)] + fn depth_bias_clamp(&self) -> f32 { + self.depth_bias_clamp_shim() + } + #[cfg(web_sys_unstable_apis)] + fn depth_bias_slope_scale(&self) -> f32 { + self.depth_bias_slope_scale_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + fn depth_compare(&self) -> GpuCompareFunction { + self.depth_compare_shim() + } + #[cfg(web_sys_unstable_apis)] + fn depth_write_enabled(&self) -> bool { + self.depth_write_enabled_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + fn format(&self) -> GpuTextureFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilFaceState")] + fn stencil_back(&self) -> GpuStencilFaceState { + self.stencil_back_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilFaceState")] + fn stencil_front(&self) -> GpuStencilFaceState { + self.stencil_front_shim() + } + #[cfg(web_sys_unstable_apis)] + fn stencil_read_mask(&self) -> u32 { + self.stencil_read_mask_shim() + } + #[cfg(web_sys_unstable_apis)] + fn stencil_write_mask(&self) -> u32 { + self.stencil_write_mask_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuDepthStencilState { @@ -51,7 +212,7 @@ impl GpuDepthStencilState { pub fn new(format: GpuTextureFormat) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.format(format); + Self::format(&mut ret, format); ret } #[cfg(web_sys_unstable_apis)] @@ -62,7 +223,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_bias(&mut self, val: i32) -> &mut Self { - self.depth_bias_shim(val); + self.set_depth_bias_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -73,7 +234,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_bias_clamp(&mut self, val: f32) -> &mut Self { - self.depth_bias_clamp_shim(val); + self.set_depth_bias_clamp_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -84,7 +245,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_bias_slope_scale(&mut self, val: f32) -> &mut Self { - self.depth_bias_slope_scale_shim(val); + self.set_depth_bias_slope_scale_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -96,7 +257,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_compare(&mut self, val: GpuCompareFunction) -> &mut Self { - self.depth_compare_shim(val); + self.set_depth_compare_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -107,7 +268,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_write_enabled(&mut self, val: bool) -> &mut Self { - self.depth_write_enabled_shim(val); + self.set_depth_write_enabled_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -119,7 +280,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -131,7 +292,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil_back(&mut self, val: &GpuStencilFaceState) -> &mut Self { - self.stencil_back_shim(val); + self.set_stencil_back_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -143,7 +304,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil_front(&mut self, val: &GpuStencilFaceState) -> &mut Self { - self.stencil_front_shim(val); + self.set_stencil_front_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -154,7 +315,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil_read_mask(&mut self, val: u32) -> &mut Self { - self.stencil_read_mask_shim(val); + self.set_stencil_read_mask_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -165,7 +326,7 @@ impl GpuDepthStencilState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil_write_mask(&mut self, val: u32) -> &mut Self { - self.stencil_write_mask_shim(val); + self.set_stencil_write_mask_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs b/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs index 4507817ca89..128133c359a 100644 --- a/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuDeviceDescriptor.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuDeviceDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuDeviceDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuDeviceDescriptor, val: &str); + fn set_label_shim(this: &GpuDeviceDescriptor, val: &str); + #[cfg(feature = "GpuQueueDescriptor")] + #[wasm_bindgen(method, getter = "defaultQueue")] + fn default_queue_shim(this: &GpuDeviceDescriptor) -> GpuQueueDescriptor; #[cfg(feature = "GpuQueueDescriptor")] #[wasm_bindgen(method, setter = "defaultQueue")] - fn default_queue_shim(this: &GpuDeviceDescriptor, val: &GpuQueueDescriptor); + fn set_default_queue_shim(this: &GpuDeviceDescriptor, val: &GpuQueueDescriptor); + #[wasm_bindgen(method, getter = "requiredFeatures")] + fn required_features_shim(this: &GpuDeviceDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "requiredFeatures")] - fn required_features_shim(this: &GpuDeviceDescriptor, val: &::wasm_bindgen::JsValue); + fn set_required_features_shim(this: &GpuDeviceDescriptor, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuDeviceDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] +pub trait GpuDeviceDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQueueDescriptor")] + #[doc = "Get the `defaultQueue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`, `GpuQueueDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn default_queue(&self) -> GpuQueueDescriptor; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDeviceDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn required_features(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl GpuDeviceDescriptorGetters for GpuDeviceDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQueueDescriptor")] + fn default_queue(&self) -> GpuQueueDescriptor { + self.default_queue_shim() + } + #[cfg(web_sys_unstable_apis)] + fn required_features(&self) -> ::js_sys::Array { + self.required_features_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuDeviceDescriptor { @@ -43,7 +97,7 @@ impl GpuDeviceDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +109,7 @@ impl GpuDeviceDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn default_queue(&mut self, val: &GpuQueueDescriptor) -> &mut Self { - self.default_queue_shim(val); + self.set_default_queue_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +120,7 @@ impl GpuDeviceDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.required_features_shim(val); + self.set_required_features_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuExtent3dDict.rs b/crates/web-sys/src/features/gen_GpuExtent3dDict.rs index b0c9f2338d1..eaa871a3248 100644 --- a/crates/web-sys/src/features/gen_GpuExtent3dDict.rs +++ b/crates/web-sys/src/features/gen_GpuExtent3dDict.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuExtent3dDict; + #[wasm_bindgen(method, getter = "depthOrArrayLayers")] + fn depth_or_array_layers_shim(this: &GpuExtent3dDict) -> u32; #[wasm_bindgen(method, setter = "depthOrArrayLayers")] - fn depth_or_array_layers_shim(this: &GpuExtent3dDict, val: u32); + fn set_depth_or_array_layers_shim(this: &GpuExtent3dDict, val: u32); + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &GpuExtent3dDict) -> u32; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &GpuExtent3dDict, val: u32); + fn set_height_shim(this: &GpuExtent3dDict, val: u32); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &GpuExtent3dDict) -> u32; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &GpuExtent3dDict, val: u32); + fn set_width_shim(this: &GpuExtent3dDict, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuExtent3dDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] +pub trait GpuExtent3dDictGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthOrArrayLayers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_or_array_layers(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn height(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExtent3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn width(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuExtent3dDictGetters for GpuExtent3dDict { + #[cfg(web_sys_unstable_apis)] + fn depth_or_array_layers(&self) -> u32 { + self.depth_or_array_layers_shim() + } + #[cfg(web_sys_unstable_apis)] + fn height(&self) -> u32 { + self.height_shim() + } + #[cfg(web_sys_unstable_apis)] + fn width(&self) -> u32 { + self.width_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuExtent3dDict { @@ -32,7 +83,7 @@ impl GpuExtent3dDict { pub fn new(width: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.width(width); + Self::width(&mut ret, width); ret } #[cfg(web_sys_unstable_apis)] @@ -43,7 +94,7 @@ impl GpuExtent3dDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_or_array_layers(&mut self, val: u32) -> &mut Self { - self.depth_or_array_layers_shim(val); + self.set_depth_or_array_layers_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -54,7 +105,7 @@ impl GpuExtent3dDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn height(&mut self, val: u32) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -65,7 +116,7 @@ impl GpuExtent3dDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn width(&mut self, val: u32) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuExternalTextureBindingLayout.rs b/crates/web-sys/src/features/gen_GpuExternalTextureBindingLayout.rs index 334427d0ec3..745b183a02b 100644 --- a/crates/web-sys/src/features/gen_GpuExternalTextureBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuExternalTextureBindingLayout.rs @@ -16,6 +16,13 @@ extern "C" { pub type GpuExternalTextureBindingLayout; } #[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuExternalTextureBindingLayout` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureBindingLayout`*"] +pub trait GpuExternalTextureBindingLayoutGetters {} +#[cfg(web_sys_unstable_apis)] +impl GpuExternalTextureBindingLayoutGetters for GpuExternalTextureBindingLayout {} +#[cfg(web_sys_unstable_apis)] impl GpuExternalTextureBindingLayout { #[doc = "Construct a new `GpuExternalTextureBindingLayout`."] #[doc = ""] diff --git a/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs b/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs index 13c397f5f3f..561df6f0b37 100644 --- a/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuExternalTextureDescriptor.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuExternalTextureDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuExternalTextureDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuExternalTextureDescriptor, val: &str); + fn set_label_shim(this: &GpuExternalTextureDescriptor, val: &str); + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &GpuExternalTextureDescriptor) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &GpuExternalTextureDescriptor, val: &::js_sys::Object); + fn set_source_shim(this: &GpuExternalTextureDescriptor, val: &::js_sys::Object); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuExternalTextureDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] +pub trait GpuExternalTextureDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuExternalTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn source(&self) -> ::js_sys::Object; +} +#[cfg(web_sys_unstable_apis)] +impl GpuExternalTextureDescriptorGetters for GpuExternalTextureDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn source(&self) -> ::js_sys::Object { + self.source_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuExternalTextureDescriptor { @@ -30,7 +67,7 @@ impl GpuExternalTextureDescriptor { pub fn new(source: &::js_sys::Object) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.source(source); + Self::source(&mut ret, source); ret } #[cfg(web_sys_unstable_apis)] @@ -41,7 +78,7 @@ impl GpuExternalTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -52,7 +89,7 @@ impl GpuExternalTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn source(&mut self, val: &::js_sys::Object) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuFragmentState.rs b/crates/web-sys/src/features/gen_GpuFragmentState.rs index e39fe9e57cb..7eb10a6457d 100644 --- a/crates/web-sys/src/features/gen_GpuFragmentState.rs +++ b/crates/web-sys/src/features/gen_GpuFragmentState.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuFragmentState; + #[wasm_bindgen(method, getter = "entryPoint")] + fn entry_point_shim(this: &GpuFragmentState) -> String; #[wasm_bindgen(method, setter = "entryPoint")] - fn entry_point_shim(this: &GpuFragmentState, val: &str); + fn set_entry_point_shim(this: &GpuFragmentState, val: &str); + #[cfg(feature = "GpuShaderModule")] + #[wasm_bindgen(method, getter = "module")] + fn module_shim(this: &GpuFragmentState) -> GpuShaderModule; #[cfg(feature = "GpuShaderModule")] #[wasm_bindgen(method, setter = "module")] - fn module_shim(this: &GpuFragmentState, val: &GpuShaderModule); + fn set_module_shim(this: &GpuFragmentState, val: &GpuShaderModule); + #[wasm_bindgen(method, getter = "targets")] + fn targets_shim(this: &GpuFragmentState) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "targets")] - fn targets_shim(this: &GpuFragmentState, val: &::wasm_bindgen::JsValue); + fn set_targets_shim(this: &GpuFragmentState, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuFragmentState` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] +pub trait GpuFragmentStateGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn entry_point(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuShaderModule")] + #[doc = "Get the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuShaderModule`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn module(&self) -> GpuShaderModule; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `targets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn targets(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl GpuFragmentStateGetters for GpuFragmentState { + #[cfg(web_sys_unstable_apis)] + fn entry_point(&self) -> String { + self.entry_point_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuShaderModule")] + fn module(&self) -> GpuShaderModule { + self.module_shim() + } + #[cfg(web_sys_unstable_apis)] + fn targets(&self) -> ::js_sys::Array { + self.targets_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuFragmentState { @@ -34,8 +88,8 @@ impl GpuFragmentState { pub fn new(module: &GpuShaderModule, targets: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.module(module); - ret.targets(targets); + Self::module(&mut ret, module); + Self::targets(&mut ret, targets); ret } #[cfg(web_sys_unstable_apis)] @@ -46,7 +100,7 @@ impl GpuFragmentState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn entry_point(&mut self, val: &str) -> &mut Self { - self.entry_point_shim(val); + self.set_entry_point_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +112,7 @@ impl GpuFragmentState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { - self.module_shim(val); + self.set_module_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +123,7 @@ impl GpuFragmentState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn targets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.targets_shim(val); + self.set_targets_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs b/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs index fdfcc69a438..863cea3c08d 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyBuffer.rs @@ -14,15 +14,83 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageCopyBuffer; + #[wasm_bindgen(method, getter = "bytesPerRow")] + fn bytes_per_row_shim(this: &GpuImageCopyBuffer) -> u32; #[wasm_bindgen(method, setter = "bytesPerRow")] - fn bytes_per_row_shim(this: &GpuImageCopyBuffer, val: u32); + fn set_bytes_per_row_shim(this: &GpuImageCopyBuffer, val: u32); + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &GpuImageCopyBuffer) -> f64; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &GpuImageCopyBuffer, val: f64); + fn set_offset_shim(this: &GpuImageCopyBuffer, val: f64); + #[wasm_bindgen(method, getter = "rowsPerImage")] + fn rows_per_image_shim(this: &GpuImageCopyBuffer) -> u32; #[wasm_bindgen(method, setter = "rowsPerImage")] - fn rows_per_image_shim(this: &GpuImageCopyBuffer, val: u32); + fn set_rows_per_image_shim(this: &GpuImageCopyBuffer, val: u32); + #[cfg(feature = "GpuBuffer")] + #[wasm_bindgen(method, getter = "buffer")] + fn buffer_shim(this: &GpuImageCopyBuffer) -> GpuBuffer; #[cfg(feature = "GpuBuffer")] #[wasm_bindgen(method, setter = "buffer")] - fn buffer_shim(this: &GpuImageCopyBuffer, val: &GpuBuffer); + fn set_buffer_shim(this: &GpuImageCopyBuffer, val: &GpuBuffer); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuImageCopyBuffer` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] +pub trait GpuImageCopyBufferGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesPerRow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes_per_row(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn offset(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `rowsPerImage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn rows_per_image(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBuffer")] + #[doc = "Get the `buffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuBuffer`, `GpuImageCopyBuffer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn buffer(&self) -> GpuBuffer; +} +#[cfg(web_sys_unstable_apis)] +impl GpuImageCopyBufferGetters for GpuImageCopyBuffer { + #[cfg(web_sys_unstable_apis)] + fn bytes_per_row(&self) -> u32 { + self.bytes_per_row_shim() + } + #[cfg(web_sys_unstable_apis)] + fn offset(&self) -> f64 { + self.offset_shim() + } + #[cfg(web_sys_unstable_apis)] + fn rows_per_image(&self) -> u32 { + self.rows_per_image_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuBuffer")] + fn buffer(&self) -> GpuBuffer { + self.buffer_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyBuffer { @@ -36,7 +104,7 @@ impl GpuImageCopyBuffer { pub fn new(buffer: &GpuBuffer) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.buffer(buffer); + Self::buffer(&mut ret, buffer); ret } #[cfg(web_sys_unstable_apis)] @@ -47,7 +115,7 @@ impl GpuImageCopyBuffer { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes_per_row(&mut self, val: u32) -> &mut Self { - self.bytes_per_row_shim(val); + self.set_bytes_per_row_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +126,7 @@ impl GpuImageCopyBuffer { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +137,7 @@ impl GpuImageCopyBuffer { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn rows_per_image(&mut self, val: u32) -> &mut Self { - self.rows_per_image_shim(val); + self.set_rows_per_image_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +149,7 @@ impl GpuImageCopyBuffer { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn buffer(&mut self, val: &GpuBuffer) -> &mut Self { - self.buffer_shim(val); + self.set_buffer_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs b/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs index 54c22ac9306..05240b9d16b 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyExternalImage.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageCopyExternalImage; + #[wasm_bindgen(method, getter = "flipY")] + fn flip_y_shim(this: &GpuImageCopyExternalImage) -> bool; #[wasm_bindgen(method, setter = "flipY")] - fn flip_y_shim(this: &GpuImageCopyExternalImage, val: bool); + fn set_flip_y_shim(this: &GpuImageCopyExternalImage, val: bool); + #[wasm_bindgen(method, getter = "origin")] + fn origin_shim(this: &GpuImageCopyExternalImage) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &GpuImageCopyExternalImage, val: &::wasm_bindgen::JsValue); + fn set_origin_shim(this: &GpuImageCopyExternalImage, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &GpuImageCopyExternalImage) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &GpuImageCopyExternalImage, val: &::js_sys::Object); + fn set_source_shim(this: &GpuImageCopyExternalImage, val: &::js_sys::Object); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuImageCopyExternalImage` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] +pub trait GpuImageCopyExternalImageGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `flipY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn flip_y(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn origin(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyExternalImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn source(&self) -> ::js_sys::Object; +} +#[cfg(web_sys_unstable_apis)] +impl GpuImageCopyExternalImageGetters for GpuImageCopyExternalImage { + #[cfg(web_sys_unstable_apis)] + fn flip_y(&self) -> bool { + self.flip_y_shim() + } + #[cfg(web_sys_unstable_apis)] + fn origin(&self) -> ::wasm_bindgen::JsValue { + self.origin_shim() + } + #[cfg(web_sys_unstable_apis)] + fn source(&self) -> ::js_sys::Object { + self.source_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyExternalImage { @@ -32,7 +83,7 @@ impl GpuImageCopyExternalImage { pub fn new(source: &::js_sys::Object) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.source(source); + Self::source(&mut ret, source); ret } #[cfg(web_sys_unstable_apis)] @@ -43,7 +94,7 @@ impl GpuImageCopyExternalImage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn flip_y(&mut self, val: bool) -> &mut Self { - self.flip_y_shim(val); + self.set_flip_y_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -54,7 +105,7 @@ impl GpuImageCopyExternalImage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.origin_shim(val); + self.set_origin_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -65,7 +116,7 @@ impl GpuImageCopyExternalImage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn source(&mut self, val: &::js_sys::Object) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs b/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs index c461d41a126..2acc609dc40 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyTexture.rs @@ -15,15 +15,86 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageCopyTexture; #[cfg(feature = "GpuTextureAspect")] + #[wasm_bindgen(method, getter = "aspect")] + fn aspect_shim(this: &GpuImageCopyTexture) -> GpuTextureAspect; + #[cfg(feature = "GpuTextureAspect")] #[wasm_bindgen(method, setter = "aspect")] - fn aspect_shim(this: &GpuImageCopyTexture, val: GpuTextureAspect); + fn set_aspect_shim(this: &GpuImageCopyTexture, val: GpuTextureAspect); + #[wasm_bindgen(method, getter = "mipLevel")] + fn mip_level_shim(this: &GpuImageCopyTexture) -> u32; #[wasm_bindgen(method, setter = "mipLevel")] - fn mip_level_shim(this: &GpuImageCopyTexture, val: u32); + fn set_mip_level_shim(this: &GpuImageCopyTexture, val: u32); + #[wasm_bindgen(method, getter = "origin")] + fn origin_shim(this: &GpuImageCopyTexture) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &GpuImageCopyTexture, val: &::wasm_bindgen::JsValue); + fn set_origin_shim(this: &GpuImageCopyTexture, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "GpuTexture")] + #[wasm_bindgen(method, getter = "texture")] + fn texture_shim(this: &GpuImageCopyTexture) -> GpuTexture; #[cfg(feature = "GpuTexture")] #[wasm_bindgen(method, setter = "texture")] - fn texture_shim(this: &GpuImageCopyTexture, val: &GpuTexture); + fn set_texture_shim(this: &GpuImageCopyTexture, val: &GpuTexture); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuImageCopyTexture` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] +pub trait GpuImageCopyTextureGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + #[doc = "Get the `aspect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTextureAspect`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn aspect(&self) -> GpuTextureAspect; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mip_level(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn origin(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTexture")] + #[doc = "Get the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTexture`, `GpuTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn texture(&self) -> GpuTexture; +} +#[cfg(web_sys_unstable_apis)] +impl GpuImageCopyTextureGetters for GpuImageCopyTexture { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + fn aspect(&self) -> GpuTextureAspect { + self.aspect_shim() + } + #[cfg(web_sys_unstable_apis)] + fn mip_level(&self) -> u32 { + self.mip_level_shim() + } + #[cfg(web_sys_unstable_apis)] + fn origin(&self) -> ::wasm_bindgen::JsValue { + self.origin_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTexture")] + fn texture(&self) -> GpuTexture { + self.texture_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyTexture { @@ -37,7 +108,7 @@ impl GpuImageCopyTexture { pub fn new(texture: &GpuTexture) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.texture(texture); + Self::texture(&mut ret, texture); ret } #[cfg(web_sys_unstable_apis)] @@ -49,7 +120,7 @@ impl GpuImageCopyTexture { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { - self.aspect_shim(val); + self.set_aspect_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -60,7 +131,7 @@ impl GpuImageCopyTexture { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mip_level(&mut self, val: u32) -> &mut Self { - self.mip_level_shim(val); + self.set_mip_level_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -71,7 +142,7 @@ impl GpuImageCopyTexture { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.origin_shim(val); + self.set_origin_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -83,7 +154,7 @@ impl GpuImageCopyTexture { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn texture(&mut self, val: &GpuTexture) -> &mut Self { - self.texture_shim(val); + self.set_texture_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs b/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs index 554f63396d4..038b1d888f5 100644 --- a/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs +++ b/crates/web-sys/src/features/gen_GpuImageCopyTextureTagged.rs @@ -15,17 +15,102 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageCopyTextureTagged; #[cfg(feature = "GpuTextureAspect")] + #[wasm_bindgen(method, getter = "aspect")] + fn aspect_shim(this: &GpuImageCopyTextureTagged) -> GpuTextureAspect; + #[cfg(feature = "GpuTextureAspect")] #[wasm_bindgen(method, setter = "aspect")] - fn aspect_shim(this: &GpuImageCopyTextureTagged, val: GpuTextureAspect); + fn set_aspect_shim(this: &GpuImageCopyTextureTagged, val: GpuTextureAspect); + #[wasm_bindgen(method, getter = "mipLevel")] + fn mip_level_shim(this: &GpuImageCopyTextureTagged) -> u32; #[wasm_bindgen(method, setter = "mipLevel")] - fn mip_level_shim(this: &GpuImageCopyTextureTagged, val: u32); + fn set_mip_level_shim(this: &GpuImageCopyTextureTagged, val: u32); + #[wasm_bindgen(method, getter = "origin")] + fn origin_shim(this: &GpuImageCopyTextureTagged) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &GpuImageCopyTextureTagged, val: &::wasm_bindgen::JsValue); + fn set_origin_shim(this: &GpuImageCopyTextureTagged, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "GpuTexture")] + #[wasm_bindgen(method, getter = "texture")] + fn texture_shim(this: &GpuImageCopyTextureTagged) -> GpuTexture; #[cfg(feature = "GpuTexture")] #[wasm_bindgen(method, setter = "texture")] - fn texture_shim(this: &GpuImageCopyTextureTagged, val: &GpuTexture); + fn set_texture_shim(this: &GpuImageCopyTextureTagged, val: &GpuTexture); + #[wasm_bindgen(method, getter = "premultipliedAlpha")] + fn premultiplied_alpha_shim(this: &GpuImageCopyTextureTagged) -> bool; #[wasm_bindgen(method, setter = "premultipliedAlpha")] - fn premultiplied_alpha_shim(this: &GpuImageCopyTextureTagged, val: bool); + fn set_premultiplied_alpha_shim(this: &GpuImageCopyTextureTagged, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuImageCopyTextureTagged` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] +pub trait GpuImageCopyTextureTaggedGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + #[doc = "Get the `aspect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTextureAspect`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn aspect(&self) -> GpuTextureAspect; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mip_level(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn origin(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTexture")] + #[doc = "Get the `texture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`, `GpuTexture`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn texture(&self) -> GpuTexture; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `premultipliedAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageCopyTextureTagged`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn premultiplied_alpha(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl GpuImageCopyTextureTaggedGetters for GpuImageCopyTextureTagged { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + fn aspect(&self) -> GpuTextureAspect { + self.aspect_shim() + } + #[cfg(web_sys_unstable_apis)] + fn mip_level(&self) -> u32 { + self.mip_level_shim() + } + #[cfg(web_sys_unstable_apis)] + fn origin(&self) -> ::wasm_bindgen::JsValue { + self.origin_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTexture")] + fn texture(&self) -> GpuTexture { + self.texture_shim() + } + #[cfg(web_sys_unstable_apis)] + fn premultiplied_alpha(&self) -> bool { + self.premultiplied_alpha_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuImageCopyTextureTagged { @@ -39,7 +124,7 @@ impl GpuImageCopyTextureTagged { pub fn new(texture: &GpuTexture) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.texture(texture); + Self::texture(&mut ret, texture); ret } #[cfg(web_sys_unstable_apis)] @@ -51,7 +136,7 @@ impl GpuImageCopyTextureTagged { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { - self.aspect_shim(val); + self.set_aspect_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -62,7 +147,7 @@ impl GpuImageCopyTextureTagged { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mip_level(&mut self, val: u32) -> &mut Self { - self.mip_level_shim(val); + self.set_mip_level_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -73,7 +158,7 @@ impl GpuImageCopyTextureTagged { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn origin(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.origin_shim(val); + self.set_origin_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -85,7 +170,7 @@ impl GpuImageCopyTextureTagged { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn texture(&mut self, val: &GpuTexture) -> &mut Self { - self.texture_shim(val); + self.set_texture_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -96,7 +181,7 @@ impl GpuImageCopyTextureTagged { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn premultiplied_alpha(&mut self, val: bool) -> &mut Self { - self.premultiplied_alpha_shim(val); + self.set_premultiplied_alpha_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuImageDataLayout.rs b/crates/web-sys/src/features/gen_GpuImageDataLayout.rs index cb267577615..5e9dc8cbf5b 100644 --- a/crates/web-sys/src/features/gen_GpuImageDataLayout.rs +++ b/crates/web-sys/src/features/gen_GpuImageDataLayout.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuImageDataLayout; + #[wasm_bindgen(method, getter = "bytesPerRow")] + fn bytes_per_row_shim(this: &GpuImageDataLayout) -> u32; #[wasm_bindgen(method, setter = "bytesPerRow")] - fn bytes_per_row_shim(this: &GpuImageDataLayout, val: u32); + fn set_bytes_per_row_shim(this: &GpuImageDataLayout, val: u32); + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &GpuImageDataLayout) -> f64; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &GpuImageDataLayout, val: f64); + fn set_offset_shim(this: &GpuImageDataLayout, val: f64); + #[wasm_bindgen(method, getter = "rowsPerImage")] + fn rows_per_image_shim(this: &GpuImageDataLayout) -> u32; #[wasm_bindgen(method, setter = "rowsPerImage")] - fn rows_per_image_shim(this: &GpuImageDataLayout, val: u32); + fn set_rows_per_image_shim(this: &GpuImageDataLayout, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuImageDataLayout` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] +pub trait GpuImageDataLayoutGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesPerRow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes_per_row(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn offset(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `rowsPerImage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuImageDataLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn rows_per_image(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuImageDataLayoutGetters for GpuImageDataLayout { + #[cfg(web_sys_unstable_apis)] + fn bytes_per_row(&self) -> u32 { + self.bytes_per_row_shim() + } + #[cfg(web_sys_unstable_apis)] + fn offset(&self) -> f64 { + self.offset_shim() + } + #[cfg(web_sys_unstable_apis)] + fn rows_per_image(&self) -> u32 { + self.rows_per_image_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuImageDataLayout { @@ -42,7 +93,7 @@ impl GpuImageDataLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes_per_row(&mut self, val: u32) -> &mut Self { - self.bytes_per_row_shim(val); + self.set_bytes_per_row_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +104,7 @@ impl GpuImageDataLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +115,7 @@ impl GpuImageDataLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn rows_per_image(&mut self, val: u32) -> &mut Self { - self.rows_per_image_shim(val); + self.set_rows_per_image_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuMultisampleState.rs b/crates/web-sys/src/features/gen_GpuMultisampleState.rs index af9b5e2e8ec..61f0d8a8181 100644 --- a/crates/web-sys/src/features/gen_GpuMultisampleState.rs +++ b/crates/web-sys/src/features/gen_GpuMultisampleState.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuMultisampleState; + #[wasm_bindgen(method, getter = "alphaToCoverageEnabled")] + fn alpha_to_coverage_enabled_shim(this: &GpuMultisampleState) -> bool; #[wasm_bindgen(method, setter = "alphaToCoverageEnabled")] - fn alpha_to_coverage_enabled_shim(this: &GpuMultisampleState, val: bool); + fn set_alpha_to_coverage_enabled_shim(this: &GpuMultisampleState, val: bool); + #[wasm_bindgen(method, getter = "count")] + fn count_shim(this: &GpuMultisampleState) -> u32; #[wasm_bindgen(method, setter = "count")] - fn count_shim(this: &GpuMultisampleState, val: u32); + fn set_count_shim(this: &GpuMultisampleState, val: u32); + #[wasm_bindgen(method, getter = "mask")] + fn mask_shim(this: &GpuMultisampleState) -> u32; #[wasm_bindgen(method, setter = "mask")] - fn mask_shim(this: &GpuMultisampleState, val: u32); + fn set_mask_shim(this: &GpuMultisampleState, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuMultisampleState` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] +pub trait GpuMultisampleStateGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `alphaToCoverageEnabled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn alpha_to_coverage_enabled(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn count(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mask(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuMultisampleStateGetters for GpuMultisampleState { + #[cfg(web_sys_unstable_apis)] + fn alpha_to_coverage_enabled(&self) -> bool { + self.alpha_to_coverage_enabled_shim() + } + #[cfg(web_sys_unstable_apis)] + fn count(&self) -> u32 { + self.count_shim() + } + #[cfg(web_sys_unstable_apis)] + fn mask(&self) -> u32 { + self.mask_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuMultisampleState { @@ -42,7 +93,7 @@ impl GpuMultisampleState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn alpha_to_coverage_enabled(&mut self, val: bool) -> &mut Self { - self.alpha_to_coverage_enabled_shim(val); + self.set_alpha_to_coverage_enabled_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +104,7 @@ impl GpuMultisampleState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn count(&mut self, val: u32) -> &mut Self { - self.count_shim(val); + self.set_count_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +115,7 @@ impl GpuMultisampleState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mask(&mut self, val: u32) -> &mut Self { - self.mask_shim(val); + self.set_mask_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs b/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs index 147e49b806a..43d3a608dca 100644 --- a/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs +++ b/crates/web-sys/src/features/gen_GpuObjectDescriptorBase.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuObjectDescriptorBase; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuObjectDescriptorBase) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuObjectDescriptorBase, val: &str); + fn set_label_shim(this: &GpuObjectDescriptorBase, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuObjectDescriptorBase` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuObjectDescriptorBase`*"] +pub trait GpuObjectDescriptorBaseGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuObjectDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl GpuObjectDescriptorBaseGetters for GpuObjectDescriptorBase { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuObjectDescriptorBase { @@ -38,7 +61,7 @@ impl GpuObjectDescriptorBase { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs b/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs index da5d620d658..1901f4a1267 100644 --- a/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs +++ b/crates/web-sys/src/features/gen_GpuOrigin2dDict.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuOrigin2dDict; + #[wasm_bindgen(method, getter = "x")] + fn x_shim(this: &GpuOrigin2dDict) -> u32; #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &GpuOrigin2dDict, val: u32); + fn set_x_shim(this: &GpuOrigin2dDict, val: u32); + #[wasm_bindgen(method, getter = "y")] + fn y_shim(this: &GpuOrigin2dDict) -> u32; #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &GpuOrigin2dDict, val: u32); + fn set_y_shim(this: &GpuOrigin2dDict, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuOrigin2dDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] +pub trait GpuOrigin2dDictGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn x(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin2dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn y(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuOrigin2dDictGetters for GpuOrigin2dDict { + #[cfg(web_sys_unstable_apis)] + fn x(&self) -> u32 { + self.x_shim() + } + #[cfg(web_sys_unstable_apis)] + fn y(&self) -> u32 { + self.y_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuOrigin2dDict { @@ -40,7 +77,7 @@ impl GpuOrigin2dDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn x(&mut self, val: u32) -> &mut Self { - self.x_shim(val); + self.set_x_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl GpuOrigin2dDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn y(&mut self, val: u32) -> &mut Self { - self.y_shim(val); + self.set_y_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs b/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs index ddca14f3aae..7cc87b4c6ca 100644 --- a/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs +++ b/crates/web-sys/src/features/gen_GpuOrigin3dDict.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuOrigin3dDict; + #[wasm_bindgen(method, getter = "x")] + fn x_shim(this: &GpuOrigin3dDict) -> u32; #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &GpuOrigin3dDict, val: u32); + fn set_x_shim(this: &GpuOrigin3dDict, val: u32); + #[wasm_bindgen(method, getter = "y")] + fn y_shim(this: &GpuOrigin3dDict) -> u32; #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &GpuOrigin3dDict, val: u32); + fn set_y_shim(this: &GpuOrigin3dDict, val: u32); + #[wasm_bindgen(method, getter = "z")] + fn z_shim(this: &GpuOrigin3dDict) -> u32; #[wasm_bindgen(method, setter = "z")] - fn z_shim(this: &GpuOrigin3dDict, val: u32); + fn set_z_shim(this: &GpuOrigin3dDict, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuOrigin3dDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] +pub trait GpuOrigin3dDictGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn x(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn y(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `z` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuOrigin3dDict`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn z(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuOrigin3dDictGetters for GpuOrigin3dDict { + #[cfg(web_sys_unstable_apis)] + fn x(&self) -> u32 { + self.x_shim() + } + #[cfg(web_sys_unstable_apis)] + fn y(&self) -> u32 { + self.y_shim() + } + #[cfg(web_sys_unstable_apis)] + fn z(&self) -> u32 { + self.z_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuOrigin3dDict { @@ -42,7 +93,7 @@ impl GpuOrigin3dDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn x(&mut self, val: u32) -> &mut Self { - self.x_shim(val); + self.set_x_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +104,7 @@ impl GpuOrigin3dDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn y(&mut self, val: u32) -> &mut Self { - self.y_shim(val); + self.set_y_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +115,7 @@ impl GpuOrigin3dDict { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn z(&mut self, val: u32) -> &mut Self { - self.z_shim(val); + self.set_z_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs b/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs index 8f94167a0c2..5ac8bc6740e 100644 --- a/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs +++ b/crates/web-sys/src/features/gen_GpuPipelineDescriptorBase.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuPipelineDescriptorBase; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuPipelineDescriptorBase) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuPipelineDescriptorBase, val: &str); + fn set_label_shim(this: &GpuPipelineDescriptorBase, val: &str); + #[wasm_bindgen(method, getter = "layout")] + fn layout_shim(this: &GpuPipelineDescriptorBase) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuPipelineDescriptorBase, val: &::wasm_bindgen::JsValue); + fn set_layout_shim(this: &GpuPipelineDescriptorBase, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuPipelineDescriptorBase` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] +pub trait GpuPipelineDescriptorBaseGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineDescriptorBase`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn layout(&self) -> ::wasm_bindgen::JsValue; +} +#[cfg(web_sys_unstable_apis)] +impl GpuPipelineDescriptorBaseGetters for GpuPipelineDescriptorBase { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn layout(&self) -> ::wasm_bindgen::JsValue { + self.layout_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuPipelineDescriptorBase { @@ -30,7 +67,7 @@ impl GpuPipelineDescriptorBase { pub fn new(layout: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.layout(layout); + Self::layout(&mut ret, layout); ret } #[cfg(web_sys_unstable_apis)] @@ -41,7 +78,7 @@ impl GpuPipelineDescriptorBase { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -52,7 +89,7 @@ impl GpuPipelineDescriptorBase { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs b/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs index 4153f498d14..9867d224cd5 100644 --- a/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs +++ b/crates/web-sys/src/features/gen_GpuPipelineErrorInit.rs @@ -15,8 +15,34 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuPipelineErrorInit; #[cfg(feature = "GpuPipelineErrorReason")] + #[wasm_bindgen(method, getter = "reason")] + fn reason_shim(this: &GpuPipelineErrorInit) -> GpuPipelineErrorReason; + #[cfg(feature = "GpuPipelineErrorReason")] #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &GpuPipelineErrorInit, val: GpuPipelineErrorReason); + fn set_reason_shim(this: &GpuPipelineErrorInit, val: GpuPipelineErrorReason); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuPipelineErrorInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuPipelineErrorInit`*"] +pub trait GpuPipelineErrorInitGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPipelineErrorReason")] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineErrorInit`, `GpuPipelineErrorReason`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn reason(&self) -> GpuPipelineErrorReason; +} +#[cfg(web_sys_unstable_apis)] +impl GpuPipelineErrorInitGetters for GpuPipelineErrorInit { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPipelineErrorReason")] + fn reason(&self) -> GpuPipelineErrorReason { + self.reason_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuPipelineErrorInit { @@ -30,7 +56,7 @@ impl GpuPipelineErrorInit { pub fn new(reason: GpuPipelineErrorReason) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.reason(reason); + Self::reason(&mut ret, reason); ret } #[cfg(web_sys_unstable_apis)] @@ -42,7 +68,7 @@ impl GpuPipelineErrorInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn reason(&mut self, val: GpuPipelineErrorReason) -> &mut Self { - self.reason_shim(val); + self.set_reason_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs b/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs index a1113b81f2f..b5317c7fedd 100644 --- a/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuPipelineLayoutDescriptor.rs @@ -14,10 +14,50 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuPipelineLayoutDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuPipelineLayoutDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuPipelineLayoutDescriptor, val: &str); + fn set_label_shim(this: &GpuPipelineLayoutDescriptor, val: &str); + #[wasm_bindgen(method, getter = "bindGroupLayouts")] + fn bind_group_layouts_shim(this: &GpuPipelineLayoutDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "bindGroupLayouts")] - fn bind_group_layouts_shim(this: &GpuPipelineLayoutDescriptor, val: &::wasm_bindgen::JsValue); + fn set_bind_group_layouts_shim( + this: &GpuPipelineLayoutDescriptor, + val: &::wasm_bindgen::JsValue, + ); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuPipelineLayoutDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] +pub trait GpuPipelineLayoutDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bindGroupLayouts` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPipelineLayoutDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bind_group_layouts(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl GpuPipelineLayoutDescriptorGetters for GpuPipelineLayoutDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn bind_group_layouts(&self) -> ::js_sys::Array { + self.bind_group_layouts_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuPipelineLayoutDescriptor { @@ -30,7 +70,7 @@ impl GpuPipelineLayoutDescriptor { pub fn new(bind_group_layouts: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.bind_group_layouts(bind_group_layouts); + Self::bind_group_layouts(&mut ret, bind_group_layouts); ret } #[cfg(web_sys_unstable_apis)] @@ -41,7 +81,7 @@ impl GpuPipelineLayoutDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -52,7 +92,7 @@ impl GpuPipelineLayoutDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bind_group_layouts(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.bind_group_layouts_shim(val); + self.set_bind_group_layouts_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuPrimitiveState.rs b/crates/web-sys/src/features/gen_GpuPrimitiveState.rs index 1c2c627c22a..1e2dca95089 100644 --- a/crates/web-sys/src/features/gen_GpuPrimitiveState.rs +++ b/crates/web-sys/src/features/gen_GpuPrimitiveState.rs @@ -15,19 +15,110 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuPrimitiveState; #[cfg(feature = "GpuCullMode")] + #[wasm_bindgen(method, getter = "cullMode")] + fn cull_mode_shim(this: &GpuPrimitiveState) -> GpuCullMode; + #[cfg(feature = "GpuCullMode")] #[wasm_bindgen(method, setter = "cullMode")] - fn cull_mode_shim(this: &GpuPrimitiveState, val: GpuCullMode); + fn set_cull_mode_shim(this: &GpuPrimitiveState, val: GpuCullMode); + #[cfg(feature = "GpuFrontFace")] + #[wasm_bindgen(method, getter = "frontFace")] + fn front_face_shim(this: &GpuPrimitiveState) -> GpuFrontFace; #[cfg(feature = "GpuFrontFace")] #[wasm_bindgen(method, setter = "frontFace")] - fn front_face_shim(this: &GpuPrimitiveState, val: GpuFrontFace); + fn set_front_face_shim(this: &GpuPrimitiveState, val: GpuFrontFace); + #[cfg(feature = "GpuIndexFormat")] + #[wasm_bindgen(method, getter = "stripIndexFormat")] + fn strip_index_format_shim(this: &GpuPrimitiveState) -> GpuIndexFormat; #[cfg(feature = "GpuIndexFormat")] #[wasm_bindgen(method, setter = "stripIndexFormat")] - fn strip_index_format_shim(this: &GpuPrimitiveState, val: GpuIndexFormat); + fn set_strip_index_format_shim(this: &GpuPrimitiveState, val: GpuIndexFormat); + #[cfg(feature = "GpuPrimitiveTopology")] + #[wasm_bindgen(method, getter = "topology")] + fn topology_shim(this: &GpuPrimitiveState) -> GpuPrimitiveTopology; #[cfg(feature = "GpuPrimitiveTopology")] #[wasm_bindgen(method, setter = "topology")] - fn topology_shim(this: &GpuPrimitiveState, val: GpuPrimitiveTopology); + fn set_topology_shim(this: &GpuPrimitiveState, val: GpuPrimitiveTopology); + #[wasm_bindgen(method, getter = "unclippedDepth")] + fn unclipped_depth_shim(this: &GpuPrimitiveState) -> bool; #[wasm_bindgen(method, setter = "unclippedDepth")] - fn unclipped_depth_shim(this: &GpuPrimitiveState, val: bool); + fn set_unclipped_depth_shim(this: &GpuPrimitiveState, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuPrimitiveState` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"] +pub trait GpuPrimitiveStateGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCullMode")] + #[doc = "Get the `cullMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCullMode`, `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cull_mode(&self) -> GpuCullMode; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFrontFace")] + #[doc = "Get the `frontFace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFrontFace`, `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn front_face(&self) -> GpuFrontFace; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuIndexFormat")] + #[doc = "Get the `stripIndexFormat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuIndexFormat`, `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn strip_index_format(&self) -> GpuIndexFormat; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPrimitiveTopology")] + #[doc = "Get the `topology` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuPrimitiveTopology`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn topology(&self) -> GpuPrimitiveTopology; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unclippedDepth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn unclipped_depth(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl GpuPrimitiveStateGetters for GpuPrimitiveState { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCullMode")] + fn cull_mode(&self) -> GpuCullMode { + self.cull_mode_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFrontFace")] + fn front_face(&self) -> GpuFrontFace { + self.front_face_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuIndexFormat")] + fn strip_index_format(&self) -> GpuIndexFormat { + self.strip_index_format_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPrimitiveTopology")] + fn topology(&self) -> GpuPrimitiveTopology { + self.topology_shim() + } + #[cfg(web_sys_unstable_apis)] + fn unclipped_depth(&self) -> bool { + self.unclipped_depth_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuPrimitiveState { @@ -51,7 +142,7 @@ impl GpuPrimitiveState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cull_mode(&mut self, val: GpuCullMode) -> &mut Self { - self.cull_mode_shim(val); + self.set_cull_mode_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -63,7 +154,7 @@ impl GpuPrimitiveState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn front_face(&mut self, val: GpuFrontFace) -> &mut Self { - self.front_face_shim(val); + self.set_front_face_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -75,7 +166,7 @@ impl GpuPrimitiveState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn strip_index_format(&mut self, val: GpuIndexFormat) -> &mut Self { - self.strip_index_format_shim(val); + self.set_strip_index_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -87,7 +178,7 @@ impl GpuPrimitiveState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn topology(&mut self, val: GpuPrimitiveTopology) -> &mut Self { - self.topology_shim(val); + self.set_topology_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -98,7 +189,7 @@ impl GpuPrimitiveState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn unclipped_depth(&mut self, val: bool) -> &mut Self { - self.unclipped_depth_shim(val); + self.set_unclipped_depth_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuProgrammableStage.rs b/crates/web-sys/src/features/gen_GpuProgrammableStage.rs index 2cce8beb098..71831b1b01d 100644 --- a/crates/web-sys/src/features/gen_GpuProgrammableStage.rs +++ b/crates/web-sys/src/features/gen_GpuProgrammableStage.rs @@ -14,11 +14,51 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuProgrammableStage; + #[wasm_bindgen(method, getter = "entryPoint")] + fn entry_point_shim(this: &GpuProgrammableStage) -> String; #[wasm_bindgen(method, setter = "entryPoint")] - fn entry_point_shim(this: &GpuProgrammableStage, val: &str); + fn set_entry_point_shim(this: &GpuProgrammableStage, val: &str); + #[cfg(feature = "GpuShaderModule")] + #[wasm_bindgen(method, getter = "module")] + fn module_shim(this: &GpuProgrammableStage) -> GpuShaderModule; #[cfg(feature = "GpuShaderModule")] #[wasm_bindgen(method, setter = "module")] - fn module_shim(this: &GpuProgrammableStage, val: &GpuShaderModule); + fn set_module_shim(this: &GpuProgrammableStage, val: &GpuShaderModule); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuProgrammableStage` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"] +pub trait GpuProgrammableStageGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn entry_point(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuShaderModule")] + #[doc = "Get the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuProgrammableStage`, `GpuShaderModule`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn module(&self) -> GpuShaderModule; +} +#[cfg(web_sys_unstable_apis)] +impl GpuProgrammableStageGetters for GpuProgrammableStage { + #[cfg(web_sys_unstable_apis)] + fn entry_point(&self) -> String { + self.entry_point_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuShaderModule")] + fn module(&self) -> GpuShaderModule { + self.module_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuProgrammableStage { @@ -32,7 +72,7 @@ impl GpuProgrammableStage { pub fn new(module: &GpuShaderModule) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.module(module); + Self::module(&mut ret, module); ret } #[cfg(web_sys_unstable_apis)] @@ -43,7 +83,7 @@ impl GpuProgrammableStage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn entry_point(&mut self, val: &str) -> &mut Self { - self.entry_point_shim(val); + self.set_entry_point_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +95,7 @@ impl GpuProgrammableStage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { - self.module_shim(val); + self.set_module_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs b/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs index 5fab281c1c3..a6c153b6be5 100644 --- a/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuQuerySetDescriptor.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuQuerySetDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuQuerySetDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuQuerySetDescriptor, val: &str); + fn set_label_shim(this: &GpuQuerySetDescriptor, val: &str); + #[wasm_bindgen(method, getter = "count")] + fn count_shim(this: &GpuQuerySetDescriptor) -> u32; #[wasm_bindgen(method, setter = "count")] - fn count_shim(this: &GpuQuerySetDescriptor, val: u32); + fn set_count_shim(this: &GpuQuerySetDescriptor, val: u32); + #[cfg(feature = "GpuQueryType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &GpuQuerySetDescriptor) -> GpuQueryType; #[cfg(feature = "GpuQueryType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &GpuQuerySetDescriptor, val: GpuQueryType); + fn set_type__shim(this: &GpuQuerySetDescriptor, val: GpuQueryType); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuQuerySetDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] +pub trait GpuQuerySetDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `count` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn count(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQueryType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySetDescriptor`, `GpuQueryType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn type_(&self) -> GpuQueryType; +} +#[cfg(web_sys_unstable_apis)] +impl GpuQuerySetDescriptorGetters for GpuQuerySetDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn count(&self) -> u32 { + self.count_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQueryType")] + fn type_(&self) -> GpuQueryType { + self.type__shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuQuerySetDescriptor { @@ -34,8 +88,8 @@ impl GpuQuerySetDescriptor { pub fn new(count: u32, type_: GpuQueryType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.count(count); - ret.type_(type_); + Self::count(&mut ret, count); + Self::type_(&mut ret, type_); ret } #[cfg(web_sys_unstable_apis)] @@ -46,7 +100,7 @@ impl GpuQuerySetDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +111,7 @@ impl GpuQuerySetDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn count(&mut self, val: u32) -> &mut Self { - self.count_shim(val); + self.set_count_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +123,7 @@ impl GpuQuerySetDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn type_(&mut self, val: GpuQueryType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs b/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs index e96c645e2bd..5e87860ba05 100644 --- a/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuQueueDescriptor.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuQueueDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuQueueDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuQueueDescriptor, val: &str); + fn set_label_shim(this: &GpuQueueDescriptor, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuQueueDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] +pub trait GpuQueueDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQueueDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl GpuQueueDescriptorGetters for GpuQueueDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuQueueDescriptor { @@ -38,7 +61,7 @@ impl GpuQueueDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs index 3100a8cda05..3234405a1cb 100644 --- a/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderBundleDescriptor.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderBundleDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuRenderBundleDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderBundleDescriptor, val: &str); + fn set_label_shim(this: &GpuRenderBundleDescriptor, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuRenderBundleDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleDescriptor`*"] +pub trait GpuRenderBundleDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderBundleDescriptorGetters for GpuRenderBundleDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuRenderBundleDescriptor { @@ -38,7 +61,7 @@ impl GpuRenderBundleDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs index 82d76b71a56..c752ce36c59 100644 --- a/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderBundleEncoderDescriptor.rs @@ -14,19 +14,121 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderBundleEncoderDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuRenderBundleEncoderDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderBundleEncoderDescriptor, val: &str); + fn set_label_shim(this: &GpuRenderBundleEncoderDescriptor, val: &str); + #[wasm_bindgen(method, getter = "colorFormats")] + fn color_formats_shim(this: &GpuRenderBundleEncoderDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "colorFormats")] - fn color_formats_shim(this: &GpuRenderBundleEncoderDescriptor, val: &::wasm_bindgen::JsValue); + fn set_color_formats_shim( + this: &GpuRenderBundleEncoderDescriptor, + val: &::wasm_bindgen::JsValue, + ); + #[cfg(feature = "GpuTextureFormat")] + #[wasm_bindgen(method, getter = "depthStencilFormat")] + fn depth_stencil_format_shim(this: &GpuRenderBundleEncoderDescriptor) -> GpuTextureFormat; #[cfg(feature = "GpuTextureFormat")] #[wasm_bindgen(method, setter = "depthStencilFormat")] - fn depth_stencil_format_shim(this: &GpuRenderBundleEncoderDescriptor, val: GpuTextureFormat); + fn set_depth_stencil_format_shim( + this: &GpuRenderBundleEncoderDescriptor, + val: GpuTextureFormat, + ); + #[wasm_bindgen(method, getter = "sampleCount")] + fn sample_count_shim(this: &GpuRenderBundleEncoderDescriptor) -> u32; #[wasm_bindgen(method, setter = "sampleCount")] - fn sample_count_shim(this: &GpuRenderBundleEncoderDescriptor, val: u32); + fn set_sample_count_shim(this: &GpuRenderBundleEncoderDescriptor, val: u32); + #[wasm_bindgen(method, getter = "depthReadOnly")] + fn depth_read_only_shim(this: &GpuRenderBundleEncoderDescriptor) -> bool; #[wasm_bindgen(method, setter = "depthReadOnly")] - fn depth_read_only_shim(this: &GpuRenderBundleEncoderDescriptor, val: bool); + fn set_depth_read_only_shim(this: &GpuRenderBundleEncoderDescriptor, val: bool); + #[wasm_bindgen(method, getter = "stencilReadOnly")] + fn stencil_read_only_shim(this: &GpuRenderBundleEncoderDescriptor) -> bool; #[wasm_bindgen(method, setter = "stencilReadOnly")] - fn stencil_read_only_shim(this: &GpuRenderBundleEncoderDescriptor, val: bool); + fn set_stencil_read_only_shim(this: &GpuRenderBundleEncoderDescriptor, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuRenderBundleEncoderDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] +pub trait GpuRenderBundleEncoderDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `colorFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn color_formats(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `depthStencilFormat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_stencil_format(&self) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sample_count(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_read_only(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderBundleEncoderDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil_read_only(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderBundleEncoderDescriptorGetters for GpuRenderBundleEncoderDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn color_formats(&self) -> ::js_sys::Array { + self.color_formats_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + fn depth_stencil_format(&self) -> GpuTextureFormat { + self.depth_stencil_format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn sample_count(&self) -> u32 { + self.sample_count_shim() + } + #[cfg(web_sys_unstable_apis)] + fn depth_read_only(&self) -> bool { + self.depth_read_only_shim() + } + #[cfg(web_sys_unstable_apis)] + fn stencil_read_only(&self) -> bool { + self.stencil_read_only_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuRenderBundleEncoderDescriptor { @@ -39,7 +141,7 @@ impl GpuRenderBundleEncoderDescriptor { pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.color_formats(color_formats); + Self::color_formats(&mut ret, color_formats); ret } #[cfg(web_sys_unstable_apis)] @@ -50,7 +152,7 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -61,7 +163,7 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.color_formats_shim(val); + self.set_color_formats_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -73,7 +175,7 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.depth_stencil_format_shim(val); + self.set_depth_stencil_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -84,7 +186,7 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sample_count(&mut self, val: u32) -> &mut Self { - self.sample_count_shim(val); + self.set_sample_count_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -95,7 +197,7 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_read_only(&mut self, val: bool) -> &mut Self { - self.depth_read_only_shim(val); + self.set_depth_read_only_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -106,7 +208,7 @@ impl GpuRenderBundleEncoderDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil_read_only(&mut self, val: bool) -> &mut Self { - self.stencil_read_only_shim(val); + self.set_stencil_read_only_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs b/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs index d0506938272..75a904dd00a 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassColorAttachment.rs @@ -14,22 +14,127 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassColorAttachment; + #[wasm_bindgen(method, getter = "clearValue")] + fn clear_value_shim(this: &GpuRenderPassColorAttachment) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "clearValue")] - fn clear_value_shim(this: &GpuRenderPassColorAttachment, val: &::wasm_bindgen::JsValue); + fn set_clear_value_shim(this: &GpuRenderPassColorAttachment, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "depthSlice")] + fn depth_slice_shim(this: &GpuRenderPassColorAttachment) -> u32; #[wasm_bindgen(method, setter = "depthSlice")] - fn depth_slice_shim(this: &GpuRenderPassColorAttachment, val: u32); + fn set_depth_slice_shim(this: &GpuRenderPassColorAttachment, val: u32); + #[cfg(feature = "GpuLoadOp")] + #[wasm_bindgen(method, getter = "loadOp")] + fn load_op_shim(this: &GpuRenderPassColorAttachment) -> GpuLoadOp; #[cfg(feature = "GpuLoadOp")] #[wasm_bindgen(method, setter = "loadOp")] - fn load_op_shim(this: &GpuRenderPassColorAttachment, val: GpuLoadOp); + fn set_load_op_shim(this: &GpuRenderPassColorAttachment, val: GpuLoadOp); + #[cfg(feature = "GpuTextureView")] + #[wasm_bindgen(method, getter = "resolveTarget")] + fn resolve_target_shim(this: &GpuRenderPassColorAttachment) -> GpuTextureView; #[cfg(feature = "GpuTextureView")] #[wasm_bindgen(method, setter = "resolveTarget")] - fn resolve_target_shim(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + fn set_resolve_target_shim(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + #[cfg(feature = "GpuStoreOp")] + #[wasm_bindgen(method, getter = "storeOp")] + fn store_op_shim(this: &GpuRenderPassColorAttachment) -> GpuStoreOp; #[cfg(feature = "GpuStoreOp")] #[wasm_bindgen(method, setter = "storeOp")] - fn store_op_shim(this: &GpuRenderPassColorAttachment, val: GpuStoreOp); + fn set_store_op_shim(this: &GpuRenderPassColorAttachment, val: GpuStoreOp); + #[cfg(feature = "GpuTextureView")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &GpuRenderPassColorAttachment) -> GpuTextureView; #[cfg(feature = "GpuTextureView")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); + fn set_view_shim(this: &GpuRenderPassColorAttachment, val: &GpuTextureView); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuRenderPassColorAttachment` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] +pub trait GpuRenderPassColorAttachmentGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `clearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn clear_value(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthSlice` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_slice(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + #[doc = "Get the `loadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassColorAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn load_op(&self) -> GpuLoadOp; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + #[doc = "Get the `resolveTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn resolve_target(&self) -> GpuTextureView; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + #[doc = "Get the `storeOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn store_op(&self) -> GpuStoreOp; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassColorAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn view(&self) -> GpuTextureView; +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderPassColorAttachmentGetters for GpuRenderPassColorAttachment { + #[cfg(web_sys_unstable_apis)] + fn clear_value(&self) -> ::wasm_bindgen::JsValue { + self.clear_value_shim() + } + #[cfg(web_sys_unstable_apis)] + fn depth_slice(&self) -> u32 { + self.depth_slice_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + fn load_op(&self) -> GpuLoadOp { + self.load_op_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + fn resolve_target(&self) -> GpuTextureView { + self.resolve_target_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + fn store_op(&self) -> GpuStoreOp { + self.store_op_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + fn view(&self) -> GpuTextureView { + self.view_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassColorAttachment { @@ -47,9 +152,9 @@ impl GpuRenderPassColorAttachment { pub fn new(load_op: GpuLoadOp, store_op: GpuStoreOp, view: &GpuTextureView) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.load_op(load_op); - ret.store_op(store_op); - ret.view(view); + Self::load_op(&mut ret, load_op); + Self::store_op(&mut ret, store_op); + Self::view(&mut ret, view); ret } #[cfg(web_sys_unstable_apis)] @@ -60,7 +165,7 @@ impl GpuRenderPassColorAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn clear_value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.clear_value_shim(val); + self.set_clear_value_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -71,7 +176,7 @@ impl GpuRenderPassColorAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_slice(&mut self, val: u32) -> &mut Self { - self.depth_slice_shim(val); + self.set_depth_slice_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -83,7 +188,7 @@ impl GpuRenderPassColorAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn load_op(&mut self, val: GpuLoadOp) -> &mut Self { - self.load_op_shim(val); + self.set_load_op_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -95,7 +200,7 @@ impl GpuRenderPassColorAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn resolve_target(&mut self, val: &GpuTextureView) -> &mut Self { - self.resolve_target_shim(val); + self.set_resolve_target_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -107,7 +212,7 @@ impl GpuRenderPassColorAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn store_op(&mut self, val: GpuStoreOp) -> &mut Self { - self.store_op_shim(val); + self.set_store_op_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -119,7 +224,7 @@ impl GpuRenderPassColorAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn view(&mut self, val: &GpuTextureView) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs b/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs index 86f32e884fc..7017e993828 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassDepthStencilAttachment.rs @@ -14,29 +14,179 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassDepthStencilAttachment; + #[wasm_bindgen(method, getter = "depthClearValue")] + fn depth_clear_value_shim(this: &GpuRenderPassDepthStencilAttachment) -> f32; #[wasm_bindgen(method, setter = "depthClearValue")] - fn depth_clear_value_shim(this: &GpuRenderPassDepthStencilAttachment, val: f32); + fn set_depth_clear_value_shim(this: &GpuRenderPassDepthStencilAttachment, val: f32); + #[cfg(feature = "GpuLoadOp")] + #[wasm_bindgen(method, getter = "depthLoadOp")] + fn depth_load_op_shim(this: &GpuRenderPassDepthStencilAttachment) -> GpuLoadOp; #[cfg(feature = "GpuLoadOp")] #[wasm_bindgen(method, setter = "depthLoadOp")] - fn depth_load_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); + fn set_depth_load_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); + #[wasm_bindgen(method, getter = "depthReadOnly")] + fn depth_read_only_shim(this: &GpuRenderPassDepthStencilAttachment) -> bool; #[wasm_bindgen(method, setter = "depthReadOnly")] - fn depth_read_only_shim(this: &GpuRenderPassDepthStencilAttachment, val: bool); + fn set_depth_read_only_shim(this: &GpuRenderPassDepthStencilAttachment, val: bool); + #[cfg(feature = "GpuStoreOp")] + #[wasm_bindgen(method, getter = "depthStoreOp")] + fn depth_store_op_shim(this: &GpuRenderPassDepthStencilAttachment) -> GpuStoreOp; #[cfg(feature = "GpuStoreOp")] #[wasm_bindgen(method, setter = "depthStoreOp")] - fn depth_store_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); + fn set_depth_store_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); + #[wasm_bindgen(method, getter = "stencilClearValue")] + fn stencil_clear_value_shim(this: &GpuRenderPassDepthStencilAttachment) -> u32; #[wasm_bindgen(method, setter = "stencilClearValue")] - fn stencil_clear_value_shim(this: &GpuRenderPassDepthStencilAttachment, val: u32); + fn set_stencil_clear_value_shim(this: &GpuRenderPassDepthStencilAttachment, val: u32); + #[cfg(feature = "GpuLoadOp")] + #[wasm_bindgen(method, getter = "stencilLoadOp")] + fn stencil_load_op_shim(this: &GpuRenderPassDepthStencilAttachment) -> GpuLoadOp; #[cfg(feature = "GpuLoadOp")] #[wasm_bindgen(method, setter = "stencilLoadOp")] - fn stencil_load_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); + fn set_stencil_load_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuLoadOp); + #[wasm_bindgen(method, getter = "stencilReadOnly")] + fn stencil_read_only_shim(this: &GpuRenderPassDepthStencilAttachment) -> bool; #[wasm_bindgen(method, setter = "stencilReadOnly")] - fn stencil_read_only_shim(this: &GpuRenderPassDepthStencilAttachment, val: bool); + fn set_stencil_read_only_shim(this: &GpuRenderPassDepthStencilAttachment, val: bool); + #[cfg(feature = "GpuStoreOp")] + #[wasm_bindgen(method, getter = "stencilStoreOp")] + fn stencil_store_op_shim(this: &GpuRenderPassDepthStencilAttachment) -> GpuStoreOp; #[cfg(feature = "GpuStoreOp")] #[wasm_bindgen(method, setter = "stencilStoreOp")] - fn stencil_store_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); + fn set_stencil_store_op_shim(this: &GpuRenderPassDepthStencilAttachment, val: GpuStoreOp); + #[cfg(feature = "GpuTextureView")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &GpuRenderPassDepthStencilAttachment) -> GpuTextureView; #[cfg(feature = "GpuTextureView")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTextureView); + fn set_view_shim(this: &GpuRenderPassDepthStencilAttachment, val: &GpuTextureView); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuRenderPassDepthStencilAttachment` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] +pub trait GpuRenderPassDepthStencilAttachmentGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthClearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_clear_value(&self) -> f32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + #[doc = "Get the `depthLoadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_load_op(&self) -> GpuLoadOp; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_read_only(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + #[doc = "Get the `depthStoreOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_store_op(&self) -> GpuStoreOp; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilClearValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil_clear_value(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + #[doc = "Get the `stencilLoadOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuLoadOp`, `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil_load_op(&self) -> GpuLoadOp; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencilReadOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil_read_only(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + #[doc = "Get the `stencilStoreOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuStoreOp`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil_store_op(&self) -> GpuStoreOp; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuTextureView`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn view(&self) -> GpuTextureView; +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderPassDepthStencilAttachmentGetters for GpuRenderPassDepthStencilAttachment { + #[cfg(web_sys_unstable_apis)] + fn depth_clear_value(&self) -> f32 { + self.depth_clear_value_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + fn depth_load_op(&self) -> GpuLoadOp { + self.depth_load_op_shim() + } + #[cfg(web_sys_unstable_apis)] + fn depth_read_only(&self) -> bool { + self.depth_read_only_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + fn depth_store_op(&self) -> GpuStoreOp { + self.depth_store_op_shim() + } + #[cfg(web_sys_unstable_apis)] + fn stencil_clear_value(&self) -> u32 { + self.stencil_clear_value_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuLoadOp")] + fn stencil_load_op(&self) -> GpuLoadOp { + self.stencil_load_op_shim() + } + #[cfg(web_sys_unstable_apis)] + fn stencil_read_only(&self) -> bool { + self.stencil_read_only_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStoreOp")] + fn stencil_store_op(&self) -> GpuStoreOp { + self.stencil_store_op_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureView")] + fn view(&self) -> GpuTextureView { + self.view_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassDepthStencilAttachment { @@ -50,7 +200,7 @@ impl GpuRenderPassDepthStencilAttachment { pub fn new(view: &GpuTextureView) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.view(view); + Self::view(&mut ret, view); ret } #[cfg(web_sys_unstable_apis)] @@ -61,7 +211,7 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_clear_value(&mut self, val: f32) -> &mut Self { - self.depth_clear_value_shim(val); + self.set_depth_clear_value_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -73,7 +223,7 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_load_op(&mut self, val: GpuLoadOp) -> &mut Self { - self.depth_load_op_shim(val); + self.set_depth_load_op_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -84,7 +234,7 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_read_only(&mut self, val: bool) -> &mut Self { - self.depth_read_only_shim(val); + self.set_depth_read_only_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -96,7 +246,7 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_store_op(&mut self, val: GpuStoreOp) -> &mut Self { - self.depth_store_op_shim(val); + self.set_depth_store_op_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -107,7 +257,7 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil_clear_value(&mut self, val: u32) -> &mut Self { - self.stencil_clear_value_shim(val); + self.set_stencil_clear_value_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -119,7 +269,7 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil_load_op(&mut self, val: GpuLoadOp) -> &mut Self { - self.stencil_load_op_shim(val); + self.set_stencil_load_op_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -130,7 +280,7 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil_read_only(&mut self, val: bool) -> &mut Self { - self.stencil_read_only_shim(val); + self.set_stencil_read_only_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -142,7 +292,7 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil_store_op(&mut self, val: GpuStoreOp) -> &mut Self { - self.stencil_store_op_shim(val); + self.set_stencil_store_op_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -154,7 +304,7 @@ impl GpuRenderPassDepthStencilAttachment { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn view(&mut self, val: &GpuTextureView) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs index 7ba69a91ec3..6d6d4a8b6c2 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassDescriptor.rs @@ -14,24 +14,131 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuRenderPassDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderPassDescriptor, val: &str); + fn set_label_shim(this: &GpuRenderPassDescriptor, val: &str); + #[wasm_bindgen(method, getter = "colorAttachments")] + fn color_attachments_shim(this: &GpuRenderPassDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "colorAttachments")] - fn color_attachments_shim(this: &GpuRenderPassDescriptor, val: &::wasm_bindgen::JsValue); + fn set_color_attachments_shim(this: &GpuRenderPassDescriptor, val: &::wasm_bindgen::JsValue); #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] - #[wasm_bindgen(method, setter = "depthStencilAttachment")] + #[wasm_bindgen(method, getter = "depthStencilAttachment")] fn depth_stencil_attachment_shim( this: &GpuRenderPassDescriptor, + ) -> GpuRenderPassDepthStencilAttachment; + #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] + #[wasm_bindgen(method, setter = "depthStencilAttachment")] + fn set_depth_stencil_attachment_shim( + this: &GpuRenderPassDescriptor, val: &GpuRenderPassDepthStencilAttachment, ); + #[wasm_bindgen(method, getter = "maxDrawCount")] + fn max_draw_count_shim(this: &GpuRenderPassDescriptor) -> f64; #[wasm_bindgen(method, setter = "maxDrawCount")] - fn max_draw_count_shim(this: &GpuRenderPassDescriptor, val: f64); + fn set_max_draw_count_shim(this: &GpuRenderPassDescriptor, val: f64); + #[cfg(feature = "GpuQuerySet")] + #[wasm_bindgen(method, getter = "occlusionQuerySet")] + fn occlusion_query_set_shim(this: &GpuRenderPassDescriptor) -> GpuQuerySet; #[cfg(feature = "GpuQuerySet")] #[wasm_bindgen(method, setter = "occlusionQuerySet")] - fn occlusion_query_set_shim(this: &GpuRenderPassDescriptor, val: &GpuQuerySet); + fn set_occlusion_query_set_shim(this: &GpuRenderPassDescriptor, val: &GpuQuerySet); + #[cfg(feature = "GpuRenderPassTimestampWrites")] + #[wasm_bindgen(method, getter = "timestampWrites")] + fn timestamp_writes_shim(this: &GpuRenderPassDescriptor) -> GpuRenderPassTimestampWrites; #[cfg(feature = "GpuRenderPassTimestampWrites")] #[wasm_bindgen(method, setter = "timestampWrites")] - fn timestamp_writes_shim(this: &GpuRenderPassDescriptor, val: &GpuRenderPassTimestampWrites); + fn set_timestamp_writes_shim( + this: &GpuRenderPassDescriptor, + val: &GpuRenderPassTimestampWrites, + ); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuRenderPassDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] +pub trait GpuRenderPassDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `colorAttachments` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn color_attachments(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] + #[doc = "Get the `depthStencilAttachment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDepthStencilAttachment`, `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_stencil_attachment(&self) -> GpuRenderPassDepthStencilAttachment; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `maxDrawCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn max_draw_count(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQuerySet")] + #[doc = "Get the `occlusionQuerySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn occlusion_query_set(&self) -> GpuQuerySet; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuRenderPassTimestampWrites")] + #[doc = "Get the `timestampWrites` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassDescriptor`, `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp_writes(&self) -> GpuRenderPassTimestampWrites; +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderPassDescriptorGetters for GpuRenderPassDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn color_attachments(&self) -> ::js_sys::Array { + self.color_attachments_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuRenderPassDepthStencilAttachment")] + fn depth_stencil_attachment(&self) -> GpuRenderPassDepthStencilAttachment { + self.depth_stencil_attachment_shim() + } + #[cfg(web_sys_unstable_apis)] + fn max_draw_count(&self) -> f64 { + self.max_draw_count_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQuerySet")] + fn occlusion_query_set(&self) -> GpuQuerySet { + self.occlusion_query_set_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuRenderPassTimestampWrites")] + fn timestamp_writes(&self) -> GpuRenderPassTimestampWrites { + self.timestamp_writes_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassDescriptor { @@ -44,7 +151,7 @@ impl GpuRenderPassDescriptor { pub fn new(color_attachments: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.color_attachments(color_attachments); + Self::color_attachments(&mut ret, color_attachments); ret } #[cfg(web_sys_unstable_apis)] @@ -55,7 +162,7 @@ impl GpuRenderPassDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +173,7 @@ impl GpuRenderPassDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn color_attachments(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.color_attachments_shim(val); + self.set_color_attachments_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +188,7 @@ impl GpuRenderPassDescriptor { &mut self, val: &GpuRenderPassDepthStencilAttachment, ) -> &mut Self { - self.depth_stencil_attachment_shim(val); + self.set_depth_stencil_attachment_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -92,7 +199,7 @@ impl GpuRenderPassDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn max_draw_count(&mut self, val: f64) -> &mut Self { - self.max_draw_count_shim(val); + self.set_max_draw_count_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -104,7 +211,7 @@ impl GpuRenderPassDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn occlusion_query_set(&mut self, val: &GpuQuerySet) -> &mut Self { - self.occlusion_query_set_shim(val); + self.set_occlusion_query_set_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -116,7 +223,7 @@ impl GpuRenderPassDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp_writes(&mut self, val: &GpuRenderPassTimestampWrites) -> &mut Self { - self.timestamp_writes_shim(val); + self.set_timestamp_writes_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs b/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs index 8ae5c2d3616..dbf70f8e7d2 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassLayout.rs @@ -14,15 +14,83 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassLayout; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuRenderPassLayout) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderPassLayout, val: &str); + fn set_label_shim(this: &GpuRenderPassLayout, val: &str); + #[wasm_bindgen(method, getter = "colorFormats")] + fn color_formats_shim(this: &GpuRenderPassLayout) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "colorFormats")] - fn color_formats_shim(this: &GpuRenderPassLayout, val: &::wasm_bindgen::JsValue); + fn set_color_formats_shim(this: &GpuRenderPassLayout, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "GpuTextureFormat")] + #[wasm_bindgen(method, getter = "depthStencilFormat")] + fn depth_stencil_format_shim(this: &GpuRenderPassLayout) -> GpuTextureFormat; #[cfg(feature = "GpuTextureFormat")] #[wasm_bindgen(method, setter = "depthStencilFormat")] - fn depth_stencil_format_shim(this: &GpuRenderPassLayout, val: GpuTextureFormat); + fn set_depth_stencil_format_shim(this: &GpuRenderPassLayout, val: GpuTextureFormat); + #[wasm_bindgen(method, getter = "sampleCount")] + fn sample_count_shim(this: &GpuRenderPassLayout) -> u32; #[wasm_bindgen(method, setter = "sampleCount")] - fn sample_count_shim(this: &GpuRenderPassLayout, val: u32); + fn set_sample_count_shim(this: &GpuRenderPassLayout, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuRenderPassLayout` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] +pub trait GpuRenderPassLayoutGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `colorFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn color_formats(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `depthStencilFormat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_stencil_format(&self) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sample_count(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderPassLayoutGetters for GpuRenderPassLayout { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn color_formats(&self) -> ::js_sys::Array { + self.color_formats_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + fn depth_stencil_format(&self) -> GpuTextureFormat { + self.depth_stencil_format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn sample_count(&self) -> u32 { + self.sample_count_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassLayout { @@ -35,7 +103,7 @@ impl GpuRenderPassLayout { pub fn new(color_formats: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.color_formats(color_formats); + Self::color_formats(&mut ret, color_formats); ret } #[cfg(web_sys_unstable_apis)] @@ -46,7 +114,7 @@ impl GpuRenderPassLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +125,7 @@ impl GpuRenderPassLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn color_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.color_formats_shim(val); + self.set_color_formats_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +137,7 @@ impl GpuRenderPassLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_stencil_format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.depth_stencil_format_shim(val); + self.set_depth_stencil_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -80,7 +148,7 @@ impl GpuRenderPassLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sample_count(&mut self, val: u32) -> &mut Self { - self.sample_count_shim(val); + self.set_sample_count_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs b/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs index 3a97f58b8c7..db2ce9a36af 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPassTimestampWrites.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPassTimestampWrites; + #[wasm_bindgen(method, getter = "beginningOfPassWriteIndex")] + fn beginning_of_pass_write_index_shim(this: &GpuRenderPassTimestampWrites) -> u32; #[wasm_bindgen(method, setter = "beginningOfPassWriteIndex")] - fn beginning_of_pass_write_index_shim(this: &GpuRenderPassTimestampWrites, val: u32); + fn set_beginning_of_pass_write_index_shim(this: &GpuRenderPassTimestampWrites, val: u32); + #[wasm_bindgen(method, getter = "endOfPassWriteIndex")] + fn end_of_pass_write_index_shim(this: &GpuRenderPassTimestampWrites) -> u32; #[wasm_bindgen(method, setter = "endOfPassWriteIndex")] - fn end_of_pass_write_index_shim(this: &GpuRenderPassTimestampWrites, val: u32); + fn set_end_of_pass_write_index_shim(this: &GpuRenderPassTimestampWrites, val: u32); + #[cfg(feature = "GpuQuerySet")] + #[wasm_bindgen(method, getter = "querySet")] + fn query_set_shim(this: &GpuRenderPassTimestampWrites) -> GpuQuerySet; #[cfg(feature = "GpuQuerySet")] #[wasm_bindgen(method, setter = "querySet")] - fn query_set_shim(this: &GpuRenderPassTimestampWrites, val: &GpuQuerySet); + fn set_query_set_shim(this: &GpuRenderPassTimestampWrites, val: &GpuQuerySet); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuRenderPassTimestampWrites` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] +pub trait GpuRenderPassTimestampWritesGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `beginningOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn beginning_of_pass_write_index(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `endOfPassWriteIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn end_of_pass_write_index(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQuerySet")] + #[doc = "Get the `querySet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuQuerySet`, `GpuRenderPassTimestampWrites`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn query_set(&self) -> GpuQuerySet; +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderPassTimestampWritesGetters for GpuRenderPassTimestampWrites { + #[cfg(web_sys_unstable_apis)] + fn beginning_of_pass_write_index(&self) -> u32 { + self.beginning_of_pass_write_index_shim() + } + #[cfg(web_sys_unstable_apis)] + fn end_of_pass_write_index(&self) -> u32 { + self.end_of_pass_write_index_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuQuerySet")] + fn query_set(&self) -> GpuQuerySet { + self.query_set_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuRenderPassTimestampWrites { @@ -34,7 +88,7 @@ impl GpuRenderPassTimestampWrites { pub fn new(query_set: &GpuQuerySet) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.query_set(query_set); + Self::query_set(&mut ret, query_set); ret } #[cfg(web_sys_unstable_apis)] @@ -45,7 +99,7 @@ impl GpuRenderPassTimestampWrites { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn beginning_of_pass_write_index(&mut self, val: u32) -> &mut Self { - self.beginning_of_pass_write_index_shim(val); + self.set_beginning_of_pass_write_index_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -56,7 +110,7 @@ impl GpuRenderPassTimestampWrites { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn end_of_pass_write_index(&mut self, val: u32) -> &mut Self { - self.end_of_pass_write_index_shim(val); + self.set_end_of_pass_write_index_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +122,7 @@ impl GpuRenderPassTimestampWrites { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn query_set(&mut self, val: &GpuQuerySet) -> &mut Self { - self.query_set_shim(val); + self.set_query_set_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs b/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs index 02dc5eec076..94d8be6ac5a 100644 --- a/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuRenderPipelineDescriptor.rs @@ -14,25 +14,147 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRenderPipelineDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuRenderPipelineDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuRenderPipelineDescriptor, val: &str); + fn set_label_shim(this: &GpuRenderPipelineDescriptor, val: &str); + #[wasm_bindgen(method, getter = "layout")] + fn layout_shim(this: &GpuRenderPipelineDescriptor) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuRenderPipelineDescriptor, val: &::wasm_bindgen::JsValue); + fn set_layout_shim(this: &GpuRenderPipelineDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "GpuDepthStencilState")] + #[wasm_bindgen(method, getter = "depthStencil")] + fn depth_stencil_shim(this: &GpuRenderPipelineDescriptor) -> GpuDepthStencilState; #[cfg(feature = "GpuDepthStencilState")] #[wasm_bindgen(method, setter = "depthStencil")] - fn depth_stencil_shim(this: &GpuRenderPipelineDescriptor, val: &GpuDepthStencilState); + fn set_depth_stencil_shim(this: &GpuRenderPipelineDescriptor, val: &GpuDepthStencilState); + #[cfg(feature = "GpuFragmentState")] + #[wasm_bindgen(method, getter = "fragment")] + fn fragment_shim(this: &GpuRenderPipelineDescriptor) -> GpuFragmentState; #[cfg(feature = "GpuFragmentState")] #[wasm_bindgen(method, setter = "fragment")] - fn fragment_shim(this: &GpuRenderPipelineDescriptor, val: &GpuFragmentState); + fn set_fragment_shim(this: &GpuRenderPipelineDescriptor, val: &GpuFragmentState); + #[cfg(feature = "GpuMultisampleState")] + #[wasm_bindgen(method, getter = "multisample")] + fn multisample_shim(this: &GpuRenderPipelineDescriptor) -> GpuMultisampleState; #[cfg(feature = "GpuMultisampleState")] #[wasm_bindgen(method, setter = "multisample")] - fn multisample_shim(this: &GpuRenderPipelineDescriptor, val: &GpuMultisampleState); + fn set_multisample_shim(this: &GpuRenderPipelineDescriptor, val: &GpuMultisampleState); + #[cfg(feature = "GpuPrimitiveState")] + #[wasm_bindgen(method, getter = "primitive")] + fn primitive_shim(this: &GpuRenderPipelineDescriptor) -> GpuPrimitiveState; #[cfg(feature = "GpuPrimitiveState")] #[wasm_bindgen(method, setter = "primitive")] - fn primitive_shim(this: &GpuRenderPipelineDescriptor, val: &GpuPrimitiveState); + fn set_primitive_shim(this: &GpuRenderPipelineDescriptor, val: &GpuPrimitiveState); + #[cfg(feature = "GpuVertexState")] + #[wasm_bindgen(method, getter = "vertex")] + fn vertex_shim(this: &GpuRenderPipelineDescriptor) -> GpuVertexState; #[cfg(feature = "GpuVertexState")] #[wasm_bindgen(method, setter = "vertex")] - fn vertex_shim(this: &GpuRenderPipelineDescriptor, val: &GpuVertexState); + fn set_vertex_shim(this: &GpuRenderPipelineDescriptor, val: &GpuVertexState); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuRenderPipelineDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] +pub trait GpuRenderPipelineDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn layout(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuDepthStencilState")] + #[doc = "Get the `depthStencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuDepthStencilState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_stencil(&self) -> GpuDepthStencilState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFragmentState")] + #[doc = "Get the `fragment` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFragmentState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn fragment(&self) -> GpuFragmentState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuMultisampleState")] + #[doc = "Get the `multisample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMultisampleState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn multisample(&self) -> GpuMultisampleState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPrimitiveState")] + #[doc = "Get the `primitive` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPrimitiveState`, `GpuRenderPipelineDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn primitive(&self) -> GpuPrimitiveState; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuVertexState")] + #[doc = "Get the `vertex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRenderPipelineDescriptor`, `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn vertex(&self) -> GpuVertexState; +} +#[cfg(web_sys_unstable_apis)] +impl GpuRenderPipelineDescriptorGetters for GpuRenderPipelineDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn layout(&self) -> ::wasm_bindgen::JsValue { + self.layout_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuDepthStencilState")] + fn depth_stencil(&self) -> GpuDepthStencilState { + self.depth_stencil_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFragmentState")] + fn fragment(&self) -> GpuFragmentState { + self.fragment_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuMultisampleState")] + fn multisample(&self) -> GpuMultisampleState { + self.multisample_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPrimitiveState")] + fn primitive(&self) -> GpuPrimitiveState { + self.primitive_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuVertexState")] + fn vertex(&self) -> GpuVertexState { + self.vertex_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuRenderPipelineDescriptor { @@ -46,8 +168,8 @@ impl GpuRenderPipelineDescriptor { pub fn new(layout: &::wasm_bindgen::JsValue, vertex: &GpuVertexState) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.layout(layout); - ret.vertex(vertex); + Self::layout(&mut ret, layout); + Self::vertex(&mut ret, vertex); ret } #[cfg(web_sys_unstable_apis)] @@ -58,7 +180,7 @@ impl GpuRenderPipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +191,7 @@ impl GpuRenderPipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +203,7 @@ impl GpuRenderPipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_stencil(&mut self, val: &GpuDepthStencilState) -> &mut Self { - self.depth_stencil_shim(val); + self.set_depth_stencil_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -93,7 +215,7 @@ impl GpuRenderPipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn fragment(&mut self, val: &GpuFragmentState) -> &mut Self { - self.fragment_shim(val); + self.set_fragment_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -105,7 +227,7 @@ impl GpuRenderPipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn multisample(&mut self, val: &GpuMultisampleState) -> &mut Self { - self.multisample_shim(val); + self.set_multisample_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -117,7 +239,7 @@ impl GpuRenderPipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn primitive(&mut self, val: &GpuPrimitiveState) -> &mut Self { - self.primitive_shim(val); + self.set_primitive_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -129,7 +251,7 @@ impl GpuRenderPipelineDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn vertex(&mut self, val: &GpuVertexState) -> &mut Self { - self.vertex_shim(val); + self.set_vertex_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs b/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs index 084385ffb36..23974fc935f 100644 --- a/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs +++ b/crates/web-sys/src/features/gen_GpuRequestAdapterOptions.rs @@ -14,11 +14,51 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuRequestAdapterOptions; + #[wasm_bindgen(method, getter = "forceFallbackAdapter")] + fn force_fallback_adapter_shim(this: &GpuRequestAdapterOptions) -> bool; #[wasm_bindgen(method, setter = "forceFallbackAdapter")] - fn force_fallback_adapter_shim(this: &GpuRequestAdapterOptions, val: bool); + fn set_force_fallback_adapter_shim(this: &GpuRequestAdapterOptions, val: bool); + #[cfg(feature = "GpuPowerPreference")] + #[wasm_bindgen(method, getter = "powerPreference")] + fn power_preference_shim(this: &GpuRequestAdapterOptions) -> GpuPowerPreference; #[cfg(feature = "GpuPowerPreference")] #[wasm_bindgen(method, setter = "powerPreference")] - fn power_preference_shim(this: &GpuRequestAdapterOptions, val: GpuPowerPreference); + fn set_power_preference_shim(this: &GpuRequestAdapterOptions, val: GpuPowerPreference); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuRequestAdapterOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuRequestAdapterOptions`*"] +pub trait GpuRequestAdapterOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `forceFallbackAdapter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuRequestAdapterOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn force_fallback_adapter(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPowerPreference")] + #[doc = "Get the `powerPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuPowerPreference`, `GpuRequestAdapterOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn power_preference(&self) -> GpuPowerPreference; +} +#[cfg(web_sys_unstable_apis)] +impl GpuRequestAdapterOptionsGetters for GpuRequestAdapterOptions { + #[cfg(web_sys_unstable_apis)] + fn force_fallback_adapter(&self) -> bool { + self.force_fallback_adapter_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuPowerPreference")] + fn power_preference(&self) -> GpuPowerPreference { + self.power_preference_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuRequestAdapterOptions { @@ -41,7 +81,7 @@ impl GpuRequestAdapterOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn force_fallback_adapter(&mut self, val: bool) -> &mut Self { - self.force_fallback_adapter_shim(val); + self.set_force_fallback_adapter_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +93,7 @@ impl GpuRequestAdapterOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn power_preference(&mut self, val: GpuPowerPreference) -> &mut Self { - self.power_preference_shim(val); + self.set_power_preference_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs b/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs index 87da31c0180..479c9b14449 100644 --- a/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuSamplerBindingLayout.rs @@ -15,8 +15,34 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuSamplerBindingLayout; #[cfg(feature = "GpuSamplerBindingType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &GpuSamplerBindingLayout) -> GpuSamplerBindingType; + #[cfg(feature = "GpuSamplerBindingType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &GpuSamplerBindingLayout, val: GpuSamplerBindingType); + fn set_type__shim(this: &GpuSamplerBindingLayout, val: GpuSamplerBindingType); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuSamplerBindingLayout` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuSamplerBindingLayout`*"] +pub trait GpuSamplerBindingLayoutGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuSamplerBindingType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerBindingLayout`, `GpuSamplerBindingType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn type_(&self) -> GpuSamplerBindingType; +} +#[cfg(web_sys_unstable_apis)] +impl GpuSamplerBindingLayoutGetters for GpuSamplerBindingLayout { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuSamplerBindingType")] + fn type_(&self) -> GpuSamplerBindingType { + self.type__shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuSamplerBindingLayout { @@ -40,7 +66,7 @@ impl GpuSamplerBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn type_(&mut self, val: GpuSamplerBindingType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs b/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs index eecc6c14c96..b16e7d0ce41 100644 --- a/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuSamplerDescriptor.rs @@ -14,35 +14,219 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuSamplerDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuSamplerDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuSamplerDescriptor, val: &str); + fn set_label_shim(this: &GpuSamplerDescriptor, val: &str); + #[cfg(feature = "GpuAddressMode")] + #[wasm_bindgen(method, getter = "addressModeU")] + fn address_mode_u_shim(this: &GpuSamplerDescriptor) -> GpuAddressMode; #[cfg(feature = "GpuAddressMode")] #[wasm_bindgen(method, setter = "addressModeU")] - fn address_mode_u_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode); + fn set_address_mode_u_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode); + #[cfg(feature = "GpuAddressMode")] + #[wasm_bindgen(method, getter = "addressModeV")] + fn address_mode_v_shim(this: &GpuSamplerDescriptor) -> GpuAddressMode; #[cfg(feature = "GpuAddressMode")] #[wasm_bindgen(method, setter = "addressModeV")] - fn address_mode_v_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode); + fn set_address_mode_v_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode); + #[cfg(feature = "GpuAddressMode")] + #[wasm_bindgen(method, getter = "addressModeW")] + fn address_mode_w_shim(this: &GpuSamplerDescriptor) -> GpuAddressMode; #[cfg(feature = "GpuAddressMode")] #[wasm_bindgen(method, setter = "addressModeW")] - fn address_mode_w_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode); + fn set_address_mode_w_shim(this: &GpuSamplerDescriptor, val: GpuAddressMode); + #[cfg(feature = "GpuCompareFunction")] + #[wasm_bindgen(method, getter = "compare")] + fn compare_shim(this: &GpuSamplerDescriptor) -> GpuCompareFunction; #[cfg(feature = "GpuCompareFunction")] #[wasm_bindgen(method, setter = "compare")] - fn compare_shim(this: &GpuSamplerDescriptor, val: GpuCompareFunction); + fn set_compare_shim(this: &GpuSamplerDescriptor, val: GpuCompareFunction); + #[wasm_bindgen(method, getter = "lodMaxClamp")] + fn lod_max_clamp_shim(this: &GpuSamplerDescriptor) -> f32; #[wasm_bindgen(method, setter = "lodMaxClamp")] - fn lod_max_clamp_shim(this: &GpuSamplerDescriptor, val: f32); + fn set_lod_max_clamp_shim(this: &GpuSamplerDescriptor, val: f32); + #[wasm_bindgen(method, getter = "lodMinClamp")] + fn lod_min_clamp_shim(this: &GpuSamplerDescriptor) -> f32; #[wasm_bindgen(method, setter = "lodMinClamp")] - fn lod_min_clamp_shim(this: &GpuSamplerDescriptor, val: f32); + fn set_lod_min_clamp_shim(this: &GpuSamplerDescriptor, val: f32); + #[cfg(feature = "GpuFilterMode")] + #[wasm_bindgen(method, getter = "magFilter")] + fn mag_filter_shim(this: &GpuSamplerDescriptor) -> GpuFilterMode; #[cfg(feature = "GpuFilterMode")] #[wasm_bindgen(method, setter = "magFilter")] - fn mag_filter_shim(this: &GpuSamplerDescriptor, val: GpuFilterMode); + fn set_mag_filter_shim(this: &GpuSamplerDescriptor, val: GpuFilterMode); + #[wasm_bindgen(method, getter = "maxAnisotropy")] + fn max_anisotropy_shim(this: &GpuSamplerDescriptor) -> u16; #[wasm_bindgen(method, setter = "maxAnisotropy")] - fn max_anisotropy_shim(this: &GpuSamplerDescriptor, val: u16); + fn set_max_anisotropy_shim(this: &GpuSamplerDescriptor, val: u16); + #[cfg(feature = "GpuFilterMode")] + #[wasm_bindgen(method, getter = "minFilter")] + fn min_filter_shim(this: &GpuSamplerDescriptor) -> GpuFilterMode; #[cfg(feature = "GpuFilterMode")] #[wasm_bindgen(method, setter = "minFilter")] - fn min_filter_shim(this: &GpuSamplerDescriptor, val: GpuFilterMode); + fn set_min_filter_shim(this: &GpuSamplerDescriptor, val: GpuFilterMode); + #[cfg(feature = "GpuMipmapFilterMode")] + #[wasm_bindgen(method, getter = "mipmapFilter")] + fn mipmap_filter_shim(this: &GpuSamplerDescriptor) -> GpuMipmapFilterMode; #[cfg(feature = "GpuMipmapFilterMode")] #[wasm_bindgen(method, setter = "mipmapFilter")] - fn mipmap_filter_shim(this: &GpuSamplerDescriptor, val: GpuMipmapFilterMode); + fn set_mipmap_filter_shim(this: &GpuSamplerDescriptor, val: GpuMipmapFilterMode); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuSamplerDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] +pub trait GpuSamplerDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + #[doc = "Get the `addressModeU` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn address_mode_u(&self) -> GpuAddressMode; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + #[doc = "Get the `addressModeV` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn address_mode_v(&self) -> GpuAddressMode; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + #[doc = "Get the `addressModeW` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuAddressMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn address_mode_w(&self) -> GpuAddressMode; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + #[doc = "Get the `compare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn compare(&self) -> GpuCompareFunction; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `lodMaxClamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn lod_max_clamp(&self) -> f32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `lodMinClamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn lod_min_clamp(&self) -> f32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFilterMode")] + #[doc = "Get the `magFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mag_filter(&self) -> GpuFilterMode; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `maxAnisotropy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn max_anisotropy(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFilterMode")] + #[doc = "Get the `minFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuFilterMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn min_filter(&self) -> GpuFilterMode; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuMipmapFilterMode")] + #[doc = "Get the `mipmapFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuMipmapFilterMode`, `GpuSamplerDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mipmap_filter(&self) -> GpuMipmapFilterMode; +} +#[cfg(web_sys_unstable_apis)] +impl GpuSamplerDescriptorGetters for GpuSamplerDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + fn address_mode_u(&self) -> GpuAddressMode { + self.address_mode_u_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + fn address_mode_v(&self) -> GpuAddressMode { + self.address_mode_v_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuAddressMode")] + fn address_mode_w(&self) -> GpuAddressMode { + self.address_mode_w_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + fn compare(&self) -> GpuCompareFunction { + self.compare_shim() + } + #[cfg(web_sys_unstable_apis)] + fn lod_max_clamp(&self) -> f32 { + self.lod_max_clamp_shim() + } + #[cfg(web_sys_unstable_apis)] + fn lod_min_clamp(&self) -> f32 { + self.lod_min_clamp_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFilterMode")] + fn mag_filter(&self) -> GpuFilterMode { + self.mag_filter_shim() + } + #[cfg(web_sys_unstable_apis)] + fn max_anisotropy(&self) -> u16 { + self.max_anisotropy_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuFilterMode")] + fn min_filter(&self) -> GpuFilterMode { + self.min_filter_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuMipmapFilterMode")] + fn mipmap_filter(&self) -> GpuMipmapFilterMode { + self.mipmap_filter_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuSamplerDescriptor { @@ -65,7 +249,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +261,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn address_mode_u(&mut self, val: GpuAddressMode) -> &mut Self { - self.address_mode_u_shim(val); + self.set_address_mode_u_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -89,7 +273,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn address_mode_v(&mut self, val: GpuAddressMode) -> &mut Self { - self.address_mode_v_shim(val); + self.set_address_mode_v_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -101,7 +285,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn address_mode_w(&mut self, val: GpuAddressMode) -> &mut Self { - self.address_mode_w_shim(val); + self.set_address_mode_w_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -113,7 +297,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn compare(&mut self, val: GpuCompareFunction) -> &mut Self { - self.compare_shim(val); + self.set_compare_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -124,7 +308,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn lod_max_clamp(&mut self, val: f32) -> &mut Self { - self.lod_max_clamp_shim(val); + self.set_lod_max_clamp_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -135,7 +319,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn lod_min_clamp(&mut self, val: f32) -> &mut Self { - self.lod_min_clamp_shim(val); + self.set_lod_min_clamp_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -147,7 +331,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mag_filter(&mut self, val: GpuFilterMode) -> &mut Self { - self.mag_filter_shim(val); + self.set_mag_filter_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -158,7 +342,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn max_anisotropy(&mut self, val: u16) -> &mut Self { - self.max_anisotropy_shim(val); + self.set_max_anisotropy_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -170,7 +354,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn min_filter(&mut self, val: GpuFilterMode) -> &mut Self { - self.min_filter_shim(val); + self.set_min_filter_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -182,7 +366,7 @@ impl GpuSamplerDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mipmap_filter(&mut self, val: GpuMipmapFilterMode) -> &mut Self { - self.mipmap_filter_shim(val); + self.set_mipmap_filter_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs b/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs index 872f504ce07..c4a0f381a25 100644 --- a/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs +++ b/crates/web-sys/src/features/gen_GpuShaderModuleCompilationHint.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuShaderModuleCompilationHint; + #[wasm_bindgen(method, getter = "entryPoint")] + fn entry_point_shim(this: &GpuShaderModuleCompilationHint) -> String; #[wasm_bindgen(method, setter = "entryPoint")] - fn entry_point_shim(this: &GpuShaderModuleCompilationHint, val: &str); + fn set_entry_point_shim(this: &GpuShaderModuleCompilationHint, val: &str); + #[wasm_bindgen(method, getter = "layout")] + fn layout_shim(this: &GpuShaderModuleCompilationHint) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &GpuShaderModuleCompilationHint, val: &::wasm_bindgen::JsValue); + fn set_layout_shim(this: &GpuShaderModuleCompilationHint, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuShaderModuleCompilationHint` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] +pub trait GpuShaderModuleCompilationHintGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn entry_point(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleCompilationHint`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn layout(&self) -> ::wasm_bindgen::JsValue; +} +#[cfg(web_sys_unstable_apis)] +impl GpuShaderModuleCompilationHintGetters for GpuShaderModuleCompilationHint { + #[cfg(web_sys_unstable_apis)] + fn entry_point(&self) -> String { + self.entry_point_shim() + } + #[cfg(web_sys_unstable_apis)] + fn layout(&self) -> ::wasm_bindgen::JsValue { + self.layout_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuShaderModuleCompilationHint { @@ -30,7 +67,7 @@ impl GpuShaderModuleCompilationHint { pub fn new(entry_point: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.entry_point(entry_point); + Self::entry_point(&mut ret, entry_point); ret } #[cfg(web_sys_unstable_apis)] @@ -41,7 +78,7 @@ impl GpuShaderModuleCompilationHint { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn entry_point(&mut self, val: &str) -> &mut Self { - self.entry_point_shim(val); + self.set_entry_point_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -52,7 +89,7 @@ impl GpuShaderModuleCompilationHint { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs b/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs index f8ed57202ac..4f2f423fe6b 100644 --- a/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuShaderModuleDescriptor.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuShaderModuleDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuShaderModuleDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuShaderModuleDescriptor, val: &str); + fn set_label_shim(this: &GpuShaderModuleDescriptor, val: &str); + #[wasm_bindgen(method, getter = "code")] + fn code_shim(this: &GpuShaderModuleDescriptor) -> String; #[wasm_bindgen(method, setter = "code")] - fn code_shim(this: &GpuShaderModuleDescriptor, val: &str); + fn set_code_shim(this: &GpuShaderModuleDescriptor, val: &str); + #[wasm_bindgen(method, getter = "compilationHints")] + fn compilation_hints_shim(this: &GpuShaderModuleDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "compilationHints")] - fn compilation_hints_shim(this: &GpuShaderModuleDescriptor, val: &::wasm_bindgen::JsValue); + fn set_compilation_hints_shim(this: &GpuShaderModuleDescriptor, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "sourceMap")] + fn source_map_shim(this: &GpuShaderModuleDescriptor) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "sourceMap")] - fn source_map_shim(this: &GpuShaderModuleDescriptor, val: &::js_sys::Object); + fn set_source_map_shim(this: &GpuShaderModuleDescriptor, val: &::js_sys::Object); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuShaderModuleDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] +pub trait GpuShaderModuleDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn code(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `compilationHints` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn compilation_hints(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sourceMap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModuleDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn source_map(&self) -> ::js_sys::Object; +} +#[cfg(web_sys_unstable_apis)] +impl GpuShaderModuleDescriptorGetters for GpuShaderModuleDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn code(&self) -> String { + self.code_shim() + } + #[cfg(web_sys_unstable_apis)] + fn compilation_hints(&self) -> ::js_sys::Array { + self.compilation_hints_shim() + } + #[cfg(web_sys_unstable_apis)] + fn source_map(&self) -> ::js_sys::Object { + self.source_map_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuShaderModuleDescriptor { @@ -34,7 +99,7 @@ impl GpuShaderModuleDescriptor { pub fn new(code: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.code(code); + Self::code(&mut ret, code); ret } #[cfg(web_sys_unstable_apis)] @@ -45,7 +110,7 @@ impl GpuShaderModuleDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -56,7 +121,7 @@ impl GpuShaderModuleDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn code(&mut self, val: &str) -> &mut Self { - self.code_shim(val); + self.set_code_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -67,7 +132,7 @@ impl GpuShaderModuleDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn compilation_hints(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.compilation_hints_shim(val); + self.set_compilation_hints_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -78,7 +143,7 @@ impl GpuShaderModuleDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn source_map(&mut self, val: &::js_sys::Object) -> &mut Self { - self.source_map_shim(val); + self.set_source_map_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuStencilFaceState.rs b/crates/web-sys/src/features/gen_GpuStencilFaceState.rs index aa72d7b9431..4d0af527614 100644 --- a/crates/web-sys/src/features/gen_GpuStencilFaceState.rs +++ b/crates/web-sys/src/features/gen_GpuStencilFaceState.rs @@ -15,17 +15,94 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuStencilFaceState; #[cfg(feature = "GpuCompareFunction")] + #[wasm_bindgen(method, getter = "compare")] + fn compare_shim(this: &GpuStencilFaceState) -> GpuCompareFunction; + #[cfg(feature = "GpuCompareFunction")] #[wasm_bindgen(method, setter = "compare")] - fn compare_shim(this: &GpuStencilFaceState, val: GpuCompareFunction); + fn set_compare_shim(this: &GpuStencilFaceState, val: GpuCompareFunction); + #[cfg(feature = "GpuStencilOperation")] + #[wasm_bindgen(method, getter = "depthFailOp")] + fn depth_fail_op_shim(this: &GpuStencilFaceState) -> GpuStencilOperation; #[cfg(feature = "GpuStencilOperation")] #[wasm_bindgen(method, setter = "depthFailOp")] - fn depth_fail_op_shim(this: &GpuStencilFaceState, val: GpuStencilOperation); + fn set_depth_fail_op_shim(this: &GpuStencilFaceState, val: GpuStencilOperation); + #[cfg(feature = "GpuStencilOperation")] + #[wasm_bindgen(method, getter = "failOp")] + fn fail_op_shim(this: &GpuStencilFaceState) -> GpuStencilOperation; #[cfg(feature = "GpuStencilOperation")] #[wasm_bindgen(method, setter = "failOp")] - fn fail_op_shim(this: &GpuStencilFaceState, val: GpuStencilOperation); + fn set_fail_op_shim(this: &GpuStencilFaceState, val: GpuStencilOperation); + #[cfg(feature = "GpuStencilOperation")] + #[wasm_bindgen(method, getter = "passOp")] + fn pass_op_shim(this: &GpuStencilFaceState) -> GpuStencilOperation; #[cfg(feature = "GpuStencilOperation")] #[wasm_bindgen(method, setter = "passOp")] - fn pass_op_shim(this: &GpuStencilFaceState, val: GpuStencilOperation); + fn set_pass_op_shim(this: &GpuStencilFaceState, val: GpuStencilOperation); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuStencilFaceState` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`*"] +pub trait GpuStencilFaceStateGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + #[doc = "Get the `compare` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuCompareFunction`, `GpuStencilFaceState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn compare(&self) -> GpuCompareFunction; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilOperation")] + #[doc = "Get the `depthFailOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_fail_op(&self) -> GpuStencilOperation; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilOperation")] + #[doc = "Get the `failOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn fail_op(&self) -> GpuStencilOperation; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilOperation")] + #[doc = "Get the `passOp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStencilFaceState`, `GpuStencilOperation`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn pass_op(&self) -> GpuStencilOperation; +} +#[cfg(web_sys_unstable_apis)] +impl GpuStencilFaceStateGetters for GpuStencilFaceState { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuCompareFunction")] + fn compare(&self) -> GpuCompareFunction { + self.compare_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilOperation")] + fn depth_fail_op(&self) -> GpuStencilOperation { + self.depth_fail_op_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilOperation")] + fn fail_op(&self) -> GpuStencilOperation { + self.fail_op_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStencilOperation")] + fn pass_op(&self) -> GpuStencilOperation { + self.pass_op_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuStencilFaceState { @@ -49,7 +126,7 @@ impl GpuStencilFaceState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn compare(&mut self, val: GpuCompareFunction) -> &mut Self { - self.compare_shim(val); + self.set_compare_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -61,7 +138,7 @@ impl GpuStencilFaceState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_fail_op(&mut self, val: GpuStencilOperation) -> &mut Self { - self.depth_fail_op_shim(val); + self.set_depth_fail_op_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -73,7 +150,7 @@ impl GpuStencilFaceState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn fail_op(&mut self, val: GpuStencilOperation) -> &mut Self { - self.fail_op_shim(val); + self.set_fail_op_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -85,7 +162,7 @@ impl GpuStencilFaceState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn pass_op(&mut self, val: GpuStencilOperation) -> &mut Self { - self.pass_op_shim(val); + self.set_pass_op_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs b/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs index 36adc75a02f..3ed0ff405d1 100644 --- a/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuStorageTextureBindingLayout.rs @@ -15,14 +15,74 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuStorageTextureBindingLayout; #[cfg(feature = "GpuStorageTextureAccess")] + #[wasm_bindgen(method, getter = "access")] + fn access_shim(this: &GpuStorageTextureBindingLayout) -> GpuStorageTextureAccess; + #[cfg(feature = "GpuStorageTextureAccess")] #[wasm_bindgen(method, setter = "access")] - fn access_shim(this: &GpuStorageTextureBindingLayout, val: GpuStorageTextureAccess); + fn set_access_shim(this: &GpuStorageTextureBindingLayout, val: GpuStorageTextureAccess); + #[cfg(feature = "GpuTextureFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &GpuStorageTextureBindingLayout) -> GpuTextureFormat; #[cfg(feature = "GpuTextureFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuStorageTextureBindingLayout, val: GpuTextureFormat); + fn set_format_shim(this: &GpuStorageTextureBindingLayout, val: GpuTextureFormat); + #[cfg(feature = "GpuTextureViewDimension")] + #[wasm_bindgen(method, getter = "viewDimension")] + fn view_dimension_shim(this: &GpuStorageTextureBindingLayout) -> GpuTextureViewDimension; #[cfg(feature = "GpuTextureViewDimension")] #[wasm_bindgen(method, setter = "viewDimension")] - fn view_dimension_shim(this: &GpuStorageTextureBindingLayout, val: GpuTextureViewDimension); + fn set_view_dimension_shim(this: &GpuStorageTextureBindingLayout, val: GpuTextureViewDimension); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuStorageTextureBindingLayout` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`*"] +pub trait GpuStorageTextureBindingLayoutGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStorageTextureAccess")] + #[doc = "Get the `access` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureAccess`, `GpuStorageTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn access(&self) -> GpuStorageTextureAccess; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Get the `viewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuStorageTextureBindingLayout`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn view_dimension(&self) -> GpuTextureViewDimension; +} +#[cfg(web_sys_unstable_apis)] +impl GpuStorageTextureBindingLayoutGetters for GpuStorageTextureBindingLayout { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuStorageTextureAccess")] + fn access(&self) -> GpuStorageTextureAccess { + self.access_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + fn format(&self) -> GpuTextureFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + fn view_dimension(&self) -> GpuTextureViewDimension { + self.view_dimension_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuStorageTextureBindingLayout { @@ -36,7 +96,7 @@ impl GpuStorageTextureBindingLayout { pub fn new(format: GpuTextureFormat) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.format(format); + Self::format(&mut ret, format); ret } #[cfg(web_sys_unstable_apis)] @@ -48,7 +108,7 @@ impl GpuStorageTextureBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn access(&mut self, val: GpuStorageTextureAccess) -> &mut Self { - self.access_shim(val); + self.set_access_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -60,7 +120,7 @@ impl GpuStorageTextureBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -72,7 +132,7 @@ impl GpuStorageTextureBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { - self.view_dimension_shim(val); + self.set_view_dimension_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs b/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs index ccd9bfc620c..f0afbe8e77c 100644 --- a/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs +++ b/crates/web-sys/src/features/gen_GpuTextureBindingLayout.rs @@ -14,14 +14,71 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuTextureBindingLayout; + #[wasm_bindgen(method, getter = "multisampled")] + fn multisampled_shim(this: &GpuTextureBindingLayout) -> bool; #[wasm_bindgen(method, setter = "multisampled")] - fn multisampled_shim(this: &GpuTextureBindingLayout, val: bool); + fn set_multisampled_shim(this: &GpuTextureBindingLayout, val: bool); + #[cfg(feature = "GpuTextureSampleType")] + #[wasm_bindgen(method, getter = "sampleType")] + fn sample_type_shim(this: &GpuTextureBindingLayout) -> GpuTextureSampleType; #[cfg(feature = "GpuTextureSampleType")] #[wasm_bindgen(method, setter = "sampleType")] - fn sample_type_shim(this: &GpuTextureBindingLayout, val: GpuTextureSampleType); + fn set_sample_type_shim(this: &GpuTextureBindingLayout, val: GpuTextureSampleType); + #[cfg(feature = "GpuTextureViewDimension")] + #[wasm_bindgen(method, getter = "viewDimension")] + fn view_dimension_shim(this: &GpuTextureBindingLayout) -> GpuTextureViewDimension; #[cfg(feature = "GpuTextureViewDimension")] #[wasm_bindgen(method, setter = "viewDimension")] - fn view_dimension_shim(this: &GpuTextureBindingLayout, val: GpuTextureViewDimension); + fn set_view_dimension_shim(this: &GpuTextureBindingLayout, val: GpuTextureViewDimension); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuTextureBindingLayout` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"] +pub trait GpuTextureBindingLayoutGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `multisampled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn multisampled(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureSampleType")] + #[doc = "Get the `sampleType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureSampleType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sample_type(&self) -> GpuTextureSampleType; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Get the `viewDimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureBindingLayout`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn view_dimension(&self) -> GpuTextureViewDimension; +} +#[cfg(web_sys_unstable_apis)] +impl GpuTextureBindingLayoutGetters for GpuTextureBindingLayout { + #[cfg(web_sys_unstable_apis)] + fn multisampled(&self) -> bool { + self.multisampled_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureSampleType")] + fn sample_type(&self) -> GpuTextureSampleType { + self.sample_type_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + fn view_dimension(&self) -> GpuTextureViewDimension { + self.view_dimension_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuTextureBindingLayout { @@ -44,7 +101,7 @@ impl GpuTextureBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn multisampled(&mut self, val: bool) -> &mut Self { - self.multisampled_shim(val); + self.set_multisampled_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -56,7 +113,7 @@ impl GpuTextureBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sample_type(&mut self, val: GpuTextureSampleType) -> &mut Self { - self.sample_type_shim(val); + self.set_sample_type_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +125,7 @@ impl GpuTextureBindingLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn view_dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { - self.view_dimension_shim(val); + self.set_view_dimension_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs b/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs index b79eccc02d3..046c9e8c9f3 100644 --- a/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuTextureDescriptor.rs @@ -14,24 +14,151 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuTextureDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuTextureDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuTextureDescriptor, val: &str); + fn set_label_shim(this: &GpuTextureDescriptor, val: &str); + #[cfg(feature = "GpuTextureDimension")] + #[wasm_bindgen(method, getter = "dimension")] + fn dimension_shim(this: &GpuTextureDescriptor) -> GpuTextureDimension; #[cfg(feature = "GpuTextureDimension")] #[wasm_bindgen(method, setter = "dimension")] - fn dimension_shim(this: &GpuTextureDescriptor, val: GpuTextureDimension); + fn set_dimension_shim(this: &GpuTextureDescriptor, val: GpuTextureDimension); + #[cfg(feature = "GpuTextureFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &GpuTextureDescriptor) -> GpuTextureFormat; #[cfg(feature = "GpuTextureFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuTextureDescriptor, val: GpuTextureFormat); + fn set_format_shim(this: &GpuTextureDescriptor, val: GpuTextureFormat); + #[wasm_bindgen(method, getter = "mipLevelCount")] + fn mip_level_count_shim(this: &GpuTextureDescriptor) -> u32; #[wasm_bindgen(method, setter = "mipLevelCount")] - fn mip_level_count_shim(this: &GpuTextureDescriptor, val: u32); + fn set_mip_level_count_shim(this: &GpuTextureDescriptor, val: u32); + #[wasm_bindgen(method, getter = "sampleCount")] + fn sample_count_shim(this: &GpuTextureDescriptor) -> u32; #[wasm_bindgen(method, setter = "sampleCount")] - fn sample_count_shim(this: &GpuTextureDescriptor, val: u32); + fn set_sample_count_shim(this: &GpuTextureDescriptor, val: u32); + #[wasm_bindgen(method, getter = "size")] + fn size_shim(this: &GpuTextureDescriptor) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); + fn set_size_shim(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "usage")] + fn usage_shim(this: &GpuTextureDescriptor) -> u32; #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &GpuTextureDescriptor, val: u32); + fn set_usage_shim(this: &GpuTextureDescriptor, val: u32); + #[wasm_bindgen(method, getter = "viewFormats")] + fn view_formats_shim(this: &GpuTextureDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "viewFormats")] - fn view_formats_shim(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); + fn set_view_formats_shim(this: &GpuTextureDescriptor, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuTextureDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] +pub trait GpuTextureDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureDimension")] + #[doc = "Get the `dimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn dimension(&self) -> GpuTextureDimension; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`, `GpuTextureFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mipLevelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mip_level_count(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sampleCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sample_count(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn size(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usage(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `viewFormats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn view_formats(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl GpuTextureDescriptorGetters for GpuTextureDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureDimension")] + fn dimension(&self) -> GpuTextureDimension { + self.dimension_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + fn format(&self) -> GpuTextureFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn mip_level_count(&self) -> u32 { + self.mip_level_count_shim() + } + #[cfg(web_sys_unstable_apis)] + fn sample_count(&self) -> u32 { + self.sample_count_shim() + } + #[cfg(web_sys_unstable_apis)] + fn size(&self) -> ::wasm_bindgen::JsValue { + self.size_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usage(&self) -> u32 { + self.usage_shim() + } + #[cfg(web_sys_unstable_apis)] + fn view_formats(&self) -> ::js_sys::Array { + self.view_formats_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuTextureDescriptor { @@ -45,9 +172,9 @@ impl GpuTextureDescriptor { pub fn new(format: GpuTextureFormat, size: &::wasm_bindgen::JsValue, usage: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.format(format); - ret.size(size); - ret.usage(usage); + Self::format(&mut ret, format); + Self::size(&mut ret, size); + Self::usage(&mut ret, usage); ret } #[cfg(web_sys_unstable_apis)] @@ -58,7 +185,7 @@ impl GpuTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +197,7 @@ impl GpuTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn dimension(&mut self, val: GpuTextureDimension) -> &mut Self { - self.dimension_shim(val); + self.set_dimension_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -82,7 +209,7 @@ impl GpuTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -93,7 +220,7 @@ impl GpuTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mip_level_count(&mut self, val: u32) -> &mut Self { - self.mip_level_count_shim(val); + self.set_mip_level_count_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -104,7 +231,7 @@ impl GpuTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sample_count(&mut self, val: u32) -> &mut Self { - self.sample_count_shim(val); + self.set_sample_count_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -115,7 +242,7 @@ impl GpuTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn size(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.size_shim(val); + self.set_size_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -126,7 +253,7 @@ impl GpuTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage(&mut self, val: u32) -> &mut Self { - self.usage_shim(val); + self.set_usage_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -137,7 +264,7 @@ impl GpuTextureDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn view_formats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.view_formats_shim(val); + self.set_view_formats_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs b/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs index e6b85aacd3f..372f678dd8c 100644 --- a/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs +++ b/crates/web-sys/src/features/gen_GpuTextureViewDescriptor.rs @@ -14,25 +14,155 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuTextureViewDescriptor; + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &GpuTextureViewDescriptor) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &GpuTextureViewDescriptor, val: &str); + fn set_label_shim(this: &GpuTextureViewDescriptor, val: &str); + #[wasm_bindgen(method, getter = "arrayLayerCount")] + fn array_layer_count_shim(this: &GpuTextureViewDescriptor) -> u32; #[wasm_bindgen(method, setter = "arrayLayerCount")] - fn array_layer_count_shim(this: &GpuTextureViewDescriptor, val: u32); + fn set_array_layer_count_shim(this: &GpuTextureViewDescriptor, val: u32); + #[cfg(feature = "GpuTextureAspect")] + #[wasm_bindgen(method, getter = "aspect")] + fn aspect_shim(this: &GpuTextureViewDescriptor) -> GpuTextureAspect; #[cfg(feature = "GpuTextureAspect")] #[wasm_bindgen(method, setter = "aspect")] - fn aspect_shim(this: &GpuTextureViewDescriptor, val: GpuTextureAspect); + fn set_aspect_shim(this: &GpuTextureViewDescriptor, val: GpuTextureAspect); + #[wasm_bindgen(method, getter = "baseArrayLayer")] + fn base_array_layer_shim(this: &GpuTextureViewDescriptor) -> u32; #[wasm_bindgen(method, setter = "baseArrayLayer")] - fn base_array_layer_shim(this: &GpuTextureViewDescriptor, val: u32); + fn set_base_array_layer_shim(this: &GpuTextureViewDescriptor, val: u32); + #[wasm_bindgen(method, getter = "baseMipLevel")] + fn base_mip_level_shim(this: &GpuTextureViewDescriptor) -> u32; #[wasm_bindgen(method, setter = "baseMipLevel")] - fn base_mip_level_shim(this: &GpuTextureViewDescriptor, val: u32); + fn set_base_mip_level_shim(this: &GpuTextureViewDescriptor, val: u32); + #[cfg(feature = "GpuTextureViewDimension")] + #[wasm_bindgen(method, getter = "dimension")] + fn dimension_shim(this: &GpuTextureViewDescriptor) -> GpuTextureViewDimension; #[cfg(feature = "GpuTextureViewDimension")] #[wasm_bindgen(method, setter = "dimension")] - fn dimension_shim(this: &GpuTextureViewDescriptor, val: GpuTextureViewDimension); + fn set_dimension_shim(this: &GpuTextureViewDescriptor, val: GpuTextureViewDimension); + #[cfg(feature = "GpuTextureFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &GpuTextureViewDescriptor) -> GpuTextureFormat; #[cfg(feature = "GpuTextureFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuTextureViewDescriptor, val: GpuTextureFormat); + fn set_format_shim(this: &GpuTextureViewDescriptor, val: GpuTextureFormat); + #[wasm_bindgen(method, getter = "mipLevelCount")] + fn mip_level_count_shim(this: &GpuTextureViewDescriptor) -> u32; #[wasm_bindgen(method, setter = "mipLevelCount")] - fn mip_level_count_shim(this: &GpuTextureViewDescriptor, val: u32); + fn set_mip_level_count_shim(this: &GpuTextureViewDescriptor, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuTextureViewDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] +pub trait GpuTextureViewDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn label(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `arrayLayerCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn array_layer_count(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + #[doc = "Get the `aspect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureAspect`, `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn aspect(&self) -> GpuTextureAspect; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `baseArrayLayer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn base_array_layer(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `baseMipLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn base_mip_level(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + #[doc = "Get the `dimension` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`, `GpuTextureViewDimension`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn dimension(&self) -> GpuTextureViewDimension; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureFormat`, `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> GpuTextureFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `mipLevelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuTextureViewDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mip_level_count(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuTextureViewDescriptorGetters for GpuTextureViewDescriptor { + #[cfg(web_sys_unstable_apis)] + fn label(&self) -> String { + self.label_shim() + } + #[cfg(web_sys_unstable_apis)] + fn array_layer_count(&self) -> u32 { + self.array_layer_count_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureAspect")] + fn aspect(&self) -> GpuTextureAspect { + self.aspect_shim() + } + #[cfg(web_sys_unstable_apis)] + fn base_array_layer(&self) -> u32 { + self.base_array_layer_shim() + } + #[cfg(web_sys_unstable_apis)] + fn base_mip_level(&self) -> u32 { + self.base_mip_level_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureViewDimension")] + fn dimension(&self) -> GpuTextureViewDimension { + self.dimension_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuTextureFormat")] + fn format(&self) -> GpuTextureFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn mip_level_count(&self) -> u32 { + self.mip_level_count_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuTextureViewDescriptor { @@ -55,7 +185,7 @@ impl GpuTextureViewDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +196,7 @@ impl GpuTextureViewDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn array_layer_count(&mut self, val: u32) -> &mut Self { - self.array_layer_count_shim(val); + self.set_array_layer_count_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -78,7 +208,7 @@ impl GpuTextureViewDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn aspect(&mut self, val: GpuTextureAspect) -> &mut Self { - self.aspect_shim(val); + self.set_aspect_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -89,7 +219,7 @@ impl GpuTextureViewDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn base_array_layer(&mut self, val: u32) -> &mut Self { - self.base_array_layer_shim(val); + self.set_base_array_layer_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -100,7 +230,7 @@ impl GpuTextureViewDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn base_mip_level(&mut self, val: u32) -> &mut Self { - self.base_mip_level_shim(val); + self.set_base_mip_level_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -112,7 +242,7 @@ impl GpuTextureViewDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn dimension(&mut self, val: GpuTextureViewDimension) -> &mut Self { - self.dimension_shim(val); + self.set_dimension_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -124,7 +254,7 @@ impl GpuTextureViewDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: GpuTextureFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -135,7 +265,7 @@ impl GpuTextureViewDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mip_level_count(&mut self, val: u32) -> &mut Self { - self.mip_level_count_shim(val); + self.set_mip_level_count_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs b/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs index 276f6d2ddd5..3cbce030523 100644 --- a/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_GpuUncapturedErrorEventInit.rs @@ -14,15 +14,83 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuUncapturedErrorEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &GpuUncapturedErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GpuUncapturedErrorEventInit, val: bool); + fn set_bubbles_shim(this: &GpuUncapturedErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &GpuUncapturedErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GpuUncapturedErrorEventInit, val: bool); + fn set_cancelable_shim(this: &GpuUncapturedErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &GpuUncapturedErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GpuUncapturedErrorEventInit, val: bool); + fn set_composed_shim(this: &GpuUncapturedErrorEventInit, val: bool); + #[cfg(feature = "GpuError")] + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &GpuUncapturedErrorEventInit) -> GpuError; #[cfg(feature = "GpuError")] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &GpuUncapturedErrorEventInit, val: &GpuError); + fn set_error_shim(this: &GpuUncapturedErrorEventInit, val: &GpuError); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuUncapturedErrorEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] +pub trait GpuUncapturedErrorEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuError")] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuError`, `GpuUncapturedErrorEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn error(&self) -> GpuError; +} +#[cfg(web_sys_unstable_apis)] +impl GpuUncapturedErrorEventInitGetters for GpuUncapturedErrorEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuError")] + fn error(&self) -> GpuError { + self.error_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuUncapturedErrorEventInit { @@ -36,7 +104,7 @@ impl GpuUncapturedErrorEventInit { pub fn new(error: &GpuError) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.error(error); + Self::error(&mut ret, error); ret } #[cfg(web_sys_unstable_apis)] @@ -47,7 +115,7 @@ impl GpuUncapturedErrorEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +126,7 @@ impl GpuUncapturedErrorEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +137,7 @@ impl GpuUncapturedErrorEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +149,7 @@ impl GpuUncapturedErrorEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn error(&mut self, val: &GpuError) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuVertexAttribute.rs b/crates/web-sys/src/features/gen_GpuVertexAttribute.rs index 630b6daa18f..2a3785f26c5 100644 --- a/crates/web-sys/src/features/gen_GpuVertexAttribute.rs +++ b/crates/web-sys/src/features/gen_GpuVertexAttribute.rs @@ -15,12 +15,66 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuVertexAttribute; #[cfg(feature = "GpuVertexFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &GpuVertexAttribute) -> GpuVertexFormat; + #[cfg(feature = "GpuVertexFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &GpuVertexAttribute, val: GpuVertexFormat); + fn set_format_shim(this: &GpuVertexAttribute, val: GpuVertexFormat); + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &GpuVertexAttribute) -> f64; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &GpuVertexAttribute, val: f64); + fn set_offset_shim(this: &GpuVertexAttribute, val: f64); + #[wasm_bindgen(method, getter = "shaderLocation")] + fn shader_location_shim(this: &GpuVertexAttribute) -> u32; #[wasm_bindgen(method, setter = "shaderLocation")] - fn shader_location_shim(this: &GpuVertexAttribute, val: u32); + fn set_shader_location_shim(this: &GpuVertexAttribute, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuVertexAttribute` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] +pub trait GpuVertexAttributeGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuVertexFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`, `GpuVertexFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> GpuVertexFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn offset(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `shaderLocation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexAttribute`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn shader_location(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl GpuVertexAttributeGetters for GpuVertexAttribute { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuVertexFormat")] + fn format(&self) -> GpuVertexFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn offset(&self) -> f64 { + self.offset_shim() + } + #[cfg(web_sys_unstable_apis)] + fn shader_location(&self) -> u32 { + self.shader_location_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuVertexAttribute { @@ -34,9 +88,9 @@ impl GpuVertexAttribute { pub fn new(format: GpuVertexFormat, offset: f64, shader_location: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.format(format); - ret.offset(offset); - ret.shader_location(shader_location); + Self::format(&mut ret, format); + Self::offset(&mut ret, offset); + Self::shader_location(&mut ret, shader_location); ret } #[cfg(web_sys_unstable_apis)] @@ -48,7 +102,7 @@ impl GpuVertexAttribute { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: GpuVertexFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -59,7 +113,7 @@ impl GpuVertexAttribute { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn offset(&mut self, val: f64) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +124,7 @@ impl GpuVertexAttribute { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn shader_location(&mut self, val: u32) -> &mut Self { - self.shader_location_shim(val); + self.set_shader_location_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs b/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs index 21594f7bab8..87633fd4688 100644 --- a/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs +++ b/crates/web-sys/src/features/gen_GpuVertexBufferLayout.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuVertexBufferLayout; + #[wasm_bindgen(method, getter = "arrayStride")] + fn array_stride_shim(this: &GpuVertexBufferLayout) -> f64; #[wasm_bindgen(method, setter = "arrayStride")] - fn array_stride_shim(this: &GpuVertexBufferLayout, val: f64); + fn set_array_stride_shim(this: &GpuVertexBufferLayout, val: f64); + #[wasm_bindgen(method, getter = "attributes")] + fn attributes_shim(this: &GpuVertexBufferLayout) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "attributes")] - fn attributes_shim(this: &GpuVertexBufferLayout, val: &::wasm_bindgen::JsValue); + fn set_attributes_shim(this: &GpuVertexBufferLayout, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "GpuVertexStepMode")] + #[wasm_bindgen(method, getter = "stepMode")] + fn step_mode_shim(this: &GpuVertexBufferLayout) -> GpuVertexStepMode; #[cfg(feature = "GpuVertexStepMode")] #[wasm_bindgen(method, setter = "stepMode")] - fn step_mode_shim(this: &GpuVertexBufferLayout, val: GpuVertexStepMode); + fn set_step_mode_shim(this: &GpuVertexBufferLayout, val: GpuVertexStepMode); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuVertexBufferLayout` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] +pub trait GpuVertexBufferLayoutGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `arrayStride` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn array_stride(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn attributes(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuVertexStepMode")] + #[doc = "Get the `stepMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexBufferLayout`, `GpuVertexStepMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn step_mode(&self) -> GpuVertexStepMode; +} +#[cfg(web_sys_unstable_apis)] +impl GpuVertexBufferLayoutGetters for GpuVertexBufferLayout { + #[cfg(web_sys_unstable_apis)] + fn array_stride(&self) -> f64 { + self.array_stride_shim() + } + #[cfg(web_sys_unstable_apis)] + fn attributes(&self) -> ::js_sys::Array { + self.attributes_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuVertexStepMode")] + fn step_mode(&self) -> GpuVertexStepMode { + self.step_mode_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuVertexBufferLayout { @@ -33,8 +87,8 @@ impl GpuVertexBufferLayout { pub fn new(array_stride: f64, attributes: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.array_stride(array_stride); - ret.attributes(attributes); + Self::array_stride(&mut ret, array_stride); + Self::attributes(&mut ret, attributes); ret } #[cfg(web_sys_unstable_apis)] @@ -45,7 +99,7 @@ impl GpuVertexBufferLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn array_stride(&mut self, val: f64) -> &mut Self { - self.array_stride_shim(val); + self.set_array_stride_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -56,7 +110,7 @@ impl GpuVertexBufferLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn attributes(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.attributes_shim(val); + self.set_attributes_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +122,7 @@ impl GpuVertexBufferLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn step_mode(&mut self, val: GpuVertexStepMode) -> &mut Self { - self.step_mode_shim(val); + self.set_step_mode_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GpuVertexState.rs b/crates/web-sys/src/features/gen_GpuVertexState.rs index 6b841d11fdf..ae7bcbb751d 100644 --- a/crates/web-sys/src/features/gen_GpuVertexState.rs +++ b/crates/web-sys/src/features/gen_GpuVertexState.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type GpuVertexState; + #[wasm_bindgen(method, getter = "entryPoint")] + fn entry_point_shim(this: &GpuVertexState) -> String; #[wasm_bindgen(method, setter = "entryPoint")] - fn entry_point_shim(this: &GpuVertexState, val: &str); + fn set_entry_point_shim(this: &GpuVertexState, val: &str); + #[cfg(feature = "GpuShaderModule")] + #[wasm_bindgen(method, getter = "module")] + fn module_shim(this: &GpuVertexState) -> GpuShaderModule; #[cfg(feature = "GpuShaderModule")] #[wasm_bindgen(method, setter = "module")] - fn module_shim(this: &GpuVertexState, val: &GpuShaderModule); + fn set_module_shim(this: &GpuVertexState, val: &GpuShaderModule); + #[wasm_bindgen(method, getter = "buffers")] + fn buffers_shim(this: &GpuVertexState) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "buffers")] - fn buffers_shim(this: &GpuVertexState, val: &::wasm_bindgen::JsValue); + fn set_buffers_shim(this: &GpuVertexState, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `GpuVertexState` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] +pub trait GpuVertexStateGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `entryPoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn entry_point(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuShaderModule")] + #[doc = "Get the `module` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuShaderModule`, `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn module(&self) -> GpuShaderModule; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `buffers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GpuVertexState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn buffers(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl GpuVertexStateGetters for GpuVertexState { + #[cfg(web_sys_unstable_apis)] + fn entry_point(&self) -> String { + self.entry_point_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "GpuShaderModule")] + fn module(&self) -> GpuShaderModule { + self.module_shim() + } + #[cfg(web_sys_unstable_apis)] + fn buffers(&self) -> ::js_sys::Array { + self.buffers_shim() + } } #[cfg(web_sys_unstable_apis)] impl GpuVertexState { @@ -34,7 +88,7 @@ impl GpuVertexState { pub fn new(module: &GpuShaderModule) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.module(module); + Self::module(&mut ret, module); ret } #[cfg(web_sys_unstable_apis)] @@ -45,7 +99,7 @@ impl GpuVertexState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn entry_point(&mut self, val: &str) -> &mut Self { - self.entry_point_shim(val); + self.set_entry_point_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +111,7 @@ impl GpuVertexState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn module(&mut self, val: &GpuShaderModule) -> &mut Self { - self.module_shim(val); + self.set_module_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +122,7 @@ impl GpuVertexState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn buffers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.buffers_shim(val); + self.set_buffers_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs b/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs index 73528f6bc37..d1367810736 100644 --- a/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs +++ b/crates/web-sys/src/features/gen_GroupedHistoryEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] pub type GroupedHistoryEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &GroupedHistoryEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &GroupedHistoryEventInit, val: bool); + fn set_bubbles_shim(this: &GroupedHistoryEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &GroupedHistoryEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &GroupedHistoryEventInit, val: bool); + fn set_cancelable_shim(this: &GroupedHistoryEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &GroupedHistoryEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &GroupedHistoryEventInit, val: bool); + fn set_composed_shim(this: &GroupedHistoryEventInit, val: bool); + #[cfg(feature = "Element")] + #[wasm_bindgen(method, getter = "otherBrowser")] + fn other_browser_shim(this: &GroupedHistoryEventInit) -> Option; #[cfg(feature = "Element")] #[wasm_bindgen(method, setter = "otherBrowser")] - fn other_browser_shim(this: &GroupedHistoryEventInit, val: Option<&Element>); + fn set_other_browser_shim(this: &GroupedHistoryEventInit, val: Option<&Element>); +} +#[doc = "The trait to access properties on the `GroupedHistoryEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] +pub trait GroupedHistoryEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "Element")] + #[doc = "Get the `otherBrowser` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `GroupedHistoryEventInit`*"] + fn other_browser(&self) -> Option; +} +impl GroupedHistoryEventInitGetters for GroupedHistoryEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "Element")] + fn other_browser(&self) -> Option { + self.other_browser_shim() + } } impl GroupedHistoryEventInit { #[doc = "Construct a new `GroupedHistoryEventInit`."] @@ -33,21 +79,21 @@ impl GroupedHistoryEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `GroupedHistoryEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "Element")] @@ -55,7 +101,7 @@ impl GroupedHistoryEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Element`, `GroupedHistoryEventInit`*"] pub fn other_browser(&mut self, val: Option<&Element>) -> &mut Self { - self.other_browser_shim(val); + self.set_other_browser_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs b/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs index 56caf74fac2..7af164e9570 100644 --- a/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs +++ b/crates/web-sys/src/features/gen_HalfOpenInfoDict.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] pub type HalfOpenInfoDict; + #[wasm_bindgen(method, getter = "speculative")] + fn speculative_shim(this: &HalfOpenInfoDict) -> bool; #[wasm_bindgen(method, setter = "speculative")] - fn speculative_shim(this: &HalfOpenInfoDict, val: bool); + fn set_speculative_shim(this: &HalfOpenInfoDict, val: bool); +} +#[doc = "The trait to access properties on the `HalfOpenInfoDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] +pub trait HalfOpenInfoDictGetters { + #[doc = "Get the `speculative` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] + fn speculative(&self) -> bool; +} +impl HalfOpenInfoDictGetters for HalfOpenInfoDict { + fn speculative(&self) -> bool { + self.speculative_shim() + } } impl HalfOpenInfoDict { #[doc = "Construct a new `HalfOpenInfoDict`."] @@ -26,7 +42,7 @@ impl HalfOpenInfoDict { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HalfOpenInfoDict`*"] pub fn speculative(&mut self, val: bool) -> &mut Self { - self.speculative_shim(val); + self.set_speculative_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HashChangeEventInit.rs b/crates/web-sys/src/features/gen_HashChangeEventInit.rs index 784fbfc5dee..a7a919f41ed 100644 --- a/crates/web-sys/src/features/gen_HashChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_HashChangeEventInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] pub type HashChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &HashChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &HashChangeEventInit, val: bool); + fn set_bubbles_shim(this: &HashChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &HashChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &HashChangeEventInit, val: bool); + fn set_cancelable_shim(this: &HashChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &HashChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &HashChangeEventInit, val: bool); + fn set_composed_shim(this: &HashChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "newURL")] + fn new_url_shim(this: &HashChangeEventInit) -> String; #[wasm_bindgen(method, setter = "newURL")] - fn new_url_shim(this: &HashChangeEventInit, val: &str); + fn set_new_url_shim(this: &HashChangeEventInit, val: &str); + #[wasm_bindgen(method, getter = "oldURL")] + fn old_url_shim(this: &HashChangeEventInit) -> String; #[wasm_bindgen(method, setter = "oldURL")] - fn old_url_shim(this: &HashChangeEventInit, val: &str); + fn set_old_url_shim(this: &HashChangeEventInit, val: &str); +} +#[doc = "The trait to access properties on the `HashChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] +pub trait HashChangeEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `newURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + fn new_url(&self) -> String; + #[doc = "Get the `oldURL` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] + fn old_url(&self) -> String; +} +impl HashChangeEventInitGetters for HashChangeEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn new_url(&self) -> String { + self.new_url_shim() + } + fn old_url(&self) -> String { + self.old_url_shim() + } } impl HashChangeEventInit { #[doc = "Construct a new `HashChangeEventInit`."] @@ -34,35 +86,35 @@ impl HashChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `newURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] pub fn new_url(&mut self, val: &str) -> &mut Self { - self.new_url_shim(val); + self.set_new_url_shim(val); self } #[doc = "Change the `oldURL` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HashChangeEventInit`*"] pub fn old_url(&mut self, val: &str) -> &mut Self { - self.old_url_shim(val); + self.set_old_url_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HidCollectionInfo.rs b/crates/web-sys/src/features/gen_HidCollectionInfo.rs index 6a99d71e18c..3d9a877f0e1 100644 --- a/crates/web-sys/src/features/gen_HidCollectionInfo.rs +++ b/crates/web-sys/src/features/gen_HidCollectionInfo.rs @@ -14,20 +14,127 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidCollectionInfo; + #[wasm_bindgen(method, getter = "children")] + fn children_shim(this: &HidCollectionInfo) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "children")] - fn children_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + fn set_children_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "featureReports")] + fn feature_reports_shim(this: &HidCollectionInfo) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "featureReports")] - fn feature_reports_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + fn set_feature_reports_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "inputReports")] + fn input_reports_shim(this: &HidCollectionInfo) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "inputReports")] - fn input_reports_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + fn set_input_reports_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "outputReports")] + fn output_reports_shim(this: &HidCollectionInfo) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "outputReports")] - fn output_reports_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + fn set_output_reports_shim(this: &HidCollectionInfo, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &HidCollectionInfo) -> u8; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &HidCollectionInfo, val: u8); + fn set_type__shim(this: &HidCollectionInfo, val: u8); + #[wasm_bindgen(method, getter = "usage")] + fn usage_shim(this: &HidCollectionInfo) -> u16; #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &HidCollectionInfo, val: u16); + fn set_usage_shim(this: &HidCollectionInfo, val: u16); + #[wasm_bindgen(method, getter = "usagePage")] + fn usage_page_shim(this: &HidCollectionInfo) -> u16; #[wasm_bindgen(method, setter = "usagePage")] - fn usage_page_shim(this: &HidCollectionInfo, val: u16); + fn set_usage_page_shim(this: &HidCollectionInfo, val: u16); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `HidCollectionInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] +pub trait HidCollectionInfoGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `children` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn children(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `featureReports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn feature_reports(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `inputReports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn input_reports(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `outputReports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn output_reports(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn type_(&self) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usage(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usagePage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidCollectionInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usage_page(&self) -> u16; +} +#[cfg(web_sys_unstable_apis)] +impl HidCollectionInfoGetters for HidCollectionInfo { + #[cfg(web_sys_unstable_apis)] + fn children(&self) -> ::js_sys::Array { + self.children_shim() + } + #[cfg(web_sys_unstable_apis)] + fn feature_reports(&self) -> ::js_sys::Array { + self.feature_reports_shim() + } + #[cfg(web_sys_unstable_apis)] + fn input_reports(&self) -> ::js_sys::Array { + self.input_reports_shim() + } + #[cfg(web_sys_unstable_apis)] + fn output_reports(&self) -> ::js_sys::Array { + self.output_reports_shim() + } + #[cfg(web_sys_unstable_apis)] + fn type_(&self) -> u8 { + self.type__shim() + } + #[cfg(web_sys_unstable_apis)] + fn usage(&self) -> u16 { + self.usage_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usage_page(&self) -> u16 { + self.usage_page_shim() + } } #[cfg(web_sys_unstable_apis)] impl HidCollectionInfo { @@ -50,7 +157,7 @@ impl HidCollectionInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn children(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.children_shim(val); + self.set_children_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -61,7 +168,7 @@ impl HidCollectionInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn feature_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.feature_reports_shim(val); + self.set_feature_reports_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -72,7 +179,7 @@ impl HidCollectionInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn input_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.input_reports_shim(val); + self.set_input_reports_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -83,7 +190,7 @@ impl HidCollectionInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn output_reports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.output_reports_shim(val); + self.set_output_reports_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -94,7 +201,7 @@ impl HidCollectionInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn type_(&mut self, val: u8) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -105,7 +212,7 @@ impl HidCollectionInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage(&mut self, val: u16) -> &mut Self { - self.usage_shim(val); + self.set_usage_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -116,7 +223,7 @@ impl HidCollectionInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage_page(&mut self, val: u16) -> &mut Self { - self.usage_page_shim(val); + self.set_usage_page_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HidConnectionEventInit.rs b/crates/web-sys/src/features/gen_HidConnectionEventInit.rs index 29201bb43b2..c0ecdcafe03 100644 --- a/crates/web-sys/src/features/gen_HidConnectionEventInit.rs +++ b/crates/web-sys/src/features/gen_HidConnectionEventInit.rs @@ -14,15 +14,83 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidConnectionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &HidConnectionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &HidConnectionEventInit, val: bool); + fn set_bubbles_shim(this: &HidConnectionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &HidConnectionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &HidConnectionEventInit, val: bool); + fn set_cancelable_shim(this: &HidConnectionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &HidConnectionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &HidConnectionEventInit, val: bool); + fn set_composed_shim(this: &HidConnectionEventInit, val: bool); + #[cfg(feature = "HidDevice")] + #[wasm_bindgen(method, getter = "device")] + fn device_shim(this: &HidConnectionEventInit) -> HidDevice; #[cfg(feature = "HidDevice")] #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &HidConnectionEventInit, val: &HidDevice); + fn set_device_shim(this: &HidConnectionEventInit, val: &HidDevice); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `HidConnectionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] +pub trait HidConnectionEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidConnectionEventInit`, `HidDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn device(&self) -> HidDevice; +} +#[cfg(web_sys_unstable_apis)] +impl HidConnectionEventInitGetters for HidConnectionEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidDevice")] + fn device(&self) -> HidDevice { + self.device_shim() + } } #[cfg(web_sys_unstable_apis)] impl HidConnectionEventInit { @@ -36,7 +104,7 @@ impl HidConnectionEventInit { pub fn new(device: &HidDevice) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.device(device); + Self::device(&mut ret, device); ret } #[cfg(web_sys_unstable_apis)] @@ -47,7 +115,7 @@ impl HidConnectionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +126,7 @@ impl HidConnectionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +137,7 @@ impl HidConnectionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +149,7 @@ impl HidConnectionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn device(&mut self, val: &HidDevice) -> &mut Self { - self.device_shim(val); + self.set_device_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HidDeviceFilter.rs b/crates/web-sys/src/features/gen_HidDeviceFilter.rs index 88c21dbc771..007fade801d 100644 --- a/crates/web-sys/src/features/gen_HidDeviceFilter.rs +++ b/crates/web-sys/src/features/gen_HidDeviceFilter.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidDeviceFilter; + #[wasm_bindgen(method, getter = "productId")] + fn product_id_shim(this: &HidDeviceFilter) -> u16; #[wasm_bindgen(method, setter = "productId")] - fn product_id_shim(this: &HidDeviceFilter, val: u16); + fn set_product_id_shim(this: &HidDeviceFilter, val: u16); + #[wasm_bindgen(method, getter = "usage")] + fn usage_shim(this: &HidDeviceFilter) -> u16; #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &HidDeviceFilter, val: u16); + fn set_usage_shim(this: &HidDeviceFilter, val: u16); + #[wasm_bindgen(method, getter = "usagePage")] + fn usage_page_shim(this: &HidDeviceFilter) -> u16; #[wasm_bindgen(method, setter = "usagePage")] - fn usage_page_shim(this: &HidDeviceFilter, val: u16); + fn set_usage_page_shim(this: &HidDeviceFilter, val: u16); + #[wasm_bindgen(method, getter = "vendorId")] + fn vendor_id_shim(this: &HidDeviceFilter) -> u32; #[wasm_bindgen(method, setter = "vendorId")] - fn vendor_id_shim(this: &HidDeviceFilter, val: u32); + fn set_vendor_id_shim(this: &HidDeviceFilter, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `HidDeviceFilter` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] +pub trait HidDeviceFilterGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `productId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn product_id(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usage(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usagePage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usage_page(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn vendor_id(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl HidDeviceFilterGetters for HidDeviceFilter { + #[cfg(web_sys_unstable_apis)] + fn product_id(&self) -> u16 { + self.product_id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usage(&self) -> u16 { + self.usage_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usage_page(&self) -> u16 { + self.usage_page_shim() + } + #[cfg(web_sys_unstable_apis)] + fn vendor_id(&self) -> u32 { + self.vendor_id_shim() + } } #[cfg(web_sys_unstable_apis)] impl HidDeviceFilter { @@ -44,7 +109,7 @@ impl HidDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn product_id(&mut self, val: u16) -> &mut Self { - self.product_id_shim(val); + self.set_product_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +120,7 @@ impl HidDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage(&mut self, val: u16) -> &mut Self { - self.usage_shim(val); + self.set_usage_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +131,7 @@ impl HidDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage_page(&mut self, val: u16) -> &mut Self { - self.usage_page_shim(val); + self.set_usage_page_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +142,7 @@ impl HidDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn vendor_id(&mut self, val: u32) -> &mut Self { - self.vendor_id_shim(val); + self.set_vendor_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs b/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs index ad2ec1f3758..e9ace7f9413 100644 --- a/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs +++ b/crates/web-sys/src/features/gen_HidDeviceRequestOptions.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidDeviceRequestOptions; + #[wasm_bindgen(method, getter = "filters")] + fn filters_shim(this: &HidDeviceRequestOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &HidDeviceRequestOptions, val: &::wasm_bindgen::JsValue); + fn set_filters_shim(this: &HidDeviceRequestOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `HidDeviceRequestOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HidDeviceRequestOptions`*"] +pub trait HidDeviceRequestOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDeviceRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn filters(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl HidDeviceRequestOptionsGetters for HidDeviceRequestOptions { + #[cfg(web_sys_unstable_apis)] + fn filters(&self) -> ::js_sys::Array { + self.filters_shim() + } } #[cfg(web_sys_unstable_apis)] impl HidDeviceRequestOptions { @@ -28,7 +51,7 @@ impl HidDeviceRequestOptions { pub fn new(filters: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.filters(filters); + Self::filters(&mut ret, filters); ret } #[cfg(web_sys_unstable_apis)] @@ -39,7 +62,7 @@ impl HidDeviceRequestOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HidInputReportEventInit.rs b/crates/web-sys/src/features/gen_HidInputReportEventInit.rs index 6defeeec352..98ae81ad475 100644 --- a/crates/web-sys/src/features/gen_HidInputReportEventInit.rs +++ b/crates/web-sys/src/features/gen_HidInputReportEventInit.rs @@ -14,19 +14,115 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidInputReportEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &HidInputReportEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &HidInputReportEventInit, val: bool); + fn set_bubbles_shim(this: &HidInputReportEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &HidInputReportEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &HidInputReportEventInit, val: bool); + fn set_cancelable_shim(this: &HidInputReportEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &HidInputReportEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &HidInputReportEventInit, val: bool); + fn set_composed_shim(this: &HidInputReportEventInit, val: bool); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &HidInputReportEventInit) -> ::js_sys::DataView; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &HidInputReportEventInit, val: &::js_sys::DataView); + fn set_data_shim(this: &HidInputReportEventInit, val: &::js_sys::DataView); + #[cfg(feature = "HidDevice")] + #[wasm_bindgen(method, getter = "device")] + fn device_shim(this: &HidInputReportEventInit) -> HidDevice; #[cfg(feature = "HidDevice")] #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &HidInputReportEventInit, val: &HidDevice); + fn set_device_shim(this: &HidInputReportEventInit, val: &HidDevice); + #[wasm_bindgen(method, getter = "reportId")] + fn report_id_shim(this: &HidInputReportEventInit) -> u8; #[wasm_bindgen(method, setter = "reportId")] - fn report_id_shim(this: &HidInputReportEventInit, val: u8); + fn set_report_id_shim(this: &HidInputReportEventInit, val: u8); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `HidInputReportEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] +pub trait HidInputReportEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data(&self) -> ::js_sys::DataView; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidDevice`, `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn device(&self) -> HidDevice; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidInputReportEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn report_id(&self) -> u8; +} +#[cfg(web_sys_unstable_apis)] +impl HidInputReportEventInitGetters for HidInputReportEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + fn data(&self) -> ::js_sys::DataView { + self.data_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidDevice")] + fn device(&self) -> HidDevice { + self.device_shim() + } + #[cfg(web_sys_unstable_apis)] + fn report_id(&self) -> u8 { + self.report_id_shim() + } } #[cfg(web_sys_unstable_apis)] impl HidInputReportEventInit { @@ -40,9 +136,9 @@ impl HidInputReportEventInit { pub fn new(data: &::js_sys::DataView, device: &HidDevice, report_id: u8) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.data(data); - ret.device(device); - ret.report_id(report_id); + Self::data(&mut ret, data); + Self::device(&mut ret, device); + Self::report_id(&mut ret, report_id); ret } #[cfg(web_sys_unstable_apis)] @@ -53,7 +149,7 @@ impl HidInputReportEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +160,7 @@ impl HidInputReportEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -75,7 +171,7 @@ impl HidInputReportEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -86,7 +182,7 @@ impl HidInputReportEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data(&mut self, val: &::js_sys::DataView) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -98,7 +194,7 @@ impl HidInputReportEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn device(&mut self, val: &HidDevice) -> &mut Self { - self.device_shim(val); + self.set_device_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -109,7 +205,7 @@ impl HidInputReportEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn report_id(&mut self, val: u8) -> &mut Self { - self.report_id_shim(val); + self.set_report_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HidReportInfo.rs b/crates/web-sys/src/features/gen_HidReportInfo.rs index 9ed35faa805..e155beec5be 100644 --- a/crates/web-sys/src/features/gen_HidReportInfo.rs +++ b/crates/web-sys/src/features/gen_HidReportInfo.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidReportInfo; + #[wasm_bindgen(method, getter = "items")] + fn items_shim(this: &HidReportInfo) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "items")] - fn items_shim(this: &HidReportInfo, val: &::wasm_bindgen::JsValue); + fn set_items_shim(this: &HidReportInfo, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "reportId")] + fn report_id_shim(this: &HidReportInfo) -> u8; #[wasm_bindgen(method, setter = "reportId")] - fn report_id_shim(this: &HidReportInfo, val: u8); + fn set_report_id_shim(this: &HidReportInfo, val: u8); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `HidReportInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] +pub trait HidReportInfoGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `items` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn items(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn report_id(&self) -> u8; +} +#[cfg(web_sys_unstable_apis)] +impl HidReportInfoGetters for HidReportInfo { + #[cfg(web_sys_unstable_apis)] + fn items(&self) -> ::js_sys::Array { + self.items_shim() + } + #[cfg(web_sys_unstable_apis)] + fn report_id(&self) -> u8 { + self.report_id_shim() + } } #[cfg(web_sys_unstable_apis)] impl HidReportInfo { @@ -40,7 +77,7 @@ impl HidReportInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn items(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.items_shim(val); + self.set_items_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl HidReportInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn report_id(&mut self, val: u8) -> &mut Self { - self.report_id_shim(val); + self.set_report_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HidReportItem.rs b/crates/web-sys/src/features/gen_HidReportItem.rs index c4d98dd12fb..663eab66836 100644 --- a/crates/web-sys/src/features/gen_HidReportItem.rs +++ b/crates/web-sys/src/features/gen_HidReportItem.rs @@ -14,63 +14,467 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type HidReportItem; + #[wasm_bindgen(method, getter = "hasNull")] + fn has_null_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "hasNull")] - fn has_null_shim(this: &HidReportItem, val: bool); + fn set_has_null_shim(this: &HidReportItem, val: bool); + #[wasm_bindgen(method, getter = "hasPreferredState")] + fn has_preferred_state_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "hasPreferredState")] - fn has_preferred_state_shim(this: &HidReportItem, val: bool); + fn set_has_preferred_state_shim(this: &HidReportItem, val: bool); + #[wasm_bindgen(method, getter = "isAbsolute")] + fn is_absolute_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "isAbsolute")] - fn is_absolute_shim(this: &HidReportItem, val: bool); + fn set_is_absolute_shim(this: &HidReportItem, val: bool); + #[wasm_bindgen(method, getter = "isArray")] + fn is_array_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "isArray")] - fn is_array_shim(this: &HidReportItem, val: bool); + fn set_is_array_shim(this: &HidReportItem, val: bool); + #[wasm_bindgen(method, getter = "isBufferedBytes")] + fn is_buffered_bytes_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "isBufferedBytes")] - fn is_buffered_bytes_shim(this: &HidReportItem, val: bool); + fn set_is_buffered_bytes_shim(this: &HidReportItem, val: bool); + #[wasm_bindgen(method, getter = "isConstant")] + fn is_constant_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "isConstant")] - fn is_constant_shim(this: &HidReportItem, val: bool); + fn set_is_constant_shim(this: &HidReportItem, val: bool); + #[wasm_bindgen(method, getter = "isLinear")] + fn is_linear_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "isLinear")] - fn is_linear_shim(this: &HidReportItem, val: bool); + fn set_is_linear_shim(this: &HidReportItem, val: bool); + #[wasm_bindgen(method, getter = "isRange")] + fn is_range_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "isRange")] - fn is_range_shim(this: &HidReportItem, val: bool); + fn set_is_range_shim(this: &HidReportItem, val: bool); + #[wasm_bindgen(method, getter = "isVolatile")] + fn is_volatile_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "isVolatile")] - fn is_volatile_shim(this: &HidReportItem, val: bool); + fn set_is_volatile_shim(this: &HidReportItem, val: bool); + #[wasm_bindgen(method, getter = "logicalMaximum")] + fn logical_maximum_shim(this: &HidReportItem) -> i32; #[wasm_bindgen(method, setter = "logicalMaximum")] - fn logical_maximum_shim(this: &HidReportItem, val: i32); + fn set_logical_maximum_shim(this: &HidReportItem, val: i32); + #[wasm_bindgen(method, getter = "logicalMinimum")] + fn logical_minimum_shim(this: &HidReportItem) -> i32; #[wasm_bindgen(method, setter = "logicalMinimum")] - fn logical_minimum_shim(this: &HidReportItem, val: i32); + fn set_logical_minimum_shim(this: &HidReportItem, val: i32); + #[wasm_bindgen(method, getter = "physicalMaximum")] + fn physical_maximum_shim(this: &HidReportItem) -> i32; #[wasm_bindgen(method, setter = "physicalMaximum")] - fn physical_maximum_shim(this: &HidReportItem, val: i32); + fn set_physical_maximum_shim(this: &HidReportItem, val: i32); + #[wasm_bindgen(method, getter = "physicalMinimum")] + fn physical_minimum_shim(this: &HidReportItem) -> i32; #[wasm_bindgen(method, setter = "physicalMinimum")] - fn physical_minimum_shim(this: &HidReportItem, val: i32); + fn set_physical_minimum_shim(this: &HidReportItem, val: i32); + #[wasm_bindgen(method, getter = "reportCount")] + fn report_count_shim(this: &HidReportItem) -> u16; #[wasm_bindgen(method, setter = "reportCount")] - fn report_count_shim(this: &HidReportItem, val: u16); + fn set_report_count_shim(this: &HidReportItem, val: u16); + #[wasm_bindgen(method, getter = "reportSize")] + fn report_size_shim(this: &HidReportItem) -> u16; #[wasm_bindgen(method, setter = "reportSize")] - fn report_size_shim(this: &HidReportItem, val: u16); + fn set_report_size_shim(this: &HidReportItem, val: u16); + #[wasm_bindgen(method, getter = "strings")] + fn strings_shim(this: &HidReportItem) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "strings")] - fn strings_shim(this: &HidReportItem, val: &::wasm_bindgen::JsValue); + fn set_strings_shim(this: &HidReportItem, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "unitExponent")] + fn unit_exponent_shim(this: &HidReportItem) -> i8; #[wasm_bindgen(method, setter = "unitExponent")] - fn unit_exponent_shim(this: &HidReportItem, val: i8); + fn set_unit_exponent_shim(this: &HidReportItem, val: i8); + #[wasm_bindgen(method, getter = "unitFactorCurrentExponent")] + fn unit_factor_current_exponent_shim(this: &HidReportItem) -> i8; #[wasm_bindgen(method, setter = "unitFactorCurrentExponent")] - fn unit_factor_current_exponent_shim(this: &HidReportItem, val: i8); + fn set_unit_factor_current_exponent_shim(this: &HidReportItem, val: i8); + #[wasm_bindgen(method, getter = "unitFactorLengthExponent")] + fn unit_factor_length_exponent_shim(this: &HidReportItem) -> i8; #[wasm_bindgen(method, setter = "unitFactorLengthExponent")] - fn unit_factor_length_exponent_shim(this: &HidReportItem, val: i8); + fn set_unit_factor_length_exponent_shim(this: &HidReportItem, val: i8); + #[wasm_bindgen(method, getter = "unitFactorLuminousIntensityExponent")] + fn unit_factor_luminous_intensity_exponent_shim(this: &HidReportItem) -> i8; #[wasm_bindgen(method, setter = "unitFactorLuminousIntensityExponent")] - fn unit_factor_luminous_intensity_exponent_shim(this: &HidReportItem, val: i8); + fn set_unit_factor_luminous_intensity_exponent_shim(this: &HidReportItem, val: i8); + #[wasm_bindgen(method, getter = "unitFactorMassExponent")] + fn unit_factor_mass_exponent_shim(this: &HidReportItem) -> i8; #[wasm_bindgen(method, setter = "unitFactorMassExponent")] - fn unit_factor_mass_exponent_shim(this: &HidReportItem, val: i8); + fn set_unit_factor_mass_exponent_shim(this: &HidReportItem, val: i8); + #[wasm_bindgen(method, getter = "unitFactorTemperatureExponent")] + fn unit_factor_temperature_exponent_shim(this: &HidReportItem) -> i8; #[wasm_bindgen(method, setter = "unitFactorTemperatureExponent")] - fn unit_factor_temperature_exponent_shim(this: &HidReportItem, val: i8); + fn set_unit_factor_temperature_exponent_shim(this: &HidReportItem, val: i8); + #[wasm_bindgen(method, getter = "unitFactorTimeExponent")] + fn unit_factor_time_exponent_shim(this: &HidReportItem) -> i8; #[wasm_bindgen(method, setter = "unitFactorTimeExponent")] - fn unit_factor_time_exponent_shim(this: &HidReportItem, val: i8); + fn set_unit_factor_time_exponent_shim(this: &HidReportItem, val: i8); + #[cfg(feature = "HidUnitSystem")] + #[wasm_bindgen(method, getter = "unitSystem")] + fn unit_system_shim(this: &HidReportItem) -> HidUnitSystem; #[cfg(feature = "HidUnitSystem")] #[wasm_bindgen(method, setter = "unitSystem")] - fn unit_system_shim(this: &HidReportItem, val: HidUnitSystem); + fn set_unit_system_shim(this: &HidReportItem, val: HidUnitSystem); + #[wasm_bindgen(method, getter = "usageMaximum")] + fn usage_maximum_shim(this: &HidReportItem) -> u32; #[wasm_bindgen(method, setter = "usageMaximum")] - fn usage_maximum_shim(this: &HidReportItem, val: u32); + fn set_usage_maximum_shim(this: &HidReportItem, val: u32); + #[wasm_bindgen(method, getter = "usageMinimum")] + fn usage_minimum_shim(this: &HidReportItem) -> u32; #[wasm_bindgen(method, setter = "usageMinimum")] - fn usage_minimum_shim(this: &HidReportItem, val: u32); + fn set_usage_minimum_shim(this: &HidReportItem, val: u32); + #[wasm_bindgen(method, getter = "usages")] + fn usages_shim(this: &HidReportItem) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "usages")] - fn usages_shim(this: &HidReportItem, val: &::wasm_bindgen::JsValue); + fn set_usages_shim(this: &HidReportItem, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "wrap")] + fn wrap_shim(this: &HidReportItem) -> bool; #[wasm_bindgen(method, setter = "wrap")] - fn wrap_shim(this: &HidReportItem, val: bool); + fn set_wrap_shim(this: &HidReportItem, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `HidReportItem` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] +pub trait HidReportItemGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `hasNull` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn has_null(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `hasPreferredState` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn has_preferred_state(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isAbsolute` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn is_absolute(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isArray` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn is_array(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isBufferedBytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn is_buffered_bytes(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isConstant` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn is_constant(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isLinear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn is_linear(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn is_range(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `isVolatile` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn is_volatile(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `logicalMaximum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn logical_maximum(&self) -> i32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `logicalMinimum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn logical_minimum(&self) -> i32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `physicalMaximum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn physical_maximum(&self) -> i32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `physicalMinimum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn physical_minimum(&self) -> i32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reportCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn report_count(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reportSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn report_size(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `strings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn strings(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn unit_exponent(&self) -> i8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorCurrentExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn unit_factor_current_exponent(&self) -> i8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorLengthExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn unit_factor_length_exponent(&self) -> i8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorLuminousIntensityExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn unit_factor_luminous_intensity_exponent(&self) -> i8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorMassExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn unit_factor_mass_exponent(&self) -> i8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorTemperatureExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn unit_factor_temperature_exponent(&self) -> i8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `unitFactorTimeExponent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn unit_factor_time_exponent(&self) -> i8; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidUnitSystem")] + #[doc = "Get the `unitSystem` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`, `HidUnitSystem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn unit_system(&self) -> HidUnitSystem; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usageMaximum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usage_maximum(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usageMinimum` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usage_minimum(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usages` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usages(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `wrap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HidReportItem`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn wrap(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl HidReportItemGetters for HidReportItem { + #[cfg(web_sys_unstable_apis)] + fn has_null(&self) -> bool { + self.has_null_shim() + } + #[cfg(web_sys_unstable_apis)] + fn has_preferred_state(&self) -> bool { + self.has_preferred_state_shim() + } + #[cfg(web_sys_unstable_apis)] + fn is_absolute(&self) -> bool { + self.is_absolute_shim() + } + #[cfg(web_sys_unstable_apis)] + fn is_array(&self) -> bool { + self.is_array_shim() + } + #[cfg(web_sys_unstable_apis)] + fn is_buffered_bytes(&self) -> bool { + self.is_buffered_bytes_shim() + } + #[cfg(web_sys_unstable_apis)] + fn is_constant(&self) -> bool { + self.is_constant_shim() + } + #[cfg(web_sys_unstable_apis)] + fn is_linear(&self) -> bool { + self.is_linear_shim() + } + #[cfg(web_sys_unstable_apis)] + fn is_range(&self) -> bool { + self.is_range_shim() + } + #[cfg(web_sys_unstable_apis)] + fn is_volatile(&self) -> bool { + self.is_volatile_shim() + } + #[cfg(web_sys_unstable_apis)] + fn logical_maximum(&self) -> i32 { + self.logical_maximum_shim() + } + #[cfg(web_sys_unstable_apis)] + fn logical_minimum(&self) -> i32 { + self.logical_minimum_shim() + } + #[cfg(web_sys_unstable_apis)] + fn physical_maximum(&self) -> i32 { + self.physical_maximum_shim() + } + #[cfg(web_sys_unstable_apis)] + fn physical_minimum(&self) -> i32 { + self.physical_minimum_shim() + } + #[cfg(web_sys_unstable_apis)] + fn report_count(&self) -> u16 { + self.report_count_shim() + } + #[cfg(web_sys_unstable_apis)] + fn report_size(&self) -> u16 { + self.report_size_shim() + } + #[cfg(web_sys_unstable_apis)] + fn strings(&self) -> ::js_sys::Array { + self.strings_shim() + } + #[cfg(web_sys_unstable_apis)] + fn unit_exponent(&self) -> i8 { + self.unit_exponent_shim() + } + #[cfg(web_sys_unstable_apis)] + fn unit_factor_current_exponent(&self) -> i8 { + self.unit_factor_current_exponent_shim() + } + #[cfg(web_sys_unstable_apis)] + fn unit_factor_length_exponent(&self) -> i8 { + self.unit_factor_length_exponent_shim() + } + #[cfg(web_sys_unstable_apis)] + fn unit_factor_luminous_intensity_exponent(&self) -> i8 { + self.unit_factor_luminous_intensity_exponent_shim() + } + #[cfg(web_sys_unstable_apis)] + fn unit_factor_mass_exponent(&self) -> i8 { + self.unit_factor_mass_exponent_shim() + } + #[cfg(web_sys_unstable_apis)] + fn unit_factor_temperature_exponent(&self) -> i8 { + self.unit_factor_temperature_exponent_shim() + } + #[cfg(web_sys_unstable_apis)] + fn unit_factor_time_exponent(&self) -> i8 { + self.unit_factor_time_exponent_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HidUnitSystem")] + fn unit_system(&self) -> HidUnitSystem { + self.unit_system_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usage_maximum(&self) -> u32 { + self.usage_maximum_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usage_minimum(&self) -> u32 { + self.usage_minimum_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usages(&self) -> ::js_sys::Array { + self.usages_shim() + } + #[cfg(web_sys_unstable_apis)] + fn wrap(&self) -> bool { + self.wrap_shim() + } } #[cfg(web_sys_unstable_apis)] impl HidReportItem { @@ -93,7 +497,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn has_null(&mut self, val: bool) -> &mut Self { - self.has_null_shim(val); + self.set_has_null_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -104,7 +508,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn has_preferred_state(&mut self, val: bool) -> &mut Self { - self.has_preferred_state_shim(val); + self.set_has_preferred_state_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -115,7 +519,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn is_absolute(&mut self, val: bool) -> &mut Self { - self.is_absolute_shim(val); + self.set_is_absolute_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -126,7 +530,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn is_array(&mut self, val: bool) -> &mut Self { - self.is_array_shim(val); + self.set_is_array_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -137,7 +541,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn is_buffered_bytes(&mut self, val: bool) -> &mut Self { - self.is_buffered_bytes_shim(val); + self.set_is_buffered_bytes_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -148,7 +552,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn is_constant(&mut self, val: bool) -> &mut Self { - self.is_constant_shim(val); + self.set_is_constant_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -159,7 +563,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn is_linear(&mut self, val: bool) -> &mut Self { - self.is_linear_shim(val); + self.set_is_linear_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -170,7 +574,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn is_range(&mut self, val: bool) -> &mut Self { - self.is_range_shim(val); + self.set_is_range_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -181,7 +585,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn is_volatile(&mut self, val: bool) -> &mut Self { - self.is_volatile_shim(val); + self.set_is_volatile_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -192,7 +596,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn logical_maximum(&mut self, val: i32) -> &mut Self { - self.logical_maximum_shim(val); + self.set_logical_maximum_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -203,7 +607,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn logical_minimum(&mut self, val: i32) -> &mut Self { - self.logical_minimum_shim(val); + self.set_logical_minimum_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -214,7 +618,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn physical_maximum(&mut self, val: i32) -> &mut Self { - self.physical_maximum_shim(val); + self.set_physical_maximum_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -225,7 +629,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn physical_minimum(&mut self, val: i32) -> &mut Self { - self.physical_minimum_shim(val); + self.set_physical_minimum_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -236,7 +640,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn report_count(&mut self, val: u16) -> &mut Self { - self.report_count_shim(val); + self.set_report_count_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -247,7 +651,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn report_size(&mut self, val: u16) -> &mut Self { - self.report_size_shim(val); + self.set_report_size_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -258,7 +662,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn strings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.strings_shim(val); + self.set_strings_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -269,7 +673,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn unit_exponent(&mut self, val: i8) -> &mut Self { - self.unit_exponent_shim(val); + self.set_unit_exponent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -280,7 +684,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn unit_factor_current_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_current_exponent_shim(val); + self.set_unit_factor_current_exponent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -291,7 +695,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn unit_factor_length_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_length_exponent_shim(val); + self.set_unit_factor_length_exponent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -302,7 +706,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn unit_factor_luminous_intensity_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_luminous_intensity_exponent_shim(val); + self.set_unit_factor_luminous_intensity_exponent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -313,7 +717,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn unit_factor_mass_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_mass_exponent_shim(val); + self.set_unit_factor_mass_exponent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -324,7 +728,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn unit_factor_temperature_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_temperature_exponent_shim(val); + self.set_unit_factor_temperature_exponent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -335,7 +739,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn unit_factor_time_exponent(&mut self, val: i8) -> &mut Self { - self.unit_factor_time_exponent_shim(val); + self.set_unit_factor_time_exponent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -347,7 +751,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn unit_system(&mut self, val: HidUnitSystem) -> &mut Self { - self.unit_system_shim(val); + self.set_unit_system_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -358,7 +762,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage_maximum(&mut self, val: u32) -> &mut Self { - self.usage_maximum_shim(val); + self.set_usage_maximum_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -369,7 +773,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usage_minimum(&mut self, val: u32) -> &mut Self { - self.usage_minimum_shim(val); + self.set_usage_minimum_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -380,7 +784,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usages(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.usages_shim(val); + self.set_usages_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -391,7 +795,7 @@ impl HidReportItem { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn wrap(&mut self, val: bool) -> &mut Self { - self.wrap_shim(val); + self.set_wrap_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs b/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs index 1052c037a47..be9d56d6576 100644 --- a/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs +++ b/crates/web-sys/src/features/gen_HiddenPluginEventInit.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] pub type HiddenPluginEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &HiddenPluginEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &HiddenPluginEventInit, val: bool); + fn set_bubbles_shim(this: &HiddenPluginEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &HiddenPluginEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &HiddenPluginEventInit, val: bool); + fn set_cancelable_shim(this: &HiddenPluginEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &HiddenPluginEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &HiddenPluginEventInit, val: bool); + fn set_composed_shim(this: &HiddenPluginEventInit, val: bool); +} +#[doc = "The trait to access properties on the `HiddenPluginEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] +pub trait HiddenPluginEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] + fn composed(&self) -> bool; +} +impl HiddenPluginEventInitGetters for HiddenPluginEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } } impl HiddenPluginEventInit { #[doc = "Construct a new `HiddenPluginEventInit`."] @@ -30,21 +64,21 @@ impl HiddenPluginEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HiddenPluginEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HitRegionOptions.rs b/crates/web-sys/src/features/gen_HitRegionOptions.rs index ebbfcefeb31..ba6f8edfc8e 100644 --- a/crates/web-sys/src/features/gen_HitRegionOptions.rs +++ b/crates/web-sys/src/features/gen_HitRegionOptions.rs @@ -11,13 +11,53 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] pub type HitRegionOptions; #[cfg(feature = "Element")] + #[wasm_bindgen(method, getter = "control")] + fn control_shim(this: &HitRegionOptions) -> Option; + #[cfg(feature = "Element")] #[wasm_bindgen(method, setter = "control")] - fn control_shim(this: &HitRegionOptions, val: Option<&Element>); + fn set_control_shim(this: &HitRegionOptions, val: Option<&Element>); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &HitRegionOptions) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &HitRegionOptions, val: &str); + fn set_id_shim(this: &HitRegionOptions, val: &str); + #[cfg(feature = "Path2d")] + #[wasm_bindgen(method, getter = "path")] + fn path_shim(this: &HitRegionOptions) -> Option; #[cfg(feature = "Path2d")] #[wasm_bindgen(method, setter = "path")] - fn path_shim(this: &HitRegionOptions, val: Option<&Path2d>); + fn set_path_shim(this: &HitRegionOptions, val: Option<&Path2d>); +} +#[doc = "The trait to access properties on the `HitRegionOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] +pub trait HitRegionOptionsGetters { + #[cfg(feature = "Element")] + #[doc = "Get the `control` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `HitRegionOptions`*"] + fn control(&self) -> Option; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] + fn id(&self) -> String; + #[cfg(feature = "Path2d")] + #[doc = "Get the `path` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`, `Path2d`*"] + fn path(&self) -> Option; +} +impl HitRegionOptionsGetters for HitRegionOptions { + #[cfg(feature = "Element")] + fn control(&self) -> Option { + self.control_shim() + } + fn id(&self) -> String { + self.id_shim() + } + #[cfg(feature = "Path2d")] + fn path(&self) -> Option { + self.path_shim() + } } impl HitRegionOptions { #[doc = "Construct a new `HitRegionOptions`."] @@ -33,14 +73,14 @@ impl HitRegionOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Element`, `HitRegionOptions`*"] pub fn control(&mut self, val: Option<&Element>) -> &mut Self { - self.control_shim(val); + self.set_control_shim(val); self } #[doc = "Change the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[cfg(feature = "Path2d")] @@ -48,7 +88,7 @@ impl HitRegionOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HitRegionOptions`, `Path2d`*"] pub fn path(&mut self, val: Option<&Path2d>) -> &mut Self { - self.path_shim(val); + self.set_path_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HkdfParams.rs b/crates/web-sys/src/features/gen_HkdfParams.rs index ba49af7229d..e14526ea609 100644 --- a/crates/web-sys/src/features/gen_HkdfParams.rs +++ b/crates/web-sys/src/features/gen_HkdfParams.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] pub type HkdfParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &HkdfParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HkdfParams, val: &str); + fn set_name_shim(this: &HkdfParams, val: &str); + #[wasm_bindgen(method, getter = "hash")] + fn hash_shim(this: &HkdfParams) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HkdfParams, val: &::wasm_bindgen::JsValue); + fn set_hash_shim(this: &HkdfParams, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "info")] + fn info_shim(this: &HkdfParams) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "info")] - fn info_shim(this: &HkdfParams, val: &::js_sys::Object); + fn set_info_shim(this: &HkdfParams, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "salt")] + fn salt_shim(this: &HkdfParams) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "salt")] - fn salt_shim(this: &HkdfParams, val: &::js_sys::Object); + fn set_salt_shim(this: &HkdfParams, val: &::js_sys::Object); +} +#[doc = "The trait to access properties on the `HkdfParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] +pub trait HkdfParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + fn name(&self) -> String; + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + fn hash(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `info` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + fn info(&self) -> ::js_sys::Object; + #[doc = "Get the `salt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] + fn salt(&self) -> ::js_sys::Object; +} +impl HkdfParamsGetters for HkdfParams { + fn name(&self) -> String { + self.name_shim() + } + fn hash(&self) -> ::wasm_bindgen::JsValue { + self.hash_shim() + } + fn info(&self) -> ::js_sys::Object { + self.info_shim() + } + fn salt(&self) -> ::js_sys::Object { + self.salt_shim() + } } impl HkdfParams { #[doc = "Construct a new `HkdfParams`."] @@ -31,38 +74,38 @@ impl HkdfParams { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.hash(hash); - ret.info(info); - ret.salt(salt); + Self::name(&mut ret, name); + Self::hash(&mut ret, hash); + Self::info(&mut ret, info); + Self::salt(&mut ret, salt); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash_shim(val); self } #[doc = "Change the `info` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] pub fn info(&mut self, val: &::js_sys::Object) -> &mut Self { - self.info_shim(val); + self.set_info_shim(val); self } #[doc = "Change the `salt` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HkdfParams`*"] pub fn salt(&mut self, val: &::js_sys::Object) -> &mut Self { - self.salt_shim(val); + self.set_salt_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs b/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs index dd912acbd23..6df54c21864 100644 --- a/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs +++ b/crates/web-sys/src/features/gen_HmacDerivedKeyParams.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] pub type HmacDerivedKeyParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &HmacDerivedKeyParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HmacDerivedKeyParams, val: &str); + fn set_name_shim(this: &HmacDerivedKeyParams, val: &str); + #[wasm_bindgen(method, getter = "hash")] + fn hash_shim(this: &HmacDerivedKeyParams) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HmacDerivedKeyParams, val: &::wasm_bindgen::JsValue); + fn set_hash_shim(this: &HmacDerivedKeyParams, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "length")] + fn length_shim(this: &HmacDerivedKeyParams) -> u32; #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &HmacDerivedKeyParams, val: u32); + fn set_length_shim(this: &HmacDerivedKeyParams, val: u32); +} +#[doc = "The trait to access properties on the `HmacDerivedKeyParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] +pub trait HmacDerivedKeyParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + fn name(&self) -> String; + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + fn hash(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] + fn length(&self) -> u32; +} +impl HmacDerivedKeyParamsGetters for HmacDerivedKeyParams { + fn name(&self) -> String { + self.name_shim() + } + fn hash(&self) -> ::wasm_bindgen::JsValue { + self.hash_shim() + } + fn length(&self) -> u32 { + self.length_shim() + } } impl HmacDerivedKeyParams { #[doc = "Construct a new `HmacDerivedKeyParams`."] @@ -24,29 +58,29 @@ impl HmacDerivedKeyParams { pub fn new(name: &str, hash: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.hash(hash); + Self::name(&mut ret, name); + Self::hash(&mut ret, hash); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash_shim(val); self } #[doc = "Change the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacDerivedKeyParams`*"] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HmacImportParams.rs b/crates/web-sys/src/features/gen_HmacImportParams.rs index 1fbc6013647..7b3619c4847 100644 --- a/crates/web-sys/src/features/gen_HmacImportParams.rs +++ b/crates/web-sys/src/features/gen_HmacImportParams.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] pub type HmacImportParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &HmacImportParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HmacImportParams, val: &str); + fn set_name_shim(this: &HmacImportParams, val: &str); + #[wasm_bindgen(method, getter = "hash")] + fn hash_shim(this: &HmacImportParams) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HmacImportParams, val: &::wasm_bindgen::JsValue); + fn set_hash_shim(this: &HmacImportParams, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `HmacImportParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] +pub trait HmacImportParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] + fn name(&self) -> String; + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] + fn hash(&self) -> ::wasm_bindgen::JsValue; +} +impl HmacImportParamsGetters for HmacImportParams { + fn name(&self) -> String { + self.name_shim() + } + fn hash(&self) -> ::wasm_bindgen::JsValue { + self.hash_shim() + } } impl HmacImportParams { #[doc = "Construct a new `HmacImportParams`."] @@ -22,22 +47,22 @@ impl HmacImportParams { pub fn new(name: &str, hash: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.hash(hash); + Self::name(&mut ret, name); + Self::hash(&mut ret, hash); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacImportParams`*"] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs b/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs index e45ef81f604..6cadb5f880d 100644 --- a/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_HmacKeyAlgorithm.rs @@ -10,13 +10,50 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] pub type HmacKeyAlgorithm; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &HmacKeyAlgorithm) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HmacKeyAlgorithm, val: &str); + fn set_name_shim(this: &HmacKeyAlgorithm, val: &str); + #[cfg(feature = "KeyAlgorithm")] + #[wasm_bindgen(method, getter = "hash")] + fn hash_shim(this: &HmacKeyAlgorithm) -> KeyAlgorithm; #[cfg(feature = "KeyAlgorithm")] #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HmacKeyAlgorithm, val: &KeyAlgorithm); + fn set_hash_shim(this: &HmacKeyAlgorithm, val: &KeyAlgorithm); + #[wasm_bindgen(method, getter = "length")] + fn length_shim(this: &HmacKeyAlgorithm) -> u32; #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &HmacKeyAlgorithm, val: u32); + fn set_length_shim(this: &HmacKeyAlgorithm, val: u32); +} +#[doc = "The trait to access properties on the `HmacKeyAlgorithm` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] +pub trait HmacKeyAlgorithmGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] + fn name(&self) -> String; + #[cfg(feature = "KeyAlgorithm")] + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`, `KeyAlgorithm`*"] + fn hash(&self) -> KeyAlgorithm; + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] + fn length(&self) -> u32; +} +impl HmacKeyAlgorithmGetters for HmacKeyAlgorithm { + fn name(&self) -> String { + self.name_shim() + } + #[cfg(feature = "KeyAlgorithm")] + fn hash(&self) -> KeyAlgorithm { + self.hash_shim() + } + fn length(&self) -> u32 { + self.length_shim() + } } impl HmacKeyAlgorithm { #[cfg(feature = "KeyAlgorithm")] @@ -26,16 +63,16 @@ impl HmacKeyAlgorithm { pub fn new(name: &str, hash: &KeyAlgorithm, length: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.hash(hash); - ret.length(length); + Self::name(&mut ret, name); + Self::hash(&mut ret, hash); + Self::length(&mut ret, length); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(feature = "KeyAlgorithm")] @@ -43,14 +80,14 @@ impl HmacKeyAlgorithm { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`, `KeyAlgorithm`*"] pub fn hash(&mut self, val: &KeyAlgorithm) -> &mut Self { - self.hash_shim(val); + self.set_hash_shim(val); self } #[doc = "Change the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyAlgorithm`*"] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HmacKeyGenParams.rs b/crates/web-sys/src/features/gen_HmacKeyGenParams.rs index 0ccceb4973a..4ea7efec026 100644 --- a/crates/web-sys/src/features/gen_HmacKeyGenParams.rs +++ b/crates/web-sys/src/features/gen_HmacKeyGenParams.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] pub type HmacKeyGenParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &HmacKeyGenParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &HmacKeyGenParams, val: &str); + fn set_name_shim(this: &HmacKeyGenParams, val: &str); + #[wasm_bindgen(method, getter = "hash")] + fn hash_shim(this: &HmacKeyGenParams) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &HmacKeyGenParams, val: &::wasm_bindgen::JsValue); + fn set_hash_shim(this: &HmacKeyGenParams, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "length")] + fn length_shim(this: &HmacKeyGenParams) -> u32; #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &HmacKeyGenParams, val: u32); + fn set_length_shim(this: &HmacKeyGenParams, val: u32); +} +#[doc = "The trait to access properties on the `HmacKeyGenParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] +pub trait HmacKeyGenParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + fn name(&self) -> String; + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + fn hash(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] + fn length(&self) -> u32; +} +impl HmacKeyGenParamsGetters for HmacKeyGenParams { + fn name(&self) -> String { + self.name_shim() + } + fn hash(&self) -> ::wasm_bindgen::JsValue { + self.hash_shim() + } + fn length(&self) -> u32 { + self.length_shim() + } } impl HmacKeyGenParams { #[doc = "Construct a new `HmacKeyGenParams`."] @@ -24,29 +58,29 @@ impl HmacKeyGenParams { pub fn new(name: &str, hash: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.hash(hash); + Self::name(&mut ret, name); + Self::hash(&mut ret, hash); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash_shim(val); self } #[doc = "Change the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HmacKeyGenParams`*"] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HttpConnDict.rs b/crates/web-sys/src/features/gen_HttpConnDict.rs index 04bbdd65a96..5d734a8290f 100644 --- a/crates/web-sys/src/features/gen_HttpConnDict.rs +++ b/crates/web-sys/src/features/gen_HttpConnDict.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] pub type HttpConnDict; + #[wasm_bindgen(method, getter = "connections")] + fn connections_shim(this: &HttpConnDict) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "connections")] - fn connections_shim(this: &HttpConnDict, val: &::wasm_bindgen::JsValue); + fn set_connections_shim(this: &HttpConnDict, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `HttpConnDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] +pub trait HttpConnDictGetters { + #[doc = "Get the `connections` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] + fn connections(&self) -> ::js_sys::Array; +} +impl HttpConnDictGetters for HttpConnDict { + fn connections(&self) -> ::js_sys::Array { + self.connections_shim() + } } impl HttpConnDict { #[doc = "Construct a new `HttpConnDict`."] @@ -26,7 +42,7 @@ impl HttpConnDict { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnDict`*"] pub fn connections(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.connections_shim(val); + self.set_connections_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HttpConnInfo.rs b/crates/web-sys/src/features/gen_HttpConnInfo.rs index 42ec871b2b8..436aeb58d2d 100644 --- a/crates/web-sys/src/features/gen_HttpConnInfo.rs +++ b/crates/web-sys/src/features/gen_HttpConnInfo.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] pub type HttpConnInfo; + #[wasm_bindgen(method, getter = "protocolVersion")] + fn protocol_version_shim(this: &HttpConnInfo) -> String; #[wasm_bindgen(method, setter = "protocolVersion")] - fn protocol_version_shim(this: &HttpConnInfo, val: &str); + fn set_protocol_version_shim(this: &HttpConnInfo, val: &str); + #[wasm_bindgen(method, getter = "rtt")] + fn rtt_shim(this: &HttpConnInfo) -> u32; #[wasm_bindgen(method, setter = "rtt")] - fn rtt_shim(this: &HttpConnInfo, val: u32); + fn set_rtt_shim(this: &HttpConnInfo, val: u32); + #[wasm_bindgen(method, getter = "ttl")] + fn ttl_shim(this: &HttpConnInfo) -> u32; #[wasm_bindgen(method, setter = "ttl")] - fn ttl_shim(this: &HttpConnInfo, val: u32); + fn set_ttl_shim(this: &HttpConnInfo, val: u32); +} +#[doc = "The trait to access properties on the `HttpConnInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] +pub trait HttpConnInfoGetters { + #[doc = "Get the `protocolVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + fn protocol_version(&self) -> String; + #[doc = "Get the `rtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + fn rtt(&self) -> u32; + #[doc = "Get the `ttl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] + fn ttl(&self) -> u32; +} +impl HttpConnInfoGetters for HttpConnInfo { + fn protocol_version(&self) -> String { + self.protocol_version_shim() + } + fn rtt(&self) -> u32 { + self.rtt_shim() + } + fn ttl(&self) -> u32 { + self.ttl_shim() + } } impl HttpConnInfo { #[doc = "Construct a new `HttpConnInfo`."] @@ -30,21 +64,21 @@ impl HttpConnInfo { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] pub fn protocol_version(&mut self, val: &str) -> &mut Self { - self.protocol_version_shim(val); + self.set_protocol_version_shim(val); self } #[doc = "Change the `rtt` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] pub fn rtt(&mut self, val: u32) -> &mut Self { - self.rtt_shim(val); + self.set_rtt_shim(val); self } #[doc = "Change the `ttl` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnInfo`*"] pub fn ttl(&mut self, val: u32) -> &mut Self { - self.ttl_shim(val); + self.set_ttl_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_HttpConnectionElement.rs b/crates/web-sys/src/features/gen_HttpConnectionElement.rs index fe702139824..aeb5099ac0c 100644 --- a/crates/web-sys/src/features/gen_HttpConnectionElement.rs +++ b/crates/web-sys/src/features/gen_HttpConnectionElement.rs @@ -10,20 +10,90 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] pub type HttpConnectionElement; + #[wasm_bindgen(method, getter = "active")] + fn active_shim(this: &HttpConnectionElement) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "active")] - fn active_shim(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + fn set_active_shim(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "halfOpens")] + fn half_opens_shim(this: &HttpConnectionElement) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "halfOpens")] - fn half_opens_shim(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + fn set_half_opens_shim(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "host")] + fn host_shim(this: &HttpConnectionElement) -> String; #[wasm_bindgen(method, setter = "host")] - fn host_shim(this: &HttpConnectionElement, val: &str); + fn set_host_shim(this: &HttpConnectionElement, val: &str); + #[wasm_bindgen(method, getter = "idle")] + fn idle_shim(this: &HttpConnectionElement) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "idle")] - fn idle_shim(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + fn set_idle_shim(this: &HttpConnectionElement, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "port")] + fn port_shim(this: &HttpConnectionElement) -> u32; #[wasm_bindgen(method, setter = "port")] - fn port_shim(this: &HttpConnectionElement, val: u32); + fn set_port_shim(this: &HttpConnectionElement, val: u32); + #[wasm_bindgen(method, getter = "spdy")] + fn spdy_shim(this: &HttpConnectionElement) -> bool; #[wasm_bindgen(method, setter = "spdy")] - fn spdy_shim(this: &HttpConnectionElement, val: bool); + fn set_spdy_shim(this: &HttpConnectionElement, val: bool); + #[wasm_bindgen(method, getter = "ssl")] + fn ssl_shim(this: &HttpConnectionElement) -> bool; #[wasm_bindgen(method, setter = "ssl")] - fn ssl_shim(this: &HttpConnectionElement, val: bool); + fn set_ssl_shim(this: &HttpConnectionElement, val: bool); +} +#[doc = "The trait to access properties on the `HttpConnectionElement` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] +pub trait HttpConnectionElementGetters { + #[doc = "Get the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + fn active(&self) -> ::js_sys::Array; + #[doc = "Get the `halfOpens` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + fn half_opens(&self) -> ::js_sys::Array; + #[doc = "Get the `host` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + fn host(&self) -> String; + #[doc = "Get the `idle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + fn idle(&self) -> ::js_sys::Array; + #[doc = "Get the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + fn port(&self) -> u32; + #[doc = "Get the `spdy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + fn spdy(&self) -> bool; + #[doc = "Get the `ssl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] + fn ssl(&self) -> bool; +} +impl HttpConnectionElementGetters for HttpConnectionElement { + fn active(&self) -> ::js_sys::Array { + self.active_shim() + } + fn half_opens(&self) -> ::js_sys::Array { + self.half_opens_shim() + } + fn host(&self) -> String { + self.host_shim() + } + fn idle(&self) -> ::js_sys::Array { + self.idle_shim() + } + fn port(&self) -> u32 { + self.port_shim() + } + fn spdy(&self) -> bool { + self.spdy_shim() + } + fn ssl(&self) -> bool { + self.ssl_shim() + } } impl HttpConnectionElement { #[doc = "Construct a new `HttpConnectionElement`."] @@ -38,49 +108,49 @@ impl HttpConnectionElement { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] pub fn active(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.active_shim(val); + self.set_active_shim(val); self } #[doc = "Change the `halfOpens` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] pub fn half_opens(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.half_opens_shim(val); + self.set_half_opens_shim(val); self } #[doc = "Change the `host` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] pub fn host(&mut self, val: &str) -> &mut Self { - self.host_shim(val); + self.set_host_shim(val); self } #[doc = "Change the `idle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] pub fn idle(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.idle_shim(val); + self.set_idle_shim(val); self } #[doc = "Change the `port` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] pub fn port(&mut self, val: u32) -> &mut Self { - self.port_shim(val); + self.set_port_shim(val); self } #[doc = "Change the `spdy` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] pub fn spdy(&mut self, val: bool) -> &mut Self { - self.spdy_shim(val); + self.set_spdy_shim(val); self } #[doc = "Change the `ssl` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HttpConnectionElement`*"] pub fn ssl(&mut self, val: bool) -> &mut Self { - self.ssl_shim(val); + self.set_ssl_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs b/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs index fabebd3008f..53446c45f0b 100644 --- a/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs +++ b/crates/web-sys/src/features/gen_IdbFileMetadataParameters.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] pub type IdbFileMetadataParameters; + #[wasm_bindgen(method, getter = "lastModified")] + fn last_modified_shim(this: &IdbFileMetadataParameters) -> bool; #[wasm_bindgen(method, setter = "lastModified")] - fn last_modified_shim(this: &IdbFileMetadataParameters, val: bool); + fn set_last_modified_shim(this: &IdbFileMetadataParameters, val: bool); + #[wasm_bindgen(method, getter = "size")] + fn size_shim(this: &IdbFileMetadataParameters) -> bool; #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &IdbFileMetadataParameters, val: bool); + fn set_size_shim(this: &IdbFileMetadataParameters, val: bool); +} +#[doc = "The trait to access properties on the `IdbFileMetadataParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] +pub trait IdbFileMetadataParametersGetters { + #[doc = "Get the `lastModified` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] + fn last_modified(&self) -> bool; + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] + fn size(&self) -> bool; +} +impl IdbFileMetadataParametersGetters for IdbFileMetadataParameters { + fn last_modified(&self) -> bool { + self.last_modified_shim() + } + fn size(&self) -> bool { + self.size_shim() + } } impl IdbFileMetadataParameters { #[doc = "Construct a new `IdbFileMetadataParameters`."] @@ -28,14 +53,14 @@ impl IdbFileMetadataParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] pub fn last_modified(&mut self, val: bool) -> &mut Self { - self.last_modified_shim(val); + self.set_last_modified_shim(val); self } #[doc = "Change the `size` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbFileMetadataParameters`*"] pub fn size(&mut self, val: bool) -> &mut Self { - self.size_shim(val); + self.set_size_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IdbIndexParameters.rs b/crates/web-sys/src/features/gen_IdbIndexParameters.rs index b4ac9086a39..17399886f71 100644 --- a/crates/web-sys/src/features/gen_IdbIndexParameters.rs +++ b/crates/web-sys/src/features/gen_IdbIndexParameters.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] pub type IdbIndexParameters; + #[wasm_bindgen(method, getter = "locale")] + fn locale_shim(this: &IdbIndexParameters) -> Option; #[wasm_bindgen(method, setter = "locale")] - fn locale_shim(this: &IdbIndexParameters, val: Option<&str>); + fn set_locale_shim(this: &IdbIndexParameters, val: Option<&str>); + #[wasm_bindgen(method, getter = "multiEntry")] + fn multi_entry_shim(this: &IdbIndexParameters) -> bool; #[wasm_bindgen(method, setter = "multiEntry")] - fn multi_entry_shim(this: &IdbIndexParameters, val: bool); + fn set_multi_entry_shim(this: &IdbIndexParameters, val: bool); + #[wasm_bindgen(method, getter = "unique")] + fn unique_shim(this: &IdbIndexParameters) -> bool; #[wasm_bindgen(method, setter = "unique")] - fn unique_shim(this: &IdbIndexParameters, val: bool); + fn set_unique_shim(this: &IdbIndexParameters, val: bool); +} +#[doc = "The trait to access properties on the `IdbIndexParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] +pub trait IdbIndexParametersGetters { + #[doc = "Get the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + fn locale(&self) -> Option; + #[doc = "Get the `multiEntry` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + fn multi_entry(&self) -> bool; + #[doc = "Get the `unique` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] + fn unique(&self) -> bool; +} +impl IdbIndexParametersGetters for IdbIndexParameters { + fn locale(&self) -> Option { + self.locale_shim() + } + fn multi_entry(&self) -> bool { + self.multi_entry_shim() + } + fn unique(&self) -> bool { + self.unique_shim() + } } impl IdbIndexParameters { #[doc = "Construct a new `IdbIndexParameters`."] @@ -30,21 +64,21 @@ impl IdbIndexParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] pub fn locale(&mut self, val: Option<&str>) -> &mut Self { - self.locale_shim(val); + self.set_locale_shim(val); self } #[doc = "Change the `multiEntry` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] pub fn multi_entry(&mut self, val: bool) -> &mut Self { - self.multi_entry_shim(val); + self.set_multi_entry_shim(val); self } #[doc = "Change the `unique` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbIndexParameters`*"] pub fn unique(&mut self, val: bool) -> &mut Self { - self.unique_shim(val); + self.set_unique_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs b/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs index be0d078c977..f566e503c88 100644 --- a/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs +++ b/crates/web-sys/src/features/gen_IdbObjectStoreParameters.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] pub type IdbObjectStoreParameters; + #[wasm_bindgen(method, getter = "autoIncrement")] + fn auto_increment_shim(this: &IdbObjectStoreParameters) -> bool; #[wasm_bindgen(method, setter = "autoIncrement")] - fn auto_increment_shim(this: &IdbObjectStoreParameters, val: bool); + fn set_auto_increment_shim(this: &IdbObjectStoreParameters, val: bool); + #[wasm_bindgen(method, getter = "keyPath")] + fn key_path_shim(this: &IdbObjectStoreParameters) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "keyPath")] - fn key_path_shim(this: &IdbObjectStoreParameters, val: &::wasm_bindgen::JsValue); + fn set_key_path_shim(this: &IdbObjectStoreParameters, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `IdbObjectStoreParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] +pub trait IdbObjectStoreParametersGetters { + #[doc = "Get the `autoIncrement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] + fn auto_increment(&self) -> bool; + #[doc = "Get the `keyPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] + fn key_path(&self) -> ::wasm_bindgen::JsValue; +} +impl IdbObjectStoreParametersGetters for IdbObjectStoreParameters { + fn auto_increment(&self) -> bool { + self.auto_increment_shim() + } + fn key_path(&self) -> ::wasm_bindgen::JsValue { + self.key_path_shim() + } } impl IdbObjectStoreParameters { #[doc = "Construct a new `IdbObjectStoreParameters`."] @@ -28,14 +53,14 @@ impl IdbObjectStoreParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] pub fn auto_increment(&mut self, val: bool) -> &mut Self { - self.auto_increment_shim(val); + self.set_auto_increment_shim(val); self } #[doc = "Change the `keyPath` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbObjectStoreParameters`*"] pub fn key_path(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.key_path_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_key_path_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } } diff --git a/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs b/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs index e5839a07b1c..49137cbaeb6 100644 --- a/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs +++ b/crates/web-sys/src/features/gen_IdbOpenDbOptions.rs @@ -11,10 +11,38 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] pub type IdbOpenDbOptions; #[cfg(feature = "StorageType")] + #[wasm_bindgen(method, getter = "storage")] + fn storage_shim(this: &IdbOpenDbOptions) -> StorageType; + #[cfg(feature = "StorageType")] #[wasm_bindgen(method, setter = "storage")] - fn storage_shim(this: &IdbOpenDbOptions, val: StorageType); + fn set_storage_shim(this: &IdbOpenDbOptions, val: StorageType); + #[wasm_bindgen(method, getter = "version")] + fn version_shim(this: &IdbOpenDbOptions) -> f64; #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &IdbOpenDbOptions, val: f64); + fn set_version_shim(this: &IdbOpenDbOptions, val: f64); +} +#[doc = "The trait to access properties on the `IdbOpenDbOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] +pub trait IdbOpenDbOptionsGetters { + #[cfg(feature = "StorageType")] + #[doc = "Get the `storage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`, `StorageType`*"] + fn storage(&self) -> StorageType; + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] + fn version(&self) -> f64; +} +impl IdbOpenDbOptionsGetters for IdbOpenDbOptions { + #[cfg(feature = "StorageType")] + fn storage(&self) -> StorageType { + self.storage_shim() + } + fn version(&self) -> f64 { + self.version_shim() + } } impl IdbOpenDbOptions { #[doc = "Construct a new `IdbOpenDbOptions`."] @@ -30,14 +58,14 @@ impl IdbOpenDbOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`, `StorageType`*"] pub fn storage(&mut self, val: StorageType) -> &mut Self { - self.storage_shim(val); + self.set_storage_shim(val); self } #[doc = "Change the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbOpenDbOptions`*"] pub fn version(&mut self, val: f64) -> &mut Self { - self.version_shim(val); + self.set_version_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs b/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs index 65ae93c1d7e..7562ed29d63 100644 --- a/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_IdbVersionChangeEventInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] pub type IdbVersionChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &IdbVersionChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &IdbVersionChangeEventInit, val: bool); + fn set_bubbles_shim(this: &IdbVersionChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &IdbVersionChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &IdbVersionChangeEventInit, val: bool); + fn set_cancelable_shim(this: &IdbVersionChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &IdbVersionChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &IdbVersionChangeEventInit, val: bool); + fn set_composed_shim(this: &IdbVersionChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "newVersion")] + fn new_version_shim(this: &IdbVersionChangeEventInit) -> Option; #[wasm_bindgen(method, setter = "newVersion")] - fn new_version_shim(this: &IdbVersionChangeEventInit, val: Option); + fn set_new_version_shim(this: &IdbVersionChangeEventInit, val: Option); + #[wasm_bindgen(method, getter = "oldVersion")] + fn old_version_shim(this: &IdbVersionChangeEventInit) -> f64; #[wasm_bindgen(method, setter = "oldVersion")] - fn old_version_shim(this: &IdbVersionChangeEventInit, val: f64); + fn set_old_version_shim(this: &IdbVersionChangeEventInit, val: f64); +} +#[doc = "The trait to access properties on the `IdbVersionChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] +pub trait IdbVersionChangeEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `newVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + fn new_version(&self) -> Option; + #[doc = "Get the `oldVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] + fn old_version(&self) -> f64; +} +impl IdbVersionChangeEventInitGetters for IdbVersionChangeEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn new_version(&self) -> Option { + self.new_version_shim() + } + fn old_version(&self) -> f64 { + self.old_version_shim() + } } impl IdbVersionChangeEventInit { #[doc = "Construct a new `IdbVersionChangeEventInit`."] @@ -34,35 +86,35 @@ impl IdbVersionChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `newVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] pub fn new_version(&mut self, val: Option) -> &mut Self { - self.new_version_shim(val); + self.set_new_version_shim(val); self } #[doc = "Change the `oldVersion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdbVersionChangeEventInit`*"] pub fn old_version(&mut self, val: f64) -> &mut Self { - self.old_version_shim(val); + self.set_old_version_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IdleRequestOptions.rs b/crates/web-sys/src/features/gen_IdleRequestOptions.rs index b0b550ed8b4..35a886e1f55 100644 --- a/crates/web-sys/src/features/gen_IdleRequestOptions.rs +++ b/crates/web-sys/src/features/gen_IdleRequestOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] pub type IdleRequestOptions; + #[wasm_bindgen(method, getter = "timeout")] + fn timeout_shim(this: &IdleRequestOptions) -> u32; #[wasm_bindgen(method, setter = "timeout")] - fn timeout_shim(this: &IdleRequestOptions, val: u32); + fn set_timeout_shim(this: &IdleRequestOptions, val: u32); +} +#[doc = "The trait to access properties on the `IdleRequestOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] +pub trait IdleRequestOptionsGetters { + #[doc = "Get the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] + fn timeout(&self) -> u32; +} +impl IdleRequestOptionsGetters for IdleRequestOptions { + fn timeout(&self) -> u32 { + self.timeout_shim() + } } impl IdleRequestOptions { #[doc = "Construct a new `IdleRequestOptions`."] @@ -26,7 +42,7 @@ impl IdleRequestOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IdleRequestOptions`*"] pub fn timeout(&mut self, val: u32) -> &mut Self { - self.timeout_shim(val); + self.set_timeout_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IirFilterOptions.rs b/crates/web-sys/src/features/gen_IirFilterOptions.rs index b88375ed03b..f54c79beaec 100644 --- a/crates/web-sys/src/features/gen_IirFilterOptions.rs +++ b/crates/web-sys/src/features/gen_IirFilterOptions.rs @@ -10,18 +10,76 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] pub type IirFilterOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &IirFilterOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &IirFilterOptions, val: u32); + fn set_channel_count_shim(this: &IirFilterOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &IirFilterOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &IirFilterOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &IirFilterOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &IirFilterOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &IirFilterOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &IirFilterOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "feedback")] + fn feedback_shim(this: &IirFilterOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "feedback")] - fn feedback_shim(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); + fn set_feedback_shim(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "feedforward")] + fn feedforward_shim(this: &IirFilterOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "feedforward")] - fn feedforward_shim(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); + fn set_feedforward_shim(this: &IirFilterOptions, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `IirFilterOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] +pub trait IirFilterOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `IirFilterOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `IirFilterOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `feedback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + fn feedback(&self) -> ::js_sys::Array; + #[doc = "Get the `feedforward` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] + fn feedforward(&self) -> ::js_sys::Array; +} +impl IirFilterOptionsGetters for IirFilterOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn feedback(&self) -> ::js_sys::Array { + self.feedback_shim() + } + fn feedforward(&self) -> ::js_sys::Array { + self.feedforward_shim() + } } impl IirFilterOptions { #[doc = "Construct a new `IirFilterOptions`."] @@ -30,15 +88,15 @@ impl IirFilterOptions { pub fn new(feedback: &::wasm_bindgen::JsValue, feedforward: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.feedback(feedback); - ret.feedforward(feedforward); + Self::feedback(&mut ret, feedback); + Self::feedforward(&mut ret, feedforward); ret } #[doc = "Change the `channelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -46,7 +104,7 @@ impl IirFilterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `IirFilterOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -54,21 +112,21 @@ impl IirFilterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `IirFilterOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `feedback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] pub fn feedback(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.feedback_shim(val); + self.set_feedback_shim(val); self } #[doc = "Change the `feedforward` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IirFilterOptions`*"] pub fn feedforward(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.feedforward_shim(val); + self.set_feedforward_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageBitmapOptions.rs b/crates/web-sys/src/features/gen_ImageBitmapOptions.rs index 865c2786fd3..b8a5f85f348 100644 --- a/crates/web-sys/src/features/gen_ImageBitmapOptions.rs +++ b/crates/web-sys/src/features/gen_ImageBitmapOptions.rs @@ -11,21 +11,94 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] pub type ImageBitmapOptions; #[cfg(feature = "ColorSpaceConversion")] + #[wasm_bindgen(method, getter = "colorSpaceConversion")] + fn color_space_conversion_shim(this: &ImageBitmapOptions) -> ColorSpaceConversion; + #[cfg(feature = "ColorSpaceConversion")] #[wasm_bindgen(method, setter = "colorSpaceConversion")] - fn color_space_conversion_shim(this: &ImageBitmapOptions, val: ColorSpaceConversion); + fn set_color_space_conversion_shim(this: &ImageBitmapOptions, val: ColorSpaceConversion); + #[cfg(feature = "ImageOrientation")] + #[wasm_bindgen(method, getter = "imageOrientation")] + fn image_orientation_shim(this: &ImageBitmapOptions) -> ImageOrientation; #[cfg(feature = "ImageOrientation")] #[wasm_bindgen(method, setter = "imageOrientation")] - fn image_orientation_shim(this: &ImageBitmapOptions, val: ImageOrientation); + fn set_image_orientation_shim(this: &ImageBitmapOptions, val: ImageOrientation); + #[cfg(feature = "PremultiplyAlpha")] + #[wasm_bindgen(method, getter = "premultiplyAlpha")] + fn premultiply_alpha_shim(this: &ImageBitmapOptions) -> PremultiplyAlpha; #[cfg(feature = "PremultiplyAlpha")] #[wasm_bindgen(method, setter = "premultiplyAlpha")] - fn premultiply_alpha_shim(this: &ImageBitmapOptions, val: PremultiplyAlpha); + fn set_premultiply_alpha_shim(this: &ImageBitmapOptions, val: PremultiplyAlpha); + #[wasm_bindgen(method, getter = "resizeHeight")] + fn resize_height_shim(this: &ImageBitmapOptions) -> u32; #[wasm_bindgen(method, setter = "resizeHeight")] - fn resize_height_shim(this: &ImageBitmapOptions, val: u32); + fn set_resize_height_shim(this: &ImageBitmapOptions, val: u32); + #[cfg(feature = "ResizeQuality")] + #[wasm_bindgen(method, getter = "resizeQuality")] + fn resize_quality_shim(this: &ImageBitmapOptions) -> ResizeQuality; #[cfg(feature = "ResizeQuality")] #[wasm_bindgen(method, setter = "resizeQuality")] - fn resize_quality_shim(this: &ImageBitmapOptions, val: ResizeQuality); + fn set_resize_quality_shim(this: &ImageBitmapOptions, val: ResizeQuality); + #[wasm_bindgen(method, getter = "resizeWidth")] + fn resize_width_shim(this: &ImageBitmapOptions) -> u32; #[wasm_bindgen(method, setter = "resizeWidth")] - fn resize_width_shim(this: &ImageBitmapOptions, val: u32); + fn set_resize_width_shim(this: &ImageBitmapOptions, val: u32); +} +#[doc = "The trait to access properties on the `ImageBitmapOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] +pub trait ImageBitmapOptionsGetters { + #[cfg(feature = "ColorSpaceConversion")] + #[doc = "Get the `colorSpaceConversion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageBitmapOptions`*"] + fn color_space_conversion(&self) -> ColorSpaceConversion; + #[cfg(feature = "ImageOrientation")] + #[doc = "Get the `imageOrientation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ImageOrientation`*"] + fn image_orientation(&self) -> ImageOrientation; + #[cfg(feature = "PremultiplyAlpha")] + #[doc = "Get the `premultiplyAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `PremultiplyAlpha`*"] + fn premultiply_alpha(&self) -> PremultiplyAlpha; + #[doc = "Get the `resizeHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] + fn resize_height(&self) -> u32; + #[cfg(feature = "ResizeQuality")] + #[doc = "Get the `resizeQuality` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ResizeQuality`*"] + fn resize_quality(&self) -> ResizeQuality; + #[doc = "Get the `resizeWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] + fn resize_width(&self) -> u32; +} +impl ImageBitmapOptionsGetters for ImageBitmapOptions { + #[cfg(feature = "ColorSpaceConversion")] + fn color_space_conversion(&self) -> ColorSpaceConversion { + self.color_space_conversion_shim() + } + #[cfg(feature = "ImageOrientation")] + fn image_orientation(&self) -> ImageOrientation { + self.image_orientation_shim() + } + #[cfg(feature = "PremultiplyAlpha")] + fn premultiply_alpha(&self) -> PremultiplyAlpha { + self.premultiply_alpha_shim() + } + fn resize_height(&self) -> u32 { + self.resize_height_shim() + } + #[cfg(feature = "ResizeQuality")] + fn resize_quality(&self) -> ResizeQuality { + self.resize_quality_shim() + } + fn resize_width(&self) -> u32 { + self.resize_width_shim() + } } impl ImageBitmapOptions { #[doc = "Construct a new `ImageBitmapOptions`."] @@ -41,7 +114,7 @@ impl ImageBitmapOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageBitmapOptions`*"] pub fn color_space_conversion(&mut self, val: ColorSpaceConversion) -> &mut Self { - self.color_space_conversion_shim(val); + self.set_color_space_conversion_shim(val); self } #[cfg(feature = "ImageOrientation")] @@ -49,7 +122,7 @@ impl ImageBitmapOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ImageOrientation`*"] pub fn image_orientation(&mut self, val: ImageOrientation) -> &mut Self { - self.image_orientation_shim(val); + self.set_image_orientation_shim(val); self } #[cfg(feature = "PremultiplyAlpha")] @@ -57,14 +130,14 @@ impl ImageBitmapOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `PremultiplyAlpha`*"] pub fn premultiply_alpha(&mut self, val: PremultiplyAlpha) -> &mut Self { - self.premultiply_alpha_shim(val); + self.set_premultiply_alpha_shim(val); self } #[doc = "Change the `resizeHeight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] pub fn resize_height(&mut self, val: u32) -> &mut Self { - self.resize_height_shim(val); + self.set_resize_height_shim(val); self } #[cfg(feature = "ResizeQuality")] @@ -72,14 +145,14 @@ impl ImageBitmapOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ResizeQuality`*"] pub fn resize_quality(&mut self, val: ResizeQuality) -> &mut Self { - self.resize_quality_shim(val); + self.set_resize_quality_shim(val); self } #[doc = "Change the `resizeWidth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"] pub fn resize_width(&mut self, val: u32) -> &mut Self { - self.resize_width_shim(val); + self.set_resize_width_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs b/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs index 093b78e3c67..1df17294acd 100644 --- a/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_ImageCaptureErrorEventInit.rs @@ -10,15 +10,64 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] pub type ImageCaptureErrorEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &ImageCaptureErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ImageCaptureErrorEventInit, val: bool); + fn set_bubbles_shim(this: &ImageCaptureErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &ImageCaptureErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ImageCaptureErrorEventInit, val: bool); + fn set_cancelable_shim(this: &ImageCaptureErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &ImageCaptureErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ImageCaptureErrorEventInit, val: bool); + fn set_composed_shim(this: &ImageCaptureErrorEventInit, val: bool); + #[cfg(feature = "ImageCaptureError")] + #[wasm_bindgen(method, getter = "imageCaptureError")] + fn image_capture_error_shim(this: &ImageCaptureErrorEventInit) -> Option; #[cfg(feature = "ImageCaptureError")] #[wasm_bindgen(method, setter = "imageCaptureError")] - fn image_capture_error_shim(this: &ImageCaptureErrorEventInit, val: Option<&ImageCaptureError>); + fn set_image_capture_error_shim( + this: &ImageCaptureErrorEventInit, + val: Option<&ImageCaptureError>, + ); +} +#[doc = "The trait to access properties on the `ImageCaptureErrorEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] +pub trait ImageCaptureErrorEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "ImageCaptureError")] + #[doc = "Get the `imageCaptureError` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageCaptureError`, `ImageCaptureErrorEventInit`*"] + fn image_capture_error(&self) -> Option; +} +impl ImageCaptureErrorEventInitGetters for ImageCaptureErrorEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "ImageCaptureError")] + fn image_capture_error(&self) -> Option { + self.image_capture_error_shim() + } } impl ImageCaptureErrorEventInit { #[doc = "Construct a new `ImageCaptureErrorEventInit`."] @@ -33,21 +82,21 @@ impl ImageCaptureErrorEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageCaptureErrorEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "ImageCaptureError")] @@ -55,7 +104,7 @@ impl ImageCaptureErrorEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageCaptureError`, `ImageCaptureErrorEventInit`*"] pub fn image_capture_error(&mut self, val: Option<&ImageCaptureError>) -> &mut Self { - self.image_capture_error_shim(val); + self.set_image_capture_error_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageDecodeOptions.rs b/crates/web-sys/src/features/gen_ImageDecodeOptions.rs index 35fae56cd7b..32944f211f9 100644 --- a/crates/web-sys/src/features/gen_ImageDecodeOptions.rs +++ b/crates/web-sys/src/features/gen_ImageDecodeOptions.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ImageDecodeOptions; + #[wasm_bindgen(method, getter = "completeFramesOnly")] + fn complete_frames_only_shim(this: &ImageDecodeOptions) -> bool; #[wasm_bindgen(method, setter = "completeFramesOnly")] - fn complete_frames_only_shim(this: &ImageDecodeOptions, val: bool); + fn set_complete_frames_only_shim(this: &ImageDecodeOptions, val: bool); + #[wasm_bindgen(method, getter = "frameIndex")] + fn frame_index_shim(this: &ImageDecodeOptions) -> u32; #[wasm_bindgen(method, setter = "frameIndex")] - fn frame_index_shim(this: &ImageDecodeOptions, val: u32); + fn set_frame_index_shim(this: &ImageDecodeOptions, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `ImageDecodeOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] +pub trait ImageDecodeOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `completeFramesOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn complete_frames_only(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `frameIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn frame_index(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl ImageDecodeOptionsGetters for ImageDecodeOptions { + #[cfg(web_sys_unstable_apis)] + fn complete_frames_only(&self) -> bool { + self.complete_frames_only_shim() + } + #[cfg(web_sys_unstable_apis)] + fn frame_index(&self) -> u32 { + self.frame_index_shim() + } } #[cfg(web_sys_unstable_apis)] impl ImageDecodeOptions { @@ -40,7 +77,7 @@ impl ImageDecodeOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn complete_frames_only(&mut self, val: bool) -> &mut Self { - self.complete_frames_only_shim(val); + self.set_complete_frames_only_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl ImageDecodeOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn frame_index(&mut self, val: u32) -> &mut Self { - self.frame_index_shim(val); + self.set_frame_index_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageDecodeResult.rs b/crates/web-sys/src/features/gen_ImageDecodeResult.rs index 056f4f15364..e8e30c636c7 100644 --- a/crates/web-sys/src/features/gen_ImageDecodeResult.rs +++ b/crates/web-sys/src/features/gen_ImageDecodeResult.rs @@ -14,11 +14,51 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ImageDecodeResult; + #[wasm_bindgen(method, getter = "complete")] + fn complete_shim(this: &ImageDecodeResult) -> bool; #[wasm_bindgen(method, setter = "complete")] - fn complete_shim(this: &ImageDecodeResult, val: bool); + fn set_complete_shim(this: &ImageDecodeResult, val: bool); + #[cfg(feature = "VideoFrame")] + #[wasm_bindgen(method, getter = "image")] + fn image_shim(this: &ImageDecodeResult) -> VideoFrame; #[cfg(feature = "VideoFrame")] #[wasm_bindgen(method, setter = "image")] - fn image_shim(this: &ImageDecodeResult, val: &VideoFrame); + fn set_image_shim(this: &ImageDecodeResult, val: &VideoFrame); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `ImageDecodeResult` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`*"] +pub trait ImageDecodeResultGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `complete` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn complete(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoFrame")] + #[doc = "Get the `image` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecodeResult`, `VideoFrame`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn image(&self) -> VideoFrame; +} +#[cfg(web_sys_unstable_apis)] +impl ImageDecodeResultGetters for ImageDecodeResult { + #[cfg(web_sys_unstable_apis)] + fn complete(&self) -> bool { + self.complete_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoFrame")] + fn image(&self) -> VideoFrame { + self.image_shim() + } } #[cfg(web_sys_unstable_apis)] impl ImageDecodeResult { @@ -32,8 +72,8 @@ impl ImageDecodeResult { pub fn new(complete: bool, image: &VideoFrame) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.complete(complete); - ret.image(image); + Self::complete(&mut ret, complete); + Self::image(&mut ret, image); ret } #[cfg(web_sys_unstable_apis)] @@ -44,7 +84,7 @@ impl ImageDecodeResult { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn complete(&mut self, val: bool) -> &mut Self { - self.complete_shim(val); + self.set_complete_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -56,7 +96,7 @@ impl ImageDecodeResult { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn image(&mut self, val: &VideoFrame) -> &mut Self { - self.image_shim(val); + self.set_image_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageDecoderInit.rs b/crates/web-sys/src/features/gen_ImageDecoderInit.rs index 416e83d64a3..36136500c45 100644 --- a/crates/web-sys/src/features/gen_ImageDecoderInit.rs +++ b/crates/web-sys/src/features/gen_ImageDecoderInit.rs @@ -15,21 +15,134 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ImageDecoderInit; #[cfg(feature = "ColorSpaceConversion")] + #[wasm_bindgen(method, getter = "colorSpaceConversion")] + fn color_space_conversion_shim(this: &ImageDecoderInit) -> ColorSpaceConversion; + #[cfg(feature = "ColorSpaceConversion")] #[wasm_bindgen(method, setter = "colorSpaceConversion")] - fn color_space_conversion_shim(this: &ImageDecoderInit, val: ColorSpaceConversion); + fn set_color_space_conversion_shim(this: &ImageDecoderInit, val: ColorSpaceConversion); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &ImageDecoderInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &ImageDecoderInit, val: &::wasm_bindgen::JsValue); + fn set_data_shim(this: &ImageDecoderInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "desiredHeight")] + fn desired_height_shim(this: &ImageDecoderInit) -> u32; #[wasm_bindgen(method, setter = "desiredHeight")] - fn desired_height_shim(this: &ImageDecoderInit, val: u32); + fn set_desired_height_shim(this: &ImageDecoderInit, val: u32); + #[wasm_bindgen(method, getter = "desiredWidth")] + fn desired_width_shim(this: &ImageDecoderInit) -> u32; #[wasm_bindgen(method, setter = "desiredWidth")] - fn desired_width_shim(this: &ImageDecoderInit, val: u32); + fn set_desired_width_shim(this: &ImageDecoderInit, val: u32); + #[wasm_bindgen(method, getter = "preferAnimation")] + fn prefer_animation_shim(this: &ImageDecoderInit) -> bool; #[wasm_bindgen(method, setter = "preferAnimation")] - fn prefer_animation_shim(this: &ImageDecoderInit, val: bool); + fn set_prefer_animation_shim(this: &ImageDecoderInit, val: bool); + #[cfg(feature = "PremultiplyAlpha")] + #[wasm_bindgen(method, getter = "premultiplyAlpha")] + fn premultiply_alpha_shim(this: &ImageDecoderInit) -> PremultiplyAlpha; #[cfg(feature = "PremultiplyAlpha")] #[wasm_bindgen(method, setter = "premultiplyAlpha")] - fn premultiply_alpha_shim(this: &ImageDecoderInit, val: PremultiplyAlpha); + fn set_premultiply_alpha_shim(this: &ImageDecoderInit, val: PremultiplyAlpha); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &ImageDecoderInit) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ImageDecoderInit, val: &str); + fn set_type__shim(this: &ImageDecoderInit, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `ImageDecoderInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] +pub trait ImageDecoderInitGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ColorSpaceConversion")] + #[doc = "Get the `colorSpaceConversion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn color_space_conversion(&self) -> ColorSpaceConversion; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `desiredHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn desired_height(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `desiredWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn desired_width(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `preferAnimation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn prefer_animation(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PremultiplyAlpha")] + #[doc = "Get the `premultiplyAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`, `PremultiplyAlpha`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn premultiply_alpha(&self) -> PremultiplyAlpha; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn type_(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl ImageDecoderInitGetters for ImageDecoderInit { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ColorSpaceConversion")] + fn color_space_conversion(&self) -> ColorSpaceConversion { + self.color_space_conversion_shim() + } + #[cfg(web_sys_unstable_apis)] + fn data(&self) -> ::wasm_bindgen::JsValue { + self.data_shim() + } + #[cfg(web_sys_unstable_apis)] + fn desired_height(&self) -> u32 { + self.desired_height_shim() + } + #[cfg(web_sys_unstable_apis)] + fn desired_width(&self) -> u32 { + self.desired_width_shim() + } + #[cfg(web_sys_unstable_apis)] + fn prefer_animation(&self) -> bool { + self.prefer_animation_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PremultiplyAlpha")] + fn premultiply_alpha(&self) -> PremultiplyAlpha { + self.premultiply_alpha_shim() + } + #[cfg(web_sys_unstable_apis)] + fn type_(&self) -> String { + self.type__shim() + } } #[cfg(web_sys_unstable_apis)] impl ImageDecoderInit { @@ -42,8 +155,8 @@ impl ImageDecoderInit { pub fn new(data: &::wasm_bindgen::JsValue, type_: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.data(data); - ret.type_(type_); + Self::data(&mut ret, data); + Self::type_(&mut ret, type_); ret } #[cfg(web_sys_unstable_apis)] @@ -55,7 +168,7 @@ impl ImageDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn color_space_conversion(&mut self, val: ColorSpaceConversion) -> &mut Self { - self.color_space_conversion_shim(val); + self.set_color_space_conversion_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +179,7 @@ impl ImageDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +190,7 @@ impl ImageDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn desired_height(&mut self, val: u32) -> &mut Self { - self.desired_height_shim(val); + self.set_desired_height_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -88,7 +201,7 @@ impl ImageDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn desired_width(&mut self, val: u32) -> &mut Self { - self.desired_width_shim(val); + self.set_desired_width_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -99,7 +212,7 @@ impl ImageDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn prefer_animation(&mut self, val: bool) -> &mut Self { - self.prefer_animation_shim(val); + self.set_prefer_animation_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -111,7 +224,7 @@ impl ImageDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn premultiply_alpha(&mut self, val: PremultiplyAlpha) -> &mut Self { - self.premultiply_alpha_shim(val); + self.set_premultiply_alpha_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -122,7 +235,7 @@ impl ImageDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ImageEncodeOptions.rs b/crates/web-sys/src/features/gen_ImageEncodeOptions.rs index da0a6b82565..5f23e2b9d83 100644 --- a/crates/web-sys/src/features/gen_ImageEncodeOptions.rs +++ b/crates/web-sys/src/features/gen_ImageEncodeOptions.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] pub type ImageEncodeOptions; + #[wasm_bindgen(method, getter = "quality")] + fn quality_shim(this: &ImageEncodeOptions) -> f64; #[wasm_bindgen(method, setter = "quality")] - fn quality_shim(this: &ImageEncodeOptions, val: f64); + fn set_quality_shim(this: &ImageEncodeOptions, val: f64); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &ImageEncodeOptions) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ImageEncodeOptions, val: &str); + fn set_type__shim(this: &ImageEncodeOptions, val: &str); +} +#[doc = "The trait to access properties on the `ImageEncodeOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] +pub trait ImageEncodeOptionsGetters { + #[doc = "Get the `quality` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] + fn quality(&self) -> f64; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] + fn type_(&self) -> String; +} +impl ImageEncodeOptionsGetters for ImageEncodeOptions { + fn quality(&self) -> f64 { + self.quality_shim() + } + fn type_(&self) -> String { + self.type__shim() + } } impl ImageEncodeOptions { #[doc = "Construct a new `ImageEncodeOptions`."] @@ -28,14 +53,14 @@ impl ImageEncodeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] pub fn quality(&mut self, val: f64) -> &mut Self { - self.quality_shim(val); + self.set_quality_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ImageEncodeOptions`*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_InputEventInit.rs b/crates/web-sys/src/features/gen_InputEventInit.rs index 2b79bf4c57a..0ab85215411 100644 --- a/crates/web-sys/src/features/gen_InputEventInit.rs +++ b/crates/web-sys/src/features/gen_InputEventInit.rs @@ -10,28 +10,131 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub type InputEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &InputEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &InputEventInit, val: bool); + fn set_bubbles_shim(this: &InputEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &InputEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &InputEventInit, val: bool); + fn set_cancelable_shim(this: &InputEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &InputEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &InputEventInit, val: bool); + fn set_composed_shim(this: &InputEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &InputEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &InputEventInit, val: i32); + fn set_detail_shim(this: &InputEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &InputEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &InputEventInit, val: Option<&Window>); + fn set_view_shim(this: &InputEventInit, val: Option<&Window>); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &InputEventInit) -> Option; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &InputEventInit, val: Option<&str>); + fn set_data_shim(this: &InputEventInit, val: Option<&str>); + #[cfg(feature = "DataTransfer")] + #[wasm_bindgen(method, getter = "dataTransfer")] + fn data_transfer_shim(this: &InputEventInit) -> Option; #[cfg(feature = "DataTransfer")] #[wasm_bindgen(method, setter = "dataTransfer")] - fn data_transfer_shim(this: &InputEventInit, val: Option<&DataTransfer>); + fn set_data_transfer_shim(this: &InputEventInit, val: Option<&DataTransfer>); + #[wasm_bindgen(method, getter = "inputType")] + fn input_type_shim(this: &InputEventInit) -> String; #[wasm_bindgen(method, setter = "inputType")] - fn input_type_shim(this: &InputEventInit, val: &str); + fn set_input_type_shim(this: &InputEventInit, val: &str); + #[wasm_bindgen(method, getter = "isComposing")] + fn is_composing_shim(this: &InputEventInit) -> bool; #[wasm_bindgen(method, setter = "isComposing")] - fn is_composing_shim(this: &InputEventInit, val: bool); + fn set_is_composing_shim(this: &InputEventInit, val: bool); + #[wasm_bindgen(method, getter = "targetRanges")] + fn target_ranges_shim(this: &InputEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "targetRanges")] - fn target_ranges_shim(this: &InputEventInit, val: &::wasm_bindgen::JsValue); + fn set_target_ranges_shim(this: &InputEventInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `InputEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] +pub trait InputEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`, `Window`*"] + fn view(&self) -> Option; + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + fn data(&self) -> Option; + #[cfg(feature = "DataTransfer")] + #[doc = "Get the `dataTransfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `InputEventInit`*"] + fn data_transfer(&self) -> Option; + #[doc = "Get the `inputType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + fn input_type(&self) -> String; + #[doc = "Get the `isComposing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + fn is_composing(&self) -> bool; + #[doc = "Get the `targetRanges` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] + fn target_ranges(&self) -> ::js_sys::Array; +} +impl InputEventInitGetters for InputEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + fn data(&self) -> Option { + self.data_shim() + } + #[cfg(feature = "DataTransfer")] + fn data_transfer(&self) -> Option { + self.data_transfer_shim() + } + fn input_type(&self) -> String { + self.input_type_shim() + } + fn is_composing(&self) -> bool { + self.is_composing_shim() + } + fn target_ranges(&self) -> ::js_sys::Array { + self.target_ranges_shim() + } } impl InputEventInit { #[doc = "Construct a new `InputEventInit`."] @@ -46,28 +149,28 @@ impl InputEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -75,14 +178,14 @@ impl InputEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub fn data(&mut self, val: Option<&str>) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[cfg(feature = "DataTransfer")] @@ -90,28 +193,28 @@ impl InputEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DataTransfer`, `InputEventInit`*"] pub fn data_transfer(&mut self, val: Option<&DataTransfer>) -> &mut Self { - self.data_transfer_shim(val); + self.set_data_transfer_shim(val); self } #[doc = "Change the `inputType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub fn input_type(&mut self, val: &str) -> &mut Self { - self.input_type_shim(val); + self.set_input_type_shim(val); self } #[doc = "Change the `isComposing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub fn is_composing(&mut self, val: bool) -> &mut Self { - self.is_composing_shim(val); + self.set_is_composing_shim(val); self } #[doc = "Change the `targetRanges` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `InputEventInit`*"] pub fn target_ranges(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.target_ranges_shim(val); + self.set_target_ranges_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs b/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs index caa9de343c9..6a3aa30ce9a 100644 --- a/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs +++ b/crates/web-sys/src/features/gen_IntersectionObserverEntryInit.rs @@ -11,19 +11,83 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] pub type IntersectionObserverEntryInit; #[cfg(feature = "DomRectInit")] + #[wasm_bindgen(method, getter = "boundingClientRect")] + fn bounding_client_rect_shim(this: &IntersectionObserverEntryInit) -> DomRectInit; + #[cfg(feature = "DomRectInit")] #[wasm_bindgen(method, setter = "boundingClientRect")] - fn bounding_client_rect_shim(this: &IntersectionObserverEntryInit, val: &DomRectInit); + fn set_bounding_client_rect_shim(this: &IntersectionObserverEntryInit, val: &DomRectInit); + #[cfg(feature = "DomRectInit")] + #[wasm_bindgen(method, getter = "intersectionRect")] + fn intersection_rect_shim(this: &IntersectionObserverEntryInit) -> DomRectInit; #[cfg(feature = "DomRectInit")] #[wasm_bindgen(method, setter = "intersectionRect")] - fn intersection_rect_shim(this: &IntersectionObserverEntryInit, val: &DomRectInit); + fn set_intersection_rect_shim(this: &IntersectionObserverEntryInit, val: &DomRectInit); + #[cfg(feature = "DomRectInit")] + #[wasm_bindgen(method, getter = "rootBounds")] + fn root_bounds_shim(this: &IntersectionObserverEntryInit) -> DomRectInit; #[cfg(feature = "DomRectInit")] #[wasm_bindgen(method, setter = "rootBounds")] - fn root_bounds_shim(this: &IntersectionObserverEntryInit, val: &DomRectInit); + fn set_root_bounds_shim(this: &IntersectionObserverEntryInit, val: &DomRectInit); + #[cfg(feature = "Element")] + #[wasm_bindgen(method, getter = "target")] + fn target_shim(this: &IntersectionObserverEntryInit) -> Element; #[cfg(feature = "Element")] #[wasm_bindgen(method, setter = "target")] - fn target_shim(this: &IntersectionObserverEntryInit, val: &Element); + fn set_target_shim(this: &IntersectionObserverEntryInit, val: &Element); + #[wasm_bindgen(method, getter = "time")] + fn time_shim(this: &IntersectionObserverEntryInit) -> f64; #[wasm_bindgen(method, setter = "time")] - fn time_shim(this: &IntersectionObserverEntryInit, val: f64); + fn set_time_shim(this: &IntersectionObserverEntryInit, val: f64); +} +#[doc = "The trait to access properties on the `IntersectionObserverEntryInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] +pub trait IntersectionObserverEntryInitGetters { + #[cfg(feature = "DomRectInit")] + #[doc = "Get the `boundingClientRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + fn bounding_client_rect(&self) -> DomRectInit; + #[cfg(feature = "DomRectInit")] + #[doc = "Get the `intersectionRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + fn intersection_rect(&self) -> DomRectInit; + #[cfg(feature = "DomRectInit")] + #[doc = "Get the `rootBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] + fn root_bounds(&self) -> DomRectInit; + #[cfg(feature = "Element")] + #[doc = "Get the `target` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverEntryInit`*"] + fn target(&self) -> Element; + #[doc = "Get the `time` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] + fn time(&self) -> f64; +} +impl IntersectionObserverEntryInitGetters for IntersectionObserverEntryInit { + #[cfg(feature = "DomRectInit")] + fn bounding_client_rect(&self) -> DomRectInit { + self.bounding_client_rect_shim() + } + #[cfg(feature = "DomRectInit")] + fn intersection_rect(&self) -> DomRectInit { + self.intersection_rect_shim() + } + #[cfg(feature = "DomRectInit")] + fn root_bounds(&self) -> DomRectInit { + self.root_bounds_shim() + } + #[cfg(feature = "Element")] + fn target(&self) -> Element { + self.target_shim() + } + fn time(&self) -> f64 { + self.time_shim() + } } impl IntersectionObserverEntryInit { #[cfg(all(feature = "DomRectInit", feature = "Element",))] @@ -39,11 +103,11 @@ impl IntersectionObserverEntryInit { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.bounding_client_rect(bounding_client_rect); - ret.intersection_rect(intersection_rect); - ret.root_bounds(root_bounds); - ret.target(target); - ret.time(time); + Self::bounding_client_rect(&mut ret, bounding_client_rect); + Self::intersection_rect(&mut ret, intersection_rect); + Self::root_bounds(&mut ret, root_bounds); + Self::target(&mut ret, target); + Self::time(&mut ret, time); ret } #[cfg(feature = "DomRectInit")] @@ -51,7 +115,7 @@ impl IntersectionObserverEntryInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] pub fn bounding_client_rect(&mut self, val: &DomRectInit) -> &mut Self { - self.bounding_client_rect_shim(val); + self.set_bounding_client_rect_shim(val); self } #[cfg(feature = "DomRectInit")] @@ -59,7 +123,7 @@ impl IntersectionObserverEntryInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] pub fn intersection_rect(&mut self, val: &DomRectInit) -> &mut Self { - self.intersection_rect_shim(val); + self.set_intersection_rect_shim(val); self } #[cfg(feature = "DomRectInit")] @@ -67,7 +131,7 @@ impl IntersectionObserverEntryInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `IntersectionObserverEntryInit`*"] pub fn root_bounds(&mut self, val: &DomRectInit) -> &mut Self { - self.root_bounds_shim(val); + self.set_root_bounds_shim(val); self } #[cfg(feature = "Element")] @@ -75,14 +139,14 @@ impl IntersectionObserverEntryInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverEntryInit`*"] pub fn target(&mut self, val: &Element) -> &mut Self { - self.target_shim(val); + self.set_target_shim(val); self } #[doc = "Change the `time` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverEntryInit`*"] pub fn time(&mut self, val: f64) -> &mut Self { - self.time_shim(val); + self.set_time_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IntersectionObserverInit.rs b/crates/web-sys/src/features/gen_IntersectionObserverInit.rs index 13c7411b698..b89169bf9dc 100644 --- a/crates/web-sys/src/features/gen_IntersectionObserverInit.rs +++ b/crates/web-sys/src/features/gen_IntersectionObserverInit.rs @@ -11,12 +11,49 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] pub type IntersectionObserverInit; #[cfg(feature = "Element")] + #[wasm_bindgen(method, getter = "root")] + fn root_shim(this: &IntersectionObserverInit) -> Option; + #[cfg(feature = "Element")] #[wasm_bindgen(method, setter = "root")] - fn root_shim(this: &IntersectionObserverInit, val: Option<&Element>); + fn set_root_shim(this: &IntersectionObserverInit, val: Option<&Element>); + #[wasm_bindgen(method, getter = "rootMargin")] + fn root_margin_shim(this: &IntersectionObserverInit) -> String; #[wasm_bindgen(method, setter = "rootMargin")] - fn root_margin_shim(this: &IntersectionObserverInit, val: &str); + fn set_root_margin_shim(this: &IntersectionObserverInit, val: &str); + #[wasm_bindgen(method, getter = "threshold")] + fn threshold_shim(this: &IntersectionObserverInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "threshold")] - fn threshold_shim(this: &IntersectionObserverInit, val: &::wasm_bindgen::JsValue); + fn set_threshold_shim(this: &IntersectionObserverInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `IntersectionObserverInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] +pub trait IntersectionObserverInitGetters { + #[cfg(feature = "Element")] + #[doc = "Get the `root` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverInit`*"] + fn root(&self) -> Option; + #[doc = "Get the `rootMargin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] + fn root_margin(&self) -> String; + #[doc = "Get the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] + fn threshold(&self) -> ::wasm_bindgen::JsValue; +} +impl IntersectionObserverInitGetters for IntersectionObserverInit { + #[cfg(feature = "Element")] + fn root(&self) -> Option { + self.root_shim() + } + fn root_margin(&self) -> String { + self.root_margin_shim() + } + fn threshold(&self) -> ::wasm_bindgen::JsValue { + self.threshold_shim() + } } impl IntersectionObserverInit { #[doc = "Construct a new `IntersectionObserverInit`."] @@ -32,21 +69,21 @@ impl IntersectionObserverInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Element`, `IntersectionObserverInit`*"] pub fn root(&mut self, val: Option<&Element>) -> &mut Self { - self.root_shim(val); + self.set_root_shim(val); self } #[doc = "Change the `rootMargin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] pub fn root_margin(&mut self, val: &str) -> &mut Self { - self.root_margin_shim(val); + self.set_root_margin_shim(val); self } #[doc = "Change the `threshold` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IntersectionObserverInit`*"] pub fn threshold(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.threshold_shim(val); + self.set_threshold_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IsInputPendingOptions.rs b/crates/web-sys/src/features/gen_IsInputPendingOptions.rs index 2aba174f2da..9ae033478d3 100644 --- a/crates/web-sys/src/features/gen_IsInputPendingOptions.rs +++ b/crates/web-sys/src/features/gen_IsInputPendingOptions.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type IsInputPendingOptions; + #[wasm_bindgen(method, getter = "includeContinuous")] + fn include_continuous_shim(this: &IsInputPendingOptions) -> bool; #[wasm_bindgen(method, setter = "includeContinuous")] - fn include_continuous_shim(this: &IsInputPendingOptions, val: bool); + fn set_include_continuous_shim(this: &IsInputPendingOptions, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `IsInputPendingOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IsInputPendingOptions`*"] +pub trait IsInputPendingOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `includeContinuous` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IsInputPendingOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn include_continuous(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl IsInputPendingOptionsGetters for IsInputPendingOptions { + #[cfg(web_sys_unstable_apis)] + fn include_continuous(&self) -> bool { + self.include_continuous_shim() + } } #[cfg(web_sys_unstable_apis)] impl IsInputPendingOptions { @@ -38,7 +61,7 @@ impl IsInputPendingOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn include_continuous(&mut self, val: bool) -> &mut Self { - self.include_continuous_shim(val); + self.set_include_continuous_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs b/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs index 85b0c3497f9..9947649e1d3 100644 --- a/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs +++ b/crates/web-sys/src/features/gen_IterableKeyAndValueResult.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] pub type IterableKeyAndValueResult; + #[wasm_bindgen(method, getter = "done")] + fn done_shim(this: &IterableKeyAndValueResult) -> bool; #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &IterableKeyAndValueResult, val: bool); + fn set_done_shim(this: &IterableKeyAndValueResult, val: bool); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &IterableKeyAndValueResult) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &IterableKeyAndValueResult, val: &::wasm_bindgen::JsValue); + fn set_value_shim(this: &IterableKeyAndValueResult, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `IterableKeyAndValueResult` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] +pub trait IterableKeyAndValueResultGetters { + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] + fn done(&self) -> bool; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] + fn value(&self) -> ::js_sys::Array; +} +impl IterableKeyAndValueResultGetters for IterableKeyAndValueResult { + fn done(&self) -> bool { + self.done_shim() + } + fn value(&self) -> ::js_sys::Array { + self.value_shim() + } } impl IterableKeyAndValueResult { #[doc = "Construct a new `IterableKeyAndValueResult`."] @@ -28,14 +53,14 @@ impl IterableKeyAndValueResult { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done_shim(val); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyAndValueResult`*"] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs b/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs index 7e76fde4bea..5e9bb8b1ffd 100644 --- a/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs +++ b/crates/web-sys/src/features/gen_IterableKeyOrValueResult.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] pub type IterableKeyOrValueResult; + #[wasm_bindgen(method, getter = "done")] + fn done_shim(this: &IterableKeyOrValueResult) -> bool; #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &IterableKeyOrValueResult, val: bool); + fn set_done_shim(this: &IterableKeyOrValueResult, val: bool); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &IterableKeyOrValueResult) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &IterableKeyOrValueResult, val: &::wasm_bindgen::JsValue); + fn set_value_shim(this: &IterableKeyOrValueResult, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `IterableKeyOrValueResult` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] +pub trait IterableKeyOrValueResultGetters { + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] + fn done(&self) -> bool; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] + fn value(&self) -> ::wasm_bindgen::JsValue; +} +impl IterableKeyOrValueResultGetters for IterableKeyOrValueResult { + fn done(&self) -> bool { + self.done_shim() + } + fn value(&self) -> ::wasm_bindgen::JsValue { + self.value_shim() + } } impl IterableKeyOrValueResult { #[doc = "Construct a new `IterableKeyOrValueResult`."] @@ -28,14 +53,14 @@ impl IterableKeyOrValueResult { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done_shim(val); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterableKeyOrValueResult`*"] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_JsonWebKey.rs b/crates/web-sys/src/features/gen_JsonWebKey.rs index 04e6cfb11a0..f040121476a 100644 --- a/crates/web-sys/src/features/gen_JsonWebKey.rs +++ b/crates/web-sys/src/features/gen_JsonWebKey.rs @@ -10,42 +10,211 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub type JsonWebKey; + #[wasm_bindgen(method, getter = "alg")] + fn alg_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "alg")] - fn alg_shim(this: &JsonWebKey, val: &str); + fn set_alg_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "crv")] + fn crv_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "crv")] - fn crv_shim(this: &JsonWebKey, val: &str); + fn set_crv_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "d")] + fn d_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "d")] - fn d_shim(this: &JsonWebKey, val: &str); + fn set_d_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "dp")] + fn dp_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "dp")] - fn dp_shim(this: &JsonWebKey, val: &str); + fn set_dp_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "dq")] + fn dq_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "dq")] - fn dq_shim(this: &JsonWebKey, val: &str); + fn set_dq_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "e")] + fn e_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "e")] - fn e_shim(this: &JsonWebKey, val: &str); + fn set_e_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "ext")] + fn ext_shim(this: &JsonWebKey) -> bool; #[wasm_bindgen(method, setter = "ext")] - fn ext_shim(this: &JsonWebKey, val: bool); + fn set_ext_shim(this: &JsonWebKey, val: bool); + #[wasm_bindgen(method, getter = "k")] + fn k_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "k")] - fn k_shim(this: &JsonWebKey, val: &str); + fn set_k_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "key_ops")] + fn key_ops_shim(this: &JsonWebKey) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "key_ops")] - fn key_ops_shim(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + fn set_key_ops_shim(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "kty")] + fn kty_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "kty")] - fn kty_shim(this: &JsonWebKey, val: &str); + fn set_kty_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "n")] + fn n_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "n")] - fn n_shim(this: &JsonWebKey, val: &str); + fn set_n_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "oth")] + fn oth_shim(this: &JsonWebKey) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "oth")] - fn oth_shim(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + fn set_oth_shim(this: &JsonWebKey, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "p")] + fn p_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "p")] - fn p_shim(this: &JsonWebKey, val: &str); + fn set_p_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "q")] + fn q_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "q")] - fn q_shim(this: &JsonWebKey, val: &str); + fn set_q_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "qi")] + fn qi_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "qi")] - fn qi_shim(this: &JsonWebKey, val: &str); + fn set_qi_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "use")] + fn use__shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "use")] - fn use__shim(this: &JsonWebKey, val: &str); + fn set_use__shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "x")] + fn x_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &JsonWebKey, val: &str); + fn set_x_shim(this: &JsonWebKey, val: &str); + #[wasm_bindgen(method, getter = "y")] + fn y_shim(this: &JsonWebKey) -> String; #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &JsonWebKey, val: &str); + fn set_y_shim(this: &JsonWebKey, val: &str); +} +#[doc = "The trait to access properties on the `JsonWebKey` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] +pub trait JsonWebKeyGetters { + #[doc = "Get the `alg` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn alg(&self) -> String; + #[doc = "Get the `crv` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn crv(&self) -> String; + #[doc = "Get the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn d(&self) -> String; + #[doc = "Get the `dp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn dp(&self) -> String; + #[doc = "Get the `dq` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn dq(&self) -> String; + #[doc = "Get the `e` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn e(&self) -> String; + #[doc = "Get the `ext` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn ext(&self) -> bool; + #[doc = "Get the `k` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn k(&self) -> String; + #[doc = "Get the `key_ops` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn key_ops(&self) -> ::js_sys::Array; + #[doc = "Get the `kty` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn kty(&self) -> String; + #[doc = "Get the `n` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn n(&self) -> String; + #[doc = "Get the `oth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn oth(&self) -> ::js_sys::Array; + #[doc = "Get the `p` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn p(&self) -> String; + #[doc = "Get the `q` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn q(&self) -> String; + #[doc = "Get the `qi` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn qi(&self) -> String; + #[doc = "Get the `use` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn use_(&self) -> String; + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn x(&self) -> String; + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] + fn y(&self) -> String; +} +impl JsonWebKeyGetters for JsonWebKey { + fn alg(&self) -> String { + self.alg_shim() + } + fn crv(&self) -> String { + self.crv_shim() + } + fn d(&self) -> String { + self.d_shim() + } + fn dp(&self) -> String { + self.dp_shim() + } + fn dq(&self) -> String { + self.dq_shim() + } + fn e(&self) -> String { + self.e_shim() + } + fn ext(&self) -> bool { + self.ext_shim() + } + fn k(&self) -> String { + self.k_shim() + } + fn key_ops(&self) -> ::js_sys::Array { + self.key_ops_shim() + } + fn kty(&self) -> String { + self.kty_shim() + } + fn n(&self) -> String { + self.n_shim() + } + fn oth(&self) -> ::js_sys::Array { + self.oth_shim() + } + fn p(&self) -> String { + self.p_shim() + } + fn q(&self) -> String { + self.q_shim() + } + fn qi(&self) -> String { + self.qi_shim() + } + fn use_(&self) -> String { + self.use__shim() + } + fn x(&self) -> String { + self.x_shim() + } + fn y(&self) -> String { + self.y_shim() + } } impl JsonWebKey { #[doc = "Construct a new `JsonWebKey`."] @@ -54,133 +223,133 @@ impl JsonWebKey { pub fn new(kty: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.kty(kty); + Self::kty(&mut ret, kty); ret } #[doc = "Change the `alg` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn alg(&mut self, val: &str) -> &mut Self { - self.alg_shim(val); + self.set_alg_shim(val); self } #[doc = "Change the `crv` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn crv(&mut self, val: &str) -> &mut Self { - self.crv_shim(val); + self.set_crv_shim(val); self } #[doc = "Change the `d` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn d(&mut self, val: &str) -> &mut Self { - self.d_shim(val); + self.set_d_shim(val); self } #[doc = "Change the `dp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn dp(&mut self, val: &str) -> &mut Self { - self.dp_shim(val); + self.set_dp_shim(val); self } #[doc = "Change the `dq` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn dq(&mut self, val: &str) -> &mut Self { - self.dq_shim(val); + self.set_dq_shim(val); self } #[doc = "Change the `e` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn e(&mut self, val: &str) -> &mut Self { - self.e_shim(val); + self.set_e_shim(val); self } #[doc = "Change the `ext` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn ext(&mut self, val: bool) -> &mut Self { - self.ext_shim(val); + self.set_ext_shim(val); self } #[doc = "Change the `k` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn k(&mut self, val: &str) -> &mut Self { - self.k_shim(val); + self.set_k_shim(val); self } #[doc = "Change the `key_ops` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn key_ops(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.key_ops_shim(val); + self.set_key_ops_shim(val); self } #[doc = "Change the `kty` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn kty(&mut self, val: &str) -> &mut Self { - self.kty_shim(val); + self.set_kty_shim(val); self } #[doc = "Change the `n` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn n(&mut self, val: &str) -> &mut Self { - self.n_shim(val); + self.set_n_shim(val); self } #[doc = "Change the `oth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn oth(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.oth_shim(val); + self.set_oth_shim(val); self } #[doc = "Change the `p` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn p(&mut self, val: &str) -> &mut Self { - self.p_shim(val); + self.set_p_shim(val); self } #[doc = "Change the `q` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn q(&mut self, val: &str) -> &mut Self { - self.q_shim(val); + self.set_q_shim(val); self } #[doc = "Change the `qi` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn qi(&mut self, val: &str) -> &mut Self { - self.qi_shim(val); + self.set_qi_shim(val); self } #[doc = "Change the `use` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn use_(&mut self, val: &str) -> &mut Self { - self.use__shim(val); + self.set_use__shim(val); self } #[doc = "Change the `x` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn x(&mut self, val: &str) -> &mut Self { - self.x_shim(val); + self.set_x_shim(val); self } #[doc = "Change the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `JsonWebKey`*"] pub fn y(&mut self, val: &str) -> &mut Self { - self.y_shim(val); + self.set_y_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyAlgorithm.rs b/crates/web-sys/src/features/gen_KeyAlgorithm.rs index 101595bb222..ebee6c500bc 100644 --- a/crates/web-sys/src/features/gen_KeyAlgorithm.rs +++ b/crates/web-sys/src/features/gen_KeyAlgorithm.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] pub type KeyAlgorithm; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &KeyAlgorithm) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &KeyAlgorithm, val: &str); + fn set_name_shim(this: &KeyAlgorithm, val: &str); +} +#[doc = "The trait to access properties on the `KeyAlgorithm` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] +pub trait KeyAlgorithmGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] + fn name(&self) -> String; +} +impl KeyAlgorithmGetters for KeyAlgorithm { + fn name(&self) -> String { + self.name_shim() + } } impl KeyAlgorithm { #[doc = "Construct a new `KeyAlgorithm`."] @@ -20,14 +36,14 @@ impl KeyAlgorithm { pub fn new(name: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyAlgorithm`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyIdsInitData.rs b/crates/web-sys/src/features/gen_KeyIdsInitData.rs index 1f4d7767a4a..78e6057eaf2 100644 --- a/crates/web-sys/src/features/gen_KeyIdsInitData.rs +++ b/crates/web-sys/src/features/gen_KeyIdsInitData.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] pub type KeyIdsInitData; + #[wasm_bindgen(method, getter = "kids")] + fn kids_shim(this: &KeyIdsInitData) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "kids")] - fn kids_shim(this: &KeyIdsInitData, val: &::wasm_bindgen::JsValue); + fn set_kids_shim(this: &KeyIdsInitData, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `KeyIdsInitData` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] +pub trait KeyIdsInitDataGetters { + #[doc = "Get the `kids` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] + fn kids(&self) -> ::js_sys::Array; +} +impl KeyIdsInitDataGetters for KeyIdsInitData { + fn kids(&self) -> ::js_sys::Array { + self.kids_shim() + } } impl KeyIdsInitData { #[doc = "Construct a new `KeyIdsInitData`."] @@ -20,14 +36,14 @@ impl KeyIdsInitData { pub fn new(kids: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.kids(kids); + Self::kids(&mut ret, kids); ret } #[doc = "Change the `kids` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyIdsInitData`*"] pub fn kids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.kids_shim(val); + self.set_kids_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyboardEventInit.rs b/crates/web-sys/src/features/gen_KeyboardEventInit.rs index 3d777d4d7fb..2d604465395 100644 --- a/crates/web-sys/src/features/gen_KeyboardEventInit.rs +++ b/crates/web-sys/src/features/gen_KeyboardEventInit.rs @@ -10,59 +10,303 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub type KeyboardEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &KeyboardEventInit, val: bool); + fn set_bubbles_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &KeyboardEventInit, val: bool); + fn set_cancelable_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &KeyboardEventInit, val: bool); + fn set_composed_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &KeyboardEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &KeyboardEventInit, val: i32); + fn set_detail_shim(this: &KeyboardEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &KeyboardEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &KeyboardEventInit, val: Option<&Window>); + fn set_view_shim(this: &KeyboardEventInit, val: Option<&Window>); + #[wasm_bindgen(method, getter = "altKey")] + fn alt_key_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &KeyboardEventInit, val: bool); + fn set_alt_key_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "ctrlKey")] + fn ctrl_key_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &KeyboardEventInit, val: bool); + fn set_ctrl_key_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "metaKey")] + fn meta_key_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &KeyboardEventInit, val: bool); + fn set_meta_key_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierAltGraph")] + fn modifier_alt_graph_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &KeyboardEventInit, val: bool); + fn set_modifier_alt_graph_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierCapsLock")] + fn modifier_caps_lock_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &KeyboardEventInit, val: bool); + fn set_modifier_caps_lock_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFn")] + fn modifier_fn_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &KeyboardEventInit, val: bool); + fn set_modifier_fn_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFnLock")] + fn modifier_fn_lock_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &KeyboardEventInit, val: bool); + fn set_modifier_fn_lock_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierNumLock")] + fn modifier_num_lock_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &KeyboardEventInit, val: bool); + fn set_modifier_num_lock_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierOS")] + fn modifier_os_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &KeyboardEventInit, val: bool); + fn set_modifier_os_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierScrollLock")] + fn modifier_scroll_lock_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &KeyboardEventInit, val: bool); + fn set_modifier_scroll_lock_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbol")] + fn modifier_symbol_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &KeyboardEventInit, val: bool); + fn set_modifier_symbol_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + fn modifier_symbol_lock_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &KeyboardEventInit, val: bool); + fn set_modifier_symbol_lock_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "shiftKey")] + fn shift_key_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &KeyboardEventInit, val: bool); + fn set_shift_key_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "charCode")] + fn char_code_shim(this: &KeyboardEventInit) -> u32; #[wasm_bindgen(method, setter = "charCode")] - fn char_code_shim(this: &KeyboardEventInit, val: u32); + fn set_char_code_shim(this: &KeyboardEventInit, val: u32); + #[wasm_bindgen(method, getter = "code")] + fn code_shim(this: &KeyboardEventInit) -> String; #[wasm_bindgen(method, setter = "code")] - fn code_shim(this: &KeyboardEventInit, val: &str); + fn set_code_shim(this: &KeyboardEventInit, val: &str); + #[wasm_bindgen(method, getter = "isComposing")] + fn is_composing_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "isComposing")] - fn is_composing_shim(this: &KeyboardEventInit, val: bool); + fn set_is_composing_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "key")] + fn key_shim(this: &KeyboardEventInit) -> String; #[wasm_bindgen(method, setter = "key")] - fn key_shim(this: &KeyboardEventInit, val: &str); + fn set_key_shim(this: &KeyboardEventInit, val: &str); + #[wasm_bindgen(method, getter = "keyCode")] + fn key_code_shim(this: &KeyboardEventInit) -> u32; #[wasm_bindgen(method, setter = "keyCode")] - fn key_code_shim(this: &KeyboardEventInit, val: u32); + fn set_key_code_shim(this: &KeyboardEventInit, val: u32); + #[wasm_bindgen(method, getter = "location")] + fn location_shim(this: &KeyboardEventInit) -> u32; #[wasm_bindgen(method, setter = "location")] - fn location_shim(this: &KeyboardEventInit, val: u32); + fn set_location_shim(this: &KeyboardEventInit, val: u32); + #[wasm_bindgen(method, getter = "repeat")] + fn repeat_shim(this: &KeyboardEventInit) -> bool; #[wasm_bindgen(method, setter = "repeat")] - fn repeat_shim(this: &KeyboardEventInit, val: bool); + fn set_repeat_shim(this: &KeyboardEventInit, val: bool); + #[wasm_bindgen(method, getter = "which")] + fn which_shim(this: &KeyboardEventInit) -> u32; #[wasm_bindgen(method, setter = "which")] - fn which_shim(this: &KeyboardEventInit, val: u32); + fn set_which_shim(this: &KeyboardEventInit, val: u32); +} +#[doc = "The trait to access properties on the `KeyboardEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] +pub trait KeyboardEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`, `Window`*"] + fn view(&self) -> Option; + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn alt_key(&self) -> bool; + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn ctrl_key(&self) -> bool; + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn meta_key(&self) -> bool; + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn modifier_alt_graph(&self) -> bool; + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn modifier_caps_lock(&self) -> bool; + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn modifier_fn(&self) -> bool; + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn modifier_fn_lock(&self) -> bool; + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn modifier_num_lock(&self) -> bool; + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn modifier_os(&self) -> bool; + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn modifier_scroll_lock(&self) -> bool; + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn modifier_symbol(&self) -> bool; + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn modifier_symbol_lock(&self) -> bool; + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn shift_key(&self) -> bool; + #[doc = "Get the `charCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn char_code(&self) -> u32; + #[doc = "Get the `code` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn code(&self) -> String; + #[doc = "Get the `isComposing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn is_composing(&self) -> bool; + #[doc = "Get the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn key(&self) -> String; + #[doc = "Get the `keyCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn key_code(&self) -> u32; + #[doc = "Get the `location` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn location(&self) -> u32; + #[doc = "Get the `repeat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn repeat(&self) -> bool; + #[doc = "Get the `which` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] + fn which(&self) -> u32; +} +impl KeyboardEventInitGetters for KeyboardEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + fn alt_key(&self) -> bool { + self.alt_key_shim() + } + fn ctrl_key(&self) -> bool { + self.ctrl_key_shim() + } + fn meta_key(&self) -> bool { + self.meta_key_shim() + } + fn modifier_alt_graph(&self) -> bool { + self.modifier_alt_graph_shim() + } + fn modifier_caps_lock(&self) -> bool { + self.modifier_caps_lock_shim() + } + fn modifier_fn(&self) -> bool { + self.modifier_fn_shim() + } + fn modifier_fn_lock(&self) -> bool { + self.modifier_fn_lock_shim() + } + fn modifier_num_lock(&self) -> bool { + self.modifier_num_lock_shim() + } + fn modifier_os(&self) -> bool { + self.modifier_os_shim() + } + fn modifier_scroll_lock(&self) -> bool { + self.modifier_scroll_lock_shim() + } + fn modifier_symbol(&self) -> bool { + self.modifier_symbol_shim() + } + fn modifier_symbol_lock(&self) -> bool { + self.modifier_symbol_lock_shim() + } + fn shift_key(&self) -> bool { + self.shift_key_shim() + } + fn char_code(&self) -> u32 { + self.char_code_shim() + } + fn code(&self) -> String { + self.code_shim() + } + fn is_composing(&self) -> bool { + self.is_composing_shim() + } + fn key(&self) -> String { + self.key_shim() + } + fn key_code(&self) -> u32 { + self.key_code_shim() + } + fn location(&self) -> u32 { + self.location_shim() + } + fn repeat(&self) -> bool { + self.repeat_shim() + } + fn which(&self) -> u32 { + self.which_shim() + } } impl KeyboardEventInit { #[doc = "Construct a new `KeyboardEventInit`."] @@ -77,28 +321,28 @@ impl KeyboardEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -106,154 +350,154 @@ impl KeyboardEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[doc = "Change the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key_shim(val); self } #[doc = "Change the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key_shim(val); self } #[doc = "Change the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key_shim(val); self } #[doc = "Change the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph_shim(val); self } #[doc = "Change the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock_shim(val); self } #[doc = "Change the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn_shim(val); self } #[doc = "Change the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock_shim(val); self } #[doc = "Change the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock_shim(val); self } #[doc = "Change the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os_shim(val); self } #[doc = "Change the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock_shim(val); self } #[doc = "Change the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol_shim(val); self } #[doc = "Change the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock_shim(val); self } #[doc = "Change the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key_shim(val); self } #[doc = "Change the `charCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn char_code(&mut self, val: u32) -> &mut Self { - self.char_code_shim(val); + self.set_char_code_shim(val); self } #[doc = "Change the `code` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn code(&mut self, val: &str) -> &mut Self { - self.code_shim(val); + self.set_code_shim(val); self } #[doc = "Change the `isComposing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn is_composing(&mut self, val: bool) -> &mut Self { - self.is_composing_shim(val); + self.set_is_composing_shim(val); self } #[doc = "Change the `key` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn key(&mut self, val: &str) -> &mut Self { - self.key_shim(val); + self.set_key_shim(val); self } #[doc = "Change the `keyCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn key_code(&mut self, val: u32) -> &mut Self { - self.key_code_shim(val); + self.set_key_code_shim(val); self } #[doc = "Change the `location` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn location(&mut self, val: u32) -> &mut Self { - self.location_shim(val); + self.set_location_shim(val); self } #[doc = "Change the `repeat` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn repeat(&mut self, val: bool) -> &mut Self { - self.repeat_shim(val); + self.set_repeat_shim(val); self } #[doc = "Change the `which` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyboardEventInit`*"] pub fn which(&mut self, val: u32) -> &mut Self { - self.which_shim(val); + self.set_which_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs b/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs index 7685c6af482..93e872a0f61 100644 --- a/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs +++ b/crates/web-sys/src/features/gen_KeyframeAnimationOptions.rs @@ -14,35 +14,230 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type KeyframeAnimationOptions; + #[wasm_bindgen(method, getter = "delay")] + fn delay_shim(this: &KeyframeAnimationOptions) -> f64; #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &KeyframeAnimationOptions, val: f64); + fn set_delay_shim(this: &KeyframeAnimationOptions, val: f64); + #[cfg(feature = "PlaybackDirection")] + #[wasm_bindgen(method, getter = "direction")] + fn direction_shim(this: &KeyframeAnimationOptions) -> PlaybackDirection; #[cfg(feature = "PlaybackDirection")] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &KeyframeAnimationOptions, val: PlaybackDirection); + fn set_direction_shim(this: &KeyframeAnimationOptions, val: PlaybackDirection); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &KeyframeAnimationOptions) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &KeyframeAnimationOptions, val: &::wasm_bindgen::JsValue); + fn set_duration_shim(this: &KeyframeAnimationOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "easing")] + fn easing_shim(this: &KeyframeAnimationOptions) -> String; #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &KeyframeAnimationOptions, val: &str); + fn set_easing_shim(this: &KeyframeAnimationOptions, val: &str); + #[wasm_bindgen(method, getter = "endDelay")] + fn end_delay_shim(this: &KeyframeAnimationOptions) -> f64; #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &KeyframeAnimationOptions, val: f64); + fn set_end_delay_shim(this: &KeyframeAnimationOptions, val: f64); + #[cfg(feature = "FillMode")] + #[wasm_bindgen(method, getter = "fill")] + fn fill_shim(this: &KeyframeAnimationOptions) -> FillMode; #[cfg(feature = "FillMode")] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &KeyframeAnimationOptions, val: FillMode); + fn set_fill_shim(this: &KeyframeAnimationOptions, val: FillMode); + #[wasm_bindgen(method, getter = "iterationStart")] + fn iteration_start_shim(this: &KeyframeAnimationOptions) -> f64; #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &KeyframeAnimationOptions, val: f64); + fn set_iteration_start_shim(this: &KeyframeAnimationOptions, val: f64); + #[wasm_bindgen(method, getter = "iterations")] + fn iterations_shim(this: &KeyframeAnimationOptions) -> f64; #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &KeyframeAnimationOptions, val: f64); + fn set_iterations_shim(this: &KeyframeAnimationOptions, val: f64); + #[cfg(feature = "CompositeOperation")] + #[wasm_bindgen(method, getter = "composite")] + fn composite_shim(this: &KeyframeAnimationOptions) -> CompositeOperation; #[cfg(feature = "CompositeOperation")] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &KeyframeAnimationOptions, val: CompositeOperation); + fn set_composite_shim(this: &KeyframeAnimationOptions, val: CompositeOperation); + #[cfg(feature = "IterationCompositeOperation")] + #[wasm_bindgen(method, getter = "iterationComposite")] + fn iteration_composite_shim(this: &KeyframeAnimationOptions) -> IterationCompositeOperation; #[cfg(feature = "IterationCompositeOperation")] #[wasm_bindgen(method, setter = "iterationComposite")] - fn iteration_composite_shim(this: &KeyframeAnimationOptions, val: IterationCompositeOperation); + fn set_iteration_composite_shim( + this: &KeyframeAnimationOptions, + val: IterationCompositeOperation, + ); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &KeyframeAnimationOptions) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &KeyframeAnimationOptions, val: &str); + fn set_id_shim(this: &KeyframeAnimationOptions, val: &str); + #[cfg(feature = "AnimationTimeline")] + #[wasm_bindgen(method, getter = "timeline")] + fn timeline_shim(this: &KeyframeAnimationOptions) -> Option; #[cfg(feature = "AnimationTimeline")] #[wasm_bindgen(method, setter = "timeline")] - fn timeline_shim(this: &KeyframeAnimationOptions, val: Option<&AnimationTimeline>); + fn set_timeline_shim(this: &KeyframeAnimationOptions, val: Option<&AnimationTimeline>); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `KeyframeAnimationOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] +pub trait KeyframeAnimationOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn delay(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`, `PlaybackDirection`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn direction(&self) -> PlaybackDirection; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn duration(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn easing(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn end_delay(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn fill(&self) -> FillMode; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn iteration_start(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn iterations(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composite(&self) -> CompositeOperation; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "IterationCompositeOperation")] + #[doc = "Get the `iterationComposite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn iteration_composite(&self) -> IterationCompositeOperation; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn id(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AnimationTimeline")] + #[doc = "Get the `timeline` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AnimationTimeline`, `KeyframeAnimationOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timeline(&self) -> Option; +} +#[cfg(web_sys_unstable_apis)] +impl KeyframeAnimationOptionsGetters for KeyframeAnimationOptions { + #[cfg(web_sys_unstable_apis)] + fn delay(&self) -> f64 { + self.delay_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PlaybackDirection")] + fn direction(&self) -> PlaybackDirection { + self.direction_shim() + } + #[cfg(web_sys_unstable_apis)] + fn duration(&self) -> ::wasm_bindgen::JsValue { + self.duration_shim() + } + #[cfg(web_sys_unstable_apis)] + fn easing(&self) -> String { + self.easing_shim() + } + #[cfg(web_sys_unstable_apis)] + fn end_delay(&self) -> f64 { + self.end_delay_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FillMode")] + fn fill(&self) -> FillMode { + self.fill_shim() + } + #[cfg(web_sys_unstable_apis)] + fn iteration_start(&self) -> f64 { + self.iteration_start_shim() + } + #[cfg(web_sys_unstable_apis)] + fn iterations(&self) -> f64 { + self.iterations_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "CompositeOperation")] + fn composite(&self) -> CompositeOperation { + self.composite_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "IterationCompositeOperation")] + fn iteration_composite(&self) -> IterationCompositeOperation { + self.iteration_composite_shim() + } + #[cfg(web_sys_unstable_apis)] + fn id(&self) -> String { + self.id_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AnimationTimeline")] + fn timeline(&self) -> Option { + self.timeline_shim() + } } #[cfg(web_sys_unstable_apis)] impl KeyframeAnimationOptions { @@ -65,7 +260,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +272,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -88,7 +283,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -99,7 +294,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -110,7 +305,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); + self.set_end_delay_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -122,7 +317,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); + self.set_fill_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -133,7 +328,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); + self.set_iteration_start_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -144,7 +339,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); + self.set_iterations_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -156,7 +351,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { - self.composite_shim(val); + self.set_composite_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -168,7 +363,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self { - self.iteration_composite_shim(val); + self.set_iteration_composite_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -179,7 +374,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -191,7 +386,7 @@ impl KeyframeAnimationOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timeline(&mut self, val: Option<&AnimationTimeline>) -> &mut Self { - self.timeline_shim(val); + self.set_timeline_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs b/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs index 94c35ecedd4..9d27cc70ecb 100644 --- a/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs +++ b/crates/web-sys/src/features/gen_KeyframeEffectOptions.rs @@ -10,30 +10,139 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] pub type KeyframeEffectOptions; + #[wasm_bindgen(method, getter = "delay")] + fn delay_shim(this: &KeyframeEffectOptions) -> f64; #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &KeyframeEffectOptions, val: f64); + fn set_delay_shim(this: &KeyframeEffectOptions, val: f64); + #[cfg(feature = "PlaybackDirection")] + #[wasm_bindgen(method, getter = "direction")] + fn direction_shim(this: &KeyframeEffectOptions) -> PlaybackDirection; #[cfg(feature = "PlaybackDirection")] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &KeyframeEffectOptions, val: PlaybackDirection); + fn set_direction_shim(this: &KeyframeEffectOptions, val: PlaybackDirection); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &KeyframeEffectOptions) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &KeyframeEffectOptions, val: &::wasm_bindgen::JsValue); + fn set_duration_shim(this: &KeyframeEffectOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "easing")] + fn easing_shim(this: &KeyframeEffectOptions) -> String; #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &KeyframeEffectOptions, val: &str); + fn set_easing_shim(this: &KeyframeEffectOptions, val: &str); + #[wasm_bindgen(method, getter = "endDelay")] + fn end_delay_shim(this: &KeyframeEffectOptions) -> f64; #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &KeyframeEffectOptions, val: f64); + fn set_end_delay_shim(this: &KeyframeEffectOptions, val: f64); + #[cfg(feature = "FillMode")] + #[wasm_bindgen(method, getter = "fill")] + fn fill_shim(this: &KeyframeEffectOptions) -> FillMode; #[cfg(feature = "FillMode")] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &KeyframeEffectOptions, val: FillMode); + fn set_fill_shim(this: &KeyframeEffectOptions, val: FillMode); + #[wasm_bindgen(method, getter = "iterationStart")] + fn iteration_start_shim(this: &KeyframeEffectOptions) -> f64; #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &KeyframeEffectOptions, val: f64); + fn set_iteration_start_shim(this: &KeyframeEffectOptions, val: f64); + #[wasm_bindgen(method, getter = "iterations")] + fn iterations_shim(this: &KeyframeEffectOptions) -> f64; #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &KeyframeEffectOptions, val: f64); + fn set_iterations_shim(this: &KeyframeEffectOptions, val: f64); + #[cfg(feature = "CompositeOperation")] + #[wasm_bindgen(method, getter = "composite")] + fn composite_shim(this: &KeyframeEffectOptions) -> CompositeOperation; #[cfg(feature = "CompositeOperation")] #[wasm_bindgen(method, setter = "composite")] - fn composite_shim(this: &KeyframeEffectOptions, val: CompositeOperation); + fn set_composite_shim(this: &KeyframeEffectOptions, val: CompositeOperation); + #[cfg(feature = "IterationCompositeOperation")] + #[wasm_bindgen(method, getter = "iterationComposite")] + fn iteration_composite_shim(this: &KeyframeEffectOptions) -> IterationCompositeOperation; #[cfg(feature = "IterationCompositeOperation")] #[wasm_bindgen(method, setter = "iterationComposite")] - fn iteration_composite_shim(this: &KeyframeEffectOptions, val: IterationCompositeOperation); + fn set_iteration_composite_shim(this: &KeyframeEffectOptions, val: IterationCompositeOperation); +} +#[doc = "The trait to access properties on the `KeyframeEffectOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] +pub trait KeyframeEffectOptionsGetters { + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + fn delay(&self) -> f64; + #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`, `PlaybackDirection`*"] + fn direction(&self) -> PlaybackDirection; + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + fn duration(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + fn easing(&self) -> String; + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + fn end_delay(&self) -> f64; + #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"] + fn fill(&self) -> FillMode; + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + fn iteration_start(&self) -> f64; + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] + fn iterations(&self) -> f64; + #[cfg(feature = "CompositeOperation")] + #[doc = "Get the `composite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"] + fn composite(&self) -> CompositeOperation; + #[cfg(feature = "IterationCompositeOperation")] + #[doc = "Get the `iterationComposite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"] + fn iteration_composite(&self) -> IterationCompositeOperation; +} +impl KeyframeEffectOptionsGetters for KeyframeEffectOptions { + fn delay(&self) -> f64 { + self.delay_shim() + } + #[cfg(feature = "PlaybackDirection")] + fn direction(&self) -> PlaybackDirection { + self.direction_shim() + } + fn duration(&self) -> ::wasm_bindgen::JsValue { + self.duration_shim() + } + fn easing(&self) -> String { + self.easing_shim() + } + fn end_delay(&self) -> f64 { + self.end_delay_shim() + } + #[cfg(feature = "FillMode")] + fn fill(&self) -> FillMode { + self.fill_shim() + } + fn iteration_start(&self) -> f64 { + self.iteration_start_shim() + } + fn iterations(&self) -> f64 { + self.iterations_shim() + } + #[cfg(feature = "CompositeOperation")] + fn composite(&self) -> CompositeOperation { + self.composite_shim() + } + #[cfg(feature = "IterationCompositeOperation")] + fn iteration_composite(&self) -> IterationCompositeOperation { + self.iteration_composite_shim() + } } impl KeyframeEffectOptions { #[doc = "Construct a new `KeyframeEffectOptions`."] @@ -48,7 +157,7 @@ impl KeyframeEffectOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay_shim(val); self } #[cfg(feature = "PlaybackDirection")] @@ -56,28 +165,28 @@ impl KeyframeEffectOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`, `PlaybackDirection`*"] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction_shim(val); self } #[doc = "Change the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[doc = "Change the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing_shim(val); self } #[doc = "Change the `endDelay` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); + self.set_end_delay_shim(val); self } #[cfg(feature = "FillMode")] @@ -85,21 +194,21 @@ impl KeyframeEffectOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FillMode`, `KeyframeEffectOptions`*"] pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); + self.set_fill_shim(val); self } #[doc = "Change the `iterationStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); + self.set_iteration_start_shim(val); self } #[doc = "Change the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `KeyframeEffectOptions`*"] pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); + self.set_iterations_shim(val); self } #[cfg(feature = "CompositeOperation")] @@ -107,7 +216,7 @@ impl KeyframeEffectOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CompositeOperation`, `KeyframeEffectOptions`*"] pub fn composite(&mut self, val: CompositeOperation) -> &mut Self { - self.composite_shim(val); + self.set_composite_shim(val); self } #[cfg(feature = "IterationCompositeOperation")] @@ -115,7 +224,7 @@ impl KeyframeEffectOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `IterationCompositeOperation`, `KeyframeEffectOptions`*"] pub fn iteration_composite(&mut self, val: IterationCompositeOperation) -> &mut Self { - self.iteration_composite_shim(val); + self.set_iteration_composite_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_L10nElement.rs b/crates/web-sys/src/features/gen_L10nElement.rs index 0fd76d28bc7..4b26a23b633 100644 --- a/crates/web-sys/src/features/gen_L10nElement.rs +++ b/crates/web-sys/src/features/gen_L10nElement.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] pub type L10nElement; + #[wasm_bindgen(method, getter = "l10nArgs")] + fn l10n_args_shim(this: &L10nElement) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "l10nArgs")] - fn l10n_args_shim(this: &L10nElement, val: Option<&::js_sys::Object>); + fn set_l10n_args_shim(this: &L10nElement, val: Option<&::js_sys::Object>); + #[wasm_bindgen(method, getter = "l10nAttrs")] + fn l10n_attrs_shim(this: &L10nElement) -> Option; #[wasm_bindgen(method, setter = "l10nAttrs")] - fn l10n_attrs_shim(this: &L10nElement, val: Option<&str>); + fn set_l10n_attrs_shim(this: &L10nElement, val: Option<&str>); + #[wasm_bindgen(method, getter = "l10nId")] + fn l10n_id_shim(this: &L10nElement) -> String; #[wasm_bindgen(method, setter = "l10nId")] - fn l10n_id_shim(this: &L10nElement, val: &str); + fn set_l10n_id_shim(this: &L10nElement, val: &str); + #[wasm_bindgen(method, getter = "localName")] + fn local_name_shim(this: &L10nElement) -> String; #[wasm_bindgen(method, setter = "localName")] - fn local_name_shim(this: &L10nElement, val: &str); + fn set_local_name_shim(this: &L10nElement, val: &str); + #[wasm_bindgen(method, getter = "namespaceURI")] + fn namespace_uri_shim(this: &L10nElement) -> String; #[wasm_bindgen(method, setter = "namespaceURI")] - fn namespace_uri_shim(this: &L10nElement, val: &str); + fn set_namespace_uri_shim(this: &L10nElement, val: &str); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &L10nElement) -> Option; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &L10nElement, val: Option<&str>); + fn set_type__shim(this: &L10nElement, val: Option<&str>); +} +#[doc = "The trait to access properties on the `L10nElement` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] +pub trait L10nElementGetters { + #[doc = "Get the `l10nArgs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + fn l10n_args(&self) -> Option<::js_sys::Object>; + #[doc = "Get the `l10nAttrs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + fn l10n_attrs(&self) -> Option; + #[doc = "Get the `l10nId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + fn l10n_id(&self) -> String; + #[doc = "Get the `localName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + fn local_name(&self) -> String; + #[doc = "Get the `namespaceURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + fn namespace_uri(&self) -> String; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] + fn type_(&self) -> Option; +} +impl L10nElementGetters for L10nElement { + fn l10n_args(&self) -> Option<::js_sys::Object> { + self.l10n_args_shim() + } + fn l10n_attrs(&self) -> Option { + self.l10n_attrs_shim() + } + fn l10n_id(&self) -> String { + self.l10n_id_shim() + } + fn local_name(&self) -> String { + self.local_name_shim() + } + fn namespace_uri(&self) -> String { + self.namespace_uri_shim() + } + fn type_(&self) -> Option { + self.type__shim() + } } impl L10nElement { #[doc = "Construct a new `L10nElement`."] @@ -30,51 +91,51 @@ impl L10nElement { pub fn new(l10n_id: &str, local_name: &str, namespace_uri: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.l10n_id(l10n_id); - ret.local_name(local_name); - ret.namespace_uri(namespace_uri); + Self::l10n_id(&mut ret, l10n_id); + Self::local_name(&mut ret, local_name); + Self::namespace_uri(&mut ret, namespace_uri); ret } #[doc = "Change the `l10nArgs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] pub fn l10n_args(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.l10n_args_shim(val); + self.set_l10n_args_shim(val); self } #[doc = "Change the `l10nAttrs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] pub fn l10n_attrs(&mut self, val: Option<&str>) -> &mut Self { - self.l10n_attrs_shim(val); + self.set_l10n_attrs_shim(val); self } #[doc = "Change the `l10nId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] pub fn l10n_id(&mut self, val: &str) -> &mut Self { - self.l10n_id_shim(val); + self.set_l10n_id_shim(val); self } #[doc = "Change the `localName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] pub fn local_name(&mut self, val: &str) -> &mut Self { - self.local_name_shim(val); + self.set_local_name_shim(val); self } #[doc = "Change the `namespaceURI` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] pub fn namespace_uri(&mut self, val: &str) -> &mut Self { - self.namespace_uri_shim(val); + self.set_namespace_uri_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nElement`*"] pub fn type_(&mut self, val: Option<&str>) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_L10nValue.rs b/crates/web-sys/src/features/gen_L10nValue.rs index 0dbf073485f..6496bbd61fa 100644 --- a/crates/web-sys/src/features/gen_L10nValue.rs +++ b/crates/web-sys/src/features/gen_L10nValue.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] pub type L10nValue; + #[wasm_bindgen(method, getter = "attributes")] + fn attributes_shim(this: &L10nValue) -> Option<::js_sys::Array>; #[wasm_bindgen(method, setter = "attributes")] - fn attributes_shim(this: &L10nValue, val: &::wasm_bindgen::JsValue); + fn set_attributes_shim(this: &L10nValue, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &L10nValue) -> Option; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &L10nValue, val: Option<&str>); + fn set_value_shim(this: &L10nValue, val: Option<&str>); +} +#[doc = "The trait to access properties on the `L10nValue` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] +pub trait L10nValueGetters { + #[doc = "Get the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] + fn attributes(&self) -> Option<::js_sys::Array>; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] + fn value(&self) -> Option; +} +impl L10nValueGetters for L10nValue { + fn attributes(&self) -> Option<::js_sys::Array> { + self.attributes_shim() + } + fn value(&self) -> Option { + self.value_shim() + } } impl L10nValue { #[doc = "Construct a new `L10nValue`."] @@ -28,14 +53,14 @@ impl L10nValue { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] pub fn attributes(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.attributes_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_attributes_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `L10nValue`*"] pub fn value(&mut self, val: Option<&str>) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_LifecycleCallbacks.rs b/crates/web-sys/src/features/gen_LifecycleCallbacks.rs index 82522003c88..156ec795085 100644 --- a/crates/web-sys/src/features/gen_LifecycleCallbacks.rs +++ b/crates/web-sys/src/features/gen_LifecycleCallbacks.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] pub type LifecycleCallbacks; + #[wasm_bindgen(method, getter = "adoptedCallback")] + fn adopted_callback_shim(this: &LifecycleCallbacks) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "adoptedCallback")] - fn adopted_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + fn set_adopted_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "attributeChangedCallback")] + fn attribute_changed_callback_shim(this: &LifecycleCallbacks) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "attributeChangedCallback")] - fn attribute_changed_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + fn set_attribute_changed_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "connectedCallback")] + fn connected_callback_shim(this: &LifecycleCallbacks) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "connectedCallback")] - fn connected_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + fn set_connected_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "disconnectedCallback")] + fn disconnected_callback_shim(this: &LifecycleCallbacks) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "disconnectedCallback")] - fn disconnected_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); + fn set_disconnected_callback_shim(this: &LifecycleCallbacks, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `LifecycleCallbacks` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] +pub trait LifecycleCallbacksGetters { + #[doc = "Get the `adoptedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + fn adopted_callback(&self) -> ::js_sys::Function; + #[doc = "Get the `attributeChangedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + fn attribute_changed_callback(&self) -> ::js_sys::Function; + #[doc = "Get the `connectedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + fn connected_callback(&self) -> ::js_sys::Function; + #[doc = "Get the `disconnectedCallback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] + fn disconnected_callback(&self) -> ::js_sys::Function; +} +impl LifecycleCallbacksGetters for LifecycleCallbacks { + fn adopted_callback(&self) -> ::js_sys::Function { + self.adopted_callback_shim() + } + fn attribute_changed_callback(&self) -> ::js_sys::Function { + self.attribute_changed_callback_shim() + } + fn connected_callback(&self) -> ::js_sys::Function { + self.connected_callback_shim() + } + fn disconnected_callback(&self) -> ::js_sys::Function { + self.disconnected_callback_shim() + } } impl LifecycleCallbacks { #[doc = "Construct a new `LifecycleCallbacks`."] @@ -32,28 +75,28 @@ impl LifecycleCallbacks { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] pub fn adopted_callback(&mut self, val: &::js_sys::Function) -> &mut Self { - self.adopted_callback_shim(val); + self.set_adopted_callback_shim(val); self } #[doc = "Change the `attributeChangedCallback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] pub fn attribute_changed_callback(&mut self, val: &::js_sys::Function) -> &mut Self { - self.attribute_changed_callback_shim(val); + self.set_attribute_changed_callback_shim(val); self } #[doc = "Change the `connectedCallback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] pub fn connected_callback(&mut self, val: &::js_sys::Function) -> &mut Self { - self.connected_callback_shim(val); + self.set_connected_callback_shim(val); self } #[doc = "Change the `disconnectedCallback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LifecycleCallbacks`*"] pub fn disconnected_callback(&mut self, val: &::js_sys::Function) -> &mut Self { - self.disconnected_callback_shim(val); + self.set_disconnected_callback_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_LocaleInfo.rs b/crates/web-sys/src/features/gen_LocaleInfo.rs index ba79aa77e67..9f0693a31e2 100644 --- a/crates/web-sys/src/features/gen_LocaleInfo.rs +++ b/crates/web-sys/src/features/gen_LocaleInfo.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] pub type LocaleInfo; + #[wasm_bindgen(method, getter = "direction")] + fn direction_shim(this: &LocaleInfo) -> String; #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &LocaleInfo, val: &str); + fn set_direction_shim(this: &LocaleInfo, val: &str); + #[wasm_bindgen(method, getter = "locale")] + fn locale_shim(this: &LocaleInfo) -> String; #[wasm_bindgen(method, setter = "locale")] - fn locale_shim(this: &LocaleInfo, val: &str); + fn set_locale_shim(this: &LocaleInfo, val: &str); +} +#[doc = "The trait to access properties on the `LocaleInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] +pub trait LocaleInfoGetters { + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] + fn direction(&self) -> String; + #[doc = "Get the `locale` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] + fn locale(&self) -> String; +} +impl LocaleInfoGetters for LocaleInfo { + fn direction(&self) -> String { + self.direction_shim() + } + fn locale(&self) -> String { + self.locale_shim() + } } impl LocaleInfo { #[doc = "Construct a new `LocaleInfo`."] @@ -28,14 +53,14 @@ impl LocaleInfo { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] pub fn direction(&mut self, val: &str) -> &mut Self { - self.direction_shim(val); + self.set_direction_shim(val); self } #[doc = "Change the `locale` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `LocaleInfo`*"] pub fn locale(&mut self, val: &str) -> &mut Self { - self.locale_shim(val); + self.set_locale_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_LockInfo.rs b/crates/web-sys/src/features/gen_LockInfo.rs index 0c7112ddc24..b150cd1145f 100644 --- a/crates/web-sys/src/features/gen_LockInfo.rs +++ b/crates/web-sys/src/features/gen_LockInfo.rs @@ -14,13 +14,67 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type LockInfo; + #[wasm_bindgen(method, getter = "clientId")] + fn client_id_shim(this: &LockInfo) -> String; #[wasm_bindgen(method, setter = "clientId")] - fn client_id_shim(this: &LockInfo, val: &str); + fn set_client_id_shim(this: &LockInfo, val: &str); + #[cfg(feature = "LockMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &LockInfo) -> LockMode; #[cfg(feature = "LockMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &LockInfo, val: LockMode); + fn set_mode_shim(this: &LockInfo, val: LockMode); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &LockInfo) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &LockInfo, val: &str); + fn set_name_shim(this: &LockInfo, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `LockInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] +pub trait LockInfoGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `clientId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn client_id(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LockMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`, `LockMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mode(&self) -> LockMode; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl LockInfoGetters for LockInfo { + #[cfg(web_sys_unstable_apis)] + fn client_id(&self) -> String { + self.client_id_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LockMode")] + fn mode(&self) -> LockMode { + self.mode_shim() + } + #[cfg(web_sys_unstable_apis)] + fn name(&self) -> String { + self.name_shim() + } } #[cfg(web_sys_unstable_apis)] impl LockInfo { @@ -43,7 +97,7 @@ impl LockInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn client_id(&mut self, val: &str) -> &mut Self { - self.client_id_shim(val); + self.set_client_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +109,7 @@ impl LockInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mode(&mut self, val: LockMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +120,7 @@ impl LockInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_LockManagerSnapshot.rs b/crates/web-sys/src/features/gen_LockManagerSnapshot.rs index a6b6ed20ddc..4156498ead4 100644 --- a/crates/web-sys/src/features/gen_LockManagerSnapshot.rs +++ b/crates/web-sys/src/features/gen_LockManagerSnapshot.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type LockManagerSnapshot; + #[wasm_bindgen(method, getter = "held")] + fn held_shim(this: &LockManagerSnapshot) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "held")] - fn held_shim(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); + fn set_held_shim(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "pending")] + fn pending_shim(this: &LockManagerSnapshot) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "pending")] - fn pending_shim(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); + fn set_pending_shim(this: &LockManagerSnapshot, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `LockManagerSnapshot` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] +pub trait LockManagerSnapshotGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `held` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn held(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `pending` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockManagerSnapshot`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn pending(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl LockManagerSnapshotGetters for LockManagerSnapshot { + #[cfg(web_sys_unstable_apis)] + fn held(&self) -> ::js_sys::Array { + self.held_shim() + } + #[cfg(web_sys_unstable_apis)] + fn pending(&self) -> ::js_sys::Array { + self.pending_shim() + } } #[cfg(web_sys_unstable_apis)] impl LockManagerSnapshot { @@ -40,7 +77,7 @@ impl LockManagerSnapshot { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn held(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.held_shim(val); + self.set_held_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl LockManagerSnapshot { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn pending(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.pending_shim(val); + self.set_pending_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_LockOptions.rs b/crates/web-sys/src/features/gen_LockOptions.rs index 8b450d2645c..0417c67388c 100644 --- a/crates/web-sys/src/features/gen_LockOptions.rs +++ b/crates/web-sys/src/features/gen_LockOptions.rs @@ -14,16 +14,87 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type LockOptions; + #[wasm_bindgen(method, getter = "ifAvailable")] + fn if_available_shim(this: &LockOptions) -> bool; #[wasm_bindgen(method, setter = "ifAvailable")] - fn if_available_shim(this: &LockOptions, val: bool); + fn set_if_available_shim(this: &LockOptions, val: bool); + #[cfg(feature = "LockMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &LockOptions) -> LockMode; #[cfg(feature = "LockMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &LockOptions, val: LockMode); + fn set_mode_shim(this: &LockOptions, val: LockMode); + #[cfg(feature = "AbortSignal")] + #[wasm_bindgen(method, getter = "signal")] + fn signal_shim(this: &LockOptions) -> AbortSignal; #[cfg(feature = "AbortSignal")] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &LockOptions, val: &AbortSignal); + fn set_signal_shim(this: &LockOptions, val: &AbortSignal); + #[wasm_bindgen(method, getter = "steal")] + fn steal_shim(this: &LockOptions) -> bool; #[wasm_bindgen(method, setter = "steal")] - fn steal_shim(this: &LockOptions, val: bool); + fn set_steal_shim(this: &LockOptions, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `LockOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] +pub trait LockOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `ifAvailable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn if_available(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LockMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockMode`, `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mode(&self) -> LockMode; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn signal(&self) -> AbortSignal; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `steal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LockOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn steal(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl LockOptionsGetters for LockOptions { + #[cfg(web_sys_unstable_apis)] + fn if_available(&self) -> bool { + self.if_available_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LockMode")] + fn mode(&self) -> LockMode { + self.mode_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + fn signal(&self) -> AbortSignal { + self.signal_shim() + } + #[cfg(web_sys_unstable_apis)] + fn steal(&self) -> bool { + self.steal_shim() + } } #[cfg(web_sys_unstable_apis)] impl LockOptions { @@ -46,7 +117,7 @@ impl LockOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn if_available(&mut self, val: bool) -> &mut Self { - self.if_available_shim(val); + self.set_if_available_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +129,7 @@ impl LockOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mode(&mut self, val: LockMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +141,7 @@ impl LockOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +152,7 @@ impl LockOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn steal(&mut self, val: bool) -> &mut Self { - self.steal_shim(val); + self.set_steal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaConfiguration.rs b/crates/web-sys/src/features/gen_MediaConfiguration.rs index 5214880c65c..7d53f9307d5 100644 --- a/crates/web-sys/src/features/gen_MediaConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaConfiguration.rs @@ -11,11 +11,42 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`*"] pub type MediaConfiguration; #[cfg(feature = "AudioConfiguration")] + #[wasm_bindgen(method, getter = "audio")] + fn audio_shim(this: &MediaConfiguration) -> AudioConfiguration; + #[cfg(feature = "AudioConfiguration")] #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &MediaConfiguration, val: &AudioConfiguration); + fn set_audio_shim(this: &MediaConfiguration, val: &AudioConfiguration); + #[cfg(feature = "VideoConfiguration")] + #[wasm_bindgen(method, getter = "video")] + fn video_shim(this: &MediaConfiguration) -> VideoConfiguration; #[cfg(feature = "VideoConfiguration")] #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &MediaConfiguration, val: &VideoConfiguration); + fn set_video_shim(this: &MediaConfiguration, val: &VideoConfiguration); +} +#[doc = "The trait to access properties on the `MediaConfiguration` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`*"] +pub trait MediaConfigurationGetters { + #[cfg(feature = "AudioConfiguration")] + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaConfiguration`*"] + fn audio(&self) -> AudioConfiguration; + #[cfg(feature = "VideoConfiguration")] + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`, `VideoConfiguration`*"] + fn video(&self) -> VideoConfiguration; +} +impl MediaConfigurationGetters for MediaConfiguration { + #[cfg(feature = "AudioConfiguration")] + fn audio(&self) -> AudioConfiguration { + self.audio_shim() + } + #[cfg(feature = "VideoConfiguration")] + fn video(&self) -> VideoConfiguration { + self.video_shim() + } } impl MediaConfiguration { #[doc = "Construct a new `MediaConfiguration`."] @@ -31,7 +62,7 @@ impl MediaConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaConfiguration`*"] pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self { - self.audio_shim(val); + self.set_audio_shim(val); self } #[cfg(feature = "VideoConfiguration")] @@ -39,7 +70,7 @@ impl MediaConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`, `VideoConfiguration`*"] pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self { - self.video_shim(val); + self.set_video_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs b/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs index 056b56bda30..84fcf552e08 100644 --- a/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaDecodingConfiguration.rs @@ -11,14 +11,57 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`*"] pub type MediaDecodingConfiguration; #[cfg(feature = "AudioConfiguration")] + #[wasm_bindgen(method, getter = "audio")] + fn audio_shim(this: &MediaDecodingConfiguration) -> AudioConfiguration; + #[cfg(feature = "AudioConfiguration")] #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &MediaDecodingConfiguration, val: &AudioConfiguration); + fn set_audio_shim(this: &MediaDecodingConfiguration, val: &AudioConfiguration); + #[cfg(feature = "VideoConfiguration")] + #[wasm_bindgen(method, getter = "video")] + fn video_shim(this: &MediaDecodingConfiguration) -> VideoConfiguration; #[cfg(feature = "VideoConfiguration")] #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &MediaDecodingConfiguration, val: &VideoConfiguration); + fn set_video_shim(this: &MediaDecodingConfiguration, val: &VideoConfiguration); + #[cfg(feature = "MediaDecodingType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &MediaDecodingConfiguration) -> MediaDecodingType; #[cfg(feature = "MediaDecodingType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &MediaDecodingConfiguration, val: MediaDecodingType); + fn set_type__shim(this: &MediaDecodingConfiguration, val: MediaDecodingType); +} +#[doc = "The trait to access properties on the `MediaDecodingConfiguration` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`*"] +pub trait MediaDecodingConfigurationGetters { + #[cfg(feature = "AudioConfiguration")] + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaDecodingConfiguration`*"] + fn audio(&self) -> AudioConfiguration; + #[cfg(feature = "VideoConfiguration")] + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `VideoConfiguration`*"] + fn video(&self) -> VideoConfiguration; + #[cfg(feature = "MediaDecodingType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `MediaDecodingType`*"] + fn type_(&self) -> MediaDecodingType; +} +impl MediaDecodingConfigurationGetters for MediaDecodingConfiguration { + #[cfg(feature = "AudioConfiguration")] + fn audio(&self) -> AudioConfiguration { + self.audio_shim() + } + #[cfg(feature = "VideoConfiguration")] + fn video(&self) -> VideoConfiguration { + self.video_shim() + } + #[cfg(feature = "MediaDecodingType")] + fn type_(&self) -> MediaDecodingType { + self.type__shim() + } } impl MediaDecodingConfiguration { #[cfg(feature = "MediaDecodingType")] @@ -28,7 +71,7 @@ impl MediaDecodingConfiguration { pub fn new(type_: MediaDecodingType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.type_(type_); + Self::type_(&mut ret, type_); ret } #[cfg(feature = "AudioConfiguration")] @@ -36,7 +79,7 @@ impl MediaDecodingConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaDecodingConfiguration`*"] pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self { - self.audio_shim(val); + self.set_audio_shim(val); self } #[cfg(feature = "VideoConfiguration")] @@ -44,7 +87,7 @@ impl MediaDecodingConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `VideoConfiguration`*"] pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self { - self.video_shim(val); + self.set_video_shim(val); self } #[cfg(feature = "MediaDecodingType")] @@ -52,7 +95,7 @@ impl MediaDecodingConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaDecodingConfiguration`, `MediaDecodingType`*"] pub fn type_(&mut self, val: MediaDecodingType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs b/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs index c13381b70d2..f2a74c6303b 100644 --- a/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs +++ b/crates/web-sys/src/features/gen_MediaElementAudioSourceOptions.rs @@ -11,8 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaElementAudioSourceOptions`*"] pub type MediaElementAudioSourceOptions; #[cfg(feature = "HtmlMediaElement")] + #[wasm_bindgen(method, getter = "mediaElement")] + fn media_element_shim(this: &MediaElementAudioSourceOptions) -> HtmlMediaElement; + #[cfg(feature = "HtmlMediaElement")] #[wasm_bindgen(method, setter = "mediaElement")] - fn media_element_shim(this: &MediaElementAudioSourceOptions, val: &HtmlMediaElement); + fn set_media_element_shim(this: &MediaElementAudioSourceOptions, val: &HtmlMediaElement); +} +#[doc = "The trait to access properties on the `MediaElementAudioSourceOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaElementAudioSourceOptions`*"] +pub trait MediaElementAudioSourceOptionsGetters { + #[cfg(feature = "HtmlMediaElement")] + #[doc = "Get the `mediaElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaElementAudioSourceOptions`*"] + fn media_element(&self) -> HtmlMediaElement; +} +impl MediaElementAudioSourceOptionsGetters for MediaElementAudioSourceOptions { + #[cfg(feature = "HtmlMediaElement")] + fn media_element(&self) -> HtmlMediaElement { + self.media_element_shim() + } } impl MediaElementAudioSourceOptions { #[cfg(feature = "HtmlMediaElement")] @@ -22,7 +41,7 @@ impl MediaElementAudioSourceOptions { pub fn new(media_element: &HtmlMediaElement) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.media_element(media_element); + Self::media_element(&mut ret, media_element); ret } #[cfg(feature = "HtmlMediaElement")] @@ -30,7 +49,7 @@ impl MediaElementAudioSourceOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaElementAudioSourceOptions`*"] pub fn media_element(&mut self, val: &HtmlMediaElement) -> &mut Self { - self.media_element_shim(val); + self.set_media_element_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs b/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs index eafa1733fc4..3e9fb2fc839 100644 --- a/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaEncodingConfiguration.rs @@ -11,14 +11,57 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`*"] pub type MediaEncodingConfiguration; #[cfg(feature = "AudioConfiguration")] + #[wasm_bindgen(method, getter = "audio")] + fn audio_shim(this: &MediaEncodingConfiguration) -> AudioConfiguration; + #[cfg(feature = "AudioConfiguration")] #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &MediaEncodingConfiguration, val: &AudioConfiguration); + fn set_audio_shim(this: &MediaEncodingConfiguration, val: &AudioConfiguration); + #[cfg(feature = "VideoConfiguration")] + #[wasm_bindgen(method, getter = "video")] + fn video_shim(this: &MediaEncodingConfiguration) -> VideoConfiguration; #[cfg(feature = "VideoConfiguration")] #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &MediaEncodingConfiguration, val: &VideoConfiguration); + fn set_video_shim(this: &MediaEncodingConfiguration, val: &VideoConfiguration); + #[cfg(feature = "MediaEncodingType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &MediaEncodingConfiguration) -> MediaEncodingType; #[cfg(feature = "MediaEncodingType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &MediaEncodingConfiguration, val: MediaEncodingType); + fn set_type__shim(this: &MediaEncodingConfiguration, val: MediaEncodingType); +} +#[doc = "The trait to access properties on the `MediaEncodingConfiguration` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`*"] +pub trait MediaEncodingConfigurationGetters { + #[cfg(feature = "AudioConfiguration")] + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaEncodingConfiguration`*"] + fn audio(&self) -> AudioConfiguration; + #[cfg(feature = "VideoConfiguration")] + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `VideoConfiguration`*"] + fn video(&self) -> VideoConfiguration; + #[cfg(feature = "MediaEncodingType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `MediaEncodingType`*"] + fn type_(&self) -> MediaEncodingType; +} +impl MediaEncodingConfigurationGetters for MediaEncodingConfiguration { + #[cfg(feature = "AudioConfiguration")] + fn audio(&self) -> AudioConfiguration { + self.audio_shim() + } + #[cfg(feature = "VideoConfiguration")] + fn video(&self) -> VideoConfiguration { + self.video_shim() + } + #[cfg(feature = "MediaEncodingType")] + fn type_(&self) -> MediaEncodingType { + self.type__shim() + } } impl MediaEncodingConfiguration { #[cfg(feature = "MediaEncodingType")] @@ -28,7 +71,7 @@ impl MediaEncodingConfiguration { pub fn new(type_: MediaEncodingType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.type_(type_); + Self::type_(&mut ret, type_); ret } #[cfg(feature = "AudioConfiguration")] @@ -36,7 +79,7 @@ impl MediaEncodingConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaEncodingConfiguration`*"] pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self { - self.audio_shim(val); + self.set_audio_shim(val); self } #[cfg(feature = "VideoConfiguration")] @@ -44,7 +87,7 @@ impl MediaEncodingConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `VideoConfiguration`*"] pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self { - self.video_shim(val); + self.set_video_shim(val); self } #[cfg(feature = "MediaEncodingType")] @@ -52,7 +95,7 @@ impl MediaEncodingConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `MediaEncodingType`*"] pub fn type_(&mut self, val: MediaEncodingType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaImage.rs b/crates/web-sys/src/features/gen_MediaImage.rs index 779f4419ecb..898b3c67186 100644 --- a/crates/web-sys/src/features/gen_MediaImage.rs +++ b/crates/web-sys/src/features/gen_MediaImage.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaImage; + #[wasm_bindgen(method, getter = "sizes")] + fn sizes_shim(this: &MediaImage) -> String; #[wasm_bindgen(method, setter = "sizes")] - fn sizes_shim(this: &MediaImage, val: &str); + fn set_sizes_shim(this: &MediaImage, val: &str); + #[wasm_bindgen(method, getter = "src")] + fn src_shim(this: &MediaImage) -> String; #[wasm_bindgen(method, setter = "src")] - fn src_shim(this: &MediaImage, val: &str); + fn set_src_shim(this: &MediaImage, val: &str); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &MediaImage) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &MediaImage, val: &str); + fn set_type__shim(this: &MediaImage, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MediaImage` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] +pub trait MediaImageGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sizes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn sizes(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `src` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn src(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaImage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn type_(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl MediaImageGetters for MediaImage { + #[cfg(web_sys_unstable_apis)] + fn sizes(&self) -> String { + self.sizes_shim() + } + #[cfg(web_sys_unstable_apis)] + fn src(&self) -> String { + self.src_shim() + } + #[cfg(web_sys_unstable_apis)] + fn type_(&self) -> String { + self.type__shim() + } } #[cfg(web_sys_unstable_apis)] impl MediaImage { @@ -32,7 +83,7 @@ impl MediaImage { pub fn new(src: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.src(src); + Self::src(&mut ret, src); ret } #[cfg(web_sys_unstable_apis)] @@ -43,7 +94,7 @@ impl MediaImage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn sizes(&mut self, val: &str) -> &mut Self { - self.sizes_shim(val); + self.set_sizes_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -54,7 +105,7 @@ impl MediaImage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn src(&mut self, val: &str) -> &mut Self { - self.src_shim(val); + self.set_src_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -65,7 +116,7 @@ impl MediaImage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs b/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs index b5d349fa116..f078189150a 100644 --- a/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaKeyMessageEventInit.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] pub type MediaKeyMessageEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MediaKeyMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaKeyMessageEventInit, val: bool); + fn set_bubbles_shim(this: &MediaKeyMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MediaKeyMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaKeyMessageEventInit, val: bool); + fn set_cancelable_shim(this: &MediaKeyMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MediaKeyMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaKeyMessageEventInit, val: bool); + fn set_composed_shim(this: &MediaKeyMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "message")] + fn message_shim(this: &MediaKeyMessageEventInit) -> ::js_sys::ArrayBuffer; #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &MediaKeyMessageEventInit, val: &::js_sys::ArrayBuffer); + fn set_message_shim(this: &MediaKeyMessageEventInit, val: &::js_sys::ArrayBuffer); + #[cfg(feature = "MediaKeyMessageType")] + #[wasm_bindgen(method, getter = "messageType")] + fn message_type_shim(this: &MediaKeyMessageEventInit) -> MediaKeyMessageType; #[cfg(feature = "MediaKeyMessageType")] #[wasm_bindgen(method, setter = "messageType")] - fn message_type_shim(this: &MediaKeyMessageEventInit, val: MediaKeyMessageType); + fn set_message_type_shim(this: &MediaKeyMessageEventInit, val: MediaKeyMessageType); +} +#[doc = "The trait to access properties on the `MediaKeyMessageEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] +pub trait MediaKeyMessageEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] + fn message(&self) -> ::js_sys::ArrayBuffer; + #[cfg(feature = "MediaKeyMessageType")] + #[doc = "Get the `messageType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`, `MediaKeyMessageType`*"] + fn message_type(&self) -> MediaKeyMessageType; +} +impl MediaKeyMessageEventInitGetters for MediaKeyMessageEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn message(&self) -> ::js_sys::ArrayBuffer { + self.message_shim() + } + #[cfg(feature = "MediaKeyMessageType")] + fn message_type(&self) -> MediaKeyMessageType { + self.message_type_shim() + } } impl MediaKeyMessageEventInit { #[cfg(feature = "MediaKeyMessageType")] @@ -30,36 +85,36 @@ impl MediaKeyMessageEventInit { pub fn new(message: &::js_sys::ArrayBuffer, message_type: MediaKeyMessageType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.message(message); - ret.message_type(message_type); + Self::message(&mut ret, message); + Self::message_type(&mut ret, message_type); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`*"] pub fn message(&mut self, val: &::js_sys::ArrayBuffer) -> &mut Self { - self.message_shim(val); + self.set_message_shim(val); self } #[cfg(feature = "MediaKeyMessageType")] @@ -67,7 +122,7 @@ impl MediaKeyMessageEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyMessageEventInit`, `MediaKeyMessageType`*"] pub fn message_type(&mut self, val: MediaKeyMessageType) -> &mut Self { - self.message_type_shim(val); + self.set_message_type_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs b/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs index f723838a4c8..fbe13869995 100644 --- a/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaKeyNeededEventInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] pub type MediaKeyNeededEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MediaKeyNeededEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaKeyNeededEventInit, val: bool); + fn set_bubbles_shim(this: &MediaKeyNeededEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MediaKeyNeededEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaKeyNeededEventInit, val: bool); + fn set_cancelable_shim(this: &MediaKeyNeededEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MediaKeyNeededEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaKeyNeededEventInit, val: bool); + fn set_composed_shim(this: &MediaKeyNeededEventInit, val: bool); + #[wasm_bindgen(method, getter = "initData")] + fn init_data_shim(this: &MediaKeyNeededEventInit) -> Option<::js_sys::ArrayBuffer>; #[wasm_bindgen(method, setter = "initData")] - fn init_data_shim(this: &MediaKeyNeededEventInit, val: Option<&::js_sys::ArrayBuffer>); + fn set_init_data_shim(this: &MediaKeyNeededEventInit, val: Option<&::js_sys::ArrayBuffer>); + #[wasm_bindgen(method, getter = "initDataType")] + fn init_data_type_shim(this: &MediaKeyNeededEventInit) -> String; #[wasm_bindgen(method, setter = "initDataType")] - fn init_data_type_shim(this: &MediaKeyNeededEventInit, val: &str); + fn set_init_data_type_shim(this: &MediaKeyNeededEventInit, val: &str); +} +#[doc = "The trait to access properties on the `MediaKeyNeededEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] +pub trait MediaKeyNeededEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `initData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + fn init_data(&self) -> Option<::js_sys::ArrayBuffer>; + #[doc = "Get the `initDataType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] + fn init_data_type(&self) -> String; +} +impl MediaKeyNeededEventInitGetters for MediaKeyNeededEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn init_data(&self) -> Option<::js_sys::ArrayBuffer> { + self.init_data_shim() + } + fn init_data_type(&self) -> String { + self.init_data_type_shim() + } } impl MediaKeyNeededEventInit { #[doc = "Construct a new `MediaKeyNeededEventInit`."] @@ -34,35 +86,35 @@ impl MediaKeyNeededEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `initData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] pub fn init_data(&mut self, val: Option<&::js_sys::ArrayBuffer>) -> &mut Self { - self.init_data_shim(val); + self.set_init_data_shim(val); self } #[doc = "Change the `initDataType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeyNeededEventInit`*"] pub fn init_data_type(&mut self, val: &str) -> &mut Self { - self.init_data_type_shim(val); + self.set_init_data_type_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs b/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs index 189ffb73a60..496aca63f92 100644 --- a/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs +++ b/crates/web-sys/src/features/gen_MediaKeySystemConfiguration.rs @@ -10,22 +10,107 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] pub type MediaKeySystemConfiguration; + #[wasm_bindgen(method, getter = "audioCapabilities")] + fn audio_capabilities_shim(this: &MediaKeySystemConfiguration) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "audioCapabilities")] - fn audio_capabilities_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + fn set_audio_capabilities_shim( + this: &MediaKeySystemConfiguration, + val: &::wasm_bindgen::JsValue, + ); + #[cfg(feature = "MediaKeysRequirement")] + #[wasm_bindgen(method, getter = "distinctiveIdentifier")] + fn distinctive_identifier_shim(this: &MediaKeySystemConfiguration) -> MediaKeysRequirement; #[cfg(feature = "MediaKeysRequirement")] #[wasm_bindgen(method, setter = "distinctiveIdentifier")] - fn distinctive_identifier_shim(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement); + fn set_distinctive_identifier_shim( + this: &MediaKeySystemConfiguration, + val: MediaKeysRequirement, + ); + #[wasm_bindgen(method, getter = "initDataTypes")] + fn init_data_types_shim(this: &MediaKeySystemConfiguration) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "initDataTypes")] - fn init_data_types_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + fn set_init_data_types_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &MediaKeySystemConfiguration) -> String; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &MediaKeySystemConfiguration, val: &str); + fn set_label_shim(this: &MediaKeySystemConfiguration, val: &str); + #[cfg(feature = "MediaKeysRequirement")] + #[wasm_bindgen(method, getter = "persistentState")] + fn persistent_state_shim(this: &MediaKeySystemConfiguration) -> MediaKeysRequirement; #[cfg(feature = "MediaKeysRequirement")] #[wasm_bindgen(method, setter = "persistentState")] - fn persistent_state_shim(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement); + fn set_persistent_state_shim(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement); + #[wasm_bindgen(method, getter = "sessionTypes")] + fn session_types_shim(this: &MediaKeySystemConfiguration) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "sessionTypes")] - fn session_types_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + fn set_session_types_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "videoCapabilities")] + fn video_capabilities_shim(this: &MediaKeySystemConfiguration) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "videoCapabilities")] - fn video_capabilities_shim(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue); + fn set_video_capabilities_shim( + this: &MediaKeySystemConfiguration, + val: &::wasm_bindgen::JsValue, + ); +} +#[doc = "The trait to access properties on the `MediaKeySystemConfiguration` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] +pub trait MediaKeySystemConfigurationGetters { + #[doc = "Get the `audioCapabilities` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + fn audio_capabilities(&self) -> ::js_sys::Array; + #[cfg(feature = "MediaKeysRequirement")] + #[doc = "Get the `distinctiveIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] + fn distinctive_identifier(&self) -> MediaKeysRequirement; + #[doc = "Get the `initDataTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + fn init_data_types(&self) -> ::js_sys::Array; + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + fn label(&self) -> String; + #[cfg(feature = "MediaKeysRequirement")] + #[doc = "Get the `persistentState` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] + fn persistent_state(&self) -> MediaKeysRequirement; + #[doc = "Get the `sessionTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + fn session_types(&self) -> ::js_sys::Array; + #[doc = "Get the `videoCapabilities` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] + fn video_capabilities(&self) -> ::js_sys::Array; +} +impl MediaKeySystemConfigurationGetters for MediaKeySystemConfiguration { + fn audio_capabilities(&self) -> ::js_sys::Array { + self.audio_capabilities_shim() + } + #[cfg(feature = "MediaKeysRequirement")] + fn distinctive_identifier(&self) -> MediaKeysRequirement { + self.distinctive_identifier_shim() + } + fn init_data_types(&self) -> ::js_sys::Array { + self.init_data_types_shim() + } + fn label(&self) -> String { + self.label_shim() + } + #[cfg(feature = "MediaKeysRequirement")] + fn persistent_state(&self) -> MediaKeysRequirement { + self.persistent_state_shim() + } + fn session_types(&self) -> ::js_sys::Array { + self.session_types_shim() + } + fn video_capabilities(&self) -> ::js_sys::Array { + self.video_capabilities_shim() + } } impl MediaKeySystemConfiguration { #[doc = "Construct a new `MediaKeySystemConfiguration`."] @@ -40,7 +125,7 @@ impl MediaKeySystemConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] pub fn audio_capabilities(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.audio_capabilities_shim(val); + self.set_audio_capabilities_shim(val); self } #[cfg(feature = "MediaKeysRequirement")] @@ -48,21 +133,21 @@ impl MediaKeySystemConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] pub fn distinctive_identifier(&mut self, val: MediaKeysRequirement) -> &mut Self { - self.distinctive_identifier_shim(val); + self.set_distinctive_identifier_shim(val); self } #[doc = "Change the `initDataTypes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] pub fn init_data_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.init_data_types_shim(val); + self.set_init_data_types_shim(val); self } #[doc = "Change the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] pub fn label(&mut self, val: &str) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } #[cfg(feature = "MediaKeysRequirement")] @@ -70,21 +155,21 @@ impl MediaKeySystemConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"] pub fn persistent_state(&mut self, val: MediaKeysRequirement) -> &mut Self { - self.persistent_state_shim(val); + self.set_persistent_state_shim(val); self } #[doc = "Change the `sessionTypes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] pub fn session_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.session_types_shim(val); + self.set_session_types_shim(val); self } #[doc = "Change the `videoCapabilities` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"] pub fn video_capabilities(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.video_capabilities_shim(val); + self.set_video_capabilities_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs b/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs index 6d4e840e0fb..8c42e95118a 100644 --- a/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs +++ b/crates/web-sys/src/features/gen_MediaKeySystemMediaCapability.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] pub type MediaKeySystemMediaCapability; + #[wasm_bindgen(method, getter = "contentType")] + fn content_type_shim(this: &MediaKeySystemMediaCapability) -> String; #[wasm_bindgen(method, setter = "contentType")] - fn content_type_shim(this: &MediaKeySystemMediaCapability, val: &str); + fn set_content_type_shim(this: &MediaKeySystemMediaCapability, val: &str); + #[wasm_bindgen(method, getter = "robustness")] + fn robustness_shim(this: &MediaKeySystemMediaCapability) -> String; #[wasm_bindgen(method, setter = "robustness")] - fn robustness_shim(this: &MediaKeySystemMediaCapability, val: &str); + fn set_robustness_shim(this: &MediaKeySystemMediaCapability, val: &str); +} +#[doc = "The trait to access properties on the `MediaKeySystemMediaCapability` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] +pub trait MediaKeySystemMediaCapabilityGetters { + #[doc = "Get the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] + fn content_type(&self) -> String; + #[doc = "Get the `robustness` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] + fn robustness(&self) -> String; +} +impl MediaKeySystemMediaCapabilityGetters for MediaKeySystemMediaCapability { + fn content_type(&self) -> String { + self.content_type_shim() + } + fn robustness(&self) -> String { + self.robustness_shim() + } } impl MediaKeySystemMediaCapability { #[doc = "Construct a new `MediaKeySystemMediaCapability`."] @@ -28,14 +53,14 @@ impl MediaKeySystemMediaCapability { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] pub fn content_type(&mut self, val: &str) -> &mut Self { - self.content_type_shim(val); + self.set_content_type_shim(val); self } #[doc = "Change the `robustness` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"] pub fn robustness(&mut self, val: &str) -> &mut Self { - self.robustness_shim(val); + self.set_robustness_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaKeysPolicy.rs b/crates/web-sys/src/features/gen_MediaKeysPolicy.rs index de6f010e296..531eaa3a634 100644 --- a/crates/web-sys/src/features/gen_MediaKeysPolicy.rs +++ b/crates/web-sys/src/features/gen_MediaKeysPolicy.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] pub type MediaKeysPolicy; + #[wasm_bindgen(method, getter = "minHdcpVersion")] + fn min_hdcp_version_shim(this: &MediaKeysPolicy) -> String; #[wasm_bindgen(method, setter = "minHdcpVersion")] - fn min_hdcp_version_shim(this: &MediaKeysPolicy, val: &str); + fn set_min_hdcp_version_shim(this: &MediaKeysPolicy, val: &str); +} +#[doc = "The trait to access properties on the `MediaKeysPolicy` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] +pub trait MediaKeysPolicyGetters { + #[doc = "Get the `minHdcpVersion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] + fn min_hdcp_version(&self) -> String; +} +impl MediaKeysPolicyGetters for MediaKeysPolicy { + fn min_hdcp_version(&self) -> String { + self.min_hdcp_version_shim() + } } impl MediaKeysPolicy { #[doc = "Construct a new `MediaKeysPolicy`."] @@ -26,7 +42,7 @@ impl MediaKeysPolicy { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeysPolicy`*"] pub fn min_hdcp_version(&mut self, val: &str) -> &mut Self { - self.min_hdcp_version_shim(val); + self.set_min_hdcp_version_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaMetadataInit.rs b/crates/web-sys/src/features/gen_MediaMetadataInit.rs index 91fb637fb19..faff4dc3055 100644 --- a/crates/web-sys/src/features/gen_MediaMetadataInit.rs +++ b/crates/web-sys/src/features/gen_MediaMetadataInit.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaMetadataInit; + #[wasm_bindgen(method, getter = "album")] + fn album_shim(this: &MediaMetadataInit) -> String; #[wasm_bindgen(method, setter = "album")] - fn album_shim(this: &MediaMetadataInit, val: &str); + fn set_album_shim(this: &MediaMetadataInit, val: &str); + #[wasm_bindgen(method, getter = "artist")] + fn artist_shim(this: &MediaMetadataInit) -> String; #[wasm_bindgen(method, setter = "artist")] - fn artist_shim(this: &MediaMetadataInit, val: &str); + fn set_artist_shim(this: &MediaMetadataInit, val: &str); + #[wasm_bindgen(method, getter = "artwork")] + fn artwork_shim(this: &MediaMetadataInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "artwork")] - fn artwork_shim(this: &MediaMetadataInit, val: &::wasm_bindgen::JsValue); + fn set_artwork_shim(this: &MediaMetadataInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "title")] + fn title_shim(this: &MediaMetadataInit) -> String; #[wasm_bindgen(method, setter = "title")] - fn title_shim(this: &MediaMetadataInit, val: &str); + fn set_title_shim(this: &MediaMetadataInit, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MediaMetadataInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] +pub trait MediaMetadataInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `album` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn album(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `artist` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn artist(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `artwork` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn artwork(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaMetadataInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn title(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl MediaMetadataInitGetters for MediaMetadataInit { + #[cfg(web_sys_unstable_apis)] + fn album(&self) -> String { + self.album_shim() + } + #[cfg(web_sys_unstable_apis)] + fn artist(&self) -> String { + self.artist_shim() + } + #[cfg(web_sys_unstable_apis)] + fn artwork(&self) -> ::js_sys::Array { + self.artwork_shim() + } + #[cfg(web_sys_unstable_apis)] + fn title(&self) -> String { + self.title_shim() + } } #[cfg(web_sys_unstable_apis)] impl MediaMetadataInit { @@ -44,7 +109,7 @@ impl MediaMetadataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn album(&mut self, val: &str) -> &mut Self { - self.album_shim(val); + self.set_album_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +120,7 @@ impl MediaMetadataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn artist(&mut self, val: &str) -> &mut Self { - self.artist_shim(val); + self.set_artist_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +131,7 @@ impl MediaMetadataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn artwork(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.artwork_shim(val); + self.set_artwork_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +142,7 @@ impl MediaMetadataInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn title(&mut self, val: &str) -> &mut Self { - self.title_shim(val); + self.set_title_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaPositionState.rs b/crates/web-sys/src/features/gen_MediaPositionState.rs index 2cb0437b6cd..470f127e1fb 100644 --- a/crates/web-sys/src/features/gen_MediaPositionState.rs +++ b/crates/web-sys/src/features/gen_MediaPositionState.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaPositionState; + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &MediaPositionState) -> f64; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &MediaPositionState, val: f64); + fn set_duration_shim(this: &MediaPositionState, val: f64); + #[wasm_bindgen(method, getter = "playbackRate")] + fn playback_rate_shim(this: &MediaPositionState) -> f64; #[wasm_bindgen(method, setter = "playbackRate")] - fn playback_rate_shim(this: &MediaPositionState, val: f64); + fn set_playback_rate_shim(this: &MediaPositionState, val: f64); + #[wasm_bindgen(method, getter = "position")] + fn position_shim(this: &MediaPositionState) -> f64; #[wasm_bindgen(method, setter = "position")] - fn position_shim(this: &MediaPositionState, val: f64); + fn set_position_shim(this: &MediaPositionState, val: f64); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MediaPositionState` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] +pub trait MediaPositionStateGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn duration(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `playbackRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn playback_rate(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `position` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaPositionState`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn position(&self) -> f64; +} +#[cfg(web_sys_unstable_apis)] +impl MediaPositionStateGetters for MediaPositionState { + #[cfg(web_sys_unstable_apis)] + fn duration(&self) -> f64 { + self.duration_shim() + } + #[cfg(web_sys_unstable_apis)] + fn playback_rate(&self) -> f64 { + self.playback_rate_shim() + } + #[cfg(web_sys_unstable_apis)] + fn position(&self) -> f64 { + self.position_shim() + } } #[cfg(web_sys_unstable_apis)] impl MediaPositionState { @@ -42,7 +93,7 @@ impl MediaPositionState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +104,7 @@ impl MediaPositionState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn playback_rate(&mut self, val: f64) -> &mut Self { - self.playback_rate_shim(val); + self.set_playback_rate_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +115,7 @@ impl MediaPositionState { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn position(&mut self, val: f64) -> &mut Self { - self.position_shim(val); + self.set_position_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs b/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs index 842841ed7d9..5cc937665a6 100644 --- a/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaQueryListEventInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] pub type MediaQueryListEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MediaQueryListEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaQueryListEventInit, val: bool); + fn set_bubbles_shim(this: &MediaQueryListEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MediaQueryListEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaQueryListEventInit, val: bool); + fn set_cancelable_shim(this: &MediaQueryListEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MediaQueryListEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaQueryListEventInit, val: bool); + fn set_composed_shim(this: &MediaQueryListEventInit, val: bool); + #[wasm_bindgen(method, getter = "matches")] + fn matches_shim(this: &MediaQueryListEventInit) -> bool; #[wasm_bindgen(method, setter = "matches")] - fn matches_shim(this: &MediaQueryListEventInit, val: bool); + fn set_matches_shim(this: &MediaQueryListEventInit, val: bool); + #[wasm_bindgen(method, getter = "media")] + fn media_shim(this: &MediaQueryListEventInit) -> String; #[wasm_bindgen(method, setter = "media")] - fn media_shim(this: &MediaQueryListEventInit, val: &str); + fn set_media_shim(this: &MediaQueryListEventInit, val: &str); +} +#[doc = "The trait to access properties on the `MediaQueryListEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] +pub trait MediaQueryListEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `matches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + fn matches(&self) -> bool; + #[doc = "Get the `media` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] + fn media(&self) -> String; +} +impl MediaQueryListEventInitGetters for MediaQueryListEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn matches(&self) -> bool { + self.matches_shim() + } + fn media(&self) -> String { + self.media_shim() + } } impl MediaQueryListEventInit { #[doc = "Construct a new `MediaQueryListEventInit`."] @@ -34,35 +86,35 @@ impl MediaQueryListEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `matches` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] pub fn matches(&mut self, val: bool) -> &mut Self { - self.matches_shim(val); + self.set_matches_shim(val); self } #[doc = "Change the `media` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaQueryListEventInit`*"] pub fn media(&mut self, val: &str) -> &mut Self { - self.media_shim(val); + self.set_media_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs b/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs index bd0cee69550..7fe24b8be54 100644 --- a/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaRecorderErrorEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] pub type MediaRecorderErrorEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MediaRecorderErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaRecorderErrorEventInit, val: bool); + fn set_bubbles_shim(this: &MediaRecorderErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MediaRecorderErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaRecorderErrorEventInit, val: bool); + fn set_cancelable_shim(this: &MediaRecorderErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MediaRecorderErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaRecorderErrorEventInit, val: bool); + fn set_composed_shim(this: &MediaRecorderErrorEventInit, val: bool); + #[cfg(feature = "DomException")] + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &MediaRecorderErrorEventInit) -> DomException; #[cfg(feature = "DomException")] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &MediaRecorderErrorEventInit, val: &DomException); + fn set_error_shim(this: &MediaRecorderErrorEventInit, val: &DomException); +} +#[doc = "The trait to access properties on the `MediaRecorderErrorEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] +pub trait MediaRecorderErrorEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "DomException")] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomException`, `MediaRecorderErrorEventInit`*"] + fn error(&self) -> DomException; +} +impl MediaRecorderErrorEventInitGetters for MediaRecorderErrorEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "DomException")] + fn error(&self) -> DomException { + self.error_shim() + } } impl MediaRecorderErrorEventInit { #[cfg(feature = "DomException")] @@ -28,28 +74,28 @@ impl MediaRecorderErrorEventInit { pub fn new(error: &DomException) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.error(error); + Self::error(&mut ret, error); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderErrorEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "DomException")] @@ -57,7 +103,7 @@ impl MediaRecorderErrorEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DomException`, `MediaRecorderErrorEventInit`*"] pub fn error(&mut self, val: &DomException) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaRecorderOptions.rs b/crates/web-sys/src/features/gen_MediaRecorderOptions.rs index c2b2d199293..b7cfc798163 100644 --- a/crates/web-sys/src/features/gen_MediaRecorderOptions.rs +++ b/crates/web-sys/src/features/gen_MediaRecorderOptions.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] pub type MediaRecorderOptions; + #[wasm_bindgen(method, getter = "audioBitsPerSecond")] + fn audio_bits_per_second_shim(this: &MediaRecorderOptions) -> u32; #[wasm_bindgen(method, setter = "audioBitsPerSecond")] - fn audio_bits_per_second_shim(this: &MediaRecorderOptions, val: u32); + fn set_audio_bits_per_second_shim(this: &MediaRecorderOptions, val: u32); + #[wasm_bindgen(method, getter = "bitsPerSecond")] + fn bits_per_second_shim(this: &MediaRecorderOptions) -> u32; #[wasm_bindgen(method, setter = "bitsPerSecond")] - fn bits_per_second_shim(this: &MediaRecorderOptions, val: u32); + fn set_bits_per_second_shim(this: &MediaRecorderOptions, val: u32); + #[wasm_bindgen(method, getter = "mimeType")] + fn mime_type_shim(this: &MediaRecorderOptions) -> String; #[wasm_bindgen(method, setter = "mimeType")] - fn mime_type_shim(this: &MediaRecorderOptions, val: &str); + fn set_mime_type_shim(this: &MediaRecorderOptions, val: &str); + #[wasm_bindgen(method, getter = "videoBitsPerSecond")] + fn video_bits_per_second_shim(this: &MediaRecorderOptions) -> u32; #[wasm_bindgen(method, setter = "videoBitsPerSecond")] - fn video_bits_per_second_shim(this: &MediaRecorderOptions, val: u32); + fn set_video_bits_per_second_shim(this: &MediaRecorderOptions, val: u32); +} +#[doc = "The trait to access properties on the `MediaRecorderOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] +pub trait MediaRecorderOptionsGetters { + #[doc = "Get the `audioBitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + fn audio_bits_per_second(&self) -> u32; + #[doc = "Get the `bitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + fn bits_per_second(&self) -> u32; + #[doc = "Get the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + fn mime_type(&self) -> String; + #[doc = "Get the `videoBitsPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] + fn video_bits_per_second(&self) -> u32; +} +impl MediaRecorderOptionsGetters for MediaRecorderOptions { + fn audio_bits_per_second(&self) -> u32 { + self.audio_bits_per_second_shim() + } + fn bits_per_second(&self) -> u32 { + self.bits_per_second_shim() + } + fn mime_type(&self) -> String { + self.mime_type_shim() + } + fn video_bits_per_second(&self) -> u32 { + self.video_bits_per_second_shim() + } } impl MediaRecorderOptions { #[doc = "Construct a new `MediaRecorderOptions`."] @@ -32,28 +75,28 @@ impl MediaRecorderOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] pub fn audio_bits_per_second(&mut self, val: u32) -> &mut Self { - self.audio_bits_per_second_shim(val); + self.set_audio_bits_per_second_shim(val); self } #[doc = "Change the `bitsPerSecond` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] pub fn bits_per_second(&mut self, val: u32) -> &mut Self { - self.bits_per_second_shim(val); + self.set_bits_per_second_shim(val); self } #[doc = "Change the `mimeType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] pub fn mime_type(&mut self, val: &str) -> &mut Self { - self.mime_type_shim(val); + self.set_mime_type_shim(val); self } #[doc = "Change the `videoBitsPerSecond` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaRecorderOptions`*"] pub fn video_bits_per_second(&mut self, val: u32) -> &mut Self { - self.video_bits_per_second_shim(val); + self.set_video_bits_per_second_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs b/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs index 45cde7e9664..61871268737 100644 --- a/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs +++ b/crates/web-sys/src/features/gen_MediaSessionActionDetails.rs @@ -15,14 +15,82 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaSessionActionDetails; #[cfg(feature = "MediaSessionAction")] + #[wasm_bindgen(method, getter = "action")] + fn action_shim(this: &MediaSessionActionDetails) -> MediaSessionAction; + #[cfg(feature = "MediaSessionAction")] #[wasm_bindgen(method, setter = "action")] - fn action_shim(this: &MediaSessionActionDetails, val: MediaSessionAction); + fn set_action_shim(this: &MediaSessionActionDetails, val: MediaSessionAction); + #[wasm_bindgen(method, getter = "fastSeek")] + fn fast_seek_shim(this: &MediaSessionActionDetails) -> Option; #[wasm_bindgen(method, setter = "fastSeek")] - fn fast_seek_shim(this: &MediaSessionActionDetails, val: Option); + fn set_fast_seek_shim(this: &MediaSessionActionDetails, val: Option); + #[wasm_bindgen(method, getter = "seekOffset")] + fn seek_offset_shim(this: &MediaSessionActionDetails) -> Option; #[wasm_bindgen(method, setter = "seekOffset")] - fn seek_offset_shim(this: &MediaSessionActionDetails, val: Option); + fn set_seek_offset_shim(this: &MediaSessionActionDetails, val: Option); + #[wasm_bindgen(method, getter = "seekTime")] + fn seek_time_shim(this: &MediaSessionActionDetails) -> Option; #[wasm_bindgen(method, setter = "seekTime")] - fn seek_time_shim(this: &MediaSessionActionDetails, val: Option); + fn set_seek_time_shim(this: &MediaSessionActionDetails, val: Option); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MediaSessionActionDetails` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] +pub trait MediaSessionActionDetailsGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "MediaSessionAction")] + #[doc = "Get the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionAction`, `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn action(&self) -> MediaSessionAction; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `fastSeek` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn fast_seek(&self) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `seekOffset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn seek_offset(&self) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `seekTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaSessionActionDetails`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn seek_time(&self) -> Option; +} +#[cfg(web_sys_unstable_apis)] +impl MediaSessionActionDetailsGetters for MediaSessionActionDetails { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "MediaSessionAction")] + fn action(&self) -> MediaSessionAction { + self.action_shim() + } + #[cfg(web_sys_unstable_apis)] + fn fast_seek(&self) -> Option { + self.fast_seek_shim() + } + #[cfg(web_sys_unstable_apis)] + fn seek_offset(&self) -> Option { + self.seek_offset_shim() + } + #[cfg(web_sys_unstable_apis)] + fn seek_time(&self) -> Option { + self.seek_time_shim() + } } #[cfg(web_sys_unstable_apis)] impl MediaSessionActionDetails { @@ -36,7 +104,7 @@ impl MediaSessionActionDetails { pub fn new(action: MediaSessionAction) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.action(action); + Self::action(&mut ret, action); ret } #[cfg(web_sys_unstable_apis)] @@ -48,7 +116,7 @@ impl MediaSessionActionDetails { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn action(&mut self, val: MediaSessionAction) -> &mut Self { - self.action_shim(val); + self.set_action_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -59,7 +127,7 @@ impl MediaSessionActionDetails { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn fast_seek(&mut self, val: Option) -> &mut Self { - self.fast_seek_shim(val); + self.set_fast_seek_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +138,7 @@ impl MediaSessionActionDetails { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn seek_offset(&mut self, val: Option) -> &mut Self { - self.seek_offset_shim(val); + self.set_seek_offset_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +149,7 @@ impl MediaSessionActionDetails { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn seek_time(&mut self, val: Option) -> &mut Self { - self.seek_time_shim(val); + self.set_seek_time_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs b/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs index 633826b3f34..3e03b8e3e5d 100644 --- a/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs +++ b/crates/web-sys/src/features/gen_MediaStreamAudioSourceOptions.rs @@ -11,8 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `MediaStreamAudioSourceOptions`*"] pub type MediaStreamAudioSourceOptions; #[cfg(feature = "MediaStream")] + #[wasm_bindgen(method, getter = "mediaStream")] + fn media_stream_shim(this: &MediaStreamAudioSourceOptions) -> MediaStream; + #[cfg(feature = "MediaStream")] #[wasm_bindgen(method, setter = "mediaStream")] - fn media_stream_shim(this: &MediaStreamAudioSourceOptions, val: &MediaStream); + fn set_media_stream_shim(this: &MediaStreamAudioSourceOptions, val: &MediaStream); +} +#[doc = "The trait to access properties on the `MediaStreamAudioSourceOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaStreamAudioSourceOptions`*"] +pub trait MediaStreamAudioSourceOptionsGetters { + #[cfg(feature = "MediaStream")] + #[doc = "Get the `mediaStream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamAudioSourceOptions`*"] + fn media_stream(&self) -> MediaStream; +} +impl MediaStreamAudioSourceOptionsGetters for MediaStreamAudioSourceOptions { + #[cfg(feature = "MediaStream")] + fn media_stream(&self) -> MediaStream { + self.media_stream_shim() + } } impl MediaStreamAudioSourceOptions { #[cfg(feature = "MediaStream")] @@ -22,7 +41,7 @@ impl MediaStreamAudioSourceOptions { pub fn new(media_stream: &MediaStream) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.media_stream(media_stream); + Self::media_stream(&mut ret, media_stream); ret } #[cfg(feature = "MediaStream")] @@ -30,7 +49,7 @@ impl MediaStreamAudioSourceOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamAudioSourceOptions`*"] pub fn media_stream(&mut self, val: &MediaStream) -> &mut Self { - self.media_stream_shim(val); + self.set_media_stream_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamConstraints.rs b/crates/web-sys/src/features/gen_MediaStreamConstraints.rs index 9533a444d03..d572e797a90 100644 --- a/crates/web-sys/src/features/gen_MediaStreamConstraints.rs +++ b/crates/web-sys/src/features/gen_MediaStreamConstraints.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] pub type MediaStreamConstraints; + #[wasm_bindgen(method, getter = "audio")] + fn audio_shim(this: &MediaStreamConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "audio")] - fn audio_shim(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); + fn set_audio_shim(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "fake")] + fn fake_shim(this: &MediaStreamConstraints) -> bool; #[wasm_bindgen(method, setter = "fake")] - fn fake_shim(this: &MediaStreamConstraints, val: bool); + fn set_fake_shim(this: &MediaStreamConstraints, val: bool); + #[wasm_bindgen(method, getter = "peerIdentity")] + fn peer_identity_shim(this: &MediaStreamConstraints) -> Option; #[wasm_bindgen(method, setter = "peerIdentity")] - fn peer_identity_shim(this: &MediaStreamConstraints, val: Option<&str>); + fn set_peer_identity_shim(this: &MediaStreamConstraints, val: Option<&str>); + #[wasm_bindgen(method, getter = "picture")] + fn picture_shim(this: &MediaStreamConstraints) -> bool; #[wasm_bindgen(method, setter = "picture")] - fn picture_shim(this: &MediaStreamConstraints, val: bool); + fn set_picture_shim(this: &MediaStreamConstraints, val: bool); + #[wasm_bindgen(method, getter = "video")] + fn video_shim(this: &MediaStreamConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "video")] - fn video_shim(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); + fn set_video_shim(this: &MediaStreamConstraints, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `MediaStreamConstraints` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] +pub trait MediaStreamConstraintsGetters { + #[doc = "Get the `audio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + fn audio(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `fake` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + fn fake(&self) -> bool; + #[doc = "Get the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + fn peer_identity(&self) -> Option; + #[doc = "Get the `picture` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + fn picture(&self) -> bool; + #[doc = "Get the `video` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] + fn video(&self) -> ::wasm_bindgen::JsValue; +} +impl MediaStreamConstraintsGetters for MediaStreamConstraints { + fn audio(&self) -> ::wasm_bindgen::JsValue { + self.audio_shim() + } + fn fake(&self) -> bool { + self.fake_shim() + } + fn peer_identity(&self) -> Option { + self.peer_identity_shim() + } + fn picture(&self) -> bool { + self.picture_shim() + } + fn video(&self) -> ::wasm_bindgen::JsValue { + self.video_shim() + } } impl MediaStreamConstraints { #[doc = "Construct a new `MediaStreamConstraints`."] @@ -34,35 +86,35 @@ impl MediaStreamConstraints { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] pub fn audio(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.audio_shim(val); + self.set_audio_shim(val); self } #[doc = "Change the `fake` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] pub fn fake(&mut self, val: bool) -> &mut Self { - self.fake_shim(val); + self.set_fake_shim(val); self } #[doc = "Change the `peerIdentity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] pub fn peer_identity(&mut self, val: Option<&str>) -> &mut Self { - self.peer_identity_shim(val); + self.set_peer_identity_shim(val); self } #[doc = "Change the `picture` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] pub fn picture(&mut self, val: bool) -> &mut Self { - self.picture_shim(val); + self.set_picture_shim(val); self } #[doc = "Change the `video` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamConstraints`*"] pub fn video(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.video_shim(val); + self.set_video_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamEventInit.rs b/crates/web-sys/src/features/gen_MediaStreamEventInit.rs index 82458dfd60c..94af4f800e2 100644 --- a/crates/web-sys/src/features/gen_MediaStreamEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] pub type MediaStreamEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MediaStreamEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaStreamEventInit, val: bool); + fn set_bubbles_shim(this: &MediaStreamEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MediaStreamEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaStreamEventInit, val: bool); + fn set_cancelable_shim(this: &MediaStreamEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MediaStreamEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaStreamEventInit, val: bool); + fn set_composed_shim(this: &MediaStreamEventInit, val: bool); + #[cfg(feature = "MediaStream")] + #[wasm_bindgen(method, getter = "stream")] + fn stream_shim(this: &MediaStreamEventInit) -> Option; #[cfg(feature = "MediaStream")] #[wasm_bindgen(method, setter = "stream")] - fn stream_shim(this: &MediaStreamEventInit, val: Option<&MediaStream>); + fn set_stream_shim(this: &MediaStreamEventInit, val: Option<&MediaStream>); +} +#[doc = "The trait to access properties on the `MediaStreamEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] +pub trait MediaStreamEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "MediaStream")] + #[doc = "Get the `stream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamEventInit`*"] + fn stream(&self) -> Option; +} +impl MediaStreamEventInitGetters for MediaStreamEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "MediaStream")] + fn stream(&self) -> Option { + self.stream_shim() + } } impl MediaStreamEventInit { #[doc = "Construct a new `MediaStreamEventInit`."] @@ -33,21 +79,21 @@ impl MediaStreamEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "MediaStream")] @@ -55,7 +101,7 @@ impl MediaStreamEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStream`, `MediaStreamEventInit`*"] pub fn stream(&mut self, val: Option<&MediaStream>) -> &mut Self { - self.stream_shim(val); + self.set_stream_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs b/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs index d66b918fe20..d2595475795 100644 --- a/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamTrackEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] pub type MediaStreamTrackEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MediaStreamTrackEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MediaStreamTrackEventInit, val: bool); + fn set_bubbles_shim(this: &MediaStreamTrackEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MediaStreamTrackEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MediaStreamTrackEventInit, val: bool); + fn set_cancelable_shim(this: &MediaStreamTrackEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MediaStreamTrackEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MediaStreamTrackEventInit, val: bool); + fn set_composed_shim(this: &MediaStreamTrackEventInit, val: bool); + #[cfg(feature = "MediaStreamTrack")] + #[wasm_bindgen(method, getter = "track")] + fn track_shim(this: &MediaStreamTrackEventInit) -> MediaStreamTrack; #[cfg(feature = "MediaStreamTrack")] #[wasm_bindgen(method, setter = "track")] - fn track_shim(this: &MediaStreamTrackEventInit, val: &MediaStreamTrack); + fn set_track_shim(this: &MediaStreamTrackEventInit, val: &MediaStreamTrack); +} +#[doc = "The trait to access properties on the `MediaStreamTrackEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] +pub trait MediaStreamTrackEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "MediaStreamTrack")] + #[doc = "Get the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackEventInit`*"] + fn track(&self) -> MediaStreamTrack; +} +impl MediaStreamTrackEventInitGetters for MediaStreamTrackEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "MediaStreamTrack")] + fn track(&self) -> MediaStreamTrack { + self.track_shim() + } } impl MediaStreamTrackEventInit { #[cfg(feature = "MediaStreamTrack")] @@ -28,28 +74,28 @@ impl MediaStreamTrackEventInit { pub fn new(track: &MediaStreamTrack) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.track(track); + Self::track(&mut ret, track); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "MediaStreamTrack")] @@ -57,7 +103,7 @@ impl MediaStreamTrackEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackEventInit`*"] pub fn track(&mut self, val: &MediaStreamTrack) -> &mut Self { - self.track_shim(val); + self.set_track_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs b/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs index a85a9268d57..666b2d358ef 100644 --- a/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamTrackGeneratorInit.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaStreamTrackGeneratorInit; + #[wasm_bindgen(method, getter = "kind")] + fn kind_shim(this: &MediaStreamTrackGeneratorInit) -> String; #[wasm_bindgen(method, setter = "kind")] - fn kind_shim(this: &MediaStreamTrackGeneratorInit, val: &str); + fn set_kind_shim(this: &MediaStreamTrackGeneratorInit, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MediaStreamTrackGeneratorInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"] +pub trait MediaStreamTrackGeneratorInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `kind` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackGeneratorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn kind(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl MediaStreamTrackGeneratorInitGetters for MediaStreamTrackGeneratorInit { + #[cfg(web_sys_unstable_apis)] + fn kind(&self) -> String { + self.kind_shim() + } } #[cfg(web_sys_unstable_apis)] impl MediaStreamTrackGeneratorInit { @@ -28,7 +51,7 @@ impl MediaStreamTrackGeneratorInit { pub fn new(kind: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.kind(kind); + Self::kind(&mut ret, kind); ret } #[cfg(web_sys_unstable_apis)] @@ -39,7 +62,7 @@ impl MediaStreamTrackGeneratorInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn kind(&mut self, val: &str) -> &mut Self { - self.kind_shim(val); + self.set_kind_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs b/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs index fabbd4a7418..51ca2da3daf 100644 --- a/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs +++ b/crates/web-sys/src/features/gen_MediaStreamTrackProcessorInit.rs @@ -14,11 +14,51 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MediaStreamTrackProcessorInit; + #[wasm_bindgen(method, getter = "maxBufferSize")] + fn max_buffer_size_shim(this: &MediaStreamTrackProcessorInit) -> u16; #[wasm_bindgen(method, setter = "maxBufferSize")] - fn max_buffer_size_shim(this: &MediaStreamTrackProcessorInit, val: u16); + fn set_max_buffer_size_shim(this: &MediaStreamTrackProcessorInit, val: u16); + #[cfg(feature = "MediaStreamTrack")] + #[wasm_bindgen(method, getter = "track")] + fn track_shim(this: &MediaStreamTrackProcessorInit) -> MediaStreamTrack; #[cfg(feature = "MediaStreamTrack")] #[wasm_bindgen(method, setter = "track")] - fn track_shim(this: &MediaStreamTrackProcessorInit, val: &MediaStreamTrack); + fn set_track_shim(this: &MediaStreamTrackProcessorInit, val: &MediaStreamTrack); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MediaStreamTrackProcessorInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackProcessorInit`*"] +pub trait MediaStreamTrackProcessorInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `maxBufferSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrackProcessorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn max_buffer_size(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "MediaStreamTrack")] + #[doc = "Get the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `MediaStreamTrackProcessorInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn track(&self) -> MediaStreamTrack; +} +#[cfg(web_sys_unstable_apis)] +impl MediaStreamTrackProcessorInitGetters for MediaStreamTrackProcessorInit { + #[cfg(web_sys_unstable_apis)] + fn max_buffer_size(&self) -> u16 { + self.max_buffer_size_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "MediaStreamTrack")] + fn track(&self) -> MediaStreamTrack { + self.track_shim() + } } #[cfg(web_sys_unstable_apis)] impl MediaStreamTrackProcessorInit { @@ -32,7 +72,7 @@ impl MediaStreamTrackProcessorInit { pub fn new(track: &MediaStreamTrack) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.track(track); + Self::track(&mut ret, track); ret } #[cfg(web_sys_unstable_apis)] @@ -43,7 +83,7 @@ impl MediaStreamTrackProcessorInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn max_buffer_size(&mut self, val: u16) -> &mut Self { - self.max_buffer_size_shim(val); + self.set_max_buffer_size_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +95,7 @@ impl MediaStreamTrackProcessorInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn track(&mut self, val: &MediaStreamTrack) -> &mut Self { - self.track_shim(val); + self.set_track_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs b/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs index 866fad34359..76c02f24961 100644 --- a/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs +++ b/crates/web-sys/src/features/gen_MediaTrackConstraintSet.rs @@ -10,38 +10,189 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub type MediaTrackConstraintSet; + #[wasm_bindgen(method, getter = "autoGainControl")] + fn auto_gain_control_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "autoGainControl")] - fn auto_gain_control_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_auto_gain_control_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "browserWindow")] + fn browser_window_shim(this: &MediaTrackConstraintSet) -> f64; #[wasm_bindgen(method, setter = "browserWindow")] - fn browser_window_shim(this: &MediaTrackConstraintSet, val: f64); + fn set_browser_window_shim(this: &MediaTrackConstraintSet, val: f64); + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_channel_count_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "deviceId")] + fn device_id_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_device_id_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "echoCancellation")] + fn echo_cancellation_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "echoCancellation")] - fn echo_cancellation_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_echo_cancellation_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "facingMode")] + fn facing_mode_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "facingMode")] - fn facing_mode_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_facing_mode_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "frameRate")] + fn frame_rate_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "frameRate")] - fn frame_rate_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_frame_rate_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_height_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "mediaSource")] + fn media_source_shim(this: &MediaTrackConstraintSet) -> String; #[wasm_bindgen(method, setter = "mediaSource")] - fn media_source_shim(this: &MediaTrackConstraintSet, val: &str); + fn set_media_source_shim(this: &MediaTrackConstraintSet, val: &str); + #[wasm_bindgen(method, getter = "noiseSuppression")] + fn noise_suppression_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "noiseSuppression")] - fn noise_suppression_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_noise_suppression_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "scrollWithPage")] + fn scroll_with_page_shim(this: &MediaTrackConstraintSet) -> bool; #[wasm_bindgen(method, setter = "scrollWithPage")] - fn scroll_with_page_shim(this: &MediaTrackConstraintSet, val: bool); + fn set_scroll_with_page_shim(this: &MediaTrackConstraintSet, val: bool); + #[wasm_bindgen(method, getter = "viewportHeight")] + fn viewport_height_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "viewportHeight")] - fn viewport_height_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_viewport_height_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "viewportOffsetX")] + fn viewport_offset_x_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "viewportOffsetX")] - fn viewport_offset_x_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_viewport_offset_x_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "viewportOffsetY")] + fn viewport_offset_y_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "viewportOffsetY")] - fn viewport_offset_y_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_viewport_offset_y_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "viewportWidth")] + fn viewport_width_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "viewportWidth")] - fn viewport_width_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_viewport_width_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &MediaTrackConstraintSet) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); + fn set_width_shim(this: &MediaTrackConstraintSet, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `MediaTrackConstraintSet` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] +pub trait MediaTrackConstraintSetGetters { + #[doc = "Get the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn auto_gain_control(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `browserWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn browser_window(&self) -> f64; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn channel_count(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn device_id(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn echo_cancellation(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn facing_mode(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn frame_rate(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn height(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `mediaSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn media_source(&self) -> String; + #[doc = "Get the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn noise_suppression(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `scrollWithPage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn scroll_with_page(&self) -> bool; + #[doc = "Get the `viewportHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn viewport_height(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `viewportOffsetX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn viewport_offset_x(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `viewportOffsetY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn viewport_offset_y(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `viewportWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn viewport_width(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] + fn width(&self) -> ::wasm_bindgen::JsValue; +} +impl MediaTrackConstraintSetGetters for MediaTrackConstraintSet { + fn auto_gain_control(&self) -> ::wasm_bindgen::JsValue { + self.auto_gain_control_shim() + } + fn browser_window(&self) -> f64 { + self.browser_window_shim() + } + fn channel_count(&self) -> ::wasm_bindgen::JsValue { + self.channel_count_shim() + } + fn device_id(&self) -> ::wasm_bindgen::JsValue { + self.device_id_shim() + } + fn echo_cancellation(&self) -> ::wasm_bindgen::JsValue { + self.echo_cancellation_shim() + } + fn facing_mode(&self) -> ::wasm_bindgen::JsValue { + self.facing_mode_shim() + } + fn frame_rate(&self) -> ::wasm_bindgen::JsValue { + self.frame_rate_shim() + } + fn height(&self) -> ::wasm_bindgen::JsValue { + self.height_shim() + } + fn media_source(&self) -> String { + self.media_source_shim() + } + fn noise_suppression(&self) -> ::wasm_bindgen::JsValue { + self.noise_suppression_shim() + } + fn scroll_with_page(&self) -> bool { + self.scroll_with_page_shim() + } + fn viewport_height(&self) -> ::wasm_bindgen::JsValue { + self.viewport_height_shim() + } + fn viewport_offset_x(&self) -> ::wasm_bindgen::JsValue { + self.viewport_offset_x_shim() + } + fn viewport_offset_y(&self) -> ::wasm_bindgen::JsValue { + self.viewport_offset_y_shim() + } + fn viewport_width(&self) -> ::wasm_bindgen::JsValue { + self.viewport_width_shim() + } + fn width(&self) -> ::wasm_bindgen::JsValue { + self.width_shim() + } } impl MediaTrackConstraintSet { #[doc = "Construct a new `MediaTrackConstraintSet`."] @@ -56,112 +207,112 @@ impl MediaTrackConstraintSet { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.auto_gain_control_shim(val); + self.set_auto_gain_control_shim(val); self } #[doc = "Change the `browserWindow` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn browser_window(&mut self, val: f64) -> &mut Self { - self.browser_window_shim(val); + self.set_browser_window_shim(val); self } #[doc = "Change the `channelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[doc = "Change the `deviceId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn device_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.device_id_shim(val); + self.set_device_id_shim(val); self } #[doc = "Change the `echoCancellation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.echo_cancellation_shim(val); + self.set_echo_cancellation_shim(val); self } #[doc = "Change the `facingMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.facing_mode_shim(val); + self.set_facing_mode_shim(val); self } #[doc = "Change the `frameRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn frame_rate(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.frame_rate_shim(val); + self.set_frame_rate_shim(val); self } #[doc = "Change the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[doc = "Change the `mediaSource` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn media_source(&mut self, val: &str) -> &mut Self { - self.media_source_shim(val); + self.set_media_source_shim(val); self } #[doc = "Change the `noiseSuppression` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.noise_suppression_shim(val); + self.set_noise_suppression_shim(val); self } #[doc = "Change the `scrollWithPage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn scroll_with_page(&mut self, val: bool) -> &mut Self { - self.scroll_with_page_shim(val); + self.set_scroll_with_page_shim(val); self } #[doc = "Change the `viewportHeight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn viewport_height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_height_shim(val); + self.set_viewport_height_shim(val); self } #[doc = "Change the `viewportOffsetX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn viewport_offset_x(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_offset_x_shim(val); + self.set_viewport_offset_x_shim(val); self } #[doc = "Change the `viewportOffsetY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn viewport_offset_y(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_offset_y_shim(val); + self.set_viewport_offset_y_shim(val); self } #[doc = "Change the `viewportWidth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn viewport_width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_width_shim(val); + self.set_viewport_width_shim(val); self } #[doc = "Change the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraintSet`*"] pub fn width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaTrackConstraints.rs b/crates/web-sys/src/features/gen_MediaTrackConstraints.rs index 8b89c26eef7..6f492219ab8 100644 --- a/crates/web-sys/src/features/gen_MediaTrackConstraints.rs +++ b/crates/web-sys/src/features/gen_MediaTrackConstraints.rs @@ -10,40 +10,200 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub type MediaTrackConstraints; + #[wasm_bindgen(method, getter = "autoGainControl")] + fn auto_gain_control_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "autoGainControl")] - fn auto_gain_control_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_auto_gain_control_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "browserWindow")] + fn browser_window_shim(this: &MediaTrackConstraints) -> f64; #[wasm_bindgen(method, setter = "browserWindow")] - fn browser_window_shim(this: &MediaTrackConstraints, val: f64); + fn set_browser_window_shim(this: &MediaTrackConstraints, val: f64); + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_channel_count_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "deviceId")] + fn device_id_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_device_id_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "echoCancellation")] + fn echo_cancellation_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "echoCancellation")] - fn echo_cancellation_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_echo_cancellation_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "facingMode")] + fn facing_mode_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "facingMode")] - fn facing_mode_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_facing_mode_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "frameRate")] + fn frame_rate_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "frameRate")] - fn frame_rate_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_frame_rate_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_height_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "mediaSource")] + fn media_source_shim(this: &MediaTrackConstraints) -> String; #[wasm_bindgen(method, setter = "mediaSource")] - fn media_source_shim(this: &MediaTrackConstraints, val: &str); + fn set_media_source_shim(this: &MediaTrackConstraints, val: &str); + #[wasm_bindgen(method, getter = "noiseSuppression")] + fn noise_suppression_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "noiseSuppression")] - fn noise_suppression_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_noise_suppression_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "scrollWithPage")] + fn scroll_with_page_shim(this: &MediaTrackConstraints) -> bool; #[wasm_bindgen(method, setter = "scrollWithPage")] - fn scroll_with_page_shim(this: &MediaTrackConstraints, val: bool); + fn set_scroll_with_page_shim(this: &MediaTrackConstraints, val: bool); + #[wasm_bindgen(method, getter = "viewportHeight")] + fn viewport_height_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "viewportHeight")] - fn viewport_height_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_viewport_height_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "viewportOffsetX")] + fn viewport_offset_x_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "viewportOffsetX")] - fn viewport_offset_x_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_viewport_offset_x_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "viewportOffsetY")] + fn viewport_offset_y_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "viewportOffsetY")] - fn viewport_offset_y_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_viewport_offset_y_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "viewportWidth")] + fn viewport_width_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "viewportWidth")] - fn viewport_width_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_viewport_width_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_width_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "advanced")] + fn advanced_shim(this: &MediaTrackConstraints) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "advanced")] - fn advanced_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); + fn set_advanced_shim(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `MediaTrackConstraints` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] +pub trait MediaTrackConstraintsGetters { + #[doc = "Get the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn auto_gain_control(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `browserWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn browser_window(&self) -> f64; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn channel_count(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn device_id(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn echo_cancellation(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn facing_mode(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn frame_rate(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn height(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `mediaSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn media_source(&self) -> String; + #[doc = "Get the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn noise_suppression(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `scrollWithPage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn scroll_with_page(&self) -> bool; + #[doc = "Get the `viewportHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn viewport_height(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `viewportOffsetX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn viewport_offset_x(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `viewportOffsetY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn viewport_offset_y(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `viewportWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn viewport_width(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn width(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `advanced` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] + fn advanced(&self) -> ::js_sys::Array; +} +impl MediaTrackConstraintsGetters for MediaTrackConstraints { + fn auto_gain_control(&self) -> ::wasm_bindgen::JsValue { + self.auto_gain_control_shim() + } + fn browser_window(&self) -> f64 { + self.browser_window_shim() + } + fn channel_count(&self) -> ::wasm_bindgen::JsValue { + self.channel_count_shim() + } + fn device_id(&self) -> ::wasm_bindgen::JsValue { + self.device_id_shim() + } + fn echo_cancellation(&self) -> ::wasm_bindgen::JsValue { + self.echo_cancellation_shim() + } + fn facing_mode(&self) -> ::wasm_bindgen::JsValue { + self.facing_mode_shim() + } + fn frame_rate(&self) -> ::wasm_bindgen::JsValue { + self.frame_rate_shim() + } + fn height(&self) -> ::wasm_bindgen::JsValue { + self.height_shim() + } + fn media_source(&self) -> String { + self.media_source_shim() + } + fn noise_suppression(&self) -> ::wasm_bindgen::JsValue { + self.noise_suppression_shim() + } + fn scroll_with_page(&self) -> bool { + self.scroll_with_page_shim() + } + fn viewport_height(&self) -> ::wasm_bindgen::JsValue { + self.viewport_height_shim() + } + fn viewport_offset_x(&self) -> ::wasm_bindgen::JsValue { + self.viewport_offset_x_shim() + } + fn viewport_offset_y(&self) -> ::wasm_bindgen::JsValue { + self.viewport_offset_y_shim() + } + fn viewport_width(&self) -> ::wasm_bindgen::JsValue { + self.viewport_width_shim() + } + fn width(&self) -> ::wasm_bindgen::JsValue { + self.width_shim() + } + fn advanced(&self) -> ::js_sys::Array { + self.advanced_shim() + } } impl MediaTrackConstraints { #[doc = "Construct a new `MediaTrackConstraints`."] @@ -58,119 +218,119 @@ impl MediaTrackConstraints { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.auto_gain_control_shim(val); + self.set_auto_gain_control_shim(val); self } #[doc = "Change the `browserWindow` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn browser_window(&mut self, val: f64) -> &mut Self { - self.browser_window_shim(val); + self.set_browser_window_shim(val); self } #[doc = "Change the `channelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[doc = "Change the `deviceId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn device_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.device_id_shim(val); + self.set_device_id_shim(val); self } #[doc = "Change the `echoCancellation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.echo_cancellation_shim(val); + self.set_echo_cancellation_shim(val); self } #[doc = "Change the `facingMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.facing_mode_shim(val); + self.set_facing_mode_shim(val); self } #[doc = "Change the `frameRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn frame_rate(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.frame_rate_shim(val); + self.set_frame_rate_shim(val); self } #[doc = "Change the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[doc = "Change the `mediaSource` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn media_source(&mut self, val: &str) -> &mut Self { - self.media_source_shim(val); + self.set_media_source_shim(val); self } #[doc = "Change the `noiseSuppression` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.noise_suppression_shim(val); + self.set_noise_suppression_shim(val); self } #[doc = "Change the `scrollWithPage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn scroll_with_page(&mut self, val: bool) -> &mut Self { - self.scroll_with_page_shim(val); + self.set_scroll_with_page_shim(val); self } #[doc = "Change the `viewportHeight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn viewport_height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_height_shim(val); + self.set_viewport_height_shim(val); self } #[doc = "Change the `viewportOffsetX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn viewport_offset_x(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_offset_x_shim(val); + self.set_viewport_offset_x_shim(val); self } #[doc = "Change the `viewportOffsetY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn viewport_offset_y(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_offset_y_shim(val); + self.set_viewport_offset_y_shim(val); self } #[doc = "Change the `viewportWidth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn viewport_width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.viewport_width_shim(val); + self.set_viewport_width_shim(val); self } #[doc = "Change the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } #[doc = "Change the `advanced` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"] pub fn advanced(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.advanced_shim(val); + self.set_advanced_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaTrackSettings.rs b/crates/web-sys/src/features/gen_MediaTrackSettings.rs index 3bd4e245aac..a59bf8525e9 100644 --- a/crates/web-sys/src/features/gen_MediaTrackSettings.rs +++ b/crates/web-sys/src/features/gen_MediaTrackSettings.rs @@ -10,24 +10,112 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub type MediaTrackSettings; + #[wasm_bindgen(method, getter = "autoGainControl")] + fn auto_gain_control_shim(this: &MediaTrackSettings) -> bool; #[wasm_bindgen(method, setter = "autoGainControl")] - fn auto_gain_control_shim(this: &MediaTrackSettings, val: bool); + fn set_auto_gain_control_shim(this: &MediaTrackSettings, val: bool); + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &MediaTrackSettings) -> i32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &MediaTrackSettings, val: i32); + fn set_channel_count_shim(this: &MediaTrackSettings, val: i32); + #[wasm_bindgen(method, getter = "deviceId")] + fn device_id_shim(this: &MediaTrackSettings) -> String; #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &MediaTrackSettings, val: &str); + fn set_device_id_shim(this: &MediaTrackSettings, val: &str); + #[wasm_bindgen(method, getter = "echoCancellation")] + fn echo_cancellation_shim(this: &MediaTrackSettings) -> bool; #[wasm_bindgen(method, setter = "echoCancellation")] - fn echo_cancellation_shim(this: &MediaTrackSettings, val: bool); + fn set_echo_cancellation_shim(this: &MediaTrackSettings, val: bool); + #[wasm_bindgen(method, getter = "facingMode")] + fn facing_mode_shim(this: &MediaTrackSettings) -> String; #[wasm_bindgen(method, setter = "facingMode")] - fn facing_mode_shim(this: &MediaTrackSettings, val: &str); + fn set_facing_mode_shim(this: &MediaTrackSettings, val: &str); + #[wasm_bindgen(method, getter = "frameRate")] + fn frame_rate_shim(this: &MediaTrackSettings) -> f64; #[wasm_bindgen(method, setter = "frameRate")] - fn frame_rate_shim(this: &MediaTrackSettings, val: f64); + fn set_frame_rate_shim(this: &MediaTrackSettings, val: f64); + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &MediaTrackSettings) -> i32; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &MediaTrackSettings, val: i32); + fn set_height_shim(this: &MediaTrackSettings, val: i32); + #[wasm_bindgen(method, getter = "noiseSuppression")] + fn noise_suppression_shim(this: &MediaTrackSettings) -> bool; #[wasm_bindgen(method, setter = "noiseSuppression")] - fn noise_suppression_shim(this: &MediaTrackSettings, val: bool); + fn set_noise_suppression_shim(this: &MediaTrackSettings, val: bool); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &MediaTrackSettings) -> i32; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &MediaTrackSettings, val: i32); + fn set_width_shim(this: &MediaTrackSettings, val: i32); +} +#[doc = "The trait to access properties on the `MediaTrackSettings` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] +pub trait MediaTrackSettingsGetters { + #[doc = "Get the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + fn auto_gain_control(&self) -> bool; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + fn channel_count(&self) -> i32; + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + fn device_id(&self) -> String; + #[doc = "Get the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + fn echo_cancellation(&self) -> bool; + #[doc = "Get the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + fn facing_mode(&self) -> String; + #[doc = "Get the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + fn frame_rate(&self) -> f64; + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + fn height(&self) -> i32; + #[doc = "Get the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + fn noise_suppression(&self) -> bool; + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] + fn width(&self) -> i32; +} +impl MediaTrackSettingsGetters for MediaTrackSettings { + fn auto_gain_control(&self) -> bool { + self.auto_gain_control_shim() + } + fn channel_count(&self) -> i32 { + self.channel_count_shim() + } + fn device_id(&self) -> String { + self.device_id_shim() + } + fn echo_cancellation(&self) -> bool { + self.echo_cancellation_shim() + } + fn facing_mode(&self) -> String { + self.facing_mode_shim() + } + fn frame_rate(&self) -> f64 { + self.frame_rate_shim() + } + fn height(&self) -> i32 { + self.height_shim() + } + fn noise_suppression(&self) -> bool { + self.noise_suppression_shim() + } + fn width(&self) -> i32 { + self.width_shim() + } } impl MediaTrackSettings { #[doc = "Construct a new `MediaTrackSettings`."] @@ -42,63 +130,63 @@ impl MediaTrackSettings { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub fn auto_gain_control(&mut self, val: bool) -> &mut Self { - self.auto_gain_control_shim(val); + self.set_auto_gain_control_shim(val); self } #[doc = "Change the `channelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub fn channel_count(&mut self, val: i32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[doc = "Change the `deviceId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub fn device_id(&mut self, val: &str) -> &mut Self { - self.device_id_shim(val); + self.set_device_id_shim(val); self } #[doc = "Change the `echoCancellation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub fn echo_cancellation(&mut self, val: bool) -> &mut Self { - self.echo_cancellation_shim(val); + self.set_echo_cancellation_shim(val); self } #[doc = "Change the `facingMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub fn facing_mode(&mut self, val: &str) -> &mut Self { - self.facing_mode_shim(val); + self.set_facing_mode_shim(val); self } #[doc = "Change the `frameRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub fn frame_rate(&mut self, val: f64) -> &mut Self { - self.frame_rate_shim(val); + self.set_frame_rate_shim(val); self } #[doc = "Change the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub fn height(&mut self, val: i32) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[doc = "Change the `noiseSuppression` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub fn noise_suppression(&mut self, val: bool) -> &mut Self { - self.noise_suppression_shim(val); + self.set_noise_suppression_shim(val); self } #[doc = "Change the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"] pub fn width(&mut self, val: i32) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs b/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs index 1cf7fc77567..d2914c4748e 100644 --- a/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs +++ b/crates/web-sys/src/features/gen_MediaTrackSupportedConstraints.rs @@ -10,36 +10,178 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub type MediaTrackSupportedConstraints; + #[wasm_bindgen(method, getter = "aspectRatio")] + fn aspect_ratio_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "aspectRatio")] - fn aspect_ratio_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_aspect_ratio_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "autoGainControl")] + fn auto_gain_control_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "autoGainControl")] - fn auto_gain_control_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_auto_gain_control_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_channel_count_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "deviceId")] + fn device_id_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "deviceId")] - fn device_id_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_device_id_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "echoCancellation")] + fn echo_cancellation_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "echoCancellation")] - fn echo_cancellation_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_echo_cancellation_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "facingMode")] + fn facing_mode_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "facingMode")] - fn facing_mode_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_facing_mode_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "frameRate")] + fn frame_rate_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "frameRate")] - fn frame_rate_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_frame_rate_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "groupId")] + fn group_id_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "groupId")] - fn group_id_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_group_id_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_height_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "latency")] + fn latency_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "latency")] - fn latency_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_latency_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "noiseSuppression")] + fn noise_suppression_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "noiseSuppression")] - fn noise_suppression_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_noise_suppression_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "sampleRate")] + fn sample_rate_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_sample_rate_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "sampleSize")] + fn sample_size_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "sampleSize")] - fn sample_size_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_sample_size_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "volume")] + fn volume_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "volume")] - fn volume_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_volume_shim(this: &MediaTrackSupportedConstraints, val: bool); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &MediaTrackSupportedConstraints) -> bool; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &MediaTrackSupportedConstraints, val: bool); + fn set_width_shim(this: &MediaTrackSupportedConstraints, val: bool); +} +#[doc = "The trait to access properties on the `MediaTrackSupportedConstraints` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] +pub trait MediaTrackSupportedConstraintsGetters { + #[doc = "Get the `aspectRatio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn aspect_ratio(&self) -> bool; + #[doc = "Get the `autoGainControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn auto_gain_control(&self) -> bool; + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn channel_count(&self) -> bool; + #[doc = "Get the `deviceId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn device_id(&self) -> bool; + #[doc = "Get the `echoCancellation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn echo_cancellation(&self) -> bool; + #[doc = "Get the `facingMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn facing_mode(&self) -> bool; + #[doc = "Get the `frameRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn frame_rate(&self) -> bool; + #[doc = "Get the `groupId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn group_id(&self) -> bool; + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn height(&self) -> bool; + #[doc = "Get the `latency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn latency(&self) -> bool; + #[doc = "Get the `noiseSuppression` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn noise_suppression(&self) -> bool; + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn sample_rate(&self) -> bool; + #[doc = "Get the `sampleSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn sample_size(&self) -> bool; + #[doc = "Get the `volume` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn volume(&self) -> bool; + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] + fn width(&self) -> bool; +} +impl MediaTrackSupportedConstraintsGetters for MediaTrackSupportedConstraints { + fn aspect_ratio(&self) -> bool { + self.aspect_ratio_shim() + } + fn auto_gain_control(&self) -> bool { + self.auto_gain_control_shim() + } + fn channel_count(&self) -> bool { + self.channel_count_shim() + } + fn device_id(&self) -> bool { + self.device_id_shim() + } + fn echo_cancellation(&self) -> bool { + self.echo_cancellation_shim() + } + fn facing_mode(&self) -> bool { + self.facing_mode_shim() + } + fn frame_rate(&self) -> bool { + self.frame_rate_shim() + } + fn group_id(&self) -> bool { + self.group_id_shim() + } + fn height(&self) -> bool { + self.height_shim() + } + fn latency(&self) -> bool { + self.latency_shim() + } + fn noise_suppression(&self) -> bool { + self.noise_suppression_shim() + } + fn sample_rate(&self) -> bool { + self.sample_rate_shim() + } + fn sample_size(&self) -> bool { + self.sample_size_shim() + } + fn volume(&self) -> bool { + self.volume_shim() + } + fn width(&self) -> bool { + self.width_shim() + } } impl MediaTrackSupportedConstraints { #[doc = "Construct a new `MediaTrackSupportedConstraints`."] @@ -54,105 +196,105 @@ impl MediaTrackSupportedConstraints { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn aspect_ratio(&mut self, val: bool) -> &mut Self { - self.aspect_ratio_shim(val); + self.set_aspect_ratio_shim(val); self } #[doc = "Change the `autoGainControl` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn auto_gain_control(&mut self, val: bool) -> &mut Self { - self.auto_gain_control_shim(val); + self.set_auto_gain_control_shim(val); self } #[doc = "Change the `channelCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn channel_count(&mut self, val: bool) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[doc = "Change the `deviceId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn device_id(&mut self, val: bool) -> &mut Self { - self.device_id_shim(val); + self.set_device_id_shim(val); self } #[doc = "Change the `echoCancellation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn echo_cancellation(&mut self, val: bool) -> &mut Self { - self.echo_cancellation_shim(val); + self.set_echo_cancellation_shim(val); self } #[doc = "Change the `facingMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn facing_mode(&mut self, val: bool) -> &mut Self { - self.facing_mode_shim(val); + self.set_facing_mode_shim(val); self } #[doc = "Change the `frameRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn frame_rate(&mut self, val: bool) -> &mut Self { - self.frame_rate_shim(val); + self.set_frame_rate_shim(val); self } #[doc = "Change the `groupId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn group_id(&mut self, val: bool) -> &mut Self { - self.group_id_shim(val); + self.set_group_id_shim(val); self } #[doc = "Change the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn height(&mut self, val: bool) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[doc = "Change the `latency` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn latency(&mut self, val: bool) -> &mut Self { - self.latency_shim(val); + self.set_latency_shim(val); self } #[doc = "Change the `noiseSuppression` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn noise_suppression(&mut self, val: bool) -> &mut Self { - self.noise_suppression_shim(val); + self.set_noise_suppression_shim(val); self } #[doc = "Change the `sampleRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn sample_rate(&mut self, val: bool) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate_shim(val); self } #[doc = "Change the `sampleSize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn sample_size(&mut self, val: bool) -> &mut Self { - self.sample_size_shim(val); + self.set_sample_size_shim(val); self } #[doc = "Change the `volume` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn volume(&mut self, val: bool) -> &mut Self { - self.volume_shim(val); + self.set_volume_shim(val); self } #[doc = "Change the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"] pub fn width(&mut self, val: bool) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MemoryAttribution.rs b/crates/web-sys/src/features/gen_MemoryAttribution.rs index 9fdedda1113..5cf6cffdee3 100644 --- a/crates/web-sys/src/features/gen_MemoryAttribution.rs +++ b/crates/web-sys/src/features/gen_MemoryAttribution.rs @@ -15,12 +15,66 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MemoryAttribution; #[cfg(feature = "MemoryAttributionContainer")] + #[wasm_bindgen(method, getter = "container")] + fn container_shim(this: &MemoryAttribution) -> MemoryAttributionContainer; + #[cfg(feature = "MemoryAttributionContainer")] #[wasm_bindgen(method, setter = "container")] - fn container_shim(this: &MemoryAttribution, val: &MemoryAttributionContainer); + fn set_container_shim(this: &MemoryAttribution, val: &MemoryAttributionContainer); + #[wasm_bindgen(method, getter = "scope")] + fn scope_shim(this: &MemoryAttribution) -> String; #[wasm_bindgen(method, setter = "scope")] - fn scope_shim(this: &MemoryAttribution, val: &str); + fn set_scope_shim(this: &MemoryAttribution, val: &str); + #[wasm_bindgen(method, getter = "url")] + fn url_shim(this: &MemoryAttribution) -> String; #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &MemoryAttribution, val: &str); + fn set_url_shim(this: &MemoryAttribution, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MemoryAttribution` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] +pub trait MemoryAttributionGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "MemoryAttributionContainer")] + #[doc = "Get the `container` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`, `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn container(&self) -> MemoryAttributionContainer; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn scope(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttribution`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn url(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl MemoryAttributionGetters for MemoryAttribution { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "MemoryAttributionContainer")] + fn container(&self) -> MemoryAttributionContainer { + self.container_shim() + } + #[cfg(web_sys_unstable_apis)] + fn scope(&self) -> String { + self.scope_shim() + } + #[cfg(web_sys_unstable_apis)] + fn url(&self) -> String { + self.url_shim() + } } #[cfg(web_sys_unstable_apis)] impl MemoryAttribution { @@ -44,7 +98,7 @@ impl MemoryAttribution { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn container(&mut self, val: &MemoryAttributionContainer) -> &mut Self { - self.container_shim(val); + self.set_container_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +109,7 @@ impl MemoryAttribution { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn scope(&mut self, val: &str) -> &mut Self { - self.scope_shim(val); + self.set_scope_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +120,7 @@ impl MemoryAttribution { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs b/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs index 0dfe8ce12ea..6ae5c02310b 100644 --- a/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs +++ b/crates/web-sys/src/features/gen_MemoryAttributionContainer.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MemoryAttributionContainer; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &MemoryAttributionContainer) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &MemoryAttributionContainer, val: &str); + fn set_id_shim(this: &MemoryAttributionContainer, val: &str); + #[wasm_bindgen(method, getter = "src")] + fn src_shim(this: &MemoryAttributionContainer) -> String; #[wasm_bindgen(method, setter = "src")] - fn src_shim(this: &MemoryAttributionContainer, val: &str); + fn set_src_shim(this: &MemoryAttributionContainer, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MemoryAttributionContainer` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] +pub trait MemoryAttributionContainerGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn id(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `src` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryAttributionContainer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn src(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl MemoryAttributionContainerGetters for MemoryAttributionContainer { + #[cfg(web_sys_unstable_apis)] + fn id(&self) -> String { + self.id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn src(&self) -> String { + self.src_shim() + } } #[cfg(web_sys_unstable_apis)] impl MemoryAttributionContainer { @@ -40,7 +77,7 @@ impl MemoryAttributionContainer { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl MemoryAttributionContainer { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn src(&mut self, val: &str) -> &mut Self { - self.src_shim(val); + self.set_src_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs b/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs index 05592cc877c..8e1cf7a0d71 100644 --- a/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs +++ b/crates/web-sys/src/features/gen_MemoryBreakdownEntry.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MemoryBreakdownEntry; + #[wasm_bindgen(method, getter = "attribution")] + fn attribution_shim(this: &MemoryBreakdownEntry) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "attribution")] - fn attribution_shim(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); + fn set_attribution_shim(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "bytes")] + fn bytes_shim(this: &MemoryBreakdownEntry) -> f64; #[wasm_bindgen(method, setter = "bytes")] - fn bytes_shim(this: &MemoryBreakdownEntry, val: f64); + fn set_bytes_shim(this: &MemoryBreakdownEntry, val: f64); + #[wasm_bindgen(method, getter = "types")] + fn types_shim(this: &MemoryBreakdownEntry) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "types")] - fn types_shim(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); + fn set_types_shim(this: &MemoryBreakdownEntry, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MemoryBreakdownEntry` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] +pub trait MemoryBreakdownEntryGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `attribution` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn attribution(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryBreakdownEntry`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn types(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl MemoryBreakdownEntryGetters for MemoryBreakdownEntry { + #[cfg(web_sys_unstable_apis)] + fn attribution(&self) -> ::js_sys::Array { + self.attribution_shim() + } + #[cfg(web_sys_unstable_apis)] + fn bytes(&self) -> f64 { + self.bytes_shim() + } + #[cfg(web_sys_unstable_apis)] + fn types(&self) -> ::js_sys::Array { + self.types_shim() + } } #[cfg(web_sys_unstable_apis)] impl MemoryBreakdownEntry { @@ -42,7 +93,7 @@ impl MemoryBreakdownEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn attribution(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.attribution_shim(val); + self.set_attribution_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +104,7 @@ impl MemoryBreakdownEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes(&mut self, val: f64) -> &mut Self { - self.bytes_shim(val); + self.set_bytes_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +115,7 @@ impl MemoryBreakdownEntry { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.types_shim(val); + self.set_types_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MemoryMeasurement.rs b/crates/web-sys/src/features/gen_MemoryMeasurement.rs index b3bbfaca883..70cd0bea148 100644 --- a/crates/web-sys/src/features/gen_MemoryMeasurement.rs +++ b/crates/web-sys/src/features/gen_MemoryMeasurement.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type MemoryMeasurement; + #[wasm_bindgen(method, getter = "breakdown")] + fn breakdown_shim(this: &MemoryMeasurement) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "breakdown")] - fn breakdown_shim(this: &MemoryMeasurement, val: &::wasm_bindgen::JsValue); + fn set_breakdown_shim(this: &MemoryMeasurement, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "bytes")] + fn bytes_shim(this: &MemoryMeasurement) -> f64; #[wasm_bindgen(method, setter = "bytes")] - fn bytes_shim(this: &MemoryMeasurement, val: f64); + fn set_bytes_shim(this: &MemoryMeasurement, val: f64); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `MemoryMeasurement` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] +pub trait MemoryMeasurementGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `breakdown` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn breakdown(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MemoryMeasurement`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes(&self) -> f64; +} +#[cfg(web_sys_unstable_apis)] +impl MemoryMeasurementGetters for MemoryMeasurement { + #[cfg(web_sys_unstable_apis)] + fn breakdown(&self) -> ::js_sys::Array { + self.breakdown_shim() + } + #[cfg(web_sys_unstable_apis)] + fn bytes(&self) -> f64 { + self.bytes_shim() + } } #[cfg(web_sys_unstable_apis)] impl MemoryMeasurement { @@ -40,7 +77,7 @@ impl MemoryMeasurement { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn breakdown(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.breakdown_shim(val); + self.set_breakdown_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl MemoryMeasurement { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes(&mut self, val: f64) -> &mut Self { - self.bytes_shim(val); + self.set_bytes_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MessageEventInit.rs b/crates/web-sys/src/features/gen_MessageEventInit.rs index 0e5381f8cc9..79ab40f9193 100644 --- a/crates/web-sys/src/features/gen_MessageEventInit.rs +++ b/crates/web-sys/src/features/gen_MessageEventInit.rs @@ -10,22 +10,101 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub type MessageEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MessageEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MessageEventInit, val: bool); + fn set_bubbles_shim(this: &MessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MessageEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MessageEventInit, val: bool); + fn set_cancelable_shim(this: &MessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MessageEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MessageEventInit, val: bool); + fn set_composed_shim(this: &MessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &MessageEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + fn set_data_shim(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "lastEventId")] + fn last_event_id_shim(this: &MessageEventInit) -> String; #[wasm_bindgen(method, setter = "lastEventId")] - fn last_event_id_shim(this: &MessageEventInit, val: &str); + fn set_last_event_id_shim(this: &MessageEventInit, val: &str); + #[wasm_bindgen(method, getter = "origin")] + fn origin_shim(this: &MessageEventInit) -> String; #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &MessageEventInit, val: &str); + fn set_origin_shim(this: &MessageEventInit, val: &str); + #[wasm_bindgen(method, getter = "ports")] + fn ports_shim(this: &MessageEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "ports")] - fn ports_shim(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + fn set_ports_shim(this: &MessageEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &MessageEventInit) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &MessageEventInit, val: Option<&::js_sys::Object>); + fn set_source_shim(this: &MessageEventInit, val: Option<&::js_sys::Object>); +} +#[doc = "The trait to access properties on the `MessageEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] +pub trait MessageEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + fn data(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `lastEventId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + fn last_event_id(&self) -> String; + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + fn origin(&self) -> String; + #[doc = "Get the `ports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + fn ports(&self) -> ::js_sys::Array; + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] + fn source(&self) -> Option<::js_sys::Object>; +} +impl MessageEventInitGetters for MessageEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn data(&self) -> ::wasm_bindgen::JsValue { + self.data_shim() + } + fn last_event_id(&self) -> String { + self.last_event_id_shim() + } + fn origin(&self) -> String { + self.origin_shim() + } + fn ports(&self) -> ::js_sys::Array { + self.ports_shim() + } + fn source(&self) -> Option<::js_sys::Object> { + self.source_shim() + } } impl MessageEventInit { #[doc = "Construct a new `MessageEventInit`."] @@ -40,56 +119,56 @@ impl MessageEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[doc = "Change the `lastEventId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub fn last_event_id(&mut self, val: &str) -> &mut Self { - self.last_event_id_shim(val); + self.set_last_event_id_shim(val); self } #[doc = "Change the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin_shim(val); self } #[doc = "Change the `ports` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub fn ports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ports_shim(val); + self.set_ports_shim(val); self } #[doc = "Change the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MessageEventInit`*"] pub fn source(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs b/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs index 77e2f4b71df..b507a378aa8 100644 --- a/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs +++ b/crates/web-sys/src/features/gen_MidiConnectionEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] pub type MidiConnectionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MidiConnectionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MidiConnectionEventInit, val: bool); + fn set_bubbles_shim(this: &MidiConnectionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MidiConnectionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MidiConnectionEventInit, val: bool); + fn set_cancelable_shim(this: &MidiConnectionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MidiConnectionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MidiConnectionEventInit, val: bool); + fn set_composed_shim(this: &MidiConnectionEventInit, val: bool); + #[cfg(feature = "MidiPort")] + #[wasm_bindgen(method, getter = "port")] + fn port_shim(this: &MidiConnectionEventInit) -> Option; #[cfg(feature = "MidiPort")] #[wasm_bindgen(method, setter = "port")] - fn port_shim(this: &MidiConnectionEventInit, val: Option<&MidiPort>); + fn set_port_shim(this: &MidiConnectionEventInit, val: Option<&MidiPort>); +} +#[doc = "The trait to access properties on the `MidiConnectionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] +pub trait MidiConnectionEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "MidiPort")] + #[doc = "Get the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`, `MidiPort`*"] + fn port(&self) -> Option; +} +impl MidiConnectionEventInitGetters for MidiConnectionEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "MidiPort")] + fn port(&self) -> Option { + self.port_shim() + } } impl MidiConnectionEventInit { #[doc = "Construct a new `MidiConnectionEventInit`."] @@ -33,21 +79,21 @@ impl MidiConnectionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "MidiPort")] @@ -55,7 +101,7 @@ impl MidiConnectionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEventInit`, `MidiPort`*"] pub fn port(&mut self, val: Option<&MidiPort>) -> &mut Self { - self.port_shim(val); + self.set_port_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MidiMessageEventInit.rs b/crates/web-sys/src/features/gen_MidiMessageEventInit.rs index da581fa01f1..6f561816f93 100644 --- a/crates/web-sys/src/features/gen_MidiMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_MidiMessageEventInit.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] pub type MidiMessageEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MidiMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MidiMessageEventInit, val: bool); + fn set_bubbles_shim(this: &MidiMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MidiMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MidiMessageEventInit, val: bool); + fn set_cancelable_shim(this: &MidiMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MidiMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MidiMessageEventInit, val: bool); + fn set_composed_shim(this: &MidiMessageEventInit, val: bool); +} +#[doc = "The trait to access properties on the `MidiMessageEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] +pub trait MidiMessageEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] + fn composed(&self) -> bool; +} +impl MidiMessageEventInitGetters for MidiMessageEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } } impl MidiMessageEventInit { #[doc = "Construct a new `MidiMessageEventInit`."] @@ -30,21 +64,21 @@ impl MidiMessageEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiMessageEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MidiOptions.rs b/crates/web-sys/src/features/gen_MidiOptions.rs index bb9a50ece05..2e0710f827f 100644 --- a/crates/web-sys/src/features/gen_MidiOptions.rs +++ b/crates/web-sys/src/features/gen_MidiOptions.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] pub type MidiOptions; + #[wasm_bindgen(method, getter = "software")] + fn software_shim(this: &MidiOptions) -> bool; #[wasm_bindgen(method, setter = "software")] - fn software_shim(this: &MidiOptions, val: bool); + fn set_software_shim(this: &MidiOptions, val: bool); + #[wasm_bindgen(method, getter = "sysex")] + fn sysex_shim(this: &MidiOptions) -> bool; #[wasm_bindgen(method, setter = "sysex")] - fn sysex_shim(this: &MidiOptions, val: bool); + fn set_sysex_shim(this: &MidiOptions, val: bool); +} +#[doc = "The trait to access properties on the `MidiOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] +pub trait MidiOptionsGetters { + #[doc = "Get the `software` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] + fn software(&self) -> bool; + #[doc = "Get the `sysex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] + fn sysex(&self) -> bool; +} +impl MidiOptionsGetters for MidiOptions { + fn software(&self) -> bool { + self.software_shim() + } + fn sysex(&self) -> bool { + self.sysex_shim() + } } impl MidiOptions { #[doc = "Construct a new `MidiOptions`."] @@ -28,14 +53,14 @@ impl MidiOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] pub fn software(&mut self, val: bool) -> &mut Self { - self.software_shim(val); + self.set_software_shim(val); self } #[doc = "Change the `sysex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MidiOptions`*"] pub fn sysex(&mut self, val: bool) -> &mut Self { - self.sysex_shim(val); + self.set_sysex_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MouseEventInit.rs b/crates/web-sys/src/features/gen_MouseEventInit.rs index 340e3bddebd..a636dea1a36 100644 --- a/crates/web-sys/src/features/gen_MouseEventInit.rs +++ b/crates/web-sys/src/features/gen_MouseEventInit.rs @@ -10,62 +10,318 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub type MouseEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &MouseEventInit, val: bool); + fn set_bubbles_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &MouseEventInit, val: bool); + fn set_cancelable_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &MouseEventInit, val: bool); + fn set_composed_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &MouseEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &MouseEventInit, val: i32); + fn set_detail_shim(this: &MouseEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &MouseEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &MouseEventInit, val: Option<&Window>); + fn set_view_shim(this: &MouseEventInit, val: Option<&Window>); + #[wasm_bindgen(method, getter = "altKey")] + fn alt_key_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &MouseEventInit, val: bool); + fn set_alt_key_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "ctrlKey")] + fn ctrl_key_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &MouseEventInit, val: bool); + fn set_ctrl_key_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "metaKey")] + fn meta_key_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &MouseEventInit, val: bool); + fn set_meta_key_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierAltGraph")] + fn modifier_alt_graph_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &MouseEventInit, val: bool); + fn set_modifier_alt_graph_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierCapsLock")] + fn modifier_caps_lock_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &MouseEventInit, val: bool); + fn set_modifier_caps_lock_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFn")] + fn modifier_fn_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &MouseEventInit, val: bool); + fn set_modifier_fn_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFnLock")] + fn modifier_fn_lock_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &MouseEventInit, val: bool); + fn set_modifier_fn_lock_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierNumLock")] + fn modifier_num_lock_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &MouseEventInit, val: bool); + fn set_modifier_num_lock_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierOS")] + fn modifier_os_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &MouseEventInit, val: bool); + fn set_modifier_os_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierScrollLock")] + fn modifier_scroll_lock_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &MouseEventInit, val: bool); + fn set_modifier_scroll_lock_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbol")] + fn modifier_symbol_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &MouseEventInit, val: bool); + fn set_modifier_symbol_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + fn modifier_symbol_lock_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &MouseEventInit, val: bool); + fn set_modifier_symbol_lock_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "shiftKey")] + fn shift_key_shim(this: &MouseEventInit) -> bool; #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &MouseEventInit, val: bool); + fn set_shift_key_shim(this: &MouseEventInit, val: bool); + #[wasm_bindgen(method, getter = "button")] + fn button_shim(this: &MouseEventInit) -> i16; #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &MouseEventInit, val: i16); + fn set_button_shim(this: &MouseEventInit, val: i16); + #[wasm_bindgen(method, getter = "buttons")] + fn buttons_shim(this: &MouseEventInit) -> u16; #[wasm_bindgen(method, setter = "buttons")] - fn buttons_shim(this: &MouseEventInit, val: u16); + fn set_buttons_shim(this: &MouseEventInit, val: u16); + #[wasm_bindgen(method, getter = "clientX")] + fn client_x_shim(this: &MouseEventInit) -> i32; #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &MouseEventInit, val: i32); + fn set_client_x_shim(this: &MouseEventInit, val: i32); + #[wasm_bindgen(method, getter = "clientY")] + fn client_y_shim(this: &MouseEventInit) -> i32; #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &MouseEventInit, val: i32); + fn set_client_y_shim(this: &MouseEventInit, val: i32); + #[wasm_bindgen(method, getter = "movementX")] + fn movement_x_shim(this: &MouseEventInit) -> i32; #[wasm_bindgen(method, setter = "movementX")] - fn movement_x_shim(this: &MouseEventInit, val: i32); + fn set_movement_x_shim(this: &MouseEventInit, val: i32); + #[wasm_bindgen(method, getter = "movementY")] + fn movement_y_shim(this: &MouseEventInit) -> i32; #[wasm_bindgen(method, setter = "movementY")] - fn movement_y_shim(this: &MouseEventInit, val: i32); + fn set_movement_y_shim(this: &MouseEventInit, val: i32); + #[cfg(feature = "EventTarget")] + #[wasm_bindgen(method, getter = "relatedTarget")] + fn related_target_shim(this: &MouseEventInit) -> Option; #[cfg(feature = "EventTarget")] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &MouseEventInit, val: Option<&EventTarget>); + fn set_related_target_shim(this: &MouseEventInit, val: Option<&EventTarget>); + #[wasm_bindgen(method, getter = "screenX")] + fn screen_x_shim(this: &MouseEventInit) -> i32; #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &MouseEventInit, val: i32); + fn set_screen_x_shim(this: &MouseEventInit, val: i32); + #[wasm_bindgen(method, getter = "screenY")] + fn screen_y_shim(this: &MouseEventInit) -> i32; #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &MouseEventInit, val: i32); + fn set_screen_y_shim(this: &MouseEventInit, val: i32); +} +#[doc = "The trait to access properties on the `MouseEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] +pub trait MouseEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`, `Window`*"] + fn view(&self) -> Option; + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn alt_key(&self) -> bool; + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn ctrl_key(&self) -> bool; + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn meta_key(&self) -> bool; + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn modifier_alt_graph(&self) -> bool; + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn modifier_caps_lock(&self) -> bool; + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn modifier_fn(&self) -> bool; + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn modifier_fn_lock(&self) -> bool; + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn modifier_num_lock(&self) -> bool; + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn modifier_os(&self) -> bool; + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn modifier_scroll_lock(&self) -> bool; + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn modifier_symbol(&self) -> bool; + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn modifier_symbol_lock(&self) -> bool; + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn shift_key(&self) -> bool; + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn button(&self) -> i16; + #[doc = "Get the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn buttons(&self) -> u16; + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn client_x(&self) -> i32; + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn client_y(&self) -> i32; + #[doc = "Get the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn movement_x(&self) -> i32; + #[doc = "Get the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn movement_y(&self) -> i32; + #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `MouseEventInit`*"] + fn related_target(&self) -> Option; + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn screen_x(&self) -> i32; + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] + fn screen_y(&self) -> i32; +} +impl MouseEventInitGetters for MouseEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + fn alt_key(&self) -> bool { + self.alt_key_shim() + } + fn ctrl_key(&self) -> bool { + self.ctrl_key_shim() + } + fn meta_key(&self) -> bool { + self.meta_key_shim() + } + fn modifier_alt_graph(&self) -> bool { + self.modifier_alt_graph_shim() + } + fn modifier_caps_lock(&self) -> bool { + self.modifier_caps_lock_shim() + } + fn modifier_fn(&self) -> bool { + self.modifier_fn_shim() + } + fn modifier_fn_lock(&self) -> bool { + self.modifier_fn_lock_shim() + } + fn modifier_num_lock(&self) -> bool { + self.modifier_num_lock_shim() + } + fn modifier_os(&self) -> bool { + self.modifier_os_shim() + } + fn modifier_scroll_lock(&self) -> bool { + self.modifier_scroll_lock_shim() + } + fn modifier_symbol(&self) -> bool { + self.modifier_symbol_shim() + } + fn modifier_symbol_lock(&self) -> bool { + self.modifier_symbol_lock_shim() + } + fn shift_key(&self) -> bool { + self.shift_key_shim() + } + fn button(&self) -> i16 { + self.button_shim() + } + fn buttons(&self) -> u16 { + self.buttons_shim() + } + fn client_x(&self) -> i32 { + self.client_x_shim() + } + fn client_y(&self) -> i32 { + self.client_y_shim() + } + fn movement_x(&self) -> i32 { + self.movement_x_shim() + } + fn movement_y(&self) -> i32 { + self.movement_y_shim() + } + #[cfg(feature = "EventTarget")] + fn related_target(&self) -> Option { + self.related_target_shim() + } + fn screen_x(&self) -> i32 { + self.screen_x_shim() + } + fn screen_y(&self) -> i32 { + self.screen_y_shim() + } } impl MouseEventInit { #[doc = "Construct a new `MouseEventInit`."] @@ -80,28 +336,28 @@ impl MouseEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -109,140 +365,140 @@ impl MouseEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[doc = "Change the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key_shim(val); self } #[doc = "Change the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key_shim(val); self } #[doc = "Change the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key_shim(val); self } #[doc = "Change the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph_shim(val); self } #[doc = "Change the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock_shim(val); self } #[doc = "Change the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn_shim(val); self } #[doc = "Change the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock_shim(val); self } #[doc = "Change the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock_shim(val); self } #[doc = "Change the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os_shim(val); self } #[doc = "Change the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock_shim(val); self } #[doc = "Change the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol_shim(val); self } #[doc = "Change the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock_shim(val); self } #[doc = "Change the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key_shim(val); self } #[doc = "Change the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn button(&mut self, val: i16) -> &mut Self { - self.button_shim(val); + self.set_button_shim(val); self } #[doc = "Change the `buttons` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn buttons(&mut self, val: u16) -> &mut Self { - self.buttons_shim(val); + self.set_buttons_shim(val); self } #[doc = "Change the `clientX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x_shim(val); self } #[doc = "Change the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y_shim(val); self } #[doc = "Change the `movementX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn movement_x(&mut self, val: i32) -> &mut Self { - self.movement_x_shim(val); + self.set_movement_x_shim(val); self } #[doc = "Change the `movementY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn movement_y(&mut self, val: i32) -> &mut Self { - self.movement_y_shim(val); + self.set_movement_y_shim(val); self } #[cfg(feature = "EventTarget")] @@ -250,21 +506,21 @@ impl MouseEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `MouseEventInit`*"] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target_shim(val); self } #[doc = "Change the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x_shim(val); self } #[doc = "Change the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MouseEventInit`*"] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MutationObserverInit.rs b/crates/web-sys/src/features/gen_MutationObserverInit.rs index 35251f2f6e8..44d05982fa0 100644 --- a/crates/web-sys/src/features/gen_MutationObserverInit.rs +++ b/crates/web-sys/src/features/gen_MutationObserverInit.rs @@ -10,24 +10,112 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub type MutationObserverInit; + #[wasm_bindgen(method, getter = "animations")] + fn animations_shim(this: &MutationObserverInit) -> bool; #[wasm_bindgen(method, setter = "animations")] - fn animations_shim(this: &MutationObserverInit, val: bool); + fn set_animations_shim(this: &MutationObserverInit, val: bool); + #[wasm_bindgen(method, getter = "attributeFilter")] + fn attribute_filter_shim(this: &MutationObserverInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "attributeFilter")] - fn attribute_filter_shim(this: &MutationObserverInit, val: &::wasm_bindgen::JsValue); + fn set_attribute_filter_shim(this: &MutationObserverInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "attributeOldValue")] + fn attribute_old_value_shim(this: &MutationObserverInit) -> bool; #[wasm_bindgen(method, setter = "attributeOldValue")] - fn attribute_old_value_shim(this: &MutationObserverInit, val: bool); + fn set_attribute_old_value_shim(this: &MutationObserverInit, val: bool); + #[wasm_bindgen(method, getter = "attributes")] + fn attributes_shim(this: &MutationObserverInit) -> bool; #[wasm_bindgen(method, setter = "attributes")] - fn attributes_shim(this: &MutationObserverInit, val: bool); + fn set_attributes_shim(this: &MutationObserverInit, val: bool); + #[wasm_bindgen(method, getter = "characterData")] + fn character_data_shim(this: &MutationObserverInit) -> bool; #[wasm_bindgen(method, setter = "characterData")] - fn character_data_shim(this: &MutationObserverInit, val: bool); + fn set_character_data_shim(this: &MutationObserverInit, val: bool); + #[wasm_bindgen(method, getter = "characterDataOldValue")] + fn character_data_old_value_shim(this: &MutationObserverInit) -> bool; #[wasm_bindgen(method, setter = "characterDataOldValue")] - fn character_data_old_value_shim(this: &MutationObserverInit, val: bool); + fn set_character_data_old_value_shim(this: &MutationObserverInit, val: bool); + #[wasm_bindgen(method, getter = "childList")] + fn child_list_shim(this: &MutationObserverInit) -> bool; #[wasm_bindgen(method, setter = "childList")] - fn child_list_shim(this: &MutationObserverInit, val: bool); + fn set_child_list_shim(this: &MutationObserverInit, val: bool); + #[wasm_bindgen(method, getter = "nativeAnonymousChildList")] + fn native_anonymous_child_list_shim(this: &MutationObserverInit) -> bool; #[wasm_bindgen(method, setter = "nativeAnonymousChildList")] - fn native_anonymous_child_list_shim(this: &MutationObserverInit, val: bool); + fn set_native_anonymous_child_list_shim(this: &MutationObserverInit, val: bool); + #[wasm_bindgen(method, getter = "subtree")] + fn subtree_shim(this: &MutationObserverInit) -> bool; #[wasm_bindgen(method, setter = "subtree")] - fn subtree_shim(this: &MutationObserverInit, val: bool); + fn set_subtree_shim(this: &MutationObserverInit, val: bool); +} +#[doc = "The trait to access properties on the `MutationObserverInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] +pub trait MutationObserverInitGetters { + #[doc = "Get the `animations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + fn animations(&self) -> bool; + #[doc = "Get the `attributeFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + fn attribute_filter(&self) -> ::js_sys::Array; + #[doc = "Get the `attributeOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + fn attribute_old_value(&self) -> bool; + #[doc = "Get the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + fn attributes(&self) -> bool; + #[doc = "Get the `characterData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + fn character_data(&self) -> bool; + #[doc = "Get the `characterDataOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + fn character_data_old_value(&self) -> bool; + #[doc = "Get the `childList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + fn child_list(&self) -> bool; + #[doc = "Get the `nativeAnonymousChildList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + fn native_anonymous_child_list(&self) -> bool; + #[doc = "Get the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] + fn subtree(&self) -> bool; +} +impl MutationObserverInitGetters for MutationObserverInit { + fn animations(&self) -> bool { + self.animations_shim() + } + fn attribute_filter(&self) -> ::js_sys::Array { + self.attribute_filter_shim() + } + fn attribute_old_value(&self) -> bool { + self.attribute_old_value_shim() + } + fn attributes(&self) -> bool { + self.attributes_shim() + } + fn character_data(&self) -> bool { + self.character_data_shim() + } + fn character_data_old_value(&self) -> bool { + self.character_data_old_value_shim() + } + fn child_list(&self) -> bool { + self.child_list_shim() + } + fn native_anonymous_child_list(&self) -> bool { + self.native_anonymous_child_list_shim() + } + fn subtree(&self) -> bool { + self.subtree_shim() + } } impl MutationObserverInit { #[doc = "Construct a new `MutationObserverInit`."] @@ -42,63 +130,63 @@ impl MutationObserverInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub fn animations(&mut self, val: bool) -> &mut Self { - self.animations_shim(val); + self.set_animations_shim(val); self } #[doc = "Change the `attributeFilter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub fn attribute_filter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.attribute_filter_shim(val); + self.set_attribute_filter_shim(val); self } #[doc = "Change the `attributeOldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub fn attribute_old_value(&mut self, val: bool) -> &mut Self { - self.attribute_old_value_shim(val); + self.set_attribute_old_value_shim(val); self } #[doc = "Change the `attributes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub fn attributes(&mut self, val: bool) -> &mut Self { - self.attributes_shim(val); + self.set_attributes_shim(val); self } #[doc = "Change the `characterData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub fn character_data(&mut self, val: bool) -> &mut Self { - self.character_data_shim(val); + self.set_character_data_shim(val); self } #[doc = "Change the `characterDataOldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub fn character_data_old_value(&mut self, val: bool) -> &mut Self { - self.character_data_old_value_shim(val); + self.set_character_data_old_value_shim(val); self } #[doc = "Change the `childList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub fn child_list(&mut self, val: bool) -> &mut Self { - self.child_list_shim(val); + self.set_child_list_shim(val); self } #[doc = "Change the `nativeAnonymousChildList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub fn native_anonymous_child_list(&mut self, val: bool) -> &mut Self { - self.native_anonymous_child_list_shim(val); + self.set_native_anonymous_child_list_shim(val); self } #[doc = "Change the `subtree` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObserverInit`*"] pub fn subtree(&mut self, val: bool) -> &mut Self { - self.subtree_shim(val); + self.set_subtree_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_MutationObservingInfo.rs b/crates/web-sys/src/features/gen_MutationObservingInfo.rs index ebe00cccdf0..5e6e9788c62 100644 --- a/crates/web-sys/src/features/gen_MutationObservingInfo.rs +++ b/crates/web-sys/src/features/gen_MutationObservingInfo.rs @@ -10,27 +10,127 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub type MutationObservingInfo; + #[wasm_bindgen(method, getter = "animations")] + fn animations_shim(this: &MutationObservingInfo) -> bool; #[wasm_bindgen(method, setter = "animations")] - fn animations_shim(this: &MutationObservingInfo, val: bool); + fn set_animations_shim(this: &MutationObservingInfo, val: bool); + #[wasm_bindgen(method, getter = "attributeFilter")] + fn attribute_filter_shim(this: &MutationObservingInfo) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "attributeFilter")] - fn attribute_filter_shim(this: &MutationObservingInfo, val: &::wasm_bindgen::JsValue); + fn set_attribute_filter_shim(this: &MutationObservingInfo, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "attributeOldValue")] + fn attribute_old_value_shim(this: &MutationObservingInfo) -> bool; #[wasm_bindgen(method, setter = "attributeOldValue")] - fn attribute_old_value_shim(this: &MutationObservingInfo, val: bool); + fn set_attribute_old_value_shim(this: &MutationObservingInfo, val: bool); + #[wasm_bindgen(method, getter = "attributes")] + fn attributes_shim(this: &MutationObservingInfo) -> bool; #[wasm_bindgen(method, setter = "attributes")] - fn attributes_shim(this: &MutationObservingInfo, val: bool); + fn set_attributes_shim(this: &MutationObservingInfo, val: bool); + #[wasm_bindgen(method, getter = "characterData")] + fn character_data_shim(this: &MutationObservingInfo) -> bool; #[wasm_bindgen(method, setter = "characterData")] - fn character_data_shim(this: &MutationObservingInfo, val: bool); + fn set_character_data_shim(this: &MutationObservingInfo, val: bool); + #[wasm_bindgen(method, getter = "characterDataOldValue")] + fn character_data_old_value_shim(this: &MutationObservingInfo) -> bool; #[wasm_bindgen(method, setter = "characterDataOldValue")] - fn character_data_old_value_shim(this: &MutationObservingInfo, val: bool); + fn set_character_data_old_value_shim(this: &MutationObservingInfo, val: bool); + #[wasm_bindgen(method, getter = "childList")] + fn child_list_shim(this: &MutationObservingInfo) -> bool; #[wasm_bindgen(method, setter = "childList")] - fn child_list_shim(this: &MutationObservingInfo, val: bool); + fn set_child_list_shim(this: &MutationObservingInfo, val: bool); + #[wasm_bindgen(method, getter = "nativeAnonymousChildList")] + fn native_anonymous_child_list_shim(this: &MutationObservingInfo) -> bool; #[wasm_bindgen(method, setter = "nativeAnonymousChildList")] - fn native_anonymous_child_list_shim(this: &MutationObservingInfo, val: bool); + fn set_native_anonymous_child_list_shim(this: &MutationObservingInfo, val: bool); + #[wasm_bindgen(method, getter = "subtree")] + fn subtree_shim(this: &MutationObservingInfo) -> bool; #[wasm_bindgen(method, setter = "subtree")] - fn subtree_shim(this: &MutationObservingInfo, val: bool); + fn set_subtree_shim(this: &MutationObservingInfo, val: bool); + #[cfg(feature = "Node")] + #[wasm_bindgen(method, getter = "observedNode")] + fn observed_node_shim(this: &MutationObservingInfo) -> Option; #[cfg(feature = "Node")] #[wasm_bindgen(method, setter = "observedNode")] - fn observed_node_shim(this: &MutationObservingInfo, val: Option<&Node>); + fn set_observed_node_shim(this: &MutationObservingInfo, val: Option<&Node>); +} +#[doc = "The trait to access properties on the `MutationObservingInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] +pub trait MutationObservingInfoGetters { + #[doc = "Get the `animations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + fn animations(&self) -> bool; + #[doc = "Get the `attributeFilter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + fn attribute_filter(&self) -> ::js_sys::Array; + #[doc = "Get the `attributeOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + fn attribute_old_value(&self) -> bool; + #[doc = "Get the `attributes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + fn attributes(&self) -> bool; + #[doc = "Get the `characterData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + fn character_data(&self) -> bool; + #[doc = "Get the `characterDataOldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + fn character_data_old_value(&self) -> bool; + #[doc = "Get the `childList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + fn child_list(&self) -> bool; + #[doc = "Get the `nativeAnonymousChildList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + fn native_anonymous_child_list(&self) -> bool; + #[doc = "Get the `subtree` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] + fn subtree(&self) -> bool; + #[cfg(feature = "Node")] + #[doc = "Get the `observedNode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`, `Node`*"] + fn observed_node(&self) -> Option; +} +impl MutationObservingInfoGetters for MutationObservingInfo { + fn animations(&self) -> bool { + self.animations_shim() + } + fn attribute_filter(&self) -> ::js_sys::Array { + self.attribute_filter_shim() + } + fn attribute_old_value(&self) -> bool { + self.attribute_old_value_shim() + } + fn attributes(&self) -> bool { + self.attributes_shim() + } + fn character_data(&self) -> bool { + self.character_data_shim() + } + fn character_data_old_value(&self) -> bool { + self.character_data_old_value_shim() + } + fn child_list(&self) -> bool { + self.child_list_shim() + } + fn native_anonymous_child_list(&self) -> bool { + self.native_anonymous_child_list_shim() + } + fn subtree(&self) -> bool { + self.subtree_shim() + } + #[cfg(feature = "Node")] + fn observed_node(&self) -> Option { + self.observed_node_shim() + } } impl MutationObservingInfo { #[doc = "Construct a new `MutationObservingInfo`."] @@ -45,63 +145,63 @@ impl MutationObservingInfo { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub fn animations(&mut self, val: bool) -> &mut Self { - self.animations_shim(val); + self.set_animations_shim(val); self } #[doc = "Change the `attributeFilter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub fn attribute_filter(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.attribute_filter_shim(val); + self.set_attribute_filter_shim(val); self } #[doc = "Change the `attributeOldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub fn attribute_old_value(&mut self, val: bool) -> &mut Self { - self.attribute_old_value_shim(val); + self.set_attribute_old_value_shim(val); self } #[doc = "Change the `attributes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub fn attributes(&mut self, val: bool) -> &mut Self { - self.attributes_shim(val); + self.set_attributes_shim(val); self } #[doc = "Change the `characterData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub fn character_data(&mut self, val: bool) -> &mut Self { - self.character_data_shim(val); + self.set_character_data_shim(val); self } #[doc = "Change the `characterDataOldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub fn character_data_old_value(&mut self, val: bool) -> &mut Self { - self.character_data_old_value_shim(val); + self.set_character_data_old_value_shim(val); self } #[doc = "Change the `childList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub fn child_list(&mut self, val: bool) -> &mut Self { - self.child_list_shim(val); + self.set_child_list_shim(val); self } #[doc = "Change the `nativeAnonymousChildList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub fn native_anonymous_child_list(&mut self, val: bool) -> &mut Self { - self.native_anonymous_child_list_shim(val); + self.set_native_anonymous_child_list_shim(val); self } #[doc = "Change the `subtree` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`*"] pub fn subtree(&mut self, val: bool) -> &mut Self { - self.subtree_shim(val); + self.set_subtree_shim(val); self } #[cfg(feature = "Node")] @@ -109,7 +209,7 @@ impl MutationObservingInfo { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MutationObservingInfo`, `Node`*"] pub fn observed_node(&mut self, val: Option<&Node>) -> &mut Self { - self.observed_node_shim(val); + self.set_observed_node_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs b/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs index 5245faddf78..983bdb31578 100644 --- a/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs +++ b/crates/web-sys/src/features/gen_NativeOsFileReadOptions.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] pub type NativeOsFileReadOptions; + #[wasm_bindgen(method, getter = "bytes")] + fn bytes_shim(this: &NativeOsFileReadOptions) -> Option; #[wasm_bindgen(method, setter = "bytes")] - fn bytes_shim(this: &NativeOsFileReadOptions, val: Option); + fn set_bytes_shim(this: &NativeOsFileReadOptions, val: Option); + #[wasm_bindgen(method, getter = "encoding")] + fn encoding_shim(this: &NativeOsFileReadOptions) -> Option; #[wasm_bindgen(method, setter = "encoding")] - fn encoding_shim(this: &NativeOsFileReadOptions, val: Option<&str>); + fn set_encoding_shim(this: &NativeOsFileReadOptions, val: Option<&str>); +} +#[doc = "The trait to access properties on the `NativeOsFileReadOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] +pub trait NativeOsFileReadOptionsGetters { + #[doc = "Get the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] + fn bytes(&self) -> Option; + #[doc = "Get the `encoding` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] + fn encoding(&self) -> Option; +} +impl NativeOsFileReadOptionsGetters for NativeOsFileReadOptions { + fn bytes(&self) -> Option { + self.bytes_shim() + } + fn encoding(&self) -> Option { + self.encoding_shim() + } } impl NativeOsFileReadOptions { #[doc = "Construct a new `NativeOsFileReadOptions`."] @@ -28,14 +53,14 @@ impl NativeOsFileReadOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] pub fn bytes(&mut self, val: Option) -> &mut Self { - self.bytes_shim(val); + self.set_bytes_shim(val); self } #[doc = "Change the `encoding` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileReadOptions`*"] pub fn encoding(&mut self, val: Option<&str>) -> &mut Self { - self.encoding_shim(val); + self.set_encoding_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs b/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs index 7310b9a165b..3250689d294 100644 --- a/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs +++ b/crates/web-sys/src/features/gen_NativeOsFileWriteAtomicOptions.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] pub type NativeOsFileWriteAtomicOptions; + #[wasm_bindgen(method, getter = "backupTo")] + fn backup_to_shim(this: &NativeOsFileWriteAtomicOptions) -> Option; #[wasm_bindgen(method, setter = "backupTo")] - fn backup_to_shim(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); + fn set_backup_to_shim(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); + #[wasm_bindgen(method, getter = "bytes")] + fn bytes_shim(this: &NativeOsFileWriteAtomicOptions) -> Option; #[wasm_bindgen(method, setter = "bytes")] - fn bytes_shim(this: &NativeOsFileWriteAtomicOptions, val: Option); + fn set_bytes_shim(this: &NativeOsFileWriteAtomicOptions, val: Option); + #[wasm_bindgen(method, getter = "flush")] + fn flush_shim(this: &NativeOsFileWriteAtomicOptions) -> bool; #[wasm_bindgen(method, setter = "flush")] - fn flush_shim(this: &NativeOsFileWriteAtomicOptions, val: bool); + fn set_flush_shim(this: &NativeOsFileWriteAtomicOptions, val: bool); + #[wasm_bindgen(method, getter = "noOverwrite")] + fn no_overwrite_shim(this: &NativeOsFileWriteAtomicOptions) -> bool; #[wasm_bindgen(method, setter = "noOverwrite")] - fn no_overwrite_shim(this: &NativeOsFileWriteAtomicOptions, val: bool); + fn set_no_overwrite_shim(this: &NativeOsFileWriteAtomicOptions, val: bool); + #[wasm_bindgen(method, getter = "tmpPath")] + fn tmp_path_shim(this: &NativeOsFileWriteAtomicOptions) -> Option; #[wasm_bindgen(method, setter = "tmpPath")] - fn tmp_path_shim(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); + fn set_tmp_path_shim(this: &NativeOsFileWriteAtomicOptions, val: Option<&str>); +} +#[doc = "The trait to access properties on the `NativeOsFileWriteAtomicOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] +pub trait NativeOsFileWriteAtomicOptionsGetters { + #[doc = "Get the `backupTo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + fn backup_to(&self) -> Option; + #[doc = "Get the `bytes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + fn bytes(&self) -> Option; + #[doc = "Get the `flush` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + fn flush(&self) -> bool; + #[doc = "Get the `noOverwrite` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + fn no_overwrite(&self) -> bool; + #[doc = "Get the `tmpPath` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] + fn tmp_path(&self) -> Option; +} +impl NativeOsFileWriteAtomicOptionsGetters for NativeOsFileWriteAtomicOptions { + fn backup_to(&self) -> Option { + self.backup_to_shim() + } + fn bytes(&self) -> Option { + self.bytes_shim() + } + fn flush(&self) -> bool { + self.flush_shim() + } + fn no_overwrite(&self) -> bool { + self.no_overwrite_shim() + } + fn tmp_path(&self) -> Option { + self.tmp_path_shim() + } } impl NativeOsFileWriteAtomicOptions { #[doc = "Construct a new `NativeOsFileWriteAtomicOptions`."] @@ -34,35 +86,35 @@ impl NativeOsFileWriteAtomicOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] pub fn backup_to(&mut self, val: Option<&str>) -> &mut Self { - self.backup_to_shim(val); + self.set_backup_to_shim(val); self } #[doc = "Change the `bytes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] pub fn bytes(&mut self, val: Option) -> &mut Self { - self.bytes_shim(val); + self.set_bytes_shim(val); self } #[doc = "Change the `flush` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] pub fn flush(&mut self, val: bool) -> &mut Self { - self.flush_shim(val); + self.set_flush_shim(val); self } #[doc = "Change the `noOverwrite` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] pub fn no_overwrite(&mut self, val: bool) -> &mut Self { - self.no_overwrite_shim(val); + self.set_no_overwrite_shim(val); self } #[doc = "Change the `tmpPath` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NativeOsFileWriteAtomicOptions`*"] pub fn tmp_path(&mut self, val: Option<&str>) -> &mut Self { - self.tmp_path_shim(val); + self.set_tmp_path_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_NetworkCommandOptions.rs b/crates/web-sys/src/features/gen_NetworkCommandOptions.rs index d90b1a5fcd7..285c6c99c29 100644 --- a/crates/web-sys/src/features/gen_NetworkCommandOptions.rs +++ b/crates/web-sys/src/features/gen_NetworkCommandOptions.rs @@ -10,92 +10,486 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub type NetworkCommandOptions; + #[wasm_bindgen(method, getter = "cmd")] + fn cmd_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "cmd")] - fn cmd_shim(this: &NetworkCommandOptions, val: &str); + fn set_cmd_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "curExternalIfname")] + fn cur_external_ifname_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "curExternalIfname")] - fn cur_external_ifname_shim(this: &NetworkCommandOptions, val: &str); + fn set_cur_external_ifname_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "curInternalIfname")] + fn cur_internal_ifname_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "curInternalIfname")] - fn cur_internal_ifname_shim(this: &NetworkCommandOptions, val: &str); + fn set_cur_internal_ifname_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "dns1")] + fn dns1_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "dns1")] - fn dns1_shim(this: &NetworkCommandOptions, val: &str); + fn set_dns1_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "dns1_long")] + fn dns1_long_shim(this: &NetworkCommandOptions) -> i32; #[wasm_bindgen(method, setter = "dns1_long")] - fn dns1_long_shim(this: &NetworkCommandOptions, val: i32); + fn set_dns1_long_shim(this: &NetworkCommandOptions, val: i32); + #[wasm_bindgen(method, getter = "dns2")] + fn dns2_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "dns2")] - fn dns2_shim(this: &NetworkCommandOptions, val: &str); + fn set_dns2_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "dns2_long")] + fn dns2_long_shim(this: &NetworkCommandOptions) -> i32; #[wasm_bindgen(method, setter = "dns2_long")] - fn dns2_long_shim(this: &NetworkCommandOptions, val: i32); + fn set_dns2_long_shim(this: &NetworkCommandOptions, val: i32); + #[wasm_bindgen(method, getter = "dnses")] + fn dnses_shim(this: &NetworkCommandOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "dnses")] - fn dnses_shim(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + fn set_dnses_shim(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "domain")] + fn domain_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "domain")] - fn domain_shim(this: &NetworkCommandOptions, val: &str); + fn set_domain_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "enable")] + fn enable_shim(this: &NetworkCommandOptions) -> bool; #[wasm_bindgen(method, setter = "enable")] - fn enable_shim(this: &NetworkCommandOptions, val: bool); + fn set_enable_shim(this: &NetworkCommandOptions, val: bool); + #[wasm_bindgen(method, getter = "enabled")] + fn enabled_shim(this: &NetworkCommandOptions) -> bool; #[wasm_bindgen(method, setter = "enabled")] - fn enabled_shim(this: &NetworkCommandOptions, val: bool); + fn set_enabled_shim(this: &NetworkCommandOptions, val: bool); + #[wasm_bindgen(method, getter = "endIp")] + fn end_ip_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "endIp")] - fn end_ip_shim(this: &NetworkCommandOptions, val: &str); + fn set_end_ip_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "externalIfname")] + fn external_ifname_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "externalIfname")] - fn external_ifname_shim(this: &NetworkCommandOptions, val: &str); + fn set_external_ifname_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "gateway")] + fn gateway_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "gateway")] - fn gateway_shim(this: &NetworkCommandOptions, val: &str); + fn set_gateway_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "gateway_long")] + fn gateway_long_shim(this: &NetworkCommandOptions) -> i32; #[wasm_bindgen(method, setter = "gateway_long")] - fn gateway_long_shim(this: &NetworkCommandOptions, val: i32); + fn set_gateway_long_shim(this: &NetworkCommandOptions, val: i32); + #[wasm_bindgen(method, getter = "gateways")] + fn gateways_shim(this: &NetworkCommandOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "gateways")] - fn gateways_shim(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + fn set_gateways_shim(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &NetworkCommandOptions) -> i32; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &NetworkCommandOptions, val: i32); + fn set_id_shim(this: &NetworkCommandOptions, val: i32); + #[wasm_bindgen(method, getter = "ifname")] + fn ifname_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "ifname")] - fn ifname_shim(this: &NetworkCommandOptions, val: &str); + fn set_ifname_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "interfaceList")] + fn interface_list_shim(this: &NetworkCommandOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "interfaceList")] - fn interface_list_shim(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + fn set_interface_list_shim(this: &NetworkCommandOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "internalIfname")] + fn internal_ifname_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "internalIfname")] - fn internal_ifname_shim(this: &NetworkCommandOptions, val: &str); + fn set_internal_ifname_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "ip")] + fn ip_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "ip")] - fn ip_shim(this: &NetworkCommandOptions, val: &str); + fn set_ip_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "ipaddr")] + fn ipaddr_shim(this: &NetworkCommandOptions) -> i32; #[wasm_bindgen(method, setter = "ipaddr")] - fn ipaddr_shim(this: &NetworkCommandOptions, val: i32); + fn set_ipaddr_shim(this: &NetworkCommandOptions, val: i32); + #[wasm_bindgen(method, getter = "key")] + fn key_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "key")] - fn key_shim(this: &NetworkCommandOptions, val: &str); + fn set_key_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "link")] + fn link_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "link")] - fn link_shim(this: &NetworkCommandOptions, val: &str); + fn set_link_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "mask")] + fn mask_shim(this: &NetworkCommandOptions) -> i32; #[wasm_bindgen(method, setter = "mask")] - fn mask_shim(this: &NetworkCommandOptions, val: i32); + fn set_mask_shim(this: &NetworkCommandOptions, val: i32); + #[wasm_bindgen(method, getter = "maskLength")] + fn mask_length_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "maskLength")] - fn mask_length_shim(this: &NetworkCommandOptions, val: &str); + fn set_mask_length_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &NetworkCommandOptions, val: &str); + fn set_mode_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "mtu")] + fn mtu_shim(this: &NetworkCommandOptions) -> i32; #[wasm_bindgen(method, setter = "mtu")] - fn mtu_shim(this: &NetworkCommandOptions, val: i32); + fn set_mtu_shim(this: &NetworkCommandOptions, val: i32); + #[wasm_bindgen(method, getter = "preExternalIfname")] + fn pre_external_ifname_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "preExternalIfname")] - fn pre_external_ifname_shim(this: &NetworkCommandOptions, val: &str); + fn set_pre_external_ifname_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "preInternalIfname")] + fn pre_internal_ifname_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "preInternalIfname")] - fn pre_internal_ifname_shim(this: &NetworkCommandOptions, val: &str); + fn set_pre_internal_ifname_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "prefix")] + fn prefix_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "prefix")] - fn prefix_shim(this: &NetworkCommandOptions, val: &str); + fn set_prefix_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "prefixLength")] + fn prefix_length_shim(this: &NetworkCommandOptions) -> u32; #[wasm_bindgen(method, setter = "prefixLength")] - fn prefix_length_shim(this: &NetworkCommandOptions, val: u32); + fn set_prefix_length_shim(this: &NetworkCommandOptions, val: u32); + #[wasm_bindgen(method, getter = "report")] + fn report_shim(this: &NetworkCommandOptions) -> bool; #[wasm_bindgen(method, setter = "report")] - fn report_shim(this: &NetworkCommandOptions, val: bool); + fn set_report_shim(this: &NetworkCommandOptions, val: bool); + #[wasm_bindgen(method, getter = "security")] + fn security_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "security")] - fn security_shim(this: &NetworkCommandOptions, val: &str); + fn set_security_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "serverIp")] + fn server_ip_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "serverIp")] - fn server_ip_shim(this: &NetworkCommandOptions, val: &str); + fn set_server_ip_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "ssid")] + fn ssid_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "ssid")] - fn ssid_shim(this: &NetworkCommandOptions, val: &str); + fn set_ssid_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "startIp")] + fn start_ip_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "startIp")] - fn start_ip_shim(this: &NetworkCommandOptions, val: &str); + fn set_start_ip_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "threshold")] + fn threshold_shim(this: &NetworkCommandOptions) -> f64; #[wasm_bindgen(method, setter = "threshold")] - fn threshold_shim(this: &NetworkCommandOptions, val: f64); + fn set_threshold_shim(this: &NetworkCommandOptions, val: f64); + #[wasm_bindgen(method, getter = "usbEndIp")] + fn usb_end_ip_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "usbEndIp")] - fn usb_end_ip_shim(this: &NetworkCommandOptions, val: &str); + fn set_usb_end_ip_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "usbStartIp")] + fn usb_start_ip_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "usbStartIp")] - fn usb_start_ip_shim(this: &NetworkCommandOptions, val: &str); + fn set_usb_start_ip_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "wifiEndIp")] + fn wifi_end_ip_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "wifiEndIp")] - fn wifi_end_ip_shim(this: &NetworkCommandOptions, val: &str); + fn set_wifi_end_ip_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "wifiStartIp")] + fn wifi_start_ip_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "wifiStartIp")] - fn wifi_start_ip_shim(this: &NetworkCommandOptions, val: &str); + fn set_wifi_start_ip_shim(this: &NetworkCommandOptions, val: &str); + #[wasm_bindgen(method, getter = "wifictrlinterfacename")] + fn wifictrlinterfacename_shim(this: &NetworkCommandOptions) -> String; #[wasm_bindgen(method, setter = "wifictrlinterfacename")] - fn wifictrlinterfacename_shim(this: &NetworkCommandOptions, val: &str); + fn set_wifictrlinterfacename_shim(this: &NetworkCommandOptions, val: &str); +} +#[doc = "The trait to access properties on the `NetworkCommandOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] +pub trait NetworkCommandOptionsGetters { + #[doc = "Get the `cmd` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn cmd(&self) -> String; + #[doc = "Get the `curExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn cur_external_ifname(&self) -> String; + #[doc = "Get the `curInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn cur_internal_ifname(&self) -> String; + #[doc = "Get the `dns1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn dns1(&self) -> String; + #[doc = "Get the `dns1_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn dns1_long(&self) -> i32; + #[doc = "Get the `dns2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn dns2(&self) -> String; + #[doc = "Get the `dns2_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn dns2_long(&self) -> i32; + #[doc = "Get the `dnses` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn dnses(&self) -> ::js_sys::Array; + #[doc = "Get the `domain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn domain(&self) -> String; + #[doc = "Get the `enable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn enable(&self) -> bool; + #[doc = "Get the `enabled` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn enabled(&self) -> bool; + #[doc = "Get the `endIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn end_ip(&self) -> String; + #[doc = "Get the `externalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn external_ifname(&self) -> String; + #[doc = "Get the `gateway` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn gateway(&self) -> String; + #[doc = "Get the `gateway_long` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn gateway_long(&self) -> i32; + #[doc = "Get the `gateways` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn gateways(&self) -> ::js_sys::Array; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn id(&self) -> i32; + #[doc = "Get the `ifname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn ifname(&self) -> String; + #[doc = "Get the `interfaceList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn interface_list(&self) -> ::js_sys::Array; + #[doc = "Get the `internalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn internal_ifname(&self) -> String; + #[doc = "Get the `ip` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn ip(&self) -> String; + #[doc = "Get the `ipaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn ipaddr(&self) -> i32; + #[doc = "Get the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn key(&self) -> String; + #[doc = "Get the `link` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn link(&self) -> String; + #[doc = "Get the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn mask(&self) -> i32; + #[doc = "Get the `maskLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn mask_length(&self) -> String; + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn mode(&self) -> String; + #[doc = "Get the `mtu` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn mtu(&self) -> i32; + #[doc = "Get the `preExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn pre_external_ifname(&self) -> String; + #[doc = "Get the `preInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn pre_internal_ifname(&self) -> String; + #[doc = "Get the `prefix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn prefix(&self) -> String; + #[doc = "Get the `prefixLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn prefix_length(&self) -> u32; + #[doc = "Get the `report` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn report(&self) -> bool; + #[doc = "Get the `security` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn security(&self) -> String; + #[doc = "Get the `serverIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn server_ip(&self) -> String; + #[doc = "Get the `ssid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn ssid(&self) -> String; + #[doc = "Get the `startIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn start_ip(&self) -> String; + #[doc = "Get the `threshold` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn threshold(&self) -> f64; + #[doc = "Get the `usbEndIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn usb_end_ip(&self) -> String; + #[doc = "Get the `usbStartIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn usb_start_ip(&self) -> String; + #[doc = "Get the `wifiEndIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn wifi_end_ip(&self) -> String; + #[doc = "Get the `wifiStartIp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn wifi_start_ip(&self) -> String; + #[doc = "Get the `wifictrlinterfacename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] + fn wifictrlinterfacename(&self) -> String; +} +impl NetworkCommandOptionsGetters for NetworkCommandOptions { + fn cmd(&self) -> String { + self.cmd_shim() + } + fn cur_external_ifname(&self) -> String { + self.cur_external_ifname_shim() + } + fn cur_internal_ifname(&self) -> String { + self.cur_internal_ifname_shim() + } + fn dns1(&self) -> String { + self.dns1_shim() + } + fn dns1_long(&self) -> i32 { + self.dns1_long_shim() + } + fn dns2(&self) -> String { + self.dns2_shim() + } + fn dns2_long(&self) -> i32 { + self.dns2_long_shim() + } + fn dnses(&self) -> ::js_sys::Array { + self.dnses_shim() + } + fn domain(&self) -> String { + self.domain_shim() + } + fn enable(&self) -> bool { + self.enable_shim() + } + fn enabled(&self) -> bool { + self.enabled_shim() + } + fn end_ip(&self) -> String { + self.end_ip_shim() + } + fn external_ifname(&self) -> String { + self.external_ifname_shim() + } + fn gateway(&self) -> String { + self.gateway_shim() + } + fn gateway_long(&self) -> i32 { + self.gateway_long_shim() + } + fn gateways(&self) -> ::js_sys::Array { + self.gateways_shim() + } + fn id(&self) -> i32 { + self.id_shim() + } + fn ifname(&self) -> String { + self.ifname_shim() + } + fn interface_list(&self) -> ::js_sys::Array { + self.interface_list_shim() + } + fn internal_ifname(&self) -> String { + self.internal_ifname_shim() + } + fn ip(&self) -> String { + self.ip_shim() + } + fn ipaddr(&self) -> i32 { + self.ipaddr_shim() + } + fn key(&self) -> String { + self.key_shim() + } + fn link(&self) -> String { + self.link_shim() + } + fn mask(&self) -> i32 { + self.mask_shim() + } + fn mask_length(&self) -> String { + self.mask_length_shim() + } + fn mode(&self) -> String { + self.mode_shim() + } + fn mtu(&self) -> i32 { + self.mtu_shim() + } + fn pre_external_ifname(&self) -> String { + self.pre_external_ifname_shim() + } + fn pre_internal_ifname(&self) -> String { + self.pre_internal_ifname_shim() + } + fn prefix(&self) -> String { + self.prefix_shim() + } + fn prefix_length(&self) -> u32 { + self.prefix_length_shim() + } + fn report(&self) -> bool { + self.report_shim() + } + fn security(&self) -> String { + self.security_shim() + } + fn server_ip(&self) -> String { + self.server_ip_shim() + } + fn ssid(&self) -> String { + self.ssid_shim() + } + fn start_ip(&self) -> String { + self.start_ip_shim() + } + fn threshold(&self) -> f64 { + self.threshold_shim() + } + fn usb_end_ip(&self) -> String { + self.usb_end_ip_shim() + } + fn usb_start_ip(&self) -> String { + self.usb_start_ip_shim() + } + fn wifi_end_ip(&self) -> String { + self.wifi_end_ip_shim() + } + fn wifi_start_ip(&self) -> String { + self.wifi_start_ip_shim() + } + fn wifictrlinterfacename(&self) -> String { + self.wifictrlinterfacename_shim() + } } impl NetworkCommandOptions { #[doc = "Construct a new `NetworkCommandOptions`."] @@ -110,301 +504,301 @@ impl NetworkCommandOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn cmd(&mut self, val: &str) -> &mut Self { - self.cmd_shim(val); + self.set_cmd_shim(val); self } #[doc = "Change the `curExternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn cur_external_ifname(&mut self, val: &str) -> &mut Self { - self.cur_external_ifname_shim(val); + self.set_cur_external_ifname_shim(val); self } #[doc = "Change the `curInternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn cur_internal_ifname(&mut self, val: &str) -> &mut Self { - self.cur_internal_ifname_shim(val); + self.set_cur_internal_ifname_shim(val); self } #[doc = "Change the `dns1` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn dns1(&mut self, val: &str) -> &mut Self { - self.dns1_shim(val); + self.set_dns1_shim(val); self } #[doc = "Change the `dns1_long` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn dns1_long(&mut self, val: i32) -> &mut Self { - self.dns1_long_shim(val); + self.set_dns1_long_shim(val); self } #[doc = "Change the `dns2` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn dns2(&mut self, val: &str) -> &mut Self { - self.dns2_shim(val); + self.set_dns2_shim(val); self } #[doc = "Change the `dns2_long` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn dns2_long(&mut self, val: i32) -> &mut Self { - self.dns2_long_shim(val); + self.set_dns2_long_shim(val); self } #[doc = "Change the `dnses` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn dnses(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.dnses_shim(val); + self.set_dnses_shim(val); self } #[doc = "Change the `domain` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn domain(&mut self, val: &str) -> &mut Self { - self.domain_shim(val); + self.set_domain_shim(val); self } #[doc = "Change the `enable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn enable(&mut self, val: bool) -> &mut Self { - self.enable_shim(val); + self.set_enable_shim(val); self } #[doc = "Change the `enabled` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn enabled(&mut self, val: bool) -> &mut Self { - self.enabled_shim(val); + self.set_enabled_shim(val); self } #[doc = "Change the `endIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn end_ip(&mut self, val: &str) -> &mut Self { - self.end_ip_shim(val); + self.set_end_ip_shim(val); self } #[doc = "Change the `externalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn external_ifname(&mut self, val: &str) -> &mut Self { - self.external_ifname_shim(val); + self.set_external_ifname_shim(val); self } #[doc = "Change the `gateway` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn gateway(&mut self, val: &str) -> &mut Self { - self.gateway_shim(val); + self.set_gateway_shim(val); self } #[doc = "Change the `gateway_long` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn gateway_long(&mut self, val: i32) -> &mut Self { - self.gateway_long_shim(val); + self.set_gateway_long_shim(val); self } #[doc = "Change the `gateways` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn gateways(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.gateways_shim(val); + self.set_gateways_shim(val); self } #[doc = "Change the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn id(&mut self, val: i32) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `ifname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn ifname(&mut self, val: &str) -> &mut Self { - self.ifname_shim(val); + self.set_ifname_shim(val); self } #[doc = "Change the `interfaceList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn interface_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.interface_list_shim(val); + self.set_interface_list_shim(val); self } #[doc = "Change the `internalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn internal_ifname(&mut self, val: &str) -> &mut Self { - self.internal_ifname_shim(val); + self.set_internal_ifname_shim(val); self } #[doc = "Change the `ip` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn ip(&mut self, val: &str) -> &mut Self { - self.ip_shim(val); + self.set_ip_shim(val); self } #[doc = "Change the `ipaddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn ipaddr(&mut self, val: i32) -> &mut Self { - self.ipaddr_shim(val); + self.set_ipaddr_shim(val); self } #[doc = "Change the `key` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn key(&mut self, val: &str) -> &mut Self { - self.key_shim(val); + self.set_key_shim(val); self } #[doc = "Change the `link` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn link(&mut self, val: &str) -> &mut Self { - self.link_shim(val); + self.set_link_shim(val); self } #[doc = "Change the `mask` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn mask(&mut self, val: i32) -> &mut Self { - self.mask_shim(val); + self.set_mask_shim(val); self } #[doc = "Change the `maskLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn mask_length(&mut self, val: &str) -> &mut Self { - self.mask_length_shim(val); + self.set_mask_length_shim(val); self } #[doc = "Change the `mode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn mode(&mut self, val: &str) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } #[doc = "Change the `mtu` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn mtu(&mut self, val: i32) -> &mut Self { - self.mtu_shim(val); + self.set_mtu_shim(val); self } #[doc = "Change the `preExternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn pre_external_ifname(&mut self, val: &str) -> &mut Self { - self.pre_external_ifname_shim(val); + self.set_pre_external_ifname_shim(val); self } #[doc = "Change the `preInternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn pre_internal_ifname(&mut self, val: &str) -> &mut Self { - self.pre_internal_ifname_shim(val); + self.set_pre_internal_ifname_shim(val); self } #[doc = "Change the `prefix` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn prefix(&mut self, val: &str) -> &mut Self { - self.prefix_shim(val); + self.set_prefix_shim(val); self } #[doc = "Change the `prefixLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn prefix_length(&mut self, val: u32) -> &mut Self { - self.prefix_length_shim(val); + self.set_prefix_length_shim(val); self } #[doc = "Change the `report` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn report(&mut self, val: bool) -> &mut Self { - self.report_shim(val); + self.set_report_shim(val); self } #[doc = "Change the `security` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn security(&mut self, val: &str) -> &mut Self { - self.security_shim(val); + self.set_security_shim(val); self } #[doc = "Change the `serverIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn server_ip(&mut self, val: &str) -> &mut Self { - self.server_ip_shim(val); + self.set_server_ip_shim(val); self } #[doc = "Change the `ssid` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn ssid(&mut self, val: &str) -> &mut Self { - self.ssid_shim(val); + self.set_ssid_shim(val); self } #[doc = "Change the `startIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn start_ip(&mut self, val: &str) -> &mut Self { - self.start_ip_shim(val); + self.set_start_ip_shim(val); self } #[doc = "Change the `threshold` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn threshold(&mut self, val: f64) -> &mut Self { - self.threshold_shim(val); + self.set_threshold_shim(val); self } #[doc = "Change the `usbEndIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn usb_end_ip(&mut self, val: &str) -> &mut Self { - self.usb_end_ip_shim(val); + self.set_usb_end_ip_shim(val); self } #[doc = "Change the `usbStartIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn usb_start_ip(&mut self, val: &str) -> &mut Self { - self.usb_start_ip_shim(val); + self.set_usb_start_ip_shim(val); self } #[doc = "Change the `wifiEndIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn wifi_end_ip(&mut self, val: &str) -> &mut Self { - self.wifi_end_ip_shim(val); + self.set_wifi_end_ip_shim(val); self } #[doc = "Change the `wifiStartIp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn wifi_start_ip(&mut self, val: &str) -> &mut Self { - self.wifi_start_ip_shim(val); + self.set_wifi_start_ip_shim(val); self } #[doc = "Change the `wifictrlinterfacename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkCommandOptions`*"] pub fn wifictrlinterfacename(&mut self, val: &str) -> &mut Self { - self.wifictrlinterfacename_shim(val); + self.set_wifictrlinterfacename_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_NetworkResultOptions.rs b/crates/web-sys/src/features/gen_NetworkResultOptions.rs index 10662e3b521..ca58bd45144 100644 --- a/crates/web-sys/src/features/gen_NetworkResultOptions.rs +++ b/crates/web-sys/src/features/gen_NetworkResultOptions.rs @@ -10,76 +10,398 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub type NetworkResultOptions; + #[wasm_bindgen(method, getter = "broadcast")] + fn broadcast_shim(this: &NetworkResultOptions) -> bool; #[wasm_bindgen(method, setter = "broadcast")] - fn broadcast_shim(this: &NetworkResultOptions, val: bool); + fn set_broadcast_shim(this: &NetworkResultOptions, val: bool); + #[wasm_bindgen(method, getter = "curExternalIfname")] + fn cur_external_ifname_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "curExternalIfname")] - fn cur_external_ifname_shim(this: &NetworkResultOptions, val: &str); + fn set_cur_external_ifname_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "curInternalIfname")] + fn cur_internal_ifname_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "curInternalIfname")] - fn cur_internal_ifname_shim(this: &NetworkResultOptions, val: &str); + fn set_cur_internal_ifname_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "dns1")] + fn dns1_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "dns1")] - fn dns1_shim(this: &NetworkResultOptions, val: i32); + fn set_dns1_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "dns1_str")] + fn dns1_str_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "dns1_str")] - fn dns1_str_shim(this: &NetworkResultOptions, val: &str); + fn set_dns1_str_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "dns2")] + fn dns2_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "dns2")] - fn dns2_shim(this: &NetworkResultOptions, val: i32); + fn set_dns2_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "dns2_str")] + fn dns2_str_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "dns2_str")] - fn dns2_str_shim(this: &NetworkResultOptions, val: &str); + fn set_dns2_str_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "enable")] + fn enable_shim(this: &NetworkResultOptions) -> bool; #[wasm_bindgen(method, setter = "enable")] - fn enable_shim(this: &NetworkResultOptions, val: bool); + fn set_enable_shim(this: &NetworkResultOptions, val: bool); + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &NetworkResultOptions) -> bool; #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &NetworkResultOptions, val: bool); + fn set_error_shim(this: &NetworkResultOptions, val: bool); + #[wasm_bindgen(method, getter = "flag")] + fn flag_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "flag")] - fn flag_shim(this: &NetworkResultOptions, val: &str); + fn set_flag_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "gateway")] + fn gateway_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "gateway")] - fn gateway_shim(this: &NetworkResultOptions, val: i32); + fn set_gateway_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "gateway_str")] + fn gateway_str_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "gateway_str")] - fn gateway_str_shim(this: &NetworkResultOptions, val: &str); + fn set_gateway_str_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &NetworkResultOptions, val: i32); + fn set_id_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "interfaceList")] + fn interface_list_shim(this: &NetworkResultOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "interfaceList")] - fn interface_list_shim(this: &NetworkResultOptions, val: &::wasm_bindgen::JsValue); + fn set_interface_list_shim(this: &NetworkResultOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "ipAddr")] + fn ip_addr_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "ipAddr")] - fn ip_addr_shim(this: &NetworkResultOptions, val: &str); + fn set_ip_addr_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "ipaddr")] + fn ipaddr_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "ipaddr")] - fn ipaddr_shim(this: &NetworkResultOptions, val: i32); + fn set_ipaddr_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "ipaddr_str")] + fn ipaddr_str_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "ipaddr_str")] - fn ipaddr_str_shim(this: &NetworkResultOptions, val: &str); + fn set_ipaddr_str_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "lease")] + fn lease_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "lease")] - fn lease_shim(this: &NetworkResultOptions, val: i32); + fn set_lease_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "macAddr")] + fn mac_addr_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "macAddr")] - fn mac_addr_shim(this: &NetworkResultOptions, val: &str); + fn set_mac_addr_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "mask")] + fn mask_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "mask")] - fn mask_shim(this: &NetworkResultOptions, val: i32); + fn set_mask_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "mask_str")] + fn mask_str_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "mask_str")] - fn mask_str_shim(this: &NetworkResultOptions, val: &str); + fn set_mask_str_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "netId")] + fn net_id_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "netId")] - fn net_id_shim(this: &NetworkResultOptions, val: &str); + fn set_net_id_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "prefixLength")] + fn prefix_length_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "prefixLength")] - fn prefix_length_shim(this: &NetworkResultOptions, val: i32); + fn set_prefix_length_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "reason")] + fn reason_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &NetworkResultOptions, val: &str); + fn set_reason_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "reply")] + fn reply_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "reply")] - fn reply_shim(this: &NetworkResultOptions, val: &str); + fn set_reply_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "result")] + fn result_shim(this: &NetworkResultOptions) -> bool; #[wasm_bindgen(method, setter = "result")] - fn result_shim(this: &NetworkResultOptions, val: bool); + fn set_result_shim(this: &NetworkResultOptions, val: bool); + #[wasm_bindgen(method, getter = "resultCode")] + fn result_code_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "resultCode")] - fn result_code_shim(this: &NetworkResultOptions, val: i32); + fn set_result_code_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "resultReason")] + fn result_reason_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "resultReason")] - fn result_reason_shim(this: &NetworkResultOptions, val: &str); + fn set_result_reason_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "ret")] + fn ret_shim(this: &NetworkResultOptions) -> bool; #[wasm_bindgen(method, setter = "ret")] - fn ret_shim(this: &NetworkResultOptions, val: bool); + fn set_ret_shim(this: &NetworkResultOptions, val: bool); + #[wasm_bindgen(method, getter = "route")] + fn route_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "route")] - fn route_shim(this: &NetworkResultOptions, val: &str); + fn set_route_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "server")] + fn server_shim(this: &NetworkResultOptions) -> i32; #[wasm_bindgen(method, setter = "server")] - fn server_shim(this: &NetworkResultOptions, val: i32); + fn set_server_shim(this: &NetworkResultOptions, val: i32); + #[wasm_bindgen(method, getter = "server_str")] + fn server_str_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "server_str")] - fn server_str_shim(this: &NetworkResultOptions, val: &str); + fn set_server_str_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "success")] + fn success_shim(this: &NetworkResultOptions) -> bool; #[wasm_bindgen(method, setter = "success")] - fn success_shim(this: &NetworkResultOptions, val: bool); + fn set_success_shim(this: &NetworkResultOptions, val: bool); + #[wasm_bindgen(method, getter = "topic")] + fn topic_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "topic")] - fn topic_shim(this: &NetworkResultOptions, val: &str); + fn set_topic_shim(this: &NetworkResultOptions, val: &str); + #[wasm_bindgen(method, getter = "vendor_str")] + fn vendor_str_shim(this: &NetworkResultOptions) -> String; #[wasm_bindgen(method, setter = "vendor_str")] - fn vendor_str_shim(this: &NetworkResultOptions, val: &str); + fn set_vendor_str_shim(this: &NetworkResultOptions, val: &str); +} +#[doc = "The trait to access properties on the `NetworkResultOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] +pub trait NetworkResultOptionsGetters { + #[doc = "Get the `broadcast` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn broadcast(&self) -> bool; + #[doc = "Get the `curExternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn cur_external_ifname(&self) -> String; + #[doc = "Get the `curInternalIfname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn cur_internal_ifname(&self) -> String; + #[doc = "Get the `dns1` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn dns1(&self) -> i32; + #[doc = "Get the `dns1_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn dns1_str(&self) -> String; + #[doc = "Get the `dns2` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn dns2(&self) -> i32; + #[doc = "Get the `dns2_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn dns2_str(&self) -> String; + #[doc = "Get the `enable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn enable(&self) -> bool; + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn error(&self) -> bool; + #[doc = "Get the `flag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn flag(&self) -> String; + #[doc = "Get the `gateway` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn gateway(&self) -> i32; + #[doc = "Get the `gateway_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn gateway_str(&self) -> String; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn id(&self) -> i32; + #[doc = "Get the `interfaceList` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn interface_list(&self) -> ::js_sys::Array; + #[doc = "Get the `ipAddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn ip_addr(&self) -> String; + #[doc = "Get the `ipaddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn ipaddr(&self) -> i32; + #[doc = "Get the `ipaddr_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn ipaddr_str(&self) -> String; + #[doc = "Get the `lease` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn lease(&self) -> i32; + #[doc = "Get the `macAddr` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn mac_addr(&self) -> String; + #[doc = "Get the `mask` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn mask(&self) -> i32; + #[doc = "Get the `mask_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn mask_str(&self) -> String; + #[doc = "Get the `netId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn net_id(&self) -> String; + #[doc = "Get the `prefixLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn prefix_length(&self) -> i32; + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn reason(&self) -> String; + #[doc = "Get the `reply` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn reply(&self) -> String; + #[doc = "Get the `result` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn result(&self) -> bool; + #[doc = "Get the `resultCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn result_code(&self) -> i32; + #[doc = "Get the `resultReason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn result_reason(&self) -> String; + #[doc = "Get the `ret` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn ret(&self) -> bool; + #[doc = "Get the `route` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn route(&self) -> String; + #[doc = "Get the `server` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn server(&self) -> i32; + #[doc = "Get the `server_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn server_str(&self) -> String; + #[doc = "Get the `success` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn success(&self) -> bool; + #[doc = "Get the `topic` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn topic(&self) -> String; + #[doc = "Get the `vendor_str` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] + fn vendor_str(&self) -> String; +} +impl NetworkResultOptionsGetters for NetworkResultOptions { + fn broadcast(&self) -> bool { + self.broadcast_shim() + } + fn cur_external_ifname(&self) -> String { + self.cur_external_ifname_shim() + } + fn cur_internal_ifname(&self) -> String { + self.cur_internal_ifname_shim() + } + fn dns1(&self) -> i32 { + self.dns1_shim() + } + fn dns1_str(&self) -> String { + self.dns1_str_shim() + } + fn dns2(&self) -> i32 { + self.dns2_shim() + } + fn dns2_str(&self) -> String { + self.dns2_str_shim() + } + fn enable(&self) -> bool { + self.enable_shim() + } + fn error(&self) -> bool { + self.error_shim() + } + fn flag(&self) -> String { + self.flag_shim() + } + fn gateway(&self) -> i32 { + self.gateway_shim() + } + fn gateway_str(&self) -> String { + self.gateway_str_shim() + } + fn id(&self) -> i32 { + self.id_shim() + } + fn interface_list(&self) -> ::js_sys::Array { + self.interface_list_shim() + } + fn ip_addr(&self) -> String { + self.ip_addr_shim() + } + fn ipaddr(&self) -> i32 { + self.ipaddr_shim() + } + fn ipaddr_str(&self) -> String { + self.ipaddr_str_shim() + } + fn lease(&self) -> i32 { + self.lease_shim() + } + fn mac_addr(&self) -> String { + self.mac_addr_shim() + } + fn mask(&self) -> i32 { + self.mask_shim() + } + fn mask_str(&self) -> String { + self.mask_str_shim() + } + fn net_id(&self) -> String { + self.net_id_shim() + } + fn prefix_length(&self) -> i32 { + self.prefix_length_shim() + } + fn reason(&self) -> String { + self.reason_shim() + } + fn reply(&self) -> String { + self.reply_shim() + } + fn result(&self) -> bool { + self.result_shim() + } + fn result_code(&self) -> i32 { + self.result_code_shim() + } + fn result_reason(&self) -> String { + self.result_reason_shim() + } + fn ret(&self) -> bool { + self.ret_shim() + } + fn route(&self) -> String { + self.route_shim() + } + fn server(&self) -> i32 { + self.server_shim() + } + fn server_str(&self) -> String { + self.server_str_shim() + } + fn success(&self) -> bool { + self.success_shim() + } + fn topic(&self) -> String { + self.topic_shim() + } + fn vendor_str(&self) -> String { + self.vendor_str_shim() + } } impl NetworkResultOptions { #[doc = "Construct a new `NetworkResultOptions`."] @@ -94,245 +416,245 @@ impl NetworkResultOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn broadcast(&mut self, val: bool) -> &mut Self { - self.broadcast_shim(val); + self.set_broadcast_shim(val); self } #[doc = "Change the `curExternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn cur_external_ifname(&mut self, val: &str) -> &mut Self { - self.cur_external_ifname_shim(val); + self.set_cur_external_ifname_shim(val); self } #[doc = "Change the `curInternalIfname` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn cur_internal_ifname(&mut self, val: &str) -> &mut Self { - self.cur_internal_ifname_shim(val); + self.set_cur_internal_ifname_shim(val); self } #[doc = "Change the `dns1` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn dns1(&mut self, val: i32) -> &mut Self { - self.dns1_shim(val); + self.set_dns1_shim(val); self } #[doc = "Change the `dns1_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn dns1_str(&mut self, val: &str) -> &mut Self { - self.dns1_str_shim(val); + self.set_dns1_str_shim(val); self } #[doc = "Change the `dns2` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn dns2(&mut self, val: i32) -> &mut Self { - self.dns2_shim(val); + self.set_dns2_shim(val); self } #[doc = "Change the `dns2_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn dns2_str(&mut self, val: &str) -> &mut Self { - self.dns2_str_shim(val); + self.set_dns2_str_shim(val); self } #[doc = "Change the `enable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn enable(&mut self, val: bool) -> &mut Self { - self.enable_shim(val); + self.set_enable_shim(val); self } #[doc = "Change the `error` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn error(&mut self, val: bool) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } #[doc = "Change the `flag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn flag(&mut self, val: &str) -> &mut Self { - self.flag_shim(val); + self.set_flag_shim(val); self } #[doc = "Change the `gateway` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn gateway(&mut self, val: i32) -> &mut Self { - self.gateway_shim(val); + self.set_gateway_shim(val); self } #[doc = "Change the `gateway_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn gateway_str(&mut self, val: &str) -> &mut Self { - self.gateway_str_shim(val); + self.set_gateway_str_shim(val); self } #[doc = "Change the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn id(&mut self, val: i32) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `interfaceList` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn interface_list(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.interface_list_shim(val); + self.set_interface_list_shim(val); self } #[doc = "Change the `ipAddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn ip_addr(&mut self, val: &str) -> &mut Self { - self.ip_addr_shim(val); + self.set_ip_addr_shim(val); self } #[doc = "Change the `ipaddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn ipaddr(&mut self, val: i32) -> &mut Self { - self.ipaddr_shim(val); + self.set_ipaddr_shim(val); self } #[doc = "Change the `ipaddr_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn ipaddr_str(&mut self, val: &str) -> &mut Self { - self.ipaddr_str_shim(val); + self.set_ipaddr_str_shim(val); self } #[doc = "Change the `lease` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn lease(&mut self, val: i32) -> &mut Self { - self.lease_shim(val); + self.set_lease_shim(val); self } #[doc = "Change the `macAddr` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn mac_addr(&mut self, val: &str) -> &mut Self { - self.mac_addr_shim(val); + self.set_mac_addr_shim(val); self } #[doc = "Change the `mask` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn mask(&mut self, val: i32) -> &mut Self { - self.mask_shim(val); + self.set_mask_shim(val); self } #[doc = "Change the `mask_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn mask_str(&mut self, val: &str) -> &mut Self { - self.mask_str_shim(val); + self.set_mask_str_shim(val); self } #[doc = "Change the `netId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn net_id(&mut self, val: &str) -> &mut Self { - self.net_id_shim(val); + self.set_net_id_shim(val); self } #[doc = "Change the `prefixLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn prefix_length(&mut self, val: i32) -> &mut Self { - self.prefix_length_shim(val); + self.set_prefix_length_shim(val); self } #[doc = "Change the `reason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn reason(&mut self, val: &str) -> &mut Self { - self.reason_shim(val); + self.set_reason_shim(val); self } #[doc = "Change the `reply` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn reply(&mut self, val: &str) -> &mut Self { - self.reply_shim(val); + self.set_reply_shim(val); self } #[doc = "Change the `result` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn result(&mut self, val: bool) -> &mut Self { - self.result_shim(val); + self.set_result_shim(val); self } #[doc = "Change the `resultCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn result_code(&mut self, val: i32) -> &mut Self { - self.result_code_shim(val); + self.set_result_code_shim(val); self } #[doc = "Change the `resultReason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn result_reason(&mut self, val: &str) -> &mut Self { - self.result_reason_shim(val); + self.set_result_reason_shim(val); self } #[doc = "Change the `ret` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn ret(&mut self, val: bool) -> &mut Self { - self.ret_shim(val); + self.set_ret_shim(val); self } #[doc = "Change the `route` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn route(&mut self, val: &str) -> &mut Self { - self.route_shim(val); + self.set_route_shim(val); self } #[doc = "Change the `server` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn server(&mut self, val: i32) -> &mut Self { - self.server_shim(val); + self.set_server_shim(val); self } #[doc = "Change the `server_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn server_str(&mut self, val: &str) -> &mut Self { - self.server_str_shim(val); + self.set_server_str_shim(val); self } #[doc = "Change the `success` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn success(&mut self, val: bool) -> &mut Self { - self.success_shim(val); + self.set_success_shim(val); self } #[doc = "Change the `topic` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn topic(&mut self, val: &str) -> &mut Self { - self.topic_shim(val); + self.set_topic_shim(val); self } #[doc = "Change the `vendor_str` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NetworkResultOptions`*"] pub fn vendor_str(&mut self, val: &str) -> &mut Self { - self.vendor_str_shim(val); + self.set_vendor_str_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_NodeFilter.rs b/crates/web-sys/src/features/gen_NodeFilter.rs index 9f41f29e589..cfe9deab278 100644 --- a/crates/web-sys/src/features/gen_NodeFilter.rs +++ b/crates/web-sys/src/features/gen_NodeFilter.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] pub type NodeFilter; + #[wasm_bindgen(method, getter = "acceptNode")] + fn accept_node_shim(this: &NodeFilter) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "acceptNode")] - fn accept_node_shim(this: &NodeFilter, val: &::js_sys::Function); + fn set_accept_node_shim(this: &NodeFilter, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `NodeFilter` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] +pub trait NodeFilterGetters { + #[doc = "Get the `acceptNode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] + fn accept_node(&self) -> ::js_sys::Function; +} +impl NodeFilterGetters for NodeFilter { + fn accept_node(&self) -> ::js_sys::Function { + self.accept_node_shim() + } } impl NodeFilter { #[doc = "Construct a new `NodeFilter`."] @@ -26,7 +42,7 @@ impl NodeFilter { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NodeFilter`*"] pub fn accept_node(&mut self, val: &::js_sys::Function) -> &mut Self { - self.accept_node_shim(val); + self.set_accept_node_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_NotificationAction.rs b/crates/web-sys/src/features/gen_NotificationAction.rs index 24bfb4d8b22..4a85cee7f0a 100644 --- a/crates/web-sys/src/features/gen_NotificationAction.rs +++ b/crates/web-sys/src/features/gen_NotificationAction.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] pub type NotificationAction; + #[wasm_bindgen(method, getter = "action")] + fn action_shim(this: &NotificationAction) -> String; #[wasm_bindgen(method, setter = "action")] - fn action_shim(this: &NotificationAction, val: &str); + fn set_action_shim(this: &NotificationAction, val: &str); + #[wasm_bindgen(method, getter = "icon")] + fn icon_shim(this: &NotificationAction) -> String; #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &NotificationAction, val: &str); + fn set_icon_shim(this: &NotificationAction, val: &str); + #[wasm_bindgen(method, getter = "title")] + fn title_shim(this: &NotificationAction) -> String; #[wasm_bindgen(method, setter = "title")] - fn title_shim(this: &NotificationAction, val: &str); + fn set_title_shim(this: &NotificationAction, val: &str); +} +#[doc = "The trait to access properties on the `NotificationAction` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] +pub trait NotificationActionGetters { + #[doc = "Get the `action` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + fn action(&self) -> String; + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + fn icon(&self) -> String; + #[doc = "Get the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] + fn title(&self) -> String; +} +impl NotificationActionGetters for NotificationAction { + fn action(&self) -> String { + self.action_shim() + } + fn icon(&self) -> String { + self.icon_shim() + } + fn title(&self) -> String { + self.title_shim() + } } impl NotificationAction { #[doc = "Construct a new `NotificationAction`."] @@ -24,29 +58,29 @@ impl NotificationAction { pub fn new(action: &str, title: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.action(action); - ret.title(title); + Self::action(&mut ret, action); + Self::title(&mut ret, title); ret } #[doc = "Change the `action` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] pub fn action(&mut self, val: &str) -> &mut Self { - self.action_shim(val); + self.set_action_shim(val); self } #[doc = "Change the `icon` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon_shim(val); self } #[doc = "Change the `title` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationAction`*"] pub fn title(&mut self, val: &str) -> &mut Self { - self.title_shim(val); + self.set_title_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_NotificationEventInit.rs b/crates/web-sys/src/features/gen_NotificationEventInit.rs index 6e73ccc7bf2..859a07ddacb 100644 --- a/crates/web-sys/src/features/gen_NotificationEventInit.rs +++ b/crates/web-sys/src/features/gen_NotificationEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] pub type NotificationEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &NotificationEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &NotificationEventInit, val: bool); + fn set_bubbles_shim(this: &NotificationEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &NotificationEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &NotificationEventInit, val: bool); + fn set_cancelable_shim(this: &NotificationEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &NotificationEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &NotificationEventInit, val: bool); + fn set_composed_shim(this: &NotificationEventInit, val: bool); + #[cfg(feature = "Notification")] + #[wasm_bindgen(method, getter = "notification")] + fn notification_shim(this: &NotificationEventInit) -> Notification; #[cfg(feature = "Notification")] #[wasm_bindgen(method, setter = "notification")] - fn notification_shim(this: &NotificationEventInit, val: &Notification); + fn set_notification_shim(this: &NotificationEventInit, val: &Notification); +} +#[doc = "The trait to access properties on the `NotificationEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] +pub trait NotificationEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "Notification")] + #[doc = "Get the `notification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Notification`, `NotificationEventInit`*"] + fn notification(&self) -> Notification; +} +impl NotificationEventInitGetters for NotificationEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "Notification")] + fn notification(&self) -> Notification { + self.notification_shim() + } } impl NotificationEventInit { #[cfg(feature = "Notification")] @@ -28,28 +74,28 @@ impl NotificationEventInit { pub fn new(notification: &Notification) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.notification(notification); + Self::notification(&mut ret, notification); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "Notification")] @@ -57,7 +103,7 @@ impl NotificationEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Notification`, `NotificationEventInit`*"] pub fn notification(&mut self, val: &Notification) -> &mut Self { - self.notification_shim(val); + self.set_notification_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_NotificationOptions.rs b/crates/web-sys/src/features/gen_NotificationOptions.rs index cd07eebe53a..371d0567acd 100644 --- a/crates/web-sys/src/features/gen_NotificationOptions.rs +++ b/crates/web-sys/src/features/gen_NotificationOptions.rs @@ -10,33 +10,160 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub type NotificationOptions; + #[wasm_bindgen(method, getter = "actions")] + fn actions_shim(this: &NotificationOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "actions")] - fn actions_shim(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); + fn set_actions_shim(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "badge")] + fn badge_shim(this: &NotificationOptions) -> String; #[wasm_bindgen(method, setter = "badge")] - fn badge_shim(this: &NotificationOptions, val: &str); + fn set_badge_shim(this: &NotificationOptions, val: &str); + #[wasm_bindgen(method, getter = "body")] + fn body_shim(this: &NotificationOptions) -> String; #[wasm_bindgen(method, setter = "body")] - fn body_shim(this: &NotificationOptions, val: &str); + fn set_body_shim(this: &NotificationOptions, val: &str); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &NotificationOptions) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); + fn set_data_shim(this: &NotificationOptions, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "NotificationDirection")] + #[wasm_bindgen(method, getter = "dir")] + fn dir_shim(this: &NotificationOptions) -> NotificationDirection; #[cfg(feature = "NotificationDirection")] #[wasm_bindgen(method, setter = "dir")] - fn dir_shim(this: &NotificationOptions, val: NotificationDirection); + fn set_dir_shim(this: &NotificationOptions, val: NotificationDirection); + #[wasm_bindgen(method, getter = "icon")] + fn icon_shim(this: &NotificationOptions) -> String; #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &NotificationOptions, val: &str); + fn set_icon_shim(this: &NotificationOptions, val: &str); + #[wasm_bindgen(method, getter = "image")] + fn image_shim(this: &NotificationOptions) -> String; #[wasm_bindgen(method, setter = "image")] - fn image_shim(this: &NotificationOptions, val: &str); + fn set_image_shim(this: &NotificationOptions, val: &str); + #[wasm_bindgen(method, getter = "lang")] + fn lang_shim(this: &NotificationOptions) -> String; #[wasm_bindgen(method, setter = "lang")] - fn lang_shim(this: &NotificationOptions, val: &str); + fn set_lang_shim(this: &NotificationOptions, val: &str); + #[wasm_bindgen(method, getter = "renotify")] + fn renotify_shim(this: &NotificationOptions) -> bool; #[wasm_bindgen(method, setter = "renotify")] - fn renotify_shim(this: &NotificationOptions, val: bool); + fn set_renotify_shim(this: &NotificationOptions, val: bool); + #[wasm_bindgen(method, getter = "requireInteraction")] + fn require_interaction_shim(this: &NotificationOptions) -> bool; #[wasm_bindgen(method, setter = "requireInteraction")] - fn require_interaction_shim(this: &NotificationOptions, val: bool); + fn set_require_interaction_shim(this: &NotificationOptions, val: bool); + #[wasm_bindgen(method, getter = "silent")] + fn silent_shim(this: &NotificationOptions) -> Option; #[wasm_bindgen(method, setter = "silent")] - fn silent_shim(this: &NotificationOptions, val: Option); + fn set_silent_shim(this: &NotificationOptions, val: Option); + #[wasm_bindgen(method, getter = "tag")] + fn tag_shim(this: &NotificationOptions) -> String; #[wasm_bindgen(method, setter = "tag")] - fn tag_shim(this: &NotificationOptions, val: &str); + fn set_tag_shim(this: &NotificationOptions, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &NotificationOptions) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &NotificationOptions, val: f64); + fn set_timestamp_shim(this: &NotificationOptions, val: f64); +} +#[doc = "The trait to access properties on the `NotificationOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] +pub trait NotificationOptionsGetters { + #[doc = "Get the `actions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn actions(&self) -> ::js_sys::Array; + #[doc = "Get the `badge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn badge(&self) -> String; + #[doc = "Get the `body` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn body(&self) -> String; + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn data(&self) -> ::wasm_bindgen::JsValue; + #[cfg(feature = "NotificationDirection")] + #[doc = "Get the `dir` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationDirection`, `NotificationOptions`*"] + fn dir(&self) -> NotificationDirection; + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn icon(&self) -> String; + #[doc = "Get the `image` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn image(&self) -> String; + #[doc = "Get the `lang` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn lang(&self) -> String; + #[doc = "Get the `renotify` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn renotify(&self) -> bool; + #[doc = "Get the `requireInteraction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn require_interaction(&self) -> bool; + #[doc = "Get the `silent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn silent(&self) -> Option; + #[doc = "Get the `tag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn tag(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] + fn timestamp(&self) -> f64; +} +impl NotificationOptionsGetters for NotificationOptions { + fn actions(&self) -> ::js_sys::Array { + self.actions_shim() + } + fn badge(&self) -> String { + self.badge_shim() + } + fn body(&self) -> String { + self.body_shim() + } + fn data(&self) -> ::wasm_bindgen::JsValue { + self.data_shim() + } + #[cfg(feature = "NotificationDirection")] + fn dir(&self) -> NotificationDirection { + self.dir_shim() + } + fn icon(&self) -> String { + self.icon_shim() + } + fn image(&self) -> String { + self.image_shim() + } + fn lang(&self) -> String { + self.lang_shim() + } + fn renotify(&self) -> bool { + self.renotify_shim() + } + fn require_interaction(&self) -> bool { + self.require_interaction_shim() + } + fn silent(&self) -> Option { + self.silent_shim() + } + fn tag(&self) -> String { + self.tag_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } } impl NotificationOptions { #[doc = "Construct a new `NotificationOptions`."] @@ -51,28 +178,28 @@ impl NotificationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn actions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.actions_shim(val); + self.set_actions_shim(val); self } #[doc = "Change the `badge` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn badge(&mut self, val: &str) -> &mut Self { - self.badge_shim(val); + self.set_badge_shim(val); self } #[doc = "Change the `body` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn body(&mut self, val: &str) -> &mut Self { - self.body_shim(val); + self.set_body_shim(val); self } #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[cfg(feature = "NotificationDirection")] @@ -80,63 +207,63 @@ impl NotificationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationDirection`, `NotificationOptions`*"] pub fn dir(&mut self, val: NotificationDirection) -> &mut Self { - self.dir_shim(val); + self.set_dir_shim(val); self } #[doc = "Change the `icon` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon_shim(val); self } #[doc = "Change the `image` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn image(&mut self, val: &str) -> &mut Self { - self.image_shim(val); + self.set_image_shim(val); self } #[doc = "Change the `lang` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn lang(&mut self, val: &str) -> &mut Self { - self.lang_shim(val); + self.set_lang_shim(val); self } #[doc = "Change the `renotify` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn renotify(&mut self, val: bool) -> &mut Self { - self.renotify_shim(val); + self.set_renotify_shim(val); self } #[doc = "Change the `requireInteraction` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn require_interaction(&mut self, val: bool) -> &mut Self { - self.require_interaction_shim(val); + self.set_require_interaction_shim(val); self } #[doc = "Change the `silent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn silent(&mut self, val: Option) -> &mut Self { - self.silent_shim(val); + self.set_silent_shim(val); self } #[doc = "Change the `tag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn tag(&mut self, val: &str) -> &mut Self { - self.tag_shim(val); + self.set_tag_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ObserverCallback.rs b/crates/web-sys/src/features/gen_ObserverCallback.rs index 6136af2a956..3bfe853fe9e 100644 --- a/crates/web-sys/src/features/gen_ObserverCallback.rs +++ b/crates/web-sys/src/features/gen_ObserverCallback.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] pub type ObserverCallback; + #[wasm_bindgen(method, getter = "handleEvent")] + fn handle_event_shim(this: &ObserverCallback) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &ObserverCallback, val: &::js_sys::Function); + fn set_handle_event_shim(this: &ObserverCallback, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `ObserverCallback` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] +pub trait ObserverCallbackGetters { + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] + fn handle_event(&self) -> ::js_sys::Function; +} +impl ObserverCallbackGetters for ObserverCallback { + fn handle_event(&self) -> ::js_sys::Function { + self.handle_event_shim() + } } impl ObserverCallback { #[doc = "Construct a new `ObserverCallback`."] @@ -26,7 +42,7 @@ impl ObserverCallback { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`*"] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs b/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs index dc607168d11..a26fe711eec 100644 --- a/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs +++ b/crates/web-sys/src/features/gen_OfflineAudioCompletionEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] pub type OfflineAudioCompletionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &OfflineAudioCompletionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &OfflineAudioCompletionEventInit, val: bool); + fn set_bubbles_shim(this: &OfflineAudioCompletionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &OfflineAudioCompletionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &OfflineAudioCompletionEventInit, val: bool); + fn set_cancelable_shim(this: &OfflineAudioCompletionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &OfflineAudioCompletionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &OfflineAudioCompletionEventInit, val: bool); + fn set_composed_shim(this: &OfflineAudioCompletionEventInit, val: bool); + #[cfg(feature = "AudioBuffer")] + #[wasm_bindgen(method, getter = "renderedBuffer")] + fn rendered_buffer_shim(this: &OfflineAudioCompletionEventInit) -> AudioBuffer; #[cfg(feature = "AudioBuffer")] #[wasm_bindgen(method, setter = "renderedBuffer")] - fn rendered_buffer_shim(this: &OfflineAudioCompletionEventInit, val: &AudioBuffer); + fn set_rendered_buffer_shim(this: &OfflineAudioCompletionEventInit, val: &AudioBuffer); +} +#[doc = "The trait to access properties on the `OfflineAudioCompletionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] +pub trait OfflineAudioCompletionEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "AudioBuffer")] + #[doc = "Get the `renderedBuffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"] + fn rendered_buffer(&self) -> AudioBuffer; +} +impl OfflineAudioCompletionEventInitGetters for OfflineAudioCompletionEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "AudioBuffer")] + fn rendered_buffer(&self) -> AudioBuffer { + self.rendered_buffer_shim() + } } impl OfflineAudioCompletionEventInit { #[cfg(feature = "AudioBuffer")] @@ -28,28 +74,28 @@ impl OfflineAudioCompletionEventInit { pub fn new(rendered_buffer: &AudioBuffer) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.rendered_buffer(rendered_buffer); + Self::rendered_buffer(&mut ret, rendered_buffer); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "AudioBuffer")] @@ -57,7 +103,7 @@ impl OfflineAudioCompletionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"] pub fn rendered_buffer(&mut self, val: &AudioBuffer) -> &mut Self { - self.rendered_buffer_shim(val); + self.set_rendered_buffer_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs b/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs index a60ff33bc11..da04c2e7882 100644 --- a/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs +++ b/crates/web-sys/src/features/gen_OfflineAudioContextOptions.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] pub type OfflineAudioContextOptions; + #[wasm_bindgen(method, getter = "length")] + fn length_shim(this: &OfflineAudioContextOptions) -> u32; #[wasm_bindgen(method, setter = "length")] - fn length_shim(this: &OfflineAudioContextOptions, val: u32); + fn set_length_shim(this: &OfflineAudioContextOptions, val: u32); + #[wasm_bindgen(method, getter = "numberOfChannels")] + fn number_of_channels_shim(this: &OfflineAudioContextOptions) -> u32; #[wasm_bindgen(method, setter = "numberOfChannels")] - fn number_of_channels_shim(this: &OfflineAudioContextOptions, val: u32); + fn set_number_of_channels_shim(this: &OfflineAudioContextOptions, val: u32); + #[wasm_bindgen(method, getter = "sampleRate")] + fn sample_rate_shim(this: &OfflineAudioContextOptions) -> f32; #[wasm_bindgen(method, setter = "sampleRate")] - fn sample_rate_shim(this: &OfflineAudioContextOptions, val: f32); + fn set_sample_rate_shim(this: &OfflineAudioContextOptions, val: f32); +} +#[doc = "The trait to access properties on the `OfflineAudioContextOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] +pub trait OfflineAudioContextOptionsGetters { + #[doc = "Get the `length` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + fn length(&self) -> u32; + #[doc = "Get the `numberOfChannels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + fn number_of_channels(&self) -> u32; + #[doc = "Get the `sampleRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] + fn sample_rate(&self) -> f32; +} +impl OfflineAudioContextOptionsGetters for OfflineAudioContextOptions { + fn length(&self) -> u32 { + self.length_shim() + } + fn number_of_channels(&self) -> u32 { + self.number_of_channels_shim() + } + fn sample_rate(&self) -> f32 { + self.sample_rate_shim() + } } impl OfflineAudioContextOptions { #[doc = "Construct a new `OfflineAudioContextOptions`."] @@ -24,29 +58,29 @@ impl OfflineAudioContextOptions { pub fn new(length: u32, sample_rate: f32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.length(length); - ret.sample_rate(sample_rate); + Self::length(&mut ret, length); + Self::sample_rate(&mut ret, sample_rate); ret } #[doc = "Change the `length` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] pub fn length(&mut self, val: u32) -> &mut Self { - self.length_shim(val); + self.set_length_shim(val); self } #[doc = "Change the `numberOfChannels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] pub fn number_of_channels(&mut self, val: u32) -> &mut Self { - self.number_of_channels_shim(val); + self.set_number_of_channels_shim(val); self } #[doc = "Change the `sampleRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OfflineAudioContextOptions`*"] pub fn sample_rate(&mut self, val: f32) -> &mut Self { - self.sample_rate_shim(val); + self.set_sample_rate_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs b/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs index 533bef161de..0fa26f23cd3 100644 --- a/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs +++ b/crates/web-sys/src/features/gen_OpenFilePickerOptions.rs @@ -14,16 +14,95 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type OpenFilePickerOptions; + #[wasm_bindgen(method, getter = "excludeAcceptAllOption")] + fn exclude_accept_all_option_shim(this: &OpenFilePickerOptions) -> bool; #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] - fn exclude_accept_all_option_shim(this: &OpenFilePickerOptions, val: bool); + fn set_exclude_accept_all_option_shim(this: &OpenFilePickerOptions, val: bool); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &OpenFilePickerOptions) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &OpenFilePickerOptions, val: &str); + fn set_id_shim(this: &OpenFilePickerOptions, val: &str); + #[wasm_bindgen(method, getter = "startIn")] + fn start_in_shim(this: &OpenFilePickerOptions) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "startIn")] - fn start_in_shim(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); + fn set_start_in_shim(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "types")] + fn types_shim(this: &OpenFilePickerOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "types")] - fn types_shim(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); + fn set_types_shim(this: &OpenFilePickerOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "multiple")] + fn multiple_shim(this: &OpenFilePickerOptions) -> bool; #[wasm_bindgen(method, setter = "multiple")] - fn multiple_shim(this: &OpenFilePickerOptions, val: bool); + fn set_multiple_shim(this: &OpenFilePickerOptions, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `OpenFilePickerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] +pub trait OpenFilePickerOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `excludeAcceptAllOption` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn exclude_accept_all_option(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn id(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn start_in(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn types(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `multiple` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn multiple(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl OpenFilePickerOptionsGetters for OpenFilePickerOptions { + #[cfg(web_sys_unstable_apis)] + fn exclude_accept_all_option(&self) -> bool { + self.exclude_accept_all_option_shim() + } + #[cfg(web_sys_unstable_apis)] + fn id(&self) -> String { + self.id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn start_in(&self) -> ::wasm_bindgen::JsValue { + self.start_in_shim() + } + #[cfg(web_sys_unstable_apis)] + fn types(&self) -> ::js_sys::Array { + self.types_shim() + } + #[cfg(web_sys_unstable_apis)] + fn multiple(&self) -> bool { + self.multiple_shim() + } } #[cfg(web_sys_unstable_apis)] impl OpenFilePickerOptions { @@ -46,7 +125,7 @@ impl OpenFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { - self.exclude_accept_all_option_shim(val); + self.set_exclude_accept_all_option_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +136,7 @@ impl OpenFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +147,7 @@ impl OpenFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.start_in_shim(val); + self.set_start_in_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -79,7 +158,7 @@ impl OpenFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.types_shim(val); + self.set_types_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -90,7 +169,7 @@ impl OpenFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn multiple(&mut self, val: bool) -> &mut Self { - self.multiple_shim(val); + self.set_multiple_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs b/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs index 326eedf30c9..bc1892b9ea7 100644 --- a/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs +++ b/crates/web-sys/src/features/gen_OpenWindowEventDetail.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] pub type OpenWindowEventDetail; + #[wasm_bindgen(method, getter = "features")] + fn features_shim(this: &OpenWindowEventDetail) -> String; #[wasm_bindgen(method, setter = "features")] - fn features_shim(this: &OpenWindowEventDetail, val: &str); + fn set_features_shim(this: &OpenWindowEventDetail, val: &str); + #[cfg(feature = "Node")] + #[wasm_bindgen(method, getter = "frameElement")] + fn frame_element_shim(this: &OpenWindowEventDetail) -> Option; #[cfg(feature = "Node")] #[wasm_bindgen(method, setter = "frameElement")] - fn frame_element_shim(this: &OpenWindowEventDetail, val: Option<&Node>); + fn set_frame_element_shim(this: &OpenWindowEventDetail, val: Option<&Node>); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &OpenWindowEventDetail) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &OpenWindowEventDetail, val: &str); + fn set_name_shim(this: &OpenWindowEventDetail, val: &str); + #[wasm_bindgen(method, getter = "url")] + fn url_shim(this: &OpenWindowEventDetail) -> String; #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &OpenWindowEventDetail, val: &str); + fn set_url_shim(this: &OpenWindowEventDetail, val: &str); +} +#[doc = "The trait to access properties on the `OpenWindowEventDetail` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] +pub trait OpenWindowEventDetailGetters { + #[doc = "Get the `features` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + fn features(&self) -> String; + #[cfg(feature = "Node")] + #[doc = "Get the `frameElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"] + fn frame_element(&self) -> Option; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + fn name(&self) -> String; + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] + fn url(&self) -> String; +} +impl OpenWindowEventDetailGetters for OpenWindowEventDetail { + fn features(&self) -> String { + self.features_shim() + } + #[cfg(feature = "Node")] + fn frame_element(&self) -> Option { + self.frame_element_shim() + } + fn name(&self) -> String { + self.name_shim() + } + fn url(&self) -> String { + self.url_shim() + } } impl OpenWindowEventDetail { #[doc = "Construct a new `OpenWindowEventDetail`."] @@ -33,7 +79,7 @@ impl OpenWindowEventDetail { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] pub fn features(&mut self, val: &str) -> &mut Self { - self.features_shim(val); + self.set_features_shim(val); self } #[cfg(feature = "Node")] @@ -41,21 +87,21 @@ impl OpenWindowEventDetail { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Node`, `OpenWindowEventDetail`*"] pub fn frame_element(&mut self, val: Option<&Node>) -> &mut Self { - self.frame_element_shim(val); + self.set_frame_element_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OpenWindowEventDetail`*"] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_OptionalEffectTiming.rs b/crates/web-sys/src/features/gen_OptionalEffectTiming.rs index a55b56f6bb6..671b8dd4613 100644 --- a/crates/web-sys/src/features/gen_OptionalEffectTiming.rs +++ b/crates/web-sys/src/features/gen_OptionalEffectTiming.rs @@ -10,24 +10,109 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] pub type OptionalEffectTiming; + #[wasm_bindgen(method, getter = "delay")] + fn delay_shim(this: &OptionalEffectTiming) -> f64; #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &OptionalEffectTiming, val: f64); + fn set_delay_shim(this: &OptionalEffectTiming, val: f64); + #[cfg(feature = "PlaybackDirection")] + #[wasm_bindgen(method, getter = "direction")] + fn direction_shim(this: &OptionalEffectTiming) -> PlaybackDirection; #[cfg(feature = "PlaybackDirection")] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &OptionalEffectTiming, val: PlaybackDirection); + fn set_direction_shim(this: &OptionalEffectTiming, val: PlaybackDirection); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &OptionalEffectTiming) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &OptionalEffectTiming, val: &::wasm_bindgen::JsValue); + fn set_duration_shim(this: &OptionalEffectTiming, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "easing")] + fn easing_shim(this: &OptionalEffectTiming) -> String; #[wasm_bindgen(method, setter = "easing")] - fn easing_shim(this: &OptionalEffectTiming, val: &str); + fn set_easing_shim(this: &OptionalEffectTiming, val: &str); + #[wasm_bindgen(method, getter = "endDelay")] + fn end_delay_shim(this: &OptionalEffectTiming) -> f64; #[wasm_bindgen(method, setter = "endDelay")] - fn end_delay_shim(this: &OptionalEffectTiming, val: f64); + fn set_end_delay_shim(this: &OptionalEffectTiming, val: f64); + #[cfg(feature = "FillMode")] + #[wasm_bindgen(method, getter = "fill")] + fn fill_shim(this: &OptionalEffectTiming) -> FillMode; #[cfg(feature = "FillMode")] #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &OptionalEffectTiming, val: FillMode); + fn set_fill_shim(this: &OptionalEffectTiming, val: FillMode); + #[wasm_bindgen(method, getter = "iterationStart")] + fn iteration_start_shim(this: &OptionalEffectTiming) -> f64; #[wasm_bindgen(method, setter = "iterationStart")] - fn iteration_start_shim(this: &OptionalEffectTiming, val: f64); + fn set_iteration_start_shim(this: &OptionalEffectTiming, val: f64); + #[wasm_bindgen(method, getter = "iterations")] + fn iterations_shim(this: &OptionalEffectTiming) -> f64; #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &OptionalEffectTiming, val: f64); + fn set_iterations_shim(this: &OptionalEffectTiming, val: f64); +} +#[doc = "The trait to access properties on the `OptionalEffectTiming` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] +pub trait OptionalEffectTimingGetters { + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + fn delay(&self) -> f64; + #[cfg(feature = "PlaybackDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`, `PlaybackDirection`*"] + fn direction(&self) -> PlaybackDirection; + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + fn duration(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `easing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + fn easing(&self) -> String; + #[doc = "Get the `endDelay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + fn end_delay(&self) -> f64; + #[cfg(feature = "FillMode")] + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FillMode`, `OptionalEffectTiming`*"] + fn fill(&self) -> FillMode; + #[doc = "Get the `iterationStart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + fn iteration_start(&self) -> f64; + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] + fn iterations(&self) -> f64; +} +impl OptionalEffectTimingGetters for OptionalEffectTiming { + fn delay(&self) -> f64 { + self.delay_shim() + } + #[cfg(feature = "PlaybackDirection")] + fn direction(&self) -> PlaybackDirection { + self.direction_shim() + } + fn duration(&self) -> ::wasm_bindgen::JsValue { + self.duration_shim() + } + fn easing(&self) -> String { + self.easing_shim() + } + fn end_delay(&self) -> f64 { + self.end_delay_shim() + } + #[cfg(feature = "FillMode")] + fn fill(&self) -> FillMode { + self.fill_shim() + } + fn iteration_start(&self) -> f64 { + self.iteration_start_shim() + } + fn iterations(&self) -> f64 { + self.iterations_shim() + } } impl OptionalEffectTiming { #[doc = "Construct a new `OptionalEffectTiming`."] @@ -42,7 +127,7 @@ impl OptionalEffectTiming { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay_shim(val); self } #[cfg(feature = "PlaybackDirection")] @@ -50,28 +135,28 @@ impl OptionalEffectTiming { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`, `PlaybackDirection`*"] pub fn direction(&mut self, val: PlaybackDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction_shim(val); self } #[doc = "Change the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] pub fn duration(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[doc = "Change the `easing` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] pub fn easing(&mut self, val: &str) -> &mut Self { - self.easing_shim(val); + self.set_easing_shim(val); self } #[doc = "Change the `endDelay` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] pub fn end_delay(&mut self, val: f64) -> &mut Self { - self.end_delay_shim(val); + self.set_end_delay_shim(val); self } #[cfg(feature = "FillMode")] @@ -79,21 +164,21 @@ impl OptionalEffectTiming { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `FillMode`, `OptionalEffectTiming`*"] pub fn fill(&mut self, val: FillMode) -> &mut Self { - self.fill_shim(val); + self.set_fill_shim(val); self } #[doc = "Change the `iterationStart` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] pub fn iteration_start(&mut self, val: f64) -> &mut Self { - self.iteration_start_shim(val); + self.set_iteration_start_shim(val); self } #[doc = "Change the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OptionalEffectTiming`*"] pub fn iterations(&mut self, val: f64) -> &mut Self { - self.iterations_shim(val); + self.set_iterations_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_OscillatorOptions.rs b/crates/web-sys/src/features/gen_OscillatorOptions.rs index 52a53e00595..9be8f6e2b8e 100644 --- a/crates/web-sys/src/features/gen_OscillatorOptions.rs +++ b/crates/web-sys/src/features/gen_OscillatorOptions.rs @@ -10,24 +10,106 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] pub type OscillatorOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &OscillatorOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &OscillatorOptions, val: u32); + fn set_channel_count_shim(this: &OscillatorOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &OscillatorOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &OscillatorOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &OscillatorOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &OscillatorOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &OscillatorOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &OscillatorOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "detune")] + fn detune_shim(this: &OscillatorOptions) -> f32; #[wasm_bindgen(method, setter = "detune")] - fn detune_shim(this: &OscillatorOptions, val: f32); + fn set_detune_shim(this: &OscillatorOptions, val: f32); + #[wasm_bindgen(method, getter = "frequency")] + fn frequency_shim(this: &OscillatorOptions) -> f32; #[wasm_bindgen(method, setter = "frequency")] - fn frequency_shim(this: &OscillatorOptions, val: f32); + fn set_frequency_shim(this: &OscillatorOptions, val: f32); + #[cfg(feature = "PeriodicWave")] + #[wasm_bindgen(method, getter = "periodicWave")] + fn periodic_wave_shim(this: &OscillatorOptions) -> PeriodicWave; #[cfg(feature = "PeriodicWave")] #[wasm_bindgen(method, setter = "periodicWave")] - fn periodic_wave_shim(this: &OscillatorOptions, val: &PeriodicWave); + fn set_periodic_wave_shim(this: &OscillatorOptions, val: &PeriodicWave); + #[cfg(feature = "OscillatorType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &OscillatorOptions) -> OscillatorType; #[cfg(feature = "OscillatorType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &OscillatorOptions, val: OscillatorType); + fn set_type__shim(this: &OscillatorOptions, val: OscillatorType); +} +#[doc = "The trait to access properties on the `OscillatorOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] +pub trait OscillatorOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `OscillatorOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `OscillatorOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `detune` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + fn detune(&self) -> f32; + #[doc = "Get the `frequency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] + fn frequency(&self) -> f32; + #[cfg(feature = "PeriodicWave")] + #[doc = "Get the `periodicWave` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `PeriodicWave`*"] + fn periodic_wave(&self) -> PeriodicWave; + #[cfg(feature = "OscillatorType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `OscillatorType`*"] + fn type_(&self) -> OscillatorType; +} +impl OscillatorOptionsGetters for OscillatorOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn detune(&self) -> f32 { + self.detune_shim() + } + fn frequency(&self) -> f32 { + self.frequency_shim() + } + #[cfg(feature = "PeriodicWave")] + fn periodic_wave(&self) -> PeriodicWave { + self.periodic_wave_shim() + } + #[cfg(feature = "OscillatorType")] + fn type_(&self) -> OscillatorType { + self.type__shim() + } } impl OscillatorOptions { #[doc = "Construct a new `OscillatorOptions`."] @@ -42,7 +124,7 @@ impl OscillatorOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -50,7 +132,7 @@ impl OscillatorOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `OscillatorOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -58,21 +140,21 @@ impl OscillatorOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `OscillatorOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `detune` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] pub fn detune(&mut self, val: f32) -> &mut Self { - self.detune_shim(val); + self.set_detune_shim(val); self } #[doc = "Change the `frequency` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`*"] pub fn frequency(&mut self, val: f32) -> &mut Self { - self.frequency_shim(val); + self.set_frequency_shim(val); self } #[cfg(feature = "PeriodicWave")] @@ -80,7 +162,7 @@ impl OscillatorOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `PeriodicWave`*"] pub fn periodic_wave(&mut self, val: &PeriodicWave) -> &mut Self { - self.periodic_wave_shim(val); + self.set_periodic_wave_shim(val); self } #[cfg(feature = "OscillatorType")] @@ -88,7 +170,7 @@ impl OscillatorOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OscillatorOptions`, `OscillatorType`*"] pub fn type_(&mut self, val: OscillatorType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PageTransitionEventInit.rs b/crates/web-sys/src/features/gen_PageTransitionEventInit.rs index 3474f5bcb49..1c74e37bb55 100644 --- a/crates/web-sys/src/features/gen_PageTransitionEventInit.rs +++ b/crates/web-sys/src/features/gen_PageTransitionEventInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] pub type PageTransitionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PageTransitionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PageTransitionEventInit, val: bool); + fn set_bubbles_shim(this: &PageTransitionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PageTransitionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PageTransitionEventInit, val: bool); + fn set_cancelable_shim(this: &PageTransitionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PageTransitionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PageTransitionEventInit, val: bool); + fn set_composed_shim(this: &PageTransitionEventInit, val: bool); + #[wasm_bindgen(method, getter = "inFrameSwap")] + fn in_frame_swap_shim(this: &PageTransitionEventInit) -> bool; #[wasm_bindgen(method, setter = "inFrameSwap")] - fn in_frame_swap_shim(this: &PageTransitionEventInit, val: bool); + fn set_in_frame_swap_shim(this: &PageTransitionEventInit, val: bool); + #[wasm_bindgen(method, getter = "persisted")] + fn persisted_shim(this: &PageTransitionEventInit) -> bool; #[wasm_bindgen(method, setter = "persisted")] - fn persisted_shim(this: &PageTransitionEventInit, val: bool); + fn set_persisted_shim(this: &PageTransitionEventInit, val: bool); +} +#[doc = "The trait to access properties on the `PageTransitionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] +pub trait PageTransitionEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `inFrameSwap` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + fn in_frame_swap(&self) -> bool; + #[doc = "Get the `persisted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] + fn persisted(&self) -> bool; +} +impl PageTransitionEventInitGetters for PageTransitionEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn in_frame_swap(&self) -> bool { + self.in_frame_swap_shim() + } + fn persisted(&self) -> bool { + self.persisted_shim() + } } impl PageTransitionEventInit { #[doc = "Construct a new `PageTransitionEventInit`."] @@ -34,35 +86,35 @@ impl PageTransitionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `inFrameSwap` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] pub fn in_frame_swap(&mut self, val: bool) -> &mut Self { - self.in_frame_swap_shim(val); + self.set_in_frame_swap_shim(val); self } #[doc = "Change the `persisted` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PageTransitionEventInit`*"] pub fn persisted(&mut self, val: bool) -> &mut Self { - self.persisted_shim(val); + self.set_persisted_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PannerOptions.rs b/crates/web-sys/src/features/gen_PannerOptions.rs index 357ea977eb0..3ce4344d573 100644 --- a/crates/web-sys/src/features/gen_PannerOptions.rs +++ b/crates/web-sys/src/features/gen_PannerOptions.rs @@ -10,44 +10,216 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub type PannerOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &PannerOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &PannerOptions, val: u32); + fn set_channel_count_shim(this: &PannerOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &PannerOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &PannerOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &PannerOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &PannerOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &PannerOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &PannerOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "coneInnerAngle")] + fn cone_inner_angle_shim(this: &PannerOptions) -> f64; #[wasm_bindgen(method, setter = "coneInnerAngle")] - fn cone_inner_angle_shim(this: &PannerOptions, val: f64); + fn set_cone_inner_angle_shim(this: &PannerOptions, val: f64); + #[wasm_bindgen(method, getter = "coneOuterAngle")] + fn cone_outer_angle_shim(this: &PannerOptions) -> f64; #[wasm_bindgen(method, setter = "coneOuterAngle")] - fn cone_outer_angle_shim(this: &PannerOptions, val: f64); + fn set_cone_outer_angle_shim(this: &PannerOptions, val: f64); + #[wasm_bindgen(method, getter = "coneOuterGain")] + fn cone_outer_gain_shim(this: &PannerOptions) -> f64; #[wasm_bindgen(method, setter = "coneOuterGain")] - fn cone_outer_gain_shim(this: &PannerOptions, val: f64); + fn set_cone_outer_gain_shim(this: &PannerOptions, val: f64); + #[cfg(feature = "DistanceModelType")] + #[wasm_bindgen(method, getter = "distanceModel")] + fn distance_model_shim(this: &PannerOptions) -> DistanceModelType; #[cfg(feature = "DistanceModelType")] #[wasm_bindgen(method, setter = "distanceModel")] - fn distance_model_shim(this: &PannerOptions, val: DistanceModelType); + fn set_distance_model_shim(this: &PannerOptions, val: DistanceModelType); + #[wasm_bindgen(method, getter = "maxDistance")] + fn max_distance_shim(this: &PannerOptions) -> f64; #[wasm_bindgen(method, setter = "maxDistance")] - fn max_distance_shim(this: &PannerOptions, val: f64); + fn set_max_distance_shim(this: &PannerOptions, val: f64); + #[wasm_bindgen(method, getter = "orientationX")] + fn orientation_x_shim(this: &PannerOptions) -> f32; #[wasm_bindgen(method, setter = "orientationX")] - fn orientation_x_shim(this: &PannerOptions, val: f32); + fn set_orientation_x_shim(this: &PannerOptions, val: f32); + #[wasm_bindgen(method, getter = "orientationY")] + fn orientation_y_shim(this: &PannerOptions) -> f32; #[wasm_bindgen(method, setter = "orientationY")] - fn orientation_y_shim(this: &PannerOptions, val: f32); + fn set_orientation_y_shim(this: &PannerOptions, val: f32); + #[wasm_bindgen(method, getter = "orientationZ")] + fn orientation_z_shim(this: &PannerOptions) -> f32; #[wasm_bindgen(method, setter = "orientationZ")] - fn orientation_z_shim(this: &PannerOptions, val: f32); + fn set_orientation_z_shim(this: &PannerOptions, val: f32); + #[cfg(feature = "PanningModelType")] + #[wasm_bindgen(method, getter = "panningModel")] + fn panning_model_shim(this: &PannerOptions) -> PanningModelType; #[cfg(feature = "PanningModelType")] #[wasm_bindgen(method, setter = "panningModel")] - fn panning_model_shim(this: &PannerOptions, val: PanningModelType); + fn set_panning_model_shim(this: &PannerOptions, val: PanningModelType); + #[wasm_bindgen(method, getter = "positionX")] + fn position_x_shim(this: &PannerOptions) -> f32; #[wasm_bindgen(method, setter = "positionX")] - fn position_x_shim(this: &PannerOptions, val: f32); + fn set_position_x_shim(this: &PannerOptions, val: f32); + #[wasm_bindgen(method, getter = "positionY")] + fn position_y_shim(this: &PannerOptions) -> f32; #[wasm_bindgen(method, setter = "positionY")] - fn position_y_shim(this: &PannerOptions, val: f32); + fn set_position_y_shim(this: &PannerOptions, val: f32); + #[wasm_bindgen(method, getter = "positionZ")] + fn position_z_shim(this: &PannerOptions) -> f32; #[wasm_bindgen(method, setter = "positionZ")] - fn position_z_shim(this: &PannerOptions, val: f32); + fn set_position_z_shim(this: &PannerOptions, val: f32); + #[wasm_bindgen(method, getter = "refDistance")] + fn ref_distance_shim(this: &PannerOptions) -> f64; #[wasm_bindgen(method, setter = "refDistance")] - fn ref_distance_shim(this: &PannerOptions, val: f64); + fn set_ref_distance_shim(this: &PannerOptions, val: f64); + #[wasm_bindgen(method, getter = "rolloffFactor")] + fn rolloff_factor_shim(this: &PannerOptions) -> f64; #[wasm_bindgen(method, setter = "rolloffFactor")] - fn rolloff_factor_shim(this: &PannerOptions, val: f64); + fn set_rolloff_factor_shim(this: &PannerOptions, val: f64); +} +#[doc = "The trait to access properties on the `PannerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] +pub trait PannerOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `PannerOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `PannerOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `coneInnerAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn cone_inner_angle(&self) -> f64; + #[doc = "Get the `coneOuterAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn cone_outer_angle(&self) -> f64; + #[doc = "Get the `coneOuterGain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn cone_outer_gain(&self) -> f64; + #[cfg(feature = "DistanceModelType")] + #[doc = "Get the `distanceModel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DistanceModelType`, `PannerOptions`*"] + fn distance_model(&self) -> DistanceModelType; + #[doc = "Get the `maxDistance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn max_distance(&self) -> f64; + #[doc = "Get the `orientationX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn orientation_x(&self) -> f32; + #[doc = "Get the `orientationY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn orientation_y(&self) -> f32; + #[doc = "Get the `orientationZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn orientation_z(&self) -> f32; + #[cfg(feature = "PanningModelType")] + #[doc = "Get the `panningModel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`, `PanningModelType`*"] + fn panning_model(&self) -> PanningModelType; + #[doc = "Get the `positionX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn position_x(&self) -> f32; + #[doc = "Get the `positionY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn position_y(&self) -> f32; + #[doc = "Get the `positionZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn position_z(&self) -> f32; + #[doc = "Get the `refDistance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn ref_distance(&self) -> f64; + #[doc = "Get the `rolloffFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] + fn rolloff_factor(&self) -> f64; +} +impl PannerOptionsGetters for PannerOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn cone_inner_angle(&self) -> f64 { + self.cone_inner_angle_shim() + } + fn cone_outer_angle(&self) -> f64 { + self.cone_outer_angle_shim() + } + fn cone_outer_gain(&self) -> f64 { + self.cone_outer_gain_shim() + } + #[cfg(feature = "DistanceModelType")] + fn distance_model(&self) -> DistanceModelType { + self.distance_model_shim() + } + fn max_distance(&self) -> f64 { + self.max_distance_shim() + } + fn orientation_x(&self) -> f32 { + self.orientation_x_shim() + } + fn orientation_y(&self) -> f32 { + self.orientation_y_shim() + } + fn orientation_z(&self) -> f32 { + self.orientation_z_shim() + } + #[cfg(feature = "PanningModelType")] + fn panning_model(&self) -> PanningModelType { + self.panning_model_shim() + } + fn position_x(&self) -> f32 { + self.position_x_shim() + } + fn position_y(&self) -> f32 { + self.position_y_shim() + } + fn position_z(&self) -> f32 { + self.position_z_shim() + } + fn ref_distance(&self) -> f64 { + self.ref_distance_shim() + } + fn rolloff_factor(&self) -> f64 { + self.rolloff_factor_shim() + } } impl PannerOptions { #[doc = "Construct a new `PannerOptions`."] @@ -62,7 +234,7 @@ impl PannerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -70,7 +242,7 @@ impl PannerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `PannerOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -78,28 +250,28 @@ impl PannerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `PannerOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `coneInnerAngle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn cone_inner_angle(&mut self, val: f64) -> &mut Self { - self.cone_inner_angle_shim(val); + self.set_cone_inner_angle_shim(val); self } #[doc = "Change the `coneOuterAngle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn cone_outer_angle(&mut self, val: f64) -> &mut Self { - self.cone_outer_angle_shim(val); + self.set_cone_outer_angle_shim(val); self } #[doc = "Change the `coneOuterGain` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn cone_outer_gain(&mut self, val: f64) -> &mut Self { - self.cone_outer_gain_shim(val); + self.set_cone_outer_gain_shim(val); self } #[cfg(feature = "DistanceModelType")] @@ -107,35 +279,35 @@ impl PannerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `DistanceModelType`, `PannerOptions`*"] pub fn distance_model(&mut self, val: DistanceModelType) -> &mut Self { - self.distance_model_shim(val); + self.set_distance_model_shim(val); self } #[doc = "Change the `maxDistance` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn max_distance(&mut self, val: f64) -> &mut Self { - self.max_distance_shim(val); + self.set_max_distance_shim(val); self } #[doc = "Change the `orientationX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn orientation_x(&mut self, val: f32) -> &mut Self { - self.orientation_x_shim(val); + self.set_orientation_x_shim(val); self } #[doc = "Change the `orientationY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn orientation_y(&mut self, val: f32) -> &mut Self { - self.orientation_y_shim(val); + self.set_orientation_y_shim(val); self } #[doc = "Change the `orientationZ` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn orientation_z(&mut self, val: f32) -> &mut Self { - self.orientation_z_shim(val); + self.set_orientation_z_shim(val); self } #[cfg(feature = "PanningModelType")] @@ -143,42 +315,42 @@ impl PannerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`, `PanningModelType`*"] pub fn panning_model(&mut self, val: PanningModelType) -> &mut Self { - self.panning_model_shim(val); + self.set_panning_model_shim(val); self } #[doc = "Change the `positionX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn position_x(&mut self, val: f32) -> &mut Self { - self.position_x_shim(val); + self.set_position_x_shim(val); self } #[doc = "Change the `positionY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn position_y(&mut self, val: f32) -> &mut Self { - self.position_y_shim(val); + self.set_position_y_shim(val); self } #[doc = "Change the `positionZ` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn position_z(&mut self, val: f32) -> &mut Self { - self.position_z_shim(val); + self.set_position_z_shim(val); self } #[doc = "Change the `refDistance` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn ref_distance(&mut self, val: f64) -> &mut Self { - self.ref_distance_shim(val); + self.set_ref_distance_shim(val); self } #[doc = "Change the `rolloffFactor` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PannerOptions`*"] pub fn rolloff_factor(&mut self, val: f64) -> &mut Self { - self.rolloff_factor_shim(val); + self.set_rolloff_factor_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs b/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs index 91144f4a6e6..1e15b612963 100644 --- a/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_PaymentMethodChangeEventInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] pub type PaymentMethodChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PaymentMethodChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PaymentMethodChangeEventInit, val: bool); + fn set_bubbles_shim(this: &PaymentMethodChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PaymentMethodChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PaymentMethodChangeEventInit, val: bool); + fn set_cancelable_shim(this: &PaymentMethodChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PaymentMethodChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PaymentMethodChangeEventInit, val: bool); + fn set_composed_shim(this: &PaymentMethodChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "methodDetails")] + fn method_details_shim(this: &PaymentMethodChangeEventInit) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "methodDetails")] - fn method_details_shim(this: &PaymentMethodChangeEventInit, val: Option<&::js_sys::Object>); + fn set_method_details_shim(this: &PaymentMethodChangeEventInit, val: Option<&::js_sys::Object>); + #[wasm_bindgen(method, getter = "methodName")] + fn method_name_shim(this: &PaymentMethodChangeEventInit) -> String; #[wasm_bindgen(method, setter = "methodName")] - fn method_name_shim(this: &PaymentMethodChangeEventInit, val: &str); + fn set_method_name_shim(this: &PaymentMethodChangeEventInit, val: &str); +} +#[doc = "The trait to access properties on the `PaymentMethodChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] +pub trait PaymentMethodChangeEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `methodDetails` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + fn method_details(&self) -> Option<::js_sys::Object>; + #[doc = "Get the `methodName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] + fn method_name(&self) -> String; +} +impl PaymentMethodChangeEventInitGetters for PaymentMethodChangeEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn method_details(&self) -> Option<::js_sys::Object> { + self.method_details_shim() + } + fn method_name(&self) -> String { + self.method_name_shim() + } } impl PaymentMethodChangeEventInit { #[doc = "Construct a new `PaymentMethodChangeEventInit`."] @@ -28,42 +80,42 @@ impl PaymentMethodChangeEventInit { pub fn new(method_name: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.method_name(method_name); + Self::method_name(&mut ret, method_name); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `methodDetails` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] pub fn method_details(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.method_details_shim(val); + self.set_method_details_shim(val); self } #[doc = "Change the `methodName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentMethodChangeEventInit`*"] pub fn method_name(&mut self, val: &str) -> &mut Self { - self.method_name_shim(val); + self.set_method_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs b/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs index 0b096480b99..3367850f398 100644 --- a/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs +++ b/crates/web-sys/src/features/gen_PaymentRequestUpdateEventInit.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] pub type PaymentRequestUpdateEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PaymentRequestUpdateEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PaymentRequestUpdateEventInit, val: bool); + fn set_bubbles_shim(this: &PaymentRequestUpdateEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PaymentRequestUpdateEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PaymentRequestUpdateEventInit, val: bool); + fn set_cancelable_shim(this: &PaymentRequestUpdateEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PaymentRequestUpdateEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PaymentRequestUpdateEventInit, val: bool); + fn set_composed_shim(this: &PaymentRequestUpdateEventInit, val: bool); +} +#[doc = "The trait to access properties on the `PaymentRequestUpdateEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] +pub trait PaymentRequestUpdateEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] + fn composed(&self) -> bool; +} +impl PaymentRequestUpdateEventInitGetters for PaymentRequestUpdateEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } } impl PaymentRequestUpdateEventInit { #[doc = "Construct a new `PaymentRequestUpdateEventInit`."] @@ -30,21 +64,21 @@ impl PaymentRequestUpdateEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PaymentRequestUpdateEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_Pbkdf2Params.rs b/crates/web-sys/src/features/gen_Pbkdf2Params.rs index 744c157c142..bdb302593c6 100644 --- a/crates/web-sys/src/features/gen_Pbkdf2Params.rs +++ b/crates/web-sys/src/features/gen_Pbkdf2Params.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] pub type Pbkdf2Params; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &Pbkdf2Params) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &Pbkdf2Params, val: &str); + fn set_name_shim(this: &Pbkdf2Params, val: &str); + #[wasm_bindgen(method, getter = "hash")] + fn hash_shim(this: &Pbkdf2Params) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &Pbkdf2Params, val: &::wasm_bindgen::JsValue); + fn set_hash_shim(this: &Pbkdf2Params, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "iterations")] + fn iterations_shim(this: &Pbkdf2Params) -> u32; #[wasm_bindgen(method, setter = "iterations")] - fn iterations_shim(this: &Pbkdf2Params, val: u32); + fn set_iterations_shim(this: &Pbkdf2Params, val: u32); + #[wasm_bindgen(method, getter = "salt")] + fn salt_shim(this: &Pbkdf2Params) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "salt")] - fn salt_shim(this: &Pbkdf2Params, val: &::js_sys::Object); + fn set_salt_shim(this: &Pbkdf2Params, val: &::js_sys::Object); +} +#[doc = "The trait to access properties on the `Pbkdf2Params` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] +pub trait Pbkdf2ParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + fn name(&self) -> String; + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + fn hash(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `iterations` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + fn iterations(&self) -> u32; + #[doc = "Get the `salt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] + fn salt(&self) -> ::js_sys::Object; +} +impl Pbkdf2ParamsGetters for Pbkdf2Params { + fn name(&self) -> String { + self.name_shim() + } + fn hash(&self) -> ::wasm_bindgen::JsValue { + self.hash_shim() + } + fn iterations(&self) -> u32 { + self.iterations_shim() + } + fn salt(&self) -> ::js_sys::Object { + self.salt_shim() + } } impl Pbkdf2Params { #[doc = "Construct a new `Pbkdf2Params`."] @@ -31,38 +74,38 @@ impl Pbkdf2Params { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.hash(hash); - ret.iterations(iterations); - ret.salt(salt); + Self::name(&mut ret, name); + Self::hash(&mut ret, hash); + Self::iterations(&mut ret, iterations); + Self::salt(&mut ret, salt); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash_shim(val); self } #[doc = "Change the `iterations` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] pub fn iterations(&mut self, val: u32) -> &mut Self { - self.iterations_shim(val); + self.set_iterations_shim(val); self } #[doc = "Change the `salt` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Pbkdf2Params`*"] pub fn salt(&mut self, val: &::js_sys::Object) -> &mut Self { - self.salt_shim(val); + self.set_salt_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs b/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs index b83c1ba16a4..abd1a0ee2f5 100644 --- a/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs +++ b/crates/web-sys/src/features/gen_PerformanceEntryEventInit.rs @@ -10,24 +10,112 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub type PerformanceEntryEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PerformanceEntryEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PerformanceEntryEventInit, val: bool); + fn set_bubbles_shim(this: &PerformanceEntryEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PerformanceEntryEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PerformanceEntryEventInit, val: bool); + fn set_cancelable_shim(this: &PerformanceEntryEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PerformanceEntryEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PerformanceEntryEventInit, val: bool); + fn set_composed_shim(this: &PerformanceEntryEventInit, val: bool); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &PerformanceEntryEventInit) -> f64; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &PerformanceEntryEventInit, val: f64); + fn set_duration_shim(this: &PerformanceEntryEventInit, val: f64); + #[wasm_bindgen(method, getter = "entryType")] + fn entry_type_shim(this: &PerformanceEntryEventInit) -> String; #[wasm_bindgen(method, setter = "entryType")] - fn entry_type_shim(this: &PerformanceEntryEventInit, val: &str); + fn set_entry_type_shim(this: &PerformanceEntryEventInit, val: &str); + #[wasm_bindgen(method, getter = "epoch")] + fn epoch_shim(this: &PerformanceEntryEventInit) -> f64; #[wasm_bindgen(method, setter = "epoch")] - fn epoch_shim(this: &PerformanceEntryEventInit, val: f64); + fn set_epoch_shim(this: &PerformanceEntryEventInit, val: f64); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &PerformanceEntryEventInit) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PerformanceEntryEventInit, val: &str); + fn set_name_shim(this: &PerformanceEntryEventInit, val: &str); + #[wasm_bindgen(method, getter = "origin")] + fn origin_shim(this: &PerformanceEntryEventInit) -> String; #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &PerformanceEntryEventInit, val: &str); + fn set_origin_shim(this: &PerformanceEntryEventInit, val: &str); + #[wasm_bindgen(method, getter = "startTime")] + fn start_time_shim(this: &PerformanceEntryEventInit) -> f64; #[wasm_bindgen(method, setter = "startTime")] - fn start_time_shim(this: &PerformanceEntryEventInit, val: f64); + fn set_start_time_shim(this: &PerformanceEntryEventInit, val: f64); +} +#[doc = "The trait to access properties on the `PerformanceEntryEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] +pub trait PerformanceEntryEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + fn duration(&self) -> f64; + #[doc = "Get the `entryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + fn entry_type(&self) -> String; + #[doc = "Get the `epoch` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + fn epoch(&self) -> f64; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + fn name(&self) -> String; + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + fn origin(&self) -> String; + #[doc = "Get the `startTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] + fn start_time(&self) -> f64; +} +impl PerformanceEntryEventInitGetters for PerformanceEntryEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn duration(&self) -> f64 { + self.duration_shim() + } + fn entry_type(&self) -> String { + self.entry_type_shim() + } + fn epoch(&self) -> f64 { + self.epoch_shim() + } + fn name(&self) -> String { + self.name_shim() + } + fn origin(&self) -> String { + self.origin_shim() + } + fn start_time(&self) -> f64 { + self.start_time_shim() + } } impl PerformanceEntryEventInit { #[doc = "Construct a new `PerformanceEntryEventInit`."] @@ -42,63 +130,63 @@ impl PerformanceEntryEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `duration` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[doc = "Change the `entryType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub fn entry_type(&mut self, val: &str) -> &mut Self { - self.entry_type_shim(val); + self.set_entry_type_shim(val); self } #[doc = "Change the `epoch` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub fn epoch(&mut self, val: f64) -> &mut Self { - self.epoch_shim(val); + self.set_epoch_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin_shim(val); self } #[doc = "Change the `startTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryEventInit`*"] pub fn start_time(&mut self, val: f64) -> &mut Self { - self.start_time_shim(val); + self.set_start_time_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs b/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs index f126babe13d..98b0f08856d 100644 --- a/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs +++ b/crates/web-sys/src/features/gen_PerformanceEntryFilterOptions.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] pub type PerformanceEntryFilterOptions; + #[wasm_bindgen(method, getter = "entryType")] + fn entry_type_shim(this: &PerformanceEntryFilterOptions) -> String; #[wasm_bindgen(method, setter = "entryType")] - fn entry_type_shim(this: &PerformanceEntryFilterOptions, val: &str); + fn set_entry_type_shim(this: &PerformanceEntryFilterOptions, val: &str); + #[wasm_bindgen(method, getter = "initiatorType")] + fn initiator_type_shim(this: &PerformanceEntryFilterOptions) -> String; #[wasm_bindgen(method, setter = "initiatorType")] - fn initiator_type_shim(this: &PerformanceEntryFilterOptions, val: &str); + fn set_initiator_type_shim(this: &PerformanceEntryFilterOptions, val: &str); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &PerformanceEntryFilterOptions) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PerformanceEntryFilterOptions, val: &str); + fn set_name_shim(this: &PerformanceEntryFilterOptions, val: &str); +} +#[doc = "The trait to access properties on the `PerformanceEntryFilterOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] +pub trait PerformanceEntryFilterOptionsGetters { + #[doc = "Get the `entryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + fn entry_type(&self) -> String; + #[doc = "Get the `initiatorType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + fn initiator_type(&self) -> String; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] + fn name(&self) -> String; +} +impl PerformanceEntryFilterOptionsGetters for PerformanceEntryFilterOptions { + fn entry_type(&self) -> String { + self.entry_type_shim() + } + fn initiator_type(&self) -> String { + self.initiator_type_shim() + } + fn name(&self) -> String { + self.name_shim() + } } impl PerformanceEntryFilterOptions { #[doc = "Construct a new `PerformanceEntryFilterOptions`."] @@ -30,21 +64,21 @@ impl PerformanceEntryFilterOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] pub fn entry_type(&mut self, val: &str) -> &mut Self { - self.entry_type_shim(val); + self.set_entry_type_shim(val); self } #[doc = "Change the `initiatorType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] pub fn initiator_type(&mut self, val: &str) -> &mut Self { - self.initiator_type_shim(val); + self.set_initiator_type_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceEntryFilterOptions`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PerformanceObserverInit.rs b/crates/web-sys/src/features/gen_PerformanceObserverInit.rs index d7ab2ac72b8..be25c6c943a 100644 --- a/crates/web-sys/src/features/gen_PerformanceObserverInit.rs +++ b/crates/web-sys/src/features/gen_PerformanceObserverInit.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] pub type PerformanceObserverInit; + #[wasm_bindgen(method, getter = "buffered")] + fn buffered_shim(this: &PerformanceObserverInit) -> bool; #[wasm_bindgen(method, setter = "buffered")] - fn buffered_shim(this: &PerformanceObserverInit, val: bool); + fn set_buffered_shim(this: &PerformanceObserverInit, val: bool); + #[wasm_bindgen(method, getter = "entryTypes")] + fn entry_types_shim(this: &PerformanceObserverInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "entryTypes")] - fn entry_types_shim(this: &PerformanceObserverInit, val: &::wasm_bindgen::JsValue); + fn set_entry_types_shim(this: &PerformanceObserverInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `PerformanceObserverInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] +pub trait PerformanceObserverInitGetters { + #[doc = "Get the `buffered` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] + fn buffered(&self) -> bool; + #[doc = "Get the `entryTypes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] + fn entry_types(&self) -> ::js_sys::Array; +} +impl PerformanceObserverInitGetters for PerformanceObserverInit { + fn buffered(&self) -> bool { + self.buffered_shim() + } + fn entry_types(&self) -> ::js_sys::Array { + self.entry_types_shim() + } } impl PerformanceObserverInit { #[doc = "Construct a new `PerformanceObserverInit`."] @@ -22,21 +47,21 @@ impl PerformanceObserverInit { pub fn new(entry_types: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.entry_types(entry_types); + Self::entry_types(&mut ret, entry_types); ret } #[doc = "Change the `buffered` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] pub fn buffered(&mut self, val: bool) -> &mut Self { - self.buffered_shim(val); + self.set_buffered_shim(val); self } #[doc = "Change the `entryTypes` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PerformanceObserverInit`*"] pub fn entry_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.entry_types_shim(val); + self.set_entry_types_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs b/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs index 66005726781..66262bbc4a3 100644 --- a/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs +++ b/crates/web-sys/src/features/gen_PeriodicWaveConstraints.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] pub type PeriodicWaveConstraints; + #[wasm_bindgen(method, getter = "disableNormalization")] + fn disable_normalization_shim(this: &PeriodicWaveConstraints) -> bool; #[wasm_bindgen(method, setter = "disableNormalization")] - fn disable_normalization_shim(this: &PeriodicWaveConstraints, val: bool); + fn set_disable_normalization_shim(this: &PeriodicWaveConstraints, val: bool); +} +#[doc = "The trait to access properties on the `PeriodicWaveConstraints` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] +pub trait PeriodicWaveConstraintsGetters { + #[doc = "Get the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] + fn disable_normalization(&self) -> bool; +} +impl PeriodicWaveConstraintsGetters for PeriodicWaveConstraints { + fn disable_normalization(&self) -> bool { + self.disable_normalization_shim() + } } impl PeriodicWaveConstraints { #[doc = "Construct a new `PeriodicWaveConstraints`."] @@ -26,7 +42,7 @@ impl PeriodicWaveConstraints { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveConstraints`*"] pub fn disable_normalization(&mut self, val: bool) -> &mut Self { - self.disable_normalization_shim(val); + self.set_disable_normalization_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs b/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs index 60a33a1061d..3a676040014 100644 --- a/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs +++ b/crates/web-sys/src/features/gen_PeriodicWaveOptions.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] pub type PeriodicWaveOptions; + #[wasm_bindgen(method, getter = "disableNormalization")] + fn disable_normalization_shim(this: &PeriodicWaveOptions) -> bool; #[wasm_bindgen(method, setter = "disableNormalization")] - fn disable_normalization_shim(this: &PeriodicWaveOptions, val: bool); + fn set_disable_normalization_shim(this: &PeriodicWaveOptions, val: bool); + #[wasm_bindgen(method, getter = "imag")] + fn imag_shim(this: &PeriodicWaveOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "imag")] - fn imag_shim(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); + fn set_imag_shim(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "real")] + fn real_shim(this: &PeriodicWaveOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "real")] - fn real_shim(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); + fn set_real_shim(this: &PeriodicWaveOptions, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `PeriodicWaveOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] +pub trait PeriodicWaveOptionsGetters { + #[doc = "Get the `disableNormalization` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + fn disable_normalization(&self) -> bool; + #[doc = "Get the `imag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + fn imag(&self) -> ::js_sys::Array; + #[doc = "Get the `real` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] + fn real(&self) -> ::js_sys::Array; +} +impl PeriodicWaveOptionsGetters for PeriodicWaveOptions { + fn disable_normalization(&self) -> bool { + self.disable_normalization_shim() + } + fn imag(&self) -> ::js_sys::Array { + self.imag_shim() + } + fn real(&self) -> ::js_sys::Array { + self.real_shim() + } } impl PeriodicWaveOptions { #[doc = "Construct a new `PeriodicWaveOptions`."] @@ -30,21 +64,21 @@ impl PeriodicWaveOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] pub fn disable_normalization(&mut self, val: bool) -> &mut Self { - self.disable_normalization_shim(val); + self.set_disable_normalization_shim(val); self } #[doc = "Change the `imag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] pub fn imag(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.imag_shim(val); + self.set_imag_shim(val); self } #[doc = "Change the `real` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PeriodicWaveOptions`*"] pub fn real(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.real_shim(val); + self.set_real_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PermissionDescriptor.rs b/crates/web-sys/src/features/gen_PermissionDescriptor.rs index 5d5777773f3..85e48067e3a 100644 --- a/crates/web-sys/src/features/gen_PermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_PermissionDescriptor.rs @@ -11,8 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`*"] pub type PermissionDescriptor; #[cfg(feature = "PermissionName")] + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &PermissionDescriptor) -> PermissionName; + #[cfg(feature = "PermissionName")] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PermissionDescriptor, val: PermissionName); + fn set_name_shim(this: &PermissionDescriptor, val: PermissionName); +} +#[doc = "The trait to access properties on the `PermissionDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`*"] +pub trait PermissionDescriptorGetters { + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`, `PermissionName`*"] + fn name(&self) -> PermissionName; +} +impl PermissionDescriptorGetters for PermissionDescriptor { + #[cfg(feature = "PermissionName")] + fn name(&self) -> PermissionName { + self.name_shim() + } } impl PermissionDescriptor { #[cfg(feature = "PermissionName")] @@ -22,7 +41,7 @@ impl PermissionDescriptor { pub fn new(name: PermissionName) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[cfg(feature = "PermissionName")] @@ -30,7 +49,7 @@ impl PermissionDescriptor { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PermissionDescriptor`, `PermissionName`*"] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PlaneLayout.rs b/crates/web-sys/src/features/gen_PlaneLayout.rs index d5859a0db5a..2fbd28ed43f 100644 --- a/crates/web-sys/src/features/gen_PlaneLayout.rs +++ b/crates/web-sys/src/features/gen_PlaneLayout.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type PlaneLayout; + #[wasm_bindgen(method, getter = "offset")] + fn offset_shim(this: &PlaneLayout) -> u32; #[wasm_bindgen(method, setter = "offset")] - fn offset_shim(this: &PlaneLayout, val: u32); + fn set_offset_shim(this: &PlaneLayout, val: u32); + #[wasm_bindgen(method, getter = "stride")] + fn stride_shim(this: &PlaneLayout) -> u32; #[wasm_bindgen(method, setter = "stride")] - fn stride_shim(this: &PlaneLayout, val: u32); + fn set_stride_shim(this: &PlaneLayout, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `PlaneLayout` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] +pub trait PlaneLayoutGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `offset` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn offset(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stride` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PlaneLayout`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stride(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl PlaneLayoutGetters for PlaneLayout { + #[cfg(web_sys_unstable_apis)] + fn offset(&self) -> u32 { + self.offset_shim() + } + #[cfg(web_sys_unstable_apis)] + fn stride(&self) -> u32 { + self.stride_shim() + } } #[cfg(web_sys_unstable_apis)] impl PlaneLayout { @@ -30,8 +67,8 @@ impl PlaneLayout { pub fn new(offset: u32, stride: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.offset(offset); - ret.stride(stride); + Self::offset(&mut ret, offset); + Self::stride(&mut ret, stride); ret } #[cfg(web_sys_unstable_apis)] @@ -42,7 +79,7 @@ impl PlaneLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn offset(&mut self, val: u32) -> &mut Self { - self.offset_shim(val); + self.set_offset_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +90,7 @@ impl PlaneLayout { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stride(&mut self, val: u32) -> &mut Self { - self.stride_shim(val); + self.set_stride_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs b/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs index 4a1f9c3f77d..ff23c791ddc 100644 --- a/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs +++ b/crates/web-sys/src/features/gen_PluginCrashedEventInit.rs @@ -10,26 +10,123 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub type PluginCrashedEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PluginCrashedEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PluginCrashedEventInit, val: bool); + fn set_bubbles_shim(this: &PluginCrashedEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PluginCrashedEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PluginCrashedEventInit, val: bool); + fn set_cancelable_shim(this: &PluginCrashedEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PluginCrashedEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PluginCrashedEventInit, val: bool); + fn set_composed_shim(this: &PluginCrashedEventInit, val: bool); + #[wasm_bindgen(method, getter = "browserDumpID")] + fn browser_dump_id_shim(this: &PluginCrashedEventInit) -> Option; #[wasm_bindgen(method, setter = "browserDumpID")] - fn browser_dump_id_shim(this: &PluginCrashedEventInit, val: Option<&str>); + fn set_browser_dump_id_shim(this: &PluginCrashedEventInit, val: Option<&str>); + #[wasm_bindgen(method, getter = "gmpPlugin")] + fn gmp_plugin_shim(this: &PluginCrashedEventInit) -> bool; #[wasm_bindgen(method, setter = "gmpPlugin")] - fn gmp_plugin_shim(this: &PluginCrashedEventInit, val: bool); + fn set_gmp_plugin_shim(this: &PluginCrashedEventInit, val: bool); + #[wasm_bindgen(method, getter = "pluginDumpID")] + fn plugin_dump_id_shim(this: &PluginCrashedEventInit) -> String; #[wasm_bindgen(method, setter = "pluginDumpID")] - fn plugin_dump_id_shim(this: &PluginCrashedEventInit, val: &str); + fn set_plugin_dump_id_shim(this: &PluginCrashedEventInit, val: &str); + #[wasm_bindgen(method, getter = "pluginFilename")] + fn plugin_filename_shim(this: &PluginCrashedEventInit) -> Option; #[wasm_bindgen(method, setter = "pluginFilename")] - fn plugin_filename_shim(this: &PluginCrashedEventInit, val: Option<&str>); + fn set_plugin_filename_shim(this: &PluginCrashedEventInit, val: Option<&str>); + #[wasm_bindgen(method, getter = "pluginID")] + fn plugin_id_shim(this: &PluginCrashedEventInit) -> u32; #[wasm_bindgen(method, setter = "pluginID")] - fn plugin_id_shim(this: &PluginCrashedEventInit, val: u32); + fn set_plugin_id_shim(this: &PluginCrashedEventInit, val: u32); + #[wasm_bindgen(method, getter = "pluginName")] + fn plugin_name_shim(this: &PluginCrashedEventInit) -> String; #[wasm_bindgen(method, setter = "pluginName")] - fn plugin_name_shim(this: &PluginCrashedEventInit, val: &str); + fn set_plugin_name_shim(this: &PluginCrashedEventInit, val: &str); + #[wasm_bindgen(method, getter = "submittedCrashReport")] + fn submitted_crash_report_shim(this: &PluginCrashedEventInit) -> bool; #[wasm_bindgen(method, setter = "submittedCrashReport")] - fn submitted_crash_report_shim(this: &PluginCrashedEventInit, val: bool); + fn set_submitted_crash_report_shim(this: &PluginCrashedEventInit, val: bool); +} +#[doc = "The trait to access properties on the `PluginCrashedEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] +pub trait PluginCrashedEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `browserDumpID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn browser_dump_id(&self) -> Option; + #[doc = "Get the `gmpPlugin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn gmp_plugin(&self) -> bool; + #[doc = "Get the `pluginDumpID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn plugin_dump_id(&self) -> String; + #[doc = "Get the `pluginFilename` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn plugin_filename(&self) -> Option; + #[doc = "Get the `pluginID` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn plugin_id(&self) -> u32; + #[doc = "Get the `pluginName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn plugin_name(&self) -> String; + #[doc = "Get the `submittedCrashReport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] + fn submitted_crash_report(&self) -> bool; +} +impl PluginCrashedEventInitGetters for PluginCrashedEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn browser_dump_id(&self) -> Option { + self.browser_dump_id_shim() + } + fn gmp_plugin(&self) -> bool { + self.gmp_plugin_shim() + } + fn plugin_dump_id(&self) -> String { + self.plugin_dump_id_shim() + } + fn plugin_filename(&self) -> Option { + self.plugin_filename_shim() + } + fn plugin_id(&self) -> u32 { + self.plugin_id_shim() + } + fn plugin_name(&self) -> String { + self.plugin_name_shim() + } + fn submitted_crash_report(&self) -> bool { + self.submitted_crash_report_shim() + } } impl PluginCrashedEventInit { #[doc = "Construct a new `PluginCrashedEventInit`."] @@ -44,70 +141,70 @@ impl PluginCrashedEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `browserDumpID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn browser_dump_id(&mut self, val: Option<&str>) -> &mut Self { - self.browser_dump_id_shim(val); + self.set_browser_dump_id_shim(val); self } #[doc = "Change the `gmpPlugin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn gmp_plugin(&mut self, val: bool) -> &mut Self { - self.gmp_plugin_shim(val); + self.set_gmp_plugin_shim(val); self } #[doc = "Change the `pluginDumpID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn plugin_dump_id(&mut self, val: &str) -> &mut Self { - self.plugin_dump_id_shim(val); + self.set_plugin_dump_id_shim(val); self } #[doc = "Change the `pluginFilename` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn plugin_filename(&mut self, val: Option<&str>) -> &mut Self { - self.plugin_filename_shim(val); + self.set_plugin_filename_shim(val); self } #[doc = "Change the `pluginID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn plugin_id(&mut self, val: u32) -> &mut Self { - self.plugin_id_shim(val); + self.set_plugin_id_shim(val); self } #[doc = "Change the `pluginName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn plugin_name(&mut self, val: &str) -> &mut Self { - self.plugin_name_shim(val); + self.set_plugin_name_shim(val); self } #[doc = "Change the `submittedCrashReport` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PluginCrashedEventInit`*"] pub fn submitted_crash_report(&mut self, val: bool) -> &mut Self { - self.submitted_crash_report_shim(val); + self.set_submitted_crash_report_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PointerEventInit.rs b/crates/web-sys/src/features/gen_PointerEventInit.rs index 33a30240346..97ddb17e2e8 100644 --- a/crates/web-sys/src/features/gen_PointerEventInit.rs +++ b/crates/web-sys/src/features/gen_PointerEventInit.rs @@ -10,84 +10,439 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub type PointerEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PointerEventInit, val: bool); + fn set_bubbles_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PointerEventInit, val: bool); + fn set_cancelable_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PointerEventInit, val: bool); + fn set_composed_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &PointerEventInit, val: i32); + fn set_detail_shim(this: &PointerEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &PointerEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &PointerEventInit, val: Option<&Window>); + fn set_view_shim(this: &PointerEventInit, val: Option<&Window>); + #[wasm_bindgen(method, getter = "altKey")] + fn alt_key_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &PointerEventInit, val: bool); + fn set_alt_key_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "ctrlKey")] + fn ctrl_key_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &PointerEventInit, val: bool); + fn set_ctrl_key_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "metaKey")] + fn meta_key_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &PointerEventInit, val: bool); + fn set_meta_key_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierAltGraph")] + fn modifier_alt_graph_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &PointerEventInit, val: bool); + fn set_modifier_alt_graph_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierCapsLock")] + fn modifier_caps_lock_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &PointerEventInit, val: bool); + fn set_modifier_caps_lock_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFn")] + fn modifier_fn_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &PointerEventInit, val: bool); + fn set_modifier_fn_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFnLock")] + fn modifier_fn_lock_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &PointerEventInit, val: bool); + fn set_modifier_fn_lock_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierNumLock")] + fn modifier_num_lock_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &PointerEventInit, val: bool); + fn set_modifier_num_lock_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierOS")] + fn modifier_os_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &PointerEventInit, val: bool); + fn set_modifier_os_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierScrollLock")] + fn modifier_scroll_lock_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &PointerEventInit, val: bool); + fn set_modifier_scroll_lock_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbol")] + fn modifier_symbol_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &PointerEventInit, val: bool); + fn set_modifier_symbol_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + fn modifier_symbol_lock_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &PointerEventInit, val: bool); + fn set_modifier_symbol_lock_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "shiftKey")] + fn shift_key_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &PointerEventInit, val: bool); + fn set_shift_key_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "button")] + fn button_shim(this: &PointerEventInit) -> i16; #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &PointerEventInit, val: i16); + fn set_button_shim(this: &PointerEventInit, val: i16); + #[wasm_bindgen(method, getter = "buttons")] + fn buttons_shim(this: &PointerEventInit) -> u16; #[wasm_bindgen(method, setter = "buttons")] - fn buttons_shim(this: &PointerEventInit, val: u16); + fn set_buttons_shim(this: &PointerEventInit, val: u16); + #[wasm_bindgen(method, getter = "clientX")] + fn client_x_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &PointerEventInit, val: i32); + fn set_client_x_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "clientY")] + fn client_y_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &PointerEventInit, val: i32); + fn set_client_y_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "movementX")] + fn movement_x_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "movementX")] - fn movement_x_shim(this: &PointerEventInit, val: i32); + fn set_movement_x_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "movementY")] + fn movement_y_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "movementY")] - fn movement_y_shim(this: &PointerEventInit, val: i32); + fn set_movement_y_shim(this: &PointerEventInit, val: i32); + #[cfg(feature = "EventTarget")] + #[wasm_bindgen(method, getter = "relatedTarget")] + fn related_target_shim(this: &PointerEventInit) -> Option; #[cfg(feature = "EventTarget")] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &PointerEventInit, val: Option<&EventTarget>); + fn set_related_target_shim(this: &PointerEventInit, val: Option<&EventTarget>); + #[wasm_bindgen(method, getter = "screenX")] + fn screen_x_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &PointerEventInit, val: i32); + fn set_screen_x_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "screenY")] + fn screen_y_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &PointerEventInit, val: i32); + fn set_screen_y_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "coalescedEvents")] + fn coalesced_events_shim(this: &PointerEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "coalescedEvents")] - fn coalesced_events_shim(this: &PointerEventInit, val: &::wasm_bindgen::JsValue); + fn set_coalesced_events_shim(this: &PointerEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &PointerEventInit, val: i32); + fn set_height_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "isPrimary")] + fn is_primary_shim(this: &PointerEventInit) -> bool; #[wasm_bindgen(method, setter = "isPrimary")] - fn is_primary_shim(this: &PointerEventInit, val: bool); + fn set_is_primary_shim(this: &PointerEventInit, val: bool); + #[wasm_bindgen(method, getter = "pointerId")] + fn pointer_id_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "pointerId")] - fn pointer_id_shim(this: &PointerEventInit, val: i32); + fn set_pointer_id_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "pointerType")] + fn pointer_type_shim(this: &PointerEventInit) -> String; #[wasm_bindgen(method, setter = "pointerType")] - fn pointer_type_shim(this: &PointerEventInit, val: &str); + fn set_pointer_type_shim(this: &PointerEventInit, val: &str); + #[wasm_bindgen(method, getter = "pressure")] + fn pressure_shim(this: &PointerEventInit) -> f32; #[wasm_bindgen(method, setter = "pressure")] - fn pressure_shim(this: &PointerEventInit, val: f32); + fn set_pressure_shim(this: &PointerEventInit, val: f32); + #[wasm_bindgen(method, getter = "tangentialPressure")] + fn tangential_pressure_shim(this: &PointerEventInit) -> f32; #[wasm_bindgen(method, setter = "tangentialPressure")] - fn tangential_pressure_shim(this: &PointerEventInit, val: f32); + fn set_tangential_pressure_shim(this: &PointerEventInit, val: f32); + #[wasm_bindgen(method, getter = "tiltX")] + fn tilt_x_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "tiltX")] - fn tilt_x_shim(this: &PointerEventInit, val: i32); + fn set_tilt_x_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "tiltY")] + fn tilt_y_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "tiltY")] - fn tilt_y_shim(this: &PointerEventInit, val: i32); + fn set_tilt_y_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "twist")] + fn twist_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "twist")] - fn twist_shim(this: &PointerEventInit, val: i32); + fn set_twist_shim(this: &PointerEventInit, val: i32); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &PointerEventInit) -> i32; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &PointerEventInit, val: i32); + fn set_width_shim(this: &PointerEventInit, val: i32); +} +#[doc = "The trait to access properties on the `PointerEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] +pub trait PointerEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`, `Window`*"] + fn view(&self) -> Option; + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn alt_key(&self) -> bool; + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn ctrl_key(&self) -> bool; + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn meta_key(&self) -> bool; + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn modifier_alt_graph(&self) -> bool; + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn modifier_caps_lock(&self) -> bool; + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn modifier_fn(&self) -> bool; + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn modifier_fn_lock(&self) -> bool; + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn modifier_num_lock(&self) -> bool; + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn modifier_os(&self) -> bool; + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn modifier_scroll_lock(&self) -> bool; + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn modifier_symbol(&self) -> bool; + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn modifier_symbol_lock(&self) -> bool; + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn shift_key(&self) -> bool; + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn button(&self) -> i16; + #[doc = "Get the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn buttons(&self) -> u16; + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn client_x(&self) -> i32; + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn client_y(&self) -> i32; + #[doc = "Get the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn movement_x(&self) -> i32; + #[doc = "Get the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn movement_y(&self) -> i32; + #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `PointerEventInit`*"] + fn related_target(&self) -> Option; + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn screen_x(&self) -> i32; + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn screen_y(&self) -> i32; + #[doc = "Get the `coalescedEvents` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn coalesced_events(&self) -> ::js_sys::Array; + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn height(&self) -> i32; + #[doc = "Get the `isPrimary` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn is_primary(&self) -> bool; + #[doc = "Get the `pointerId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn pointer_id(&self) -> i32; + #[doc = "Get the `pointerType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn pointer_type(&self) -> String; + #[doc = "Get the `pressure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn pressure(&self) -> f32; + #[doc = "Get the `tangentialPressure` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn tangential_pressure(&self) -> f32; + #[doc = "Get the `tiltX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn tilt_x(&self) -> i32; + #[doc = "Get the `tiltY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn tilt_y(&self) -> i32; + #[doc = "Get the `twist` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn twist(&self) -> i32; + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] + fn width(&self) -> i32; +} +impl PointerEventInitGetters for PointerEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + fn alt_key(&self) -> bool { + self.alt_key_shim() + } + fn ctrl_key(&self) -> bool { + self.ctrl_key_shim() + } + fn meta_key(&self) -> bool { + self.meta_key_shim() + } + fn modifier_alt_graph(&self) -> bool { + self.modifier_alt_graph_shim() + } + fn modifier_caps_lock(&self) -> bool { + self.modifier_caps_lock_shim() + } + fn modifier_fn(&self) -> bool { + self.modifier_fn_shim() + } + fn modifier_fn_lock(&self) -> bool { + self.modifier_fn_lock_shim() + } + fn modifier_num_lock(&self) -> bool { + self.modifier_num_lock_shim() + } + fn modifier_os(&self) -> bool { + self.modifier_os_shim() + } + fn modifier_scroll_lock(&self) -> bool { + self.modifier_scroll_lock_shim() + } + fn modifier_symbol(&self) -> bool { + self.modifier_symbol_shim() + } + fn modifier_symbol_lock(&self) -> bool { + self.modifier_symbol_lock_shim() + } + fn shift_key(&self) -> bool { + self.shift_key_shim() + } + fn button(&self) -> i16 { + self.button_shim() + } + fn buttons(&self) -> u16 { + self.buttons_shim() + } + fn client_x(&self) -> i32 { + self.client_x_shim() + } + fn client_y(&self) -> i32 { + self.client_y_shim() + } + fn movement_x(&self) -> i32 { + self.movement_x_shim() + } + fn movement_y(&self) -> i32 { + self.movement_y_shim() + } + #[cfg(feature = "EventTarget")] + fn related_target(&self) -> Option { + self.related_target_shim() + } + fn screen_x(&self) -> i32 { + self.screen_x_shim() + } + fn screen_y(&self) -> i32 { + self.screen_y_shim() + } + fn coalesced_events(&self) -> ::js_sys::Array { + self.coalesced_events_shim() + } + fn height(&self) -> i32 { + self.height_shim() + } + fn is_primary(&self) -> bool { + self.is_primary_shim() + } + fn pointer_id(&self) -> i32 { + self.pointer_id_shim() + } + fn pointer_type(&self) -> String { + self.pointer_type_shim() + } + fn pressure(&self) -> f32 { + self.pressure_shim() + } + fn tangential_pressure(&self) -> f32 { + self.tangential_pressure_shim() + } + fn tilt_x(&self) -> i32 { + self.tilt_x_shim() + } + fn tilt_y(&self) -> i32 { + self.tilt_y_shim() + } + fn twist(&self) -> i32 { + self.twist_shim() + } + fn width(&self) -> i32 { + self.width_shim() + } } impl PointerEventInit { #[doc = "Construct a new `PointerEventInit`."] @@ -102,28 +457,28 @@ impl PointerEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -131,140 +486,140 @@ impl PointerEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[doc = "Change the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key_shim(val); self } #[doc = "Change the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key_shim(val); self } #[doc = "Change the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key_shim(val); self } #[doc = "Change the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph_shim(val); self } #[doc = "Change the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock_shim(val); self } #[doc = "Change the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn_shim(val); self } #[doc = "Change the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock_shim(val); self } #[doc = "Change the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock_shim(val); self } #[doc = "Change the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os_shim(val); self } #[doc = "Change the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock_shim(val); self } #[doc = "Change the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol_shim(val); self } #[doc = "Change the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock_shim(val); self } #[doc = "Change the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key_shim(val); self } #[doc = "Change the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn button(&mut self, val: i16) -> &mut Self { - self.button_shim(val); + self.set_button_shim(val); self } #[doc = "Change the `buttons` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn buttons(&mut self, val: u16) -> &mut Self { - self.buttons_shim(val); + self.set_buttons_shim(val); self } #[doc = "Change the `clientX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x_shim(val); self } #[doc = "Change the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y_shim(val); self } #[doc = "Change the `movementX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn movement_x(&mut self, val: i32) -> &mut Self { - self.movement_x_shim(val); + self.set_movement_x_shim(val); self } #[doc = "Change the `movementY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn movement_y(&mut self, val: i32) -> &mut Self { - self.movement_y_shim(val); + self.set_movement_y_shim(val); self } #[cfg(feature = "EventTarget")] @@ -272,98 +627,98 @@ impl PointerEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `PointerEventInit`*"] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target_shim(val); self } #[doc = "Change the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x_shim(val); self } #[doc = "Change the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y_shim(val); self } #[doc = "Change the `coalescedEvents` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn coalesced_events(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.coalesced_events_shim(val); + self.set_coalesced_events_shim(val); self } #[doc = "Change the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn height(&mut self, val: i32) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[doc = "Change the `isPrimary` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn is_primary(&mut self, val: bool) -> &mut Self { - self.is_primary_shim(val); + self.set_is_primary_shim(val); self } #[doc = "Change the `pointerId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn pointer_id(&mut self, val: i32) -> &mut Self { - self.pointer_id_shim(val); + self.set_pointer_id_shim(val); self } #[doc = "Change the `pointerType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn pointer_type(&mut self, val: &str) -> &mut Self { - self.pointer_type_shim(val); + self.set_pointer_type_shim(val); self } #[doc = "Change the `pressure` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn pressure(&mut self, val: f32) -> &mut Self { - self.pressure_shim(val); + self.set_pressure_shim(val); self } #[doc = "Change the `tangentialPressure` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn tangential_pressure(&mut self, val: f32) -> &mut Self { - self.tangential_pressure_shim(val); + self.set_tangential_pressure_shim(val); self } #[doc = "Change the `tiltX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn tilt_x(&mut self, val: i32) -> &mut Self { - self.tilt_x_shim(val); + self.set_tilt_x_shim(val); self } #[doc = "Change the `tiltY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn tilt_y(&mut self, val: i32) -> &mut Self { - self.tilt_y_shim(val); + self.set_tilt_y_shim(val); self } #[doc = "Change the `twist` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn twist(&mut self, val: i32) -> &mut Self { - self.twist_shim(val); + self.set_twist_shim(val); self } #[doc = "Change the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"] pub fn width(&mut self, val: i32) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PopStateEventInit.rs b/crates/web-sys/src/features/gen_PopStateEventInit.rs index e00ea0f3eae..5570ad88990 100644 --- a/crates/web-sys/src/features/gen_PopStateEventInit.rs +++ b/crates/web-sys/src/features/gen_PopStateEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] pub type PopStateEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PopStateEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PopStateEventInit, val: bool); + fn set_bubbles_shim(this: &PopStateEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PopStateEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PopStateEventInit, val: bool); + fn set_cancelable_shim(this: &PopStateEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PopStateEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PopStateEventInit, val: bool); + fn set_composed_shim(this: &PopStateEventInit, val: bool); + #[wasm_bindgen(method, getter = "state")] + fn state_shim(this: &PopStateEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "state")] - fn state_shim(this: &PopStateEventInit, val: &::wasm_bindgen::JsValue); + fn set_state_shim(this: &PopStateEventInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `PopStateEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] +pub trait PopStateEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] + fn state(&self) -> ::wasm_bindgen::JsValue; +} +impl PopStateEventInitGetters for PopStateEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn state(&self) -> ::wasm_bindgen::JsValue { + self.state_shim() + } } impl PopStateEventInit { #[doc = "Construct a new `PopStateEventInit`."] @@ -32,28 +75,28 @@ impl PopStateEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `state` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopStateEventInit`*"] pub fn state(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.state_shim(val); + self.set_state_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs b/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs index 3e1d3043190..c4ba425f215 100644 --- a/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs +++ b/crates/web-sys/src/features/gen_PopupBlockedEventInit.rs @@ -10,19 +10,83 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] pub type PopupBlockedEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PopupBlockedEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PopupBlockedEventInit, val: bool); + fn set_bubbles_shim(this: &PopupBlockedEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PopupBlockedEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PopupBlockedEventInit, val: bool); + fn set_cancelable_shim(this: &PopupBlockedEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PopupBlockedEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PopupBlockedEventInit, val: bool); + fn set_composed_shim(this: &PopupBlockedEventInit, val: bool); + #[wasm_bindgen(method, getter = "popupWindowFeatures")] + fn popup_window_features_shim(this: &PopupBlockedEventInit) -> String; #[wasm_bindgen(method, setter = "popupWindowFeatures")] - fn popup_window_features_shim(this: &PopupBlockedEventInit, val: &str); + fn set_popup_window_features_shim(this: &PopupBlockedEventInit, val: &str); + #[wasm_bindgen(method, getter = "popupWindowName")] + fn popup_window_name_shim(this: &PopupBlockedEventInit) -> String; #[wasm_bindgen(method, setter = "popupWindowName")] - fn popup_window_name_shim(this: &PopupBlockedEventInit, val: &str); + fn set_popup_window_name_shim(this: &PopupBlockedEventInit, val: &str); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "requestingWindow")] + fn requesting_window_shim(this: &PopupBlockedEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "requestingWindow")] - fn requesting_window_shim(this: &PopupBlockedEventInit, val: Option<&Window>); + fn set_requesting_window_shim(this: &PopupBlockedEventInit, val: Option<&Window>); +} +#[doc = "The trait to access properties on the `PopupBlockedEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] +pub trait PopupBlockedEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `popupWindowFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + fn popup_window_features(&self) -> String; + #[doc = "Get the `popupWindowName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] + fn popup_window_name(&self) -> String; + #[cfg(feature = "Window")] + #[doc = "Get the `requestingWindow` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"] + fn requesting_window(&self) -> Option; +} +impl PopupBlockedEventInitGetters for PopupBlockedEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn popup_window_features(&self) -> String { + self.popup_window_features_shim() + } + fn popup_window_name(&self) -> String { + self.popup_window_name_shim() + } + #[cfg(feature = "Window")] + fn requesting_window(&self) -> Option { + self.requesting_window_shim() + } } impl PopupBlockedEventInit { #[doc = "Construct a new `PopupBlockedEventInit`."] @@ -37,35 +101,35 @@ impl PopupBlockedEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `popupWindowFeatures` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] pub fn popup_window_features(&mut self, val: &str) -> &mut Self { - self.popup_window_features_shim(val); + self.set_popup_window_features_shim(val); self } #[doc = "Change the `popupWindowName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"] pub fn popup_window_name(&mut self, val: &str) -> &mut Self { - self.popup_window_name_shim(val); + self.set_popup_window_name_shim(val); self } #[cfg(feature = "Window")] @@ -73,7 +137,7 @@ impl PopupBlockedEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"] pub fn requesting_window(&mut self, val: Option<&Window>) -> &mut Self { - self.requesting_window_shim(val); + self.set_requesting_window_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PositionOptions.rs b/crates/web-sys/src/features/gen_PositionOptions.rs index 2d5d5276299..7493ca03ba1 100644 --- a/crates/web-sys/src/features/gen_PositionOptions.rs +++ b/crates/web-sys/src/features/gen_PositionOptions.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] pub type PositionOptions; + #[wasm_bindgen(method, getter = "enableHighAccuracy")] + fn enable_high_accuracy_shim(this: &PositionOptions) -> bool; #[wasm_bindgen(method, setter = "enableHighAccuracy")] - fn enable_high_accuracy_shim(this: &PositionOptions, val: bool); + fn set_enable_high_accuracy_shim(this: &PositionOptions, val: bool); + #[wasm_bindgen(method, getter = "maximumAge")] + fn maximum_age_shim(this: &PositionOptions) -> u32; #[wasm_bindgen(method, setter = "maximumAge")] - fn maximum_age_shim(this: &PositionOptions, val: u32); + fn set_maximum_age_shim(this: &PositionOptions, val: u32); + #[wasm_bindgen(method, getter = "timeout")] + fn timeout_shim(this: &PositionOptions) -> u32; #[wasm_bindgen(method, setter = "timeout")] - fn timeout_shim(this: &PositionOptions, val: u32); + fn set_timeout_shim(this: &PositionOptions, val: u32); +} +#[doc = "The trait to access properties on the `PositionOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] +pub trait PositionOptionsGetters { + #[doc = "Get the `enableHighAccuracy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + fn enable_high_accuracy(&self) -> bool; + #[doc = "Get the `maximumAge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + fn maximum_age(&self) -> u32; + #[doc = "Get the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] + fn timeout(&self) -> u32; +} +impl PositionOptionsGetters for PositionOptions { + fn enable_high_accuracy(&self) -> bool { + self.enable_high_accuracy_shim() + } + fn maximum_age(&self) -> u32 { + self.maximum_age_shim() + } + fn timeout(&self) -> u32 { + self.timeout_shim() + } } impl PositionOptions { #[doc = "Construct a new `PositionOptions`."] @@ -30,21 +64,21 @@ impl PositionOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] pub fn enable_high_accuracy(&mut self, val: bool) -> &mut Self { - self.enable_high_accuracy_shim(val); + self.set_enable_high_accuracy_shim(val); self } #[doc = "Change the `maximumAge` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] pub fn maximum_age(&mut self, val: u32) -> &mut Self { - self.maximum_age_shim(val); + self.set_maximum_age_shim(val); self } #[doc = "Change the `timeout` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PositionOptions`*"] pub fn timeout(&mut self, val: u32) -> &mut Self { - self.timeout_shim(val); + self.set_timeout_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs b/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs index 146db924710..cde7adec0f7 100644 --- a/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs +++ b/crates/web-sys/src/features/gen_PresentationConnectionAvailableEventInit.rs @@ -10,19 +10,65 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] pub type PresentationConnectionAvailableEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PresentationConnectionAvailableEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PresentationConnectionAvailableEventInit, val: bool); + fn set_bubbles_shim(this: &PresentationConnectionAvailableEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PresentationConnectionAvailableEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PresentationConnectionAvailableEventInit, val: bool); + fn set_cancelable_shim(this: &PresentationConnectionAvailableEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PresentationConnectionAvailableEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PresentationConnectionAvailableEventInit, val: bool); + fn set_composed_shim(this: &PresentationConnectionAvailableEventInit, val: bool); + #[cfg(feature = "PresentationConnection")] + #[wasm_bindgen(method, getter = "connection")] + fn connection_shim(this: &PresentationConnectionAvailableEventInit) -> PresentationConnection; #[cfg(feature = "PresentationConnection")] #[wasm_bindgen(method, setter = "connection")] - fn connection_shim( + fn set_connection_shim( this: &PresentationConnectionAvailableEventInit, val: &PresentationConnection, ); } +#[doc = "The trait to access properties on the `PresentationConnectionAvailableEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] +pub trait PresentationConnectionAvailableEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "PresentationConnection")] + #[doc = "Get the `connection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"] + fn connection(&self) -> PresentationConnection; +} +impl PresentationConnectionAvailableEventInitGetters for PresentationConnectionAvailableEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "PresentationConnection")] + fn connection(&self) -> PresentationConnection { + self.connection_shim() + } +} impl PresentationConnectionAvailableEventInit { #[cfg(feature = "PresentationConnection")] #[doc = "Construct a new `PresentationConnectionAvailableEventInit`."] @@ -31,28 +77,28 @@ impl PresentationConnectionAvailableEventInit { pub fn new(connection: &PresentationConnection) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.connection(connection); + Self::connection(&mut ret, connection); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "PresentationConnection")] @@ -60,7 +106,7 @@ impl PresentationConnectionAvailableEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"] pub fn connection(&mut self, val: &PresentationConnection) -> &mut Self { - self.connection_shim(val); + self.set_connection_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs b/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs index c7786dacd06..86364787a7b 100644 --- a/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs +++ b/crates/web-sys/src/features/gen_PresentationConnectionCloseEventInit.rs @@ -10,21 +10,78 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] pub type PresentationConnectionCloseEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PresentationConnectionCloseEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PresentationConnectionCloseEventInit, val: bool); + fn set_bubbles_shim(this: &PresentationConnectionCloseEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PresentationConnectionCloseEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PresentationConnectionCloseEventInit, val: bool); + fn set_cancelable_shim(this: &PresentationConnectionCloseEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PresentationConnectionCloseEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PresentationConnectionCloseEventInit, val: bool); + fn set_composed_shim(this: &PresentationConnectionCloseEventInit, val: bool); + #[wasm_bindgen(method, getter = "message")] + fn message_shim(this: &PresentationConnectionCloseEventInit) -> String; #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &PresentationConnectionCloseEventInit, val: &str); + fn set_message_shim(this: &PresentationConnectionCloseEventInit, val: &str); #[cfg(feature = "PresentationConnectionClosedReason")] - #[wasm_bindgen(method, setter = "reason")] + #[wasm_bindgen(method, getter = "reason")] fn reason_shim( this: &PresentationConnectionCloseEventInit, + ) -> PresentationConnectionClosedReason; + #[cfg(feature = "PresentationConnectionClosedReason")] + #[wasm_bindgen(method, setter = "reason")] + fn set_reason_shim( + this: &PresentationConnectionCloseEventInit, val: PresentationConnectionClosedReason, ); } +#[doc = "The trait to access properties on the `PresentationConnectionCloseEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] +pub trait PresentationConnectionCloseEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] + fn message(&self) -> String; + #[cfg(feature = "PresentationConnectionClosedReason")] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`, `PresentationConnectionClosedReason`*"] + fn reason(&self) -> PresentationConnectionClosedReason; +} +impl PresentationConnectionCloseEventInitGetters for PresentationConnectionCloseEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn message(&self) -> String { + self.message_shim() + } + #[cfg(feature = "PresentationConnectionClosedReason")] + fn reason(&self) -> PresentationConnectionClosedReason { + self.reason_shim() + } +} impl PresentationConnectionCloseEventInit { #[cfg(feature = "PresentationConnectionClosedReason")] #[doc = "Construct a new `PresentationConnectionCloseEventInit`."] @@ -33,35 +90,35 @@ impl PresentationConnectionCloseEventInit { pub fn new(reason: PresentationConnectionClosedReason) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.reason(reason); + Self::reason(&mut ret, reason); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"] pub fn message(&mut self, val: &str) -> &mut Self { - self.message_shim(val); + self.set_message_shim(val); self } #[cfg(feature = "PresentationConnectionClosedReason")] @@ -69,7 +126,7 @@ impl PresentationConnectionCloseEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`, `PresentationConnectionClosedReason`*"] pub fn reason(&mut self, val: PresentationConnectionClosedReason) -> &mut Self { - self.reason_shim(val); + self.set_reason_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs b/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs index 7ab50ae8bb7..620de08db98 100644 --- a/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs +++ b/crates/web-sys/src/features/gen_ProfileTimelineLayerRect.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] pub type ProfileTimelineLayerRect; + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &ProfileTimelineLayerRect) -> i32; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &ProfileTimelineLayerRect, val: i32); + fn set_height_shim(this: &ProfileTimelineLayerRect, val: i32); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &ProfileTimelineLayerRect) -> i32; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &ProfileTimelineLayerRect, val: i32); + fn set_width_shim(this: &ProfileTimelineLayerRect, val: i32); + #[wasm_bindgen(method, getter = "x")] + fn x_shim(this: &ProfileTimelineLayerRect) -> i32; #[wasm_bindgen(method, setter = "x")] - fn x_shim(this: &ProfileTimelineLayerRect, val: i32); + fn set_x_shim(this: &ProfileTimelineLayerRect, val: i32); + #[wasm_bindgen(method, getter = "y")] + fn y_shim(this: &ProfileTimelineLayerRect) -> i32; #[wasm_bindgen(method, setter = "y")] - fn y_shim(this: &ProfileTimelineLayerRect, val: i32); + fn set_y_shim(this: &ProfileTimelineLayerRect, val: i32); +} +#[doc = "The trait to access properties on the `ProfileTimelineLayerRect` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] +pub trait ProfileTimelineLayerRectGetters { + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + fn height(&self) -> i32; + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + fn width(&self) -> i32; + #[doc = "Get the `x` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + fn x(&self) -> i32; + #[doc = "Get the `y` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] + fn y(&self) -> i32; +} +impl ProfileTimelineLayerRectGetters for ProfileTimelineLayerRect { + fn height(&self) -> i32 { + self.height_shim() + } + fn width(&self) -> i32 { + self.width_shim() + } + fn x(&self) -> i32 { + self.x_shim() + } + fn y(&self) -> i32 { + self.y_shim() + } } impl ProfileTimelineLayerRect { #[doc = "Construct a new `ProfileTimelineLayerRect`."] @@ -32,28 +75,28 @@ impl ProfileTimelineLayerRect { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] pub fn height(&mut self, val: i32) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[doc = "Change the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] pub fn width(&mut self, val: i32) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } #[doc = "Change the `x` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] pub fn x(&mut self, val: i32) -> &mut Self { - self.x_shim(val); + self.set_x_shim(val); self } #[doc = "Change the `y` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineLayerRect`*"] pub fn y(&mut self, val: i32) -> &mut Self { - self.y_shim(val); + self.set_y_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs b/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs index acd1885a31d..ad0a1548aef 100644 --- a/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs +++ b/crates/web-sys/src/features/gen_ProfileTimelineMarker.rs @@ -10,41 +10,194 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub type ProfileTimelineMarker; + #[wasm_bindgen(method, getter = "causeName")] + fn cause_name_shim(this: &ProfileTimelineMarker) -> String; #[wasm_bindgen(method, setter = "causeName")] - fn cause_name_shim(this: &ProfileTimelineMarker, val: &str); + fn set_cause_name_shim(this: &ProfileTimelineMarker, val: &str); + #[wasm_bindgen(method, getter = "end")] + fn end_shim(this: &ProfileTimelineMarker) -> f64; #[wasm_bindgen(method, setter = "end")] - fn end_shim(this: &ProfileTimelineMarker, val: f64); + fn set_end_shim(this: &ProfileTimelineMarker, val: f64); + #[wasm_bindgen(method, getter = "endStack")] + fn end_stack_shim(this: &ProfileTimelineMarker) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "endStack")] - fn end_stack_shim(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + fn set_end_stack_shim(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + #[wasm_bindgen(method, getter = "eventPhase")] + fn event_phase_shim(this: &ProfileTimelineMarker) -> u16; #[wasm_bindgen(method, setter = "eventPhase")] - fn event_phase_shim(this: &ProfileTimelineMarker, val: u16); + fn set_event_phase_shim(this: &ProfileTimelineMarker, val: u16); + #[wasm_bindgen(method, getter = "isAnimationOnly")] + fn is_animation_only_shim(this: &ProfileTimelineMarker) -> bool; #[wasm_bindgen(method, setter = "isAnimationOnly")] - fn is_animation_only_shim(this: &ProfileTimelineMarker, val: bool); + fn set_is_animation_only_shim(this: &ProfileTimelineMarker, val: bool); + #[wasm_bindgen(method, getter = "isOffMainThread")] + fn is_off_main_thread_shim(this: &ProfileTimelineMarker) -> bool; #[wasm_bindgen(method, setter = "isOffMainThread")] - fn is_off_main_thread_shim(this: &ProfileTimelineMarker, val: bool); + fn set_is_off_main_thread_shim(this: &ProfileTimelineMarker, val: bool); #[cfg(feature = "ProfileTimelineMessagePortOperationType")] - #[wasm_bindgen(method, setter = "messagePortOperation")] + #[wasm_bindgen(method, getter = "messagePortOperation")] fn message_port_operation_shim( this: &ProfileTimelineMarker, + ) -> ProfileTimelineMessagePortOperationType; + #[cfg(feature = "ProfileTimelineMessagePortOperationType")] + #[wasm_bindgen(method, setter = "messagePortOperation")] + fn set_message_port_operation_shim( + this: &ProfileTimelineMarker, val: ProfileTimelineMessagePortOperationType, ); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &ProfileTimelineMarker) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &ProfileTimelineMarker, val: &str); + fn set_name_shim(this: &ProfileTimelineMarker, val: &str); + #[wasm_bindgen(method, getter = "processType")] + fn process_type_shim(this: &ProfileTimelineMarker) -> u16; #[wasm_bindgen(method, setter = "processType")] - fn process_type_shim(this: &ProfileTimelineMarker, val: u16); + fn set_process_type_shim(this: &ProfileTimelineMarker, val: u16); + #[wasm_bindgen(method, getter = "rectangles")] + fn rectangles_shim(this: &ProfileTimelineMarker) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "rectangles")] - fn rectangles_shim(this: &ProfileTimelineMarker, val: &::wasm_bindgen::JsValue); + fn set_rectangles_shim(this: &ProfileTimelineMarker, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "stack")] + fn stack_shim(this: &ProfileTimelineMarker) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "stack")] - fn stack_shim(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + fn set_stack_shim(this: &ProfileTimelineMarker, val: Option<&::js_sys::Object>); + #[wasm_bindgen(method, getter = "start")] + fn start_shim(this: &ProfileTimelineMarker) -> f64; #[wasm_bindgen(method, setter = "start")] - fn start_shim(this: &ProfileTimelineMarker, val: f64); + fn set_start_shim(this: &ProfileTimelineMarker, val: f64); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &ProfileTimelineMarker) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &ProfileTimelineMarker, val: &str); + fn set_type__shim(this: &ProfileTimelineMarker, val: &str); + #[wasm_bindgen(method, getter = "unixTime")] + fn unix_time_shim(this: &ProfileTimelineMarker) -> f64; #[wasm_bindgen(method, setter = "unixTime")] - fn unix_time_shim(this: &ProfileTimelineMarker, val: f64); + fn set_unix_time_shim(this: &ProfileTimelineMarker, val: f64); + #[cfg(feature = "ProfileTimelineWorkerOperationType")] + #[wasm_bindgen(method, getter = "workerOperation")] + fn worker_operation_shim(this: &ProfileTimelineMarker) -> ProfileTimelineWorkerOperationType; #[cfg(feature = "ProfileTimelineWorkerOperationType")] #[wasm_bindgen(method, setter = "workerOperation")] - fn worker_operation_shim(this: &ProfileTimelineMarker, val: ProfileTimelineWorkerOperationType); + fn set_worker_operation_shim( + this: &ProfileTimelineMarker, + val: ProfileTimelineWorkerOperationType, + ); +} +#[doc = "The trait to access properties on the `ProfileTimelineMarker` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] +pub trait ProfileTimelineMarkerGetters { + #[doc = "Get the `causeName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn cause_name(&self) -> String; + #[doc = "Get the `end` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn end(&self) -> f64; + #[doc = "Get the `endStack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn end_stack(&self) -> Option<::js_sys::Object>; + #[doc = "Get the `eventPhase` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn event_phase(&self) -> u16; + #[doc = "Get the `isAnimationOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn is_animation_only(&self) -> bool; + #[doc = "Get the `isOffMainThread` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn is_off_main_thread(&self) -> bool; + #[cfg(feature = "ProfileTimelineMessagePortOperationType")] + #[doc = "Get the `messagePortOperation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineMessagePortOperationType`*"] + fn message_port_operation(&self) -> ProfileTimelineMessagePortOperationType; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn name(&self) -> String; + #[doc = "Get the `processType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn process_type(&self) -> u16; + #[doc = "Get the `rectangles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn rectangles(&self) -> ::js_sys::Array; + #[doc = "Get the `stack` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn stack(&self) -> Option<::js_sys::Object>; + #[doc = "Get the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn start(&self) -> f64; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn type_(&self) -> String; + #[doc = "Get the `unixTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] + fn unix_time(&self) -> f64; + #[cfg(feature = "ProfileTimelineWorkerOperationType")] + #[doc = "Get the `workerOperation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"] + fn worker_operation(&self) -> ProfileTimelineWorkerOperationType; +} +impl ProfileTimelineMarkerGetters for ProfileTimelineMarker { + fn cause_name(&self) -> String { + self.cause_name_shim() + } + fn end(&self) -> f64 { + self.end_shim() + } + fn end_stack(&self) -> Option<::js_sys::Object> { + self.end_stack_shim() + } + fn event_phase(&self) -> u16 { + self.event_phase_shim() + } + fn is_animation_only(&self) -> bool { + self.is_animation_only_shim() + } + fn is_off_main_thread(&self) -> bool { + self.is_off_main_thread_shim() + } + #[cfg(feature = "ProfileTimelineMessagePortOperationType")] + fn message_port_operation(&self) -> ProfileTimelineMessagePortOperationType { + self.message_port_operation_shim() + } + fn name(&self) -> String { + self.name_shim() + } + fn process_type(&self) -> u16 { + self.process_type_shim() + } + fn rectangles(&self) -> ::js_sys::Array { + self.rectangles_shim() + } + fn stack(&self) -> Option<::js_sys::Object> { + self.stack_shim() + } + fn start(&self) -> f64 { + self.start_shim() + } + fn type_(&self) -> String { + self.type__shim() + } + fn unix_time(&self) -> f64 { + self.unix_time_shim() + } + #[cfg(feature = "ProfileTimelineWorkerOperationType")] + fn worker_operation(&self) -> ProfileTimelineWorkerOperationType { + self.worker_operation_shim() + } } impl ProfileTimelineMarker { #[doc = "Construct a new `ProfileTimelineMarker`."] @@ -59,42 +212,42 @@ impl ProfileTimelineMarker { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn cause_name(&mut self, val: &str) -> &mut Self { - self.cause_name_shim(val); + self.set_cause_name_shim(val); self } #[doc = "Change the `end` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn end(&mut self, val: f64) -> &mut Self { - self.end_shim(val); + self.set_end_shim(val); self } #[doc = "Change the `endStack` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn end_stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.end_stack_shim(val); + self.set_end_stack_shim(val); self } #[doc = "Change the `eventPhase` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn event_phase(&mut self, val: u16) -> &mut Self { - self.event_phase_shim(val); + self.set_event_phase_shim(val); self } #[doc = "Change the `isAnimationOnly` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn is_animation_only(&mut self, val: bool) -> &mut Self { - self.is_animation_only_shim(val); + self.set_is_animation_only_shim(val); self } #[doc = "Change the `isOffMainThread` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn is_off_main_thread(&mut self, val: bool) -> &mut Self { - self.is_off_main_thread_shim(val); + self.set_is_off_main_thread_shim(val); self } #[cfg(feature = "ProfileTimelineMessagePortOperationType")] @@ -105,56 +258,56 @@ impl ProfileTimelineMarker { &mut self, val: ProfileTimelineMessagePortOperationType, ) -> &mut Self { - self.message_port_operation_shim(val); + self.set_message_port_operation_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `processType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn process_type(&mut self, val: u16) -> &mut Self { - self.process_type_shim(val); + self.set_process_type_shim(val); self } #[doc = "Change the `rectangles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn rectangles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.rectangles_shim(val); + self.set_rectangles_shim(val); self } #[doc = "Change the `stack` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.stack_shim(val); + self.set_stack_shim(val); self } #[doc = "Change the `start` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn start(&mut self, val: f64) -> &mut Self { - self.start_shim(val); + self.set_start_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `unixTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] pub fn unix_time(&mut self, val: f64) -> &mut Self { - self.unix_time_shim(val); + self.set_unix_time_shim(val); self } #[cfg(feature = "ProfileTimelineWorkerOperationType")] @@ -162,7 +315,7 @@ impl ProfileTimelineMarker { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"] pub fn worker_operation(&mut self, val: ProfileTimelineWorkerOperationType) -> &mut Self { - self.worker_operation_shim(val); + self.set_worker_operation_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs b/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs index 33a4ac48f09..707f8d0b783 100644 --- a/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs +++ b/crates/web-sys/src/features/gen_ProfileTimelineStackFrame.rs @@ -10,20 +10,90 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] pub type ProfileTimelineStackFrame; + #[wasm_bindgen(method, getter = "asyncCause")] + fn async_cause_shim(this: &ProfileTimelineStackFrame) -> String; #[wasm_bindgen(method, setter = "asyncCause")] - fn async_cause_shim(this: &ProfileTimelineStackFrame, val: &str); + fn set_async_cause_shim(this: &ProfileTimelineStackFrame, val: &str); + #[wasm_bindgen(method, getter = "asyncParent")] + fn async_parent_shim(this: &ProfileTimelineStackFrame) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "asyncParent")] - fn async_parent_shim(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + fn set_async_parent_shim(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + #[wasm_bindgen(method, getter = "column")] + fn column_shim(this: &ProfileTimelineStackFrame) -> i32; #[wasm_bindgen(method, setter = "column")] - fn column_shim(this: &ProfileTimelineStackFrame, val: i32); + fn set_column_shim(this: &ProfileTimelineStackFrame, val: i32); + #[wasm_bindgen(method, getter = "functionDisplayName")] + fn function_display_name_shim(this: &ProfileTimelineStackFrame) -> String; #[wasm_bindgen(method, setter = "functionDisplayName")] - fn function_display_name_shim(this: &ProfileTimelineStackFrame, val: &str); + fn set_function_display_name_shim(this: &ProfileTimelineStackFrame, val: &str); + #[wasm_bindgen(method, getter = "line")] + fn line_shim(this: &ProfileTimelineStackFrame) -> i32; #[wasm_bindgen(method, setter = "line")] - fn line_shim(this: &ProfileTimelineStackFrame, val: i32); + fn set_line_shim(this: &ProfileTimelineStackFrame, val: i32); + #[wasm_bindgen(method, getter = "parent")] + fn parent_shim(this: &ProfileTimelineStackFrame) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "parent")] - fn parent_shim(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + fn set_parent_shim(this: &ProfileTimelineStackFrame, val: Option<&::js_sys::Object>); + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &ProfileTimelineStackFrame) -> String; #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &ProfileTimelineStackFrame, val: &str); + fn set_source_shim(this: &ProfileTimelineStackFrame, val: &str); +} +#[doc = "The trait to access properties on the `ProfileTimelineStackFrame` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] +pub trait ProfileTimelineStackFrameGetters { + #[doc = "Get the `asyncCause` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + fn async_cause(&self) -> String; + #[doc = "Get the `asyncParent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + fn async_parent(&self) -> Option<::js_sys::Object>; + #[doc = "Get the `column` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + fn column(&self) -> i32; + #[doc = "Get the `functionDisplayName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + fn function_display_name(&self) -> String; + #[doc = "Get the `line` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + fn line(&self) -> i32; + #[doc = "Get the `parent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + fn parent(&self) -> Option<::js_sys::Object>; + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] + fn source(&self) -> String; +} +impl ProfileTimelineStackFrameGetters for ProfileTimelineStackFrame { + fn async_cause(&self) -> String { + self.async_cause_shim() + } + fn async_parent(&self) -> Option<::js_sys::Object> { + self.async_parent_shim() + } + fn column(&self) -> i32 { + self.column_shim() + } + fn function_display_name(&self) -> String { + self.function_display_name_shim() + } + fn line(&self) -> i32 { + self.line_shim() + } + fn parent(&self) -> Option<::js_sys::Object> { + self.parent_shim() + } + fn source(&self) -> String { + self.source_shim() + } } impl ProfileTimelineStackFrame { #[doc = "Construct a new `ProfileTimelineStackFrame`."] @@ -38,49 +108,49 @@ impl ProfileTimelineStackFrame { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] pub fn async_cause(&mut self, val: &str) -> &mut Self { - self.async_cause_shim(val); + self.set_async_cause_shim(val); self } #[doc = "Change the `asyncParent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] pub fn async_parent(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.async_parent_shim(val); + self.set_async_parent_shim(val); self } #[doc = "Change the `column` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] pub fn column(&mut self, val: i32) -> &mut Self { - self.column_shim(val); + self.set_column_shim(val); self } #[doc = "Change the `functionDisplayName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] pub fn function_display_name(&mut self, val: &str) -> &mut Self { - self.function_display_name_shim(val); + self.set_function_display_name_shim(val); self } #[doc = "Change the `line` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] pub fn line(&mut self, val: i32) -> &mut Self { - self.line_shim(val); + self.set_line_shim(val); self } #[doc = "Change the `parent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] pub fn parent(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.parent_shim(val); + self.set_parent_shim(val); self } #[doc = "Change the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineStackFrame`*"] pub fn source(&mut self, val: &str) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ProgressEventInit.rs b/crates/web-sys/src/features/gen_ProgressEventInit.rs index f638b1dcad2..7290b086dfb 100644 --- a/crates/web-sys/src/features/gen_ProgressEventInit.rs +++ b/crates/web-sys/src/features/gen_ProgressEventInit.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] pub type ProgressEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &ProgressEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ProgressEventInit, val: bool); + fn set_bubbles_shim(this: &ProgressEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &ProgressEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ProgressEventInit, val: bool); + fn set_cancelable_shim(this: &ProgressEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &ProgressEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ProgressEventInit, val: bool); + fn set_composed_shim(this: &ProgressEventInit, val: bool); + #[wasm_bindgen(method, getter = "lengthComputable")] + fn length_computable_shim(this: &ProgressEventInit) -> bool; #[wasm_bindgen(method, setter = "lengthComputable")] - fn length_computable_shim(this: &ProgressEventInit, val: bool); + fn set_length_computable_shim(this: &ProgressEventInit, val: bool); + #[wasm_bindgen(method, getter = "loaded")] + fn loaded_shim(this: &ProgressEventInit) -> f64; #[wasm_bindgen(method, setter = "loaded")] - fn loaded_shim(this: &ProgressEventInit, val: f64); + fn set_loaded_shim(this: &ProgressEventInit, val: f64); + #[wasm_bindgen(method, getter = "total")] + fn total_shim(this: &ProgressEventInit) -> f64; #[wasm_bindgen(method, setter = "total")] - fn total_shim(this: &ProgressEventInit, val: f64); + fn set_total_shim(this: &ProgressEventInit, val: f64); +} +#[doc = "The trait to access properties on the `ProgressEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] +pub trait ProgressEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `lengthComputable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + fn length_computable(&self) -> bool; + #[doc = "Get the `loaded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + fn loaded(&self) -> f64; + #[doc = "Get the `total` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] + fn total(&self) -> f64; +} +impl ProgressEventInitGetters for ProgressEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn length_computable(&self) -> bool { + self.length_computable_shim() + } + fn loaded(&self) -> f64 { + self.loaded_shim() + } + fn total(&self) -> f64 { + self.total_shim() + } } impl ProgressEventInit { #[doc = "Construct a new `ProgressEventInit`."] @@ -36,42 +97,42 @@ impl ProgressEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `lengthComputable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] pub fn length_computable(&mut self, val: bool) -> &mut Self { - self.length_computable_shim(val); + self.set_length_computable_shim(val); self } #[doc = "Change the `loaded` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] pub fn loaded(&mut self, val: f64) -> &mut Self { - self.loaded_shim(val); + self.set_loaded_shim(val); self } #[doc = "Change the `total` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ProgressEventInit`*"] pub fn total(&mut self, val: f64) -> &mut Self { - self.total_shim(val); + self.set_total_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs b/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs index 05effa91c6e..b91b5076985 100644 --- a/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs +++ b/crates/web-sys/src/features/gen_PromiseRejectionEventInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] pub type PromiseRejectionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PromiseRejectionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PromiseRejectionEventInit, val: bool); + fn set_bubbles_shim(this: &PromiseRejectionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PromiseRejectionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PromiseRejectionEventInit, val: bool); + fn set_cancelable_shim(this: &PromiseRejectionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PromiseRejectionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PromiseRejectionEventInit, val: bool); + fn set_composed_shim(this: &PromiseRejectionEventInit, val: bool); + #[wasm_bindgen(method, getter = "promise")] + fn promise_shim(this: &PromiseRejectionEventInit) -> ::js_sys::Promise; #[wasm_bindgen(method, setter = "promise")] - fn promise_shim(this: &PromiseRejectionEventInit, val: &::js_sys::Promise); + fn set_promise_shim(this: &PromiseRejectionEventInit, val: &::js_sys::Promise); + #[wasm_bindgen(method, getter = "reason")] + fn reason_shim(this: &PromiseRejectionEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &PromiseRejectionEventInit, val: &::wasm_bindgen::JsValue); + fn set_reason_shim(this: &PromiseRejectionEventInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `PromiseRejectionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] +pub trait PromiseRejectionEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `promise` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + fn promise(&self) -> ::js_sys::Promise; + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] + fn reason(&self) -> ::wasm_bindgen::JsValue; +} +impl PromiseRejectionEventInitGetters for PromiseRejectionEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn promise(&self) -> ::js_sys::Promise { + self.promise_shim() + } + fn reason(&self) -> ::wasm_bindgen::JsValue { + self.reason_shim() + } } impl PromiseRejectionEventInit { #[doc = "Construct a new `PromiseRejectionEventInit`."] @@ -28,42 +80,42 @@ impl PromiseRejectionEventInit { pub fn new(promise: &::js_sys::Promise) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.promise(promise); + Self::promise(&mut ret, promise); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `promise` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] pub fn promise(&mut self, val: &::js_sys::Promise) -> &mut Self { - self.promise_shim(val); + self.set_promise_shim(val); self } #[doc = "Change the `reason` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PromiseRejectionEventInit`*"] pub fn reason(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.reason_shim(val); + self.set_reason_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs index bbd042e3033..edd1e788a08 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialCreationOptions.rs @@ -11,43 +11,155 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] pub type PublicKeyCredentialCreationOptions; #[cfg(feature = "AttestationConveyancePreference")] - #[wasm_bindgen(method, setter = "attestation")] + #[wasm_bindgen(method, getter = "attestation")] fn attestation_shim( this: &PublicKeyCredentialCreationOptions, + ) -> AttestationConveyancePreference; + #[cfg(feature = "AttestationConveyancePreference")] + #[wasm_bindgen(method, setter = "attestation")] + fn set_attestation_shim( + this: &PublicKeyCredentialCreationOptions, val: AttestationConveyancePreference, ); #[cfg(feature = "AuthenticatorSelectionCriteria")] - #[wasm_bindgen(method, setter = "authenticatorSelection")] + #[wasm_bindgen(method, getter = "authenticatorSelection")] fn authenticator_selection_shim( this: &PublicKeyCredentialCreationOptions, + ) -> AuthenticatorSelectionCriteria; + #[cfg(feature = "AuthenticatorSelectionCriteria")] + #[wasm_bindgen(method, setter = "authenticatorSelection")] + fn set_authenticator_selection_shim( + this: &PublicKeyCredentialCreationOptions, val: &AuthenticatorSelectionCriteria, ); + #[wasm_bindgen(method, getter = "challenge")] + fn challenge_shim(this: &PublicKeyCredentialCreationOptions) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &PublicKeyCredentialCreationOptions, val: &::js_sys::Object); + fn set_challenge_shim(this: &PublicKeyCredentialCreationOptions, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "excludeCredentials")] + fn exclude_credentials_shim(this: &PublicKeyCredentialCreationOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "excludeCredentials")] - fn exclude_credentials_shim( + fn set_exclude_credentials_shim( this: &PublicKeyCredentialCreationOptions, val: &::wasm_bindgen::JsValue, ); #[cfg(feature = "AuthenticationExtensionsClientInputs")] - #[wasm_bindgen(method, setter = "extensions")] + #[wasm_bindgen(method, getter = "extensions")] fn extensions_shim( this: &PublicKeyCredentialCreationOptions, + ) -> AuthenticationExtensionsClientInputs; + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[wasm_bindgen(method, setter = "extensions")] + fn set_extensions_shim( + this: &PublicKeyCredentialCreationOptions, val: &AuthenticationExtensionsClientInputs, ); + #[wasm_bindgen(method, getter = "pubKeyCredParams")] + fn pub_key_cred_params_shim(this: &PublicKeyCredentialCreationOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "pubKeyCredParams")] - fn pub_key_cred_params_shim( + fn set_pub_key_cred_params_shim( this: &PublicKeyCredentialCreationOptions, val: &::wasm_bindgen::JsValue, ); #[cfg(feature = "PublicKeyCredentialRpEntity")] + #[wasm_bindgen(method, getter = "rp")] + fn rp_shim(this: &PublicKeyCredentialCreationOptions) -> PublicKeyCredentialRpEntity; + #[cfg(feature = "PublicKeyCredentialRpEntity")] #[wasm_bindgen(method, setter = "rp")] - fn rp_shim(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialRpEntity); + fn set_rp_shim(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialRpEntity); + #[wasm_bindgen(method, getter = "timeout")] + fn timeout_shim(this: &PublicKeyCredentialCreationOptions) -> u32; #[wasm_bindgen(method, setter = "timeout")] - fn timeout_shim(this: &PublicKeyCredentialCreationOptions, val: u32); + fn set_timeout_shim(this: &PublicKeyCredentialCreationOptions, val: u32); + #[cfg(feature = "PublicKeyCredentialUserEntity")] + #[wasm_bindgen(method, getter = "user")] + fn user_shim(this: &PublicKeyCredentialCreationOptions) -> PublicKeyCredentialUserEntity; #[cfg(feature = "PublicKeyCredentialUserEntity")] #[wasm_bindgen(method, setter = "user")] - fn user_shim(this: &PublicKeyCredentialCreationOptions, val: &PublicKeyCredentialUserEntity); + fn set_user_shim( + this: &PublicKeyCredentialCreationOptions, + val: &PublicKeyCredentialUserEntity, + ); +} +#[doc = "The trait to access properties on the `PublicKeyCredentialCreationOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] +pub trait PublicKeyCredentialCreationOptionsGetters { + #[cfg(feature = "AttestationConveyancePreference")] + #[doc = "Get the `attestation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AttestationConveyancePreference`, `PublicKeyCredentialCreationOptions`*"] + fn attestation(&self) -> AttestationConveyancePreference; + #[cfg(feature = "AuthenticatorSelectionCriteria")] + #[doc = "Get the `authenticatorSelection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `PublicKeyCredentialCreationOptions`*"] + fn authenticator_selection(&self) -> AuthenticatorSelectionCriteria; + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + fn challenge(&self) -> ::js_sys::Object; + #[doc = "Get the `excludeCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + fn exclude_credentials(&self) -> ::js_sys::Array; + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Get the `extensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialCreationOptions`*"] + fn extensions(&self) -> AuthenticationExtensionsClientInputs; + #[doc = "Get the `pubKeyCredParams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + fn pub_key_cred_params(&self) -> ::js_sys::Array; + #[cfg(feature = "PublicKeyCredentialRpEntity")] + #[doc = "Get the `rp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialRpEntity`*"] + fn rp(&self) -> PublicKeyCredentialRpEntity; + #[doc = "Get the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] + fn timeout(&self) -> u32; + #[cfg(feature = "PublicKeyCredentialUserEntity")] + #[doc = "Get the `user` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialUserEntity`*"] + fn user(&self) -> PublicKeyCredentialUserEntity; +} +impl PublicKeyCredentialCreationOptionsGetters for PublicKeyCredentialCreationOptions { + #[cfg(feature = "AttestationConveyancePreference")] + fn attestation(&self) -> AttestationConveyancePreference { + self.attestation_shim() + } + #[cfg(feature = "AuthenticatorSelectionCriteria")] + fn authenticator_selection(&self) -> AuthenticatorSelectionCriteria { + self.authenticator_selection_shim() + } + fn challenge(&self) -> ::js_sys::Object { + self.challenge_shim() + } + fn exclude_credentials(&self) -> ::js_sys::Array { + self.exclude_credentials_shim() + } + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + fn extensions(&self) -> AuthenticationExtensionsClientInputs { + self.extensions_shim() + } + fn pub_key_cred_params(&self) -> ::js_sys::Array { + self.pub_key_cred_params_shim() + } + #[cfg(feature = "PublicKeyCredentialRpEntity")] + fn rp(&self) -> PublicKeyCredentialRpEntity { + self.rp_shim() + } + fn timeout(&self) -> u32 { + self.timeout_shim() + } + #[cfg(feature = "PublicKeyCredentialUserEntity")] + fn user(&self) -> PublicKeyCredentialUserEntity { + self.user_shim() + } } impl PublicKeyCredentialCreationOptions { #[cfg(all( @@ -65,10 +177,10 @@ impl PublicKeyCredentialCreationOptions { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.challenge(challenge); - ret.pub_key_cred_params(pub_key_cred_params); - ret.rp(rp); - ret.user(user); + Self::challenge(&mut ret, challenge); + Self::pub_key_cred_params(&mut ret, pub_key_cred_params); + Self::rp(&mut ret, rp); + Self::user(&mut ret, user); ret } #[cfg(feature = "AttestationConveyancePreference")] @@ -76,7 +188,7 @@ impl PublicKeyCredentialCreationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AttestationConveyancePreference`, `PublicKeyCredentialCreationOptions`*"] pub fn attestation(&mut self, val: AttestationConveyancePreference) -> &mut Self { - self.attestation_shim(val); + self.set_attestation_shim(val); self } #[cfg(feature = "AuthenticatorSelectionCriteria")] @@ -84,21 +196,21 @@ impl PublicKeyCredentialCreationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticatorSelectionCriteria`, `PublicKeyCredentialCreationOptions`*"] pub fn authenticator_selection(&mut self, val: &AuthenticatorSelectionCriteria) -> &mut Self { - self.authenticator_selection_shim(val); + self.set_authenticator_selection_shim(val); self } #[doc = "Change the `challenge` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] pub fn challenge(&mut self, val: &::js_sys::Object) -> &mut Self { - self.challenge_shim(val); + self.set_challenge_shim(val); self } #[doc = "Change the `excludeCredentials` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] pub fn exclude_credentials(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.exclude_credentials_shim(val); + self.set_exclude_credentials_shim(val); self } #[cfg(feature = "AuthenticationExtensionsClientInputs")] @@ -106,14 +218,14 @@ impl PublicKeyCredentialCreationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialCreationOptions`*"] pub fn extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self { - self.extensions_shim(val); + self.set_extensions_shim(val); self } #[doc = "Change the `pubKeyCredParams` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] pub fn pub_key_cred_params(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.pub_key_cred_params_shim(val); + self.set_pub_key_cred_params_shim(val); self } #[cfg(feature = "PublicKeyCredentialRpEntity")] @@ -121,14 +233,14 @@ impl PublicKeyCredentialCreationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialRpEntity`*"] pub fn rp(&mut self, val: &PublicKeyCredentialRpEntity) -> &mut Self { - self.rp_shim(val); + self.set_rp_shim(val); self } #[doc = "Change the `timeout` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`*"] pub fn timeout(&mut self, val: u32) -> &mut Self { - self.timeout_shim(val); + self.set_timeout_shim(val); self } #[cfg(feature = "PublicKeyCredentialUserEntity")] @@ -136,7 +248,7 @@ impl PublicKeyCredentialCreationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialCreationOptions`, `PublicKeyCredentialUserEntity`*"] pub fn user(&mut self, val: &PublicKeyCredentialUserEntity) -> &mut Self { - self.user_shim(val); + self.set_user_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs index c2ca7cc04d7..fab16f1fcd6 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialDescriptor.rs @@ -10,13 +10,50 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] pub type PublicKeyCredentialDescriptor; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &PublicKeyCredentialDescriptor) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &PublicKeyCredentialDescriptor, val: &::js_sys::Object); + fn set_id_shim(this: &PublicKeyCredentialDescriptor, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "transports")] + fn transports_shim(this: &PublicKeyCredentialDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "transports")] - fn transports_shim(this: &PublicKeyCredentialDescriptor, val: &::wasm_bindgen::JsValue); + fn set_transports_shim(this: &PublicKeyCredentialDescriptor, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "PublicKeyCredentialType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &PublicKeyCredentialDescriptor) -> PublicKeyCredentialType; #[cfg(feature = "PublicKeyCredentialType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &PublicKeyCredentialDescriptor, val: PublicKeyCredentialType); + fn set_type__shim(this: &PublicKeyCredentialDescriptor, val: PublicKeyCredentialType); +} +#[doc = "The trait to access properties on the `PublicKeyCredentialDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] +pub trait PublicKeyCredentialDescriptorGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] + fn id(&self) -> ::js_sys::Object; + #[doc = "Get the `transports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] + fn transports(&self) -> ::js_sys::Array; + #[cfg(feature = "PublicKeyCredentialType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`, `PublicKeyCredentialType`*"] + fn type_(&self) -> PublicKeyCredentialType; +} +impl PublicKeyCredentialDescriptorGetters for PublicKeyCredentialDescriptor { + fn id(&self) -> ::js_sys::Object { + self.id_shim() + } + fn transports(&self) -> ::js_sys::Array { + self.transports_shim() + } + #[cfg(feature = "PublicKeyCredentialType")] + fn type_(&self) -> PublicKeyCredentialType { + self.type__shim() + } } impl PublicKeyCredentialDescriptor { #[cfg(feature = "PublicKeyCredentialType")] @@ -26,22 +63,22 @@ impl PublicKeyCredentialDescriptor { pub fn new(id: &::js_sys::Object, type_: PublicKeyCredentialType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.id(id); - ret.type_(type_); + Self::id(&mut ret, id); + Self::type_(&mut ret, type_); ret } #[doc = "Change the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] pub fn id(&mut self, val: &::js_sys::Object) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `transports` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`*"] pub fn transports(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.transports_shim(val); + self.set_transports_shim(val); self } #[cfg(feature = "PublicKeyCredentialType")] @@ -49,7 +86,7 @@ impl PublicKeyCredentialDescriptor { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialDescriptor`, `PublicKeyCredentialType`*"] pub fn type_(&mut self, val: PublicKeyCredentialType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs index 6dc0e64c189..ae488d37db0 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialEntity.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] pub type PublicKeyCredentialEntity; + #[wasm_bindgen(method, getter = "icon")] + fn icon_shim(this: &PublicKeyCredentialEntity) -> String; #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &PublicKeyCredentialEntity, val: &str); + fn set_icon_shim(this: &PublicKeyCredentialEntity, val: &str); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &PublicKeyCredentialEntity) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PublicKeyCredentialEntity, val: &str); + fn set_name_shim(this: &PublicKeyCredentialEntity, val: &str); +} +#[doc = "The trait to access properties on the `PublicKeyCredentialEntity` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] +pub trait PublicKeyCredentialEntityGetters { + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] + fn icon(&self) -> String; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] + fn name(&self) -> String; +} +impl PublicKeyCredentialEntityGetters for PublicKeyCredentialEntity { + fn icon(&self) -> String { + self.icon_shim() + } + fn name(&self) -> String { + self.name_shim() + } } impl PublicKeyCredentialEntity { #[doc = "Construct a new `PublicKeyCredentialEntity`."] @@ -22,21 +47,21 @@ impl PublicKeyCredentialEntity { pub fn new(name: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[doc = "Change the `icon` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialEntity`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs index fd51859ddf6..6f8d6d78525 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialParameters.rs @@ -10,11 +10,39 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] pub type PublicKeyCredentialParameters; + #[wasm_bindgen(method, getter = "alg")] + fn alg_shim(this: &PublicKeyCredentialParameters) -> i32; #[wasm_bindgen(method, setter = "alg")] - fn alg_shim(this: &PublicKeyCredentialParameters, val: i32); + fn set_alg_shim(this: &PublicKeyCredentialParameters, val: i32); + #[cfg(feature = "PublicKeyCredentialType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &PublicKeyCredentialParameters) -> PublicKeyCredentialType; #[cfg(feature = "PublicKeyCredentialType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &PublicKeyCredentialParameters, val: PublicKeyCredentialType); + fn set_type__shim(this: &PublicKeyCredentialParameters, val: PublicKeyCredentialType); +} +#[doc = "The trait to access properties on the `PublicKeyCredentialParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] +pub trait PublicKeyCredentialParametersGetters { + #[doc = "Get the `alg` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] + fn alg(&self) -> i32; + #[cfg(feature = "PublicKeyCredentialType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"] + fn type_(&self) -> PublicKeyCredentialType; +} +impl PublicKeyCredentialParametersGetters for PublicKeyCredentialParameters { + fn alg(&self) -> i32 { + self.alg_shim() + } + #[cfg(feature = "PublicKeyCredentialType")] + fn type_(&self) -> PublicKeyCredentialType { + self.type__shim() + } } impl PublicKeyCredentialParameters { #[cfg(feature = "PublicKeyCredentialType")] @@ -24,15 +52,15 @@ impl PublicKeyCredentialParameters { pub fn new(alg: i32, type_: PublicKeyCredentialType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.alg(alg); - ret.type_(type_); + Self::alg(&mut ret, alg); + Self::type_(&mut ret, type_); ret } #[doc = "Change the `alg` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`*"] pub fn alg(&mut self, val: i32) -> &mut Self { - self.alg_shim(val); + self.set_alg_shim(val); self } #[cfg(feature = "PublicKeyCredentialType")] @@ -40,7 +68,7 @@ impl PublicKeyCredentialParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialParameters`, `PublicKeyCredentialType`*"] pub fn type_(&mut self, val: PublicKeyCredentialType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs index 3528ea3d7db..231192fa337 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialRequestOptions.rs @@ -10,30 +10,101 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] pub type PublicKeyCredentialRequestOptions; + #[wasm_bindgen(method, getter = "allowCredentials")] + fn allow_credentials_shim(this: &PublicKeyCredentialRequestOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "allowCredentials")] - fn allow_credentials_shim( + fn set_allow_credentials_shim( this: &PublicKeyCredentialRequestOptions, val: &::wasm_bindgen::JsValue, ); + #[wasm_bindgen(method, getter = "challenge")] + fn challenge_shim(this: &PublicKeyCredentialRequestOptions) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &PublicKeyCredentialRequestOptions, val: &::js_sys::Object); + fn set_challenge_shim(this: &PublicKeyCredentialRequestOptions, val: &::js_sys::Object); #[cfg(feature = "AuthenticationExtensionsClientInputs")] - #[wasm_bindgen(method, setter = "extensions")] + #[wasm_bindgen(method, getter = "extensions")] fn extensions_shim( this: &PublicKeyCredentialRequestOptions, + ) -> AuthenticationExtensionsClientInputs; + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[wasm_bindgen(method, setter = "extensions")] + fn set_extensions_shim( + this: &PublicKeyCredentialRequestOptions, val: &AuthenticationExtensionsClientInputs, ); + #[wasm_bindgen(method, getter = "rpId")] + fn rp_id_shim(this: &PublicKeyCredentialRequestOptions) -> String; #[wasm_bindgen(method, setter = "rpId")] - fn rp_id_shim(this: &PublicKeyCredentialRequestOptions, val: &str); + fn set_rp_id_shim(this: &PublicKeyCredentialRequestOptions, val: &str); + #[wasm_bindgen(method, getter = "timeout")] + fn timeout_shim(this: &PublicKeyCredentialRequestOptions) -> u32; #[wasm_bindgen(method, setter = "timeout")] - fn timeout_shim(this: &PublicKeyCredentialRequestOptions, val: u32); + fn set_timeout_shim(this: &PublicKeyCredentialRequestOptions, val: u32); #[cfg(feature = "UserVerificationRequirement")] - #[wasm_bindgen(method, setter = "userVerification")] + #[wasm_bindgen(method, getter = "userVerification")] fn user_verification_shim( this: &PublicKeyCredentialRequestOptions, + ) -> UserVerificationRequirement; + #[cfg(feature = "UserVerificationRequirement")] + #[wasm_bindgen(method, setter = "userVerification")] + fn set_user_verification_shim( + this: &PublicKeyCredentialRequestOptions, val: UserVerificationRequirement, ); } +#[doc = "The trait to access properties on the `PublicKeyCredentialRequestOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] +pub trait PublicKeyCredentialRequestOptionsGetters { + #[doc = "Get the `allowCredentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + fn allow_credentials(&self) -> ::js_sys::Array; + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + fn challenge(&self) -> ::js_sys::Object; + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + #[doc = "Get the `extensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialRequestOptions`*"] + fn extensions(&self) -> AuthenticationExtensionsClientInputs; + #[doc = "Get the `rpId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + fn rp_id(&self) -> String; + #[doc = "Get the `timeout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] + fn timeout(&self) -> u32; + #[cfg(feature = "UserVerificationRequirement")] + #[doc = "Get the `userVerification` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`, `UserVerificationRequirement`*"] + fn user_verification(&self) -> UserVerificationRequirement; +} +impl PublicKeyCredentialRequestOptionsGetters for PublicKeyCredentialRequestOptions { + fn allow_credentials(&self) -> ::js_sys::Array { + self.allow_credentials_shim() + } + fn challenge(&self) -> ::js_sys::Object { + self.challenge_shim() + } + #[cfg(feature = "AuthenticationExtensionsClientInputs")] + fn extensions(&self) -> AuthenticationExtensionsClientInputs { + self.extensions_shim() + } + fn rp_id(&self) -> String { + self.rp_id_shim() + } + fn timeout(&self) -> u32 { + self.timeout_shim() + } + #[cfg(feature = "UserVerificationRequirement")] + fn user_verification(&self) -> UserVerificationRequirement { + self.user_verification_shim() + } +} impl PublicKeyCredentialRequestOptions { #[doc = "Construct a new `PublicKeyCredentialRequestOptions`."] #[doc = ""] @@ -41,21 +112,21 @@ impl PublicKeyCredentialRequestOptions { pub fn new(challenge: &::js_sys::Object) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.challenge(challenge); + Self::challenge(&mut ret, challenge); ret } #[doc = "Change the `allowCredentials` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] pub fn allow_credentials(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.allow_credentials_shim(val); + self.set_allow_credentials_shim(val); self } #[doc = "Change the `challenge` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] pub fn challenge(&mut self, val: &::js_sys::Object) -> &mut Self { - self.challenge_shim(val); + self.set_challenge_shim(val); self } #[cfg(feature = "AuthenticationExtensionsClientInputs")] @@ -63,21 +134,21 @@ impl PublicKeyCredentialRequestOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AuthenticationExtensionsClientInputs`, `PublicKeyCredentialRequestOptions`*"] pub fn extensions(&mut self, val: &AuthenticationExtensionsClientInputs) -> &mut Self { - self.extensions_shim(val); + self.set_extensions_shim(val); self } #[doc = "Change the `rpId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] pub fn rp_id(&mut self, val: &str) -> &mut Self { - self.rp_id_shim(val); + self.set_rp_id_shim(val); self } #[doc = "Change the `timeout` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`*"] pub fn timeout(&mut self, val: u32) -> &mut Self { - self.timeout_shim(val); + self.set_timeout_shim(val); self } #[cfg(feature = "UserVerificationRequirement")] @@ -85,7 +156,7 @@ impl PublicKeyCredentialRequestOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRequestOptions`, `UserVerificationRequirement`*"] pub fn user_verification(&mut self, val: UserVerificationRequirement) -> &mut Self { - self.user_verification_shim(val); + self.set_user_verification_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs index ac8318357da..40cdd90974d 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialRpEntity.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] pub type PublicKeyCredentialRpEntity; + #[wasm_bindgen(method, getter = "icon")] + fn icon_shim(this: &PublicKeyCredentialRpEntity) -> String; #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &PublicKeyCredentialRpEntity, val: &str); + fn set_icon_shim(this: &PublicKeyCredentialRpEntity, val: &str); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &PublicKeyCredentialRpEntity) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PublicKeyCredentialRpEntity, val: &str); + fn set_name_shim(this: &PublicKeyCredentialRpEntity, val: &str); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &PublicKeyCredentialRpEntity) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &PublicKeyCredentialRpEntity, val: &str); + fn set_id_shim(this: &PublicKeyCredentialRpEntity, val: &str); +} +#[doc = "The trait to access properties on the `PublicKeyCredentialRpEntity` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] +pub trait PublicKeyCredentialRpEntityGetters { + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + fn icon(&self) -> String; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + fn name(&self) -> String; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] + fn id(&self) -> String; +} +impl PublicKeyCredentialRpEntityGetters for PublicKeyCredentialRpEntity { + fn icon(&self) -> String { + self.icon_shim() + } + fn name(&self) -> String { + self.name_shim() + } + fn id(&self) -> String { + self.id_shim() + } } impl PublicKeyCredentialRpEntity { #[doc = "Construct a new `PublicKeyCredentialRpEntity`."] @@ -24,28 +58,28 @@ impl PublicKeyCredentialRpEntity { pub fn new(name: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[doc = "Change the `icon` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialRpEntity`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs b/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs index a720e3a36e7..8236ba22f0d 100644 --- a/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs +++ b/crates/web-sys/src/features/gen_PublicKeyCredentialUserEntity.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] pub type PublicKeyCredentialUserEntity; + #[wasm_bindgen(method, getter = "icon")] + fn icon_shim(this: &PublicKeyCredentialUserEntity) -> String; #[wasm_bindgen(method, setter = "icon")] - fn icon_shim(this: &PublicKeyCredentialUserEntity, val: &str); + fn set_icon_shim(this: &PublicKeyCredentialUserEntity, val: &str); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &PublicKeyCredentialUserEntity) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &PublicKeyCredentialUserEntity, val: &str); + fn set_name_shim(this: &PublicKeyCredentialUserEntity, val: &str); + #[wasm_bindgen(method, getter = "displayName")] + fn display_name_shim(this: &PublicKeyCredentialUserEntity) -> String; #[wasm_bindgen(method, setter = "displayName")] - fn display_name_shim(this: &PublicKeyCredentialUserEntity, val: &str); + fn set_display_name_shim(this: &PublicKeyCredentialUserEntity, val: &str); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &PublicKeyCredentialUserEntity) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &PublicKeyCredentialUserEntity, val: &::js_sys::Object); + fn set_id_shim(this: &PublicKeyCredentialUserEntity, val: &::js_sys::Object); +} +#[doc = "The trait to access properties on the `PublicKeyCredentialUserEntity` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] +pub trait PublicKeyCredentialUserEntityGetters { + #[doc = "Get the `icon` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + fn icon(&self) -> String; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + fn name(&self) -> String; + #[doc = "Get the `displayName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + fn display_name(&self) -> String; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] + fn id(&self) -> ::js_sys::Object; +} +impl PublicKeyCredentialUserEntityGetters for PublicKeyCredentialUserEntity { + fn icon(&self) -> String { + self.icon_shim() + } + fn name(&self) -> String { + self.name_shim() + } + fn display_name(&self) -> String { + self.display_name_shim() + } + fn id(&self) -> ::js_sys::Object { + self.id_shim() + } } impl PublicKeyCredentialUserEntity { #[doc = "Construct a new `PublicKeyCredentialUserEntity`."] @@ -26,37 +69,37 @@ impl PublicKeyCredentialUserEntity { pub fn new(name: &str, display_name: &str, id: &::js_sys::Object) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.display_name(display_name); - ret.id(id); + Self::name(&mut ret, name); + Self::display_name(&mut ret, display_name); + Self::id(&mut ret, id); ret } #[doc = "Change the `icon` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] pub fn icon(&mut self, val: &str) -> &mut Self { - self.icon_shim(val); + self.set_icon_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `displayName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] pub fn display_name(&mut self, val: &str) -> &mut Self { - self.display_name_shim(val); + self.set_display_name_shim(val); self } #[doc = "Change the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PublicKeyCredentialUserEntity`*"] pub fn id(&mut self, val: &::js_sys::Object) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PushEventInit.rs b/crates/web-sys/src/features/gen_PushEventInit.rs index 5add3d2125d..e389d29f805 100644 --- a/crates/web-sys/src/features/gen_PushEventInit.rs +++ b/crates/web-sys/src/features/gen_PushEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] pub type PushEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &PushEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &PushEventInit, val: bool); + fn set_bubbles_shim(this: &PushEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &PushEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &PushEventInit, val: bool); + fn set_cancelable_shim(this: &PushEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &PushEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &PushEventInit, val: bool); + fn set_composed_shim(this: &PushEventInit, val: bool); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &PushEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &PushEventInit, val: &::wasm_bindgen::JsValue); + fn set_data_shim(this: &PushEventInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `PushEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] +pub trait PushEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] + fn data(&self) -> ::wasm_bindgen::JsValue; +} +impl PushEventInitGetters for PushEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn data(&self) -> ::wasm_bindgen::JsValue { + self.data_shim() + } } impl PushEventInit { #[doc = "Construct a new `PushEventInit`."] @@ -32,28 +75,28 @@ impl PushEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushEventInit`*"] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PushSubscriptionInit.rs b/crates/web-sys/src/features/gen_PushSubscriptionInit.rs index 721c813742a..5d2ec0874b3 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionInit.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] pub type PushSubscriptionInit; + #[wasm_bindgen(method, getter = "appServerKey")] + fn app_server_key_shim(this: &PushSubscriptionInit) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "appServerKey")] - fn app_server_key_shim(this: &PushSubscriptionInit, val: Option<&::js_sys::Object>); + fn set_app_server_key_shim(this: &PushSubscriptionInit, val: Option<&::js_sys::Object>); + #[wasm_bindgen(method, getter = "authSecret")] + fn auth_secret_shim(this: &PushSubscriptionInit) -> Option<::js_sys::ArrayBuffer>; #[wasm_bindgen(method, setter = "authSecret")] - fn auth_secret_shim(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + fn set_auth_secret_shim(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + #[wasm_bindgen(method, getter = "endpoint")] + fn endpoint_shim(this: &PushSubscriptionInit) -> String; #[wasm_bindgen(method, setter = "endpoint")] - fn endpoint_shim(this: &PushSubscriptionInit, val: &str); + fn set_endpoint_shim(this: &PushSubscriptionInit, val: &str); + #[wasm_bindgen(method, getter = "p256dhKey")] + fn p256dh_key_shim(this: &PushSubscriptionInit) -> Option<::js_sys::ArrayBuffer>; #[wasm_bindgen(method, setter = "p256dhKey")] - fn p256dh_key_shim(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + fn set_p256dh_key_shim(this: &PushSubscriptionInit, val: Option<&::js_sys::ArrayBuffer>); + #[wasm_bindgen(method, getter = "scope")] + fn scope_shim(this: &PushSubscriptionInit) -> String; #[wasm_bindgen(method, setter = "scope")] - fn scope_shim(this: &PushSubscriptionInit, val: &str); + fn set_scope_shim(this: &PushSubscriptionInit, val: &str); +} +#[doc = "The trait to access properties on the `PushSubscriptionInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] +pub trait PushSubscriptionInitGetters { + #[doc = "Get the `appServerKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + fn app_server_key(&self) -> Option<::js_sys::Object>; + #[doc = "Get the `authSecret` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + fn auth_secret(&self) -> Option<::js_sys::ArrayBuffer>; + #[doc = "Get the `endpoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + fn endpoint(&self) -> String; + #[doc = "Get the `p256dhKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + fn p256dh_key(&self) -> Option<::js_sys::ArrayBuffer>; + #[doc = "Get the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] + fn scope(&self) -> String; +} +impl PushSubscriptionInitGetters for PushSubscriptionInit { + fn app_server_key(&self) -> Option<::js_sys::Object> { + self.app_server_key_shim() + } + fn auth_secret(&self) -> Option<::js_sys::ArrayBuffer> { + self.auth_secret_shim() + } + fn endpoint(&self) -> String { + self.endpoint_shim() + } + fn p256dh_key(&self) -> Option<::js_sys::ArrayBuffer> { + self.p256dh_key_shim() + } + fn scope(&self) -> String { + self.scope_shim() + } } impl PushSubscriptionInit { #[doc = "Construct a new `PushSubscriptionInit`."] @@ -28,43 +80,43 @@ impl PushSubscriptionInit { pub fn new(endpoint: &str, scope: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.endpoint(endpoint); - ret.scope(scope); + Self::endpoint(&mut ret, endpoint); + Self::scope(&mut ret, scope); ret } #[doc = "Change the `appServerKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] pub fn app_server_key(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.app_server_key_shim(val); + self.set_app_server_key_shim(val); self } #[doc = "Change the `authSecret` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] pub fn auth_secret(&mut self, val: Option<&::js_sys::ArrayBuffer>) -> &mut Self { - self.auth_secret_shim(val); + self.set_auth_secret_shim(val); self } #[doc = "Change the `endpoint` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] pub fn endpoint(&mut self, val: &str) -> &mut Self { - self.endpoint_shim(val); + self.set_endpoint_shim(val); self } #[doc = "Change the `p256dhKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] pub fn p256dh_key(&mut self, val: Option<&::js_sys::ArrayBuffer>) -> &mut Self { - self.p256dh_key_shim(val); + self.set_p256dh_key_shim(val); self } #[doc = "Change the `scope` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionInit`*"] pub fn scope(&mut self, val: &str) -> &mut Self { - self.scope_shim(val); + self.set_scope_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PushSubscriptionJson.rs b/crates/web-sys/src/features/gen_PushSubscriptionJson.rs index 1fdb21c22bc..b1173069f67 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionJson.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionJson.rs @@ -10,11 +10,39 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] pub type PushSubscriptionJson; + #[wasm_bindgen(method, getter = "endpoint")] + fn endpoint_shim(this: &PushSubscriptionJson) -> String; #[wasm_bindgen(method, setter = "endpoint")] - fn endpoint_shim(this: &PushSubscriptionJson, val: &str); + fn set_endpoint_shim(this: &PushSubscriptionJson, val: &str); + #[cfg(feature = "PushSubscriptionKeys")] + #[wasm_bindgen(method, getter = "keys")] + fn keys_shim(this: &PushSubscriptionJson) -> PushSubscriptionKeys; #[cfg(feature = "PushSubscriptionKeys")] #[wasm_bindgen(method, setter = "keys")] - fn keys_shim(this: &PushSubscriptionJson, val: &PushSubscriptionKeys); + fn set_keys_shim(this: &PushSubscriptionJson, val: &PushSubscriptionKeys); +} +#[doc = "The trait to access properties on the `PushSubscriptionJson` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] +pub trait PushSubscriptionJsonGetters { + #[doc = "Get the `endpoint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] + fn endpoint(&self) -> String; + #[cfg(feature = "PushSubscriptionKeys")] + #[doc = "Get the `keys` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`, `PushSubscriptionKeys`*"] + fn keys(&self) -> PushSubscriptionKeys; +} +impl PushSubscriptionJsonGetters for PushSubscriptionJson { + fn endpoint(&self) -> String { + self.endpoint_shim() + } + #[cfg(feature = "PushSubscriptionKeys")] + fn keys(&self) -> PushSubscriptionKeys { + self.keys_shim() + } } impl PushSubscriptionJson { #[doc = "Construct a new `PushSubscriptionJson`."] @@ -29,7 +57,7 @@ impl PushSubscriptionJson { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`*"] pub fn endpoint(&mut self, val: &str) -> &mut Self { - self.endpoint_shim(val); + self.set_endpoint_shim(val); self } #[cfg(feature = "PushSubscriptionKeys")] @@ -37,7 +65,7 @@ impl PushSubscriptionJson { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionJson`, `PushSubscriptionKeys`*"] pub fn keys(&mut self, val: &PushSubscriptionKeys) -> &mut Self { - self.keys_shim(val); + self.set_keys_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs b/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs index f4b03611fba..a0c5360bf5c 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionKeys.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] pub type PushSubscriptionKeys; + #[wasm_bindgen(method, getter = "auth")] + fn auth_shim(this: &PushSubscriptionKeys) -> String; #[wasm_bindgen(method, setter = "auth")] - fn auth_shim(this: &PushSubscriptionKeys, val: &str); + fn set_auth_shim(this: &PushSubscriptionKeys, val: &str); + #[wasm_bindgen(method, getter = "p256dh")] + fn p256dh_shim(this: &PushSubscriptionKeys) -> String; #[wasm_bindgen(method, setter = "p256dh")] - fn p256dh_shim(this: &PushSubscriptionKeys, val: &str); + fn set_p256dh_shim(this: &PushSubscriptionKeys, val: &str); +} +#[doc = "The trait to access properties on the `PushSubscriptionKeys` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] +pub trait PushSubscriptionKeysGetters { + #[doc = "Get the `auth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] + fn auth(&self) -> String; + #[doc = "Get the `p256dh` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] + fn p256dh(&self) -> String; +} +impl PushSubscriptionKeysGetters for PushSubscriptionKeys { + fn auth(&self) -> String { + self.auth_shim() + } + fn p256dh(&self) -> String { + self.p256dh_shim() + } } impl PushSubscriptionKeys { #[doc = "Construct a new `PushSubscriptionKeys`."] @@ -28,14 +53,14 @@ impl PushSubscriptionKeys { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] pub fn auth(&mut self, val: &str) -> &mut Self { - self.auth_shim(val); + self.set_auth_shim(val); self } #[doc = "Change the `p256dh` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionKeys`*"] pub fn p256dh(&mut self, val: &str) -> &mut Self { - self.p256dh_shim(val); + self.set_p256dh_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs b/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs index ba2ce96b985..d8811b0ca6a 100644 --- a/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs +++ b/crates/web-sys/src/features/gen_PushSubscriptionOptionsInit.rs @@ -10,13 +10,38 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] pub type PushSubscriptionOptionsInit; + #[wasm_bindgen(method, getter = "applicationServerKey")] + fn application_server_key_shim(this: &PushSubscriptionOptionsInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "applicationServerKey")] - fn application_server_key_shim( + fn set_application_server_key_shim( this: &PushSubscriptionOptionsInit, val: &::wasm_bindgen::JsValue, ); + #[wasm_bindgen(method, getter = "userVisibleOnly")] + fn user_visible_only_shim(this: &PushSubscriptionOptionsInit) -> bool; #[wasm_bindgen(method, setter = "userVisibleOnly")] - fn user_visible_only_shim(this: &PushSubscriptionOptionsInit, val: bool); + fn set_user_visible_only_shim(this: &PushSubscriptionOptionsInit, val: bool); +} +#[doc = "The trait to access properties on the `PushSubscriptionOptionsInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] +pub trait PushSubscriptionOptionsInitGetters { + #[doc = "Get the `applicationServerKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] + fn application_server_key(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `userVisibleOnly` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] + fn user_visible_only(&self) -> bool; +} +impl PushSubscriptionOptionsInitGetters for PushSubscriptionOptionsInit { + fn application_server_key(&self) -> ::wasm_bindgen::JsValue { + self.application_server_key_shim() + } + fn user_visible_only(&self) -> bool { + self.user_visible_only_shim() + } } impl PushSubscriptionOptionsInit { #[doc = "Construct a new `PushSubscriptionOptionsInit`."] @@ -31,14 +56,14 @@ impl PushSubscriptionOptionsInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] pub fn application_server_key(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.application_server_key_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_application_server_key_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } #[doc = "Change the `userVisibleOnly` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `PushSubscriptionOptionsInit`*"] pub fn user_visible_only(&mut self, val: bool) -> &mut Self { - self.user_visible_only_shim(val); + self.set_user_visible_only_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_QueryOptions.rs b/crates/web-sys/src/features/gen_QueryOptions.rs index 6ef1d3ad6c0..5e3b2e43511 100644 --- a/crates/web-sys/src/features/gen_QueryOptions.rs +++ b/crates/web-sys/src/features/gen_QueryOptions.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type QueryOptions; + #[wasm_bindgen(method, getter = "postscriptNames")] + fn postscript_names_shim(this: &QueryOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "postscriptNames")] - fn postscript_names_shim(this: &QueryOptions, val: &::wasm_bindgen::JsValue); + fn set_postscript_names_shim(this: &QueryOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `QueryOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"] +pub trait QueryOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `postscriptNames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueryOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn postscript_names(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl QueryOptionsGetters for QueryOptions { + #[cfg(web_sys_unstable_apis)] + fn postscript_names(&self) -> ::js_sys::Array { + self.postscript_names_shim() + } } #[cfg(web_sys_unstable_apis)] impl QueryOptions { @@ -38,7 +61,7 @@ impl QueryOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn postscript_names(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.postscript_names_shim(val); + self.set_postscript_names_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_QueuingStrategy.rs b/crates/web-sys/src/features/gen_QueuingStrategy.rs index 9ecbfa23cd1..90f39825f9e 100644 --- a/crates/web-sys/src/features/gen_QueuingStrategy.rs +++ b/crates/web-sys/src/features/gen_QueuingStrategy.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] pub type QueuingStrategy; + #[wasm_bindgen(method, getter = "highWaterMark")] + fn high_water_mark_shim(this: &QueuingStrategy) -> f64; #[wasm_bindgen(method, setter = "highWaterMark")] - fn high_water_mark_shim(this: &QueuingStrategy, val: f64); + fn set_high_water_mark_shim(this: &QueuingStrategy, val: f64); + #[wasm_bindgen(method, getter = "size")] + fn size_shim(this: &QueuingStrategy) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &QueuingStrategy, val: &::js_sys::Function); + fn set_size_shim(this: &QueuingStrategy, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `QueuingStrategy` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] +pub trait QueuingStrategyGetters { + #[doc = "Get the `highWaterMark` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] + fn high_water_mark(&self) -> f64; + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] + fn size(&self) -> ::js_sys::Function; +} +impl QueuingStrategyGetters for QueuingStrategy { + fn high_water_mark(&self) -> f64 { + self.high_water_mark_shim() + } + fn size(&self) -> ::js_sys::Function { + self.size_shim() + } } impl QueuingStrategy { #[doc = "Construct a new `QueuingStrategy`."] @@ -28,14 +53,14 @@ impl QueuingStrategy { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] pub fn high_water_mark(&mut self, val: f64) -> &mut Self { - self.high_water_mark_shim(val); + self.set_high_water_mark_shim(val); self } #[doc = "Change the `size` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `QueuingStrategy`*"] pub fn size(&mut self, val: &::js_sys::Function) -> &mut Self { - self.size_shim(val); + self.set_size_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_QueuingStrategyInit.rs b/crates/web-sys/src/features/gen_QueuingStrategyInit.rs index 42523cd8b2f..aa70b3822e6 100644 --- a/crates/web-sys/src/features/gen_QueuingStrategyInit.rs +++ b/crates/web-sys/src/features/gen_QueuingStrategyInit.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] pub type QueuingStrategyInit; + #[wasm_bindgen(method, getter = "highWaterMark")] + fn high_water_mark_shim(this: &QueuingStrategyInit) -> f64; #[wasm_bindgen(method, setter = "highWaterMark")] - fn high_water_mark_shim(this: &QueuingStrategyInit, val: f64); + fn set_high_water_mark_shim(this: &QueuingStrategyInit, val: f64); +} +#[doc = "The trait to access properties on the `QueuingStrategyInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] +pub trait QueuingStrategyInitGetters { + #[doc = "Get the `highWaterMark` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] + fn high_water_mark(&self) -> f64; +} +impl QueuingStrategyInitGetters for QueuingStrategyInit { + fn high_water_mark(&self) -> f64 { + self.high_water_mark_shim() + } } impl QueuingStrategyInit { #[doc = "Construct a new `QueuingStrategyInit`."] @@ -20,14 +36,14 @@ impl QueuingStrategyInit { pub fn new(high_water_mark: f64) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.high_water_mark(high_water_mark); + Self::high_water_mark(&mut ret, high_water_mark); ret } #[doc = "Change the `highWaterMark` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `QueuingStrategyInit`*"] pub fn high_water_mark(&mut self, val: f64) -> &mut Self { - self.high_water_mark_shim(val); + self.set_high_water_mark_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RcwnPerfStats.rs b/crates/web-sys/src/features/gen_RcwnPerfStats.rs index ee8fc7c302a..cad4df1e119 100644 --- a/crates/web-sys/src/features/gen_RcwnPerfStats.rs +++ b/crates/web-sys/src/features/gen_RcwnPerfStats.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] pub type RcwnPerfStats; + #[wasm_bindgen(method, getter = "avgLong")] + fn avg_long_shim(this: &RcwnPerfStats) -> u32; #[wasm_bindgen(method, setter = "avgLong")] - fn avg_long_shim(this: &RcwnPerfStats, val: u32); + fn set_avg_long_shim(this: &RcwnPerfStats, val: u32); + #[wasm_bindgen(method, getter = "avgShort")] + fn avg_short_shim(this: &RcwnPerfStats) -> u32; #[wasm_bindgen(method, setter = "avgShort")] - fn avg_short_shim(this: &RcwnPerfStats, val: u32); + fn set_avg_short_shim(this: &RcwnPerfStats, val: u32); + #[wasm_bindgen(method, getter = "stddevLong")] + fn stddev_long_shim(this: &RcwnPerfStats) -> u32; #[wasm_bindgen(method, setter = "stddevLong")] - fn stddev_long_shim(this: &RcwnPerfStats, val: u32); + fn set_stddev_long_shim(this: &RcwnPerfStats, val: u32); +} +#[doc = "The trait to access properties on the `RcwnPerfStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] +pub trait RcwnPerfStatsGetters { + #[doc = "Get the `avgLong` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + fn avg_long(&self) -> u32; + #[doc = "Get the `avgShort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + fn avg_short(&self) -> u32; + #[doc = "Get the `stddevLong` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] + fn stddev_long(&self) -> u32; +} +impl RcwnPerfStatsGetters for RcwnPerfStats { + fn avg_long(&self) -> u32 { + self.avg_long_shim() + } + fn avg_short(&self) -> u32 { + self.avg_short_shim() + } + fn stddev_long(&self) -> u32 { + self.stddev_long_shim() + } } impl RcwnPerfStats { #[doc = "Construct a new `RcwnPerfStats`."] @@ -30,21 +64,21 @@ impl RcwnPerfStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] pub fn avg_long(&mut self, val: u32) -> &mut Self { - self.avg_long_shim(val); + self.set_avg_long_shim(val); self } #[doc = "Change the `avgShort` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] pub fn avg_short(&mut self, val: u32) -> &mut Self { - self.avg_short_shim(val); + self.set_avg_short_shim(val); self } #[doc = "Change the `stddevLong` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnPerfStats`*"] pub fn stddev_long(&mut self, val: u32) -> &mut Self { - self.stddev_long_shim(val); + self.set_stddev_long_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RcwnStatus.rs b/crates/web-sys/src/features/gen_RcwnStatus.rs index e29982da89e..604f51a8e8e 100644 --- a/crates/web-sys/src/features/gen_RcwnStatus.rs +++ b/crates/web-sys/src/features/gen_RcwnStatus.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] pub type RcwnStatus; + #[wasm_bindgen(method, getter = "cacheNotSlowCount")] + fn cache_not_slow_count_shim(this: &RcwnStatus) -> u32; #[wasm_bindgen(method, setter = "cacheNotSlowCount")] - fn cache_not_slow_count_shim(this: &RcwnStatus, val: u32); + fn set_cache_not_slow_count_shim(this: &RcwnStatus, val: u32); + #[wasm_bindgen(method, getter = "cacheSlowCount")] + fn cache_slow_count_shim(this: &RcwnStatus) -> u32; #[wasm_bindgen(method, setter = "cacheSlowCount")] - fn cache_slow_count_shim(this: &RcwnStatus, val: u32); + fn set_cache_slow_count_shim(this: &RcwnStatus, val: u32); + #[wasm_bindgen(method, getter = "perfStats")] + fn perf_stats_shim(this: &RcwnStatus) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "perfStats")] - fn perf_stats_shim(this: &RcwnStatus, val: &::wasm_bindgen::JsValue); + fn set_perf_stats_shim(this: &RcwnStatus, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "rcwnCacheWonCount")] + fn rcwn_cache_won_count_shim(this: &RcwnStatus) -> u32; #[wasm_bindgen(method, setter = "rcwnCacheWonCount")] - fn rcwn_cache_won_count_shim(this: &RcwnStatus, val: u32); + fn set_rcwn_cache_won_count_shim(this: &RcwnStatus, val: u32); + #[wasm_bindgen(method, getter = "rcwnNetWonCount")] + fn rcwn_net_won_count_shim(this: &RcwnStatus) -> u32; #[wasm_bindgen(method, setter = "rcwnNetWonCount")] - fn rcwn_net_won_count_shim(this: &RcwnStatus, val: u32); + fn set_rcwn_net_won_count_shim(this: &RcwnStatus, val: u32); + #[wasm_bindgen(method, getter = "totalNetworkRequests")] + fn total_network_requests_shim(this: &RcwnStatus) -> u32; #[wasm_bindgen(method, setter = "totalNetworkRequests")] - fn total_network_requests_shim(this: &RcwnStatus, val: u32); + fn set_total_network_requests_shim(this: &RcwnStatus, val: u32); +} +#[doc = "The trait to access properties on the `RcwnStatus` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] +pub trait RcwnStatusGetters { + #[doc = "Get the `cacheNotSlowCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + fn cache_not_slow_count(&self) -> u32; + #[doc = "Get the `cacheSlowCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + fn cache_slow_count(&self) -> u32; + #[doc = "Get the `perfStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + fn perf_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `rcwnCacheWonCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + fn rcwn_cache_won_count(&self) -> u32; + #[doc = "Get the `rcwnNetWonCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + fn rcwn_net_won_count(&self) -> u32; + #[doc = "Get the `totalNetworkRequests` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] + fn total_network_requests(&self) -> u32; +} +impl RcwnStatusGetters for RcwnStatus { + fn cache_not_slow_count(&self) -> u32 { + self.cache_not_slow_count_shim() + } + fn cache_slow_count(&self) -> u32 { + self.cache_slow_count_shim() + } + fn perf_stats(&self) -> ::js_sys::Array { + self.perf_stats_shim() + } + fn rcwn_cache_won_count(&self) -> u32 { + self.rcwn_cache_won_count_shim() + } + fn rcwn_net_won_count(&self) -> u32 { + self.rcwn_net_won_count_shim() + } + fn total_network_requests(&self) -> u32 { + self.total_network_requests_shim() + } } impl RcwnStatus { #[doc = "Construct a new `RcwnStatus`."] @@ -36,42 +97,42 @@ impl RcwnStatus { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] pub fn cache_not_slow_count(&mut self, val: u32) -> &mut Self { - self.cache_not_slow_count_shim(val); + self.set_cache_not_slow_count_shim(val); self } #[doc = "Change the `cacheSlowCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] pub fn cache_slow_count(&mut self, val: u32) -> &mut Self { - self.cache_slow_count_shim(val); + self.set_cache_slow_count_shim(val); self } #[doc = "Change the `perfStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] pub fn perf_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.perf_stats_shim(val); + self.set_perf_stats_shim(val); self } #[doc = "Change the `rcwnCacheWonCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] pub fn rcwn_cache_won_count(&mut self, val: u32) -> &mut Self { - self.rcwn_cache_won_count_shim(val); + self.set_rcwn_cache_won_count_shim(val); self } #[doc = "Change the `rcwnNetWonCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] pub fn rcwn_net_won_count(&mut self, val: u32) -> &mut Self { - self.rcwn_net_won_count_shim(val); + self.set_rcwn_net_won_count_shim(val); self } #[doc = "Change the `totalNetworkRequests` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RcwnStatus`*"] pub fn total_network_requests(&mut self, val: u32) -> &mut Self { - self.total_network_requests_shim(val); + self.set_total_network_requests_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs b/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs index ba38a2a7cd6..8c97246c6a2 100644 --- a/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs +++ b/crates/web-sys/src/features/gen_ReadableStreamGetReaderOptions.rs @@ -11,8 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`*"] pub type ReadableStreamGetReaderOptions; #[cfg(feature = "ReadableStreamReaderMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &ReadableStreamGetReaderOptions) -> ReadableStreamReaderMode; + #[cfg(feature = "ReadableStreamReaderMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &ReadableStreamGetReaderOptions, val: ReadableStreamReaderMode); + fn set_mode_shim(this: &ReadableStreamGetReaderOptions, val: ReadableStreamReaderMode); +} +#[doc = "The trait to access properties on the `ReadableStreamGetReaderOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`*"] +pub trait ReadableStreamGetReaderOptionsGetters { + #[cfg(feature = "ReadableStreamReaderMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`, `ReadableStreamReaderMode`*"] + fn mode(&self) -> ReadableStreamReaderMode; +} +impl ReadableStreamGetReaderOptionsGetters for ReadableStreamGetReaderOptions { + #[cfg(feature = "ReadableStreamReaderMode")] + fn mode(&self) -> ReadableStreamReaderMode { + self.mode_shim() + } } impl ReadableStreamGetReaderOptions { #[doc = "Construct a new `ReadableStreamGetReaderOptions`."] @@ -28,7 +47,7 @@ impl ReadableStreamGetReaderOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamGetReaderOptions`, `ReadableStreamReaderMode`*"] pub fn mode(&mut self, val: ReadableStreamReaderMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs b/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs index bd432a43d33..e633b9413c6 100644 --- a/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs +++ b/crates/web-sys/src/features/gen_ReadableStreamIteratorOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] pub type ReadableStreamIteratorOptions; + #[wasm_bindgen(method, getter = "preventCancel")] + fn prevent_cancel_shim(this: &ReadableStreamIteratorOptions) -> bool; #[wasm_bindgen(method, setter = "preventCancel")] - fn prevent_cancel_shim(this: &ReadableStreamIteratorOptions, val: bool); + fn set_prevent_cancel_shim(this: &ReadableStreamIteratorOptions, val: bool); +} +#[doc = "The trait to access properties on the `ReadableStreamIteratorOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] +pub trait ReadableStreamIteratorOptionsGetters { + #[doc = "Get the `preventCancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] + fn prevent_cancel(&self) -> bool; +} +impl ReadableStreamIteratorOptionsGetters for ReadableStreamIteratorOptions { + fn prevent_cancel(&self) -> bool { + self.prevent_cancel_shim() + } } impl ReadableStreamIteratorOptions { #[doc = "Construct a new `ReadableStreamIteratorOptions`."] @@ -26,7 +42,7 @@ impl ReadableStreamIteratorOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamIteratorOptions`*"] pub fn prevent_cancel(&mut self, val: bool) -> &mut Self { - self.prevent_cancel_shim(val); + self.set_prevent_cancel_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs b/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs index 1ee926ae577..16e57c4e4f0 100644 --- a/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs +++ b/crates/web-sys/src/features/gen_ReadableStreamReadResult.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] pub type ReadableStreamReadResult; + #[wasm_bindgen(method, getter = "done")] + fn done_shim(this: &ReadableStreamReadResult) -> bool; #[wasm_bindgen(method, setter = "done")] - fn done_shim(this: &ReadableStreamReadResult, val: bool); + fn set_done_shim(this: &ReadableStreamReadResult, val: bool); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &ReadableStreamReadResult) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &ReadableStreamReadResult, val: &::wasm_bindgen::JsValue); + fn set_value_shim(this: &ReadableStreamReadResult, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `ReadableStreamReadResult` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] +pub trait ReadableStreamReadResultGetters { + #[doc = "Get the `done` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] + fn done(&self) -> bool; + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] + fn value(&self) -> ::wasm_bindgen::JsValue; +} +impl ReadableStreamReadResultGetters for ReadableStreamReadResult { + fn done(&self) -> bool { + self.done_shim() + } + fn value(&self) -> ::wasm_bindgen::JsValue { + self.value_shim() + } } impl ReadableStreamReadResult { #[doc = "Construct a new `ReadableStreamReadResult`."] @@ -28,14 +53,14 @@ impl ReadableStreamReadResult { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] pub fn done(&mut self, val: bool) -> &mut Self { - self.done_shim(val); + self.set_done_shim(val); self } #[doc = "Change the `value` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamReadResult`*"] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ReadableWritablePair.rs b/crates/web-sys/src/features/gen_ReadableWritablePair.rs index 3079c8805c3..604d38b99c4 100644 --- a/crates/web-sys/src/features/gen_ReadableWritablePair.rs +++ b/crates/web-sys/src/features/gen_ReadableWritablePair.rs @@ -11,11 +11,42 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`*"] pub type ReadableWritablePair; #[cfg(feature = "ReadableStream")] + #[wasm_bindgen(method, getter = "readable")] + fn readable_shim(this: &ReadableWritablePair) -> ReadableStream; + #[cfg(feature = "ReadableStream")] #[wasm_bindgen(method, setter = "readable")] - fn readable_shim(this: &ReadableWritablePair, val: &ReadableStream); + fn set_readable_shim(this: &ReadableWritablePair, val: &ReadableStream); + #[cfg(feature = "WritableStream")] + #[wasm_bindgen(method, getter = "writable")] + fn writable_shim(this: &ReadableWritablePair) -> WritableStream; #[cfg(feature = "WritableStream")] #[wasm_bindgen(method, setter = "writable")] - fn writable_shim(this: &ReadableWritablePair, val: &WritableStream); + fn set_writable_shim(this: &ReadableWritablePair, val: &WritableStream); +} +#[doc = "The trait to access properties on the `ReadableWritablePair` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`*"] +pub trait ReadableWritablePairGetters { + #[cfg(feature = "ReadableStream")] + #[doc = "Get the `readable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`*"] + fn readable(&self) -> ReadableStream; + #[cfg(feature = "WritableStream")] + #[doc = "Get the `writable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`, `WritableStream`*"] + fn writable(&self) -> WritableStream; +} +impl ReadableWritablePairGetters for ReadableWritablePair { + #[cfg(feature = "ReadableStream")] + fn readable(&self) -> ReadableStream { + self.readable_shim() + } + #[cfg(feature = "WritableStream")] + fn writable(&self) -> WritableStream { + self.writable_shim() + } } impl ReadableWritablePair { #[cfg(all(feature = "ReadableStream", feature = "WritableStream",))] @@ -25,8 +56,8 @@ impl ReadableWritablePair { pub fn new(readable: &ReadableStream, writable: &WritableStream) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.readable(readable); - ret.writable(writable); + Self::readable(&mut ret, readable); + Self::writable(&mut ret, writable); ret } #[cfg(feature = "ReadableStream")] @@ -34,7 +65,7 @@ impl ReadableWritablePair { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `ReadableWritablePair`*"] pub fn readable(&mut self, val: &ReadableStream) -> &mut Self { - self.readable_shim(val); + self.set_readable_shim(val); self } #[cfg(feature = "WritableStream")] @@ -42,7 +73,7 @@ impl ReadableWritablePair { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableWritablePair`, `WritableStream`*"] pub fn writable(&mut self, val: &WritableStream) -> &mut Self { - self.writable_shim(val); + self.set_writable_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RegisterRequest.rs b/crates/web-sys/src/features/gen_RegisterRequest.rs index f35b3953389..b5ac4d0fa9f 100644 --- a/crates/web-sys/src/features/gen_RegisterRequest.rs +++ b/crates/web-sys/src/features/gen_RegisterRequest.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] pub type RegisterRequest; + #[wasm_bindgen(method, getter = "challenge")] + fn challenge_shim(this: &RegisterRequest) -> String; #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &RegisterRequest, val: &str); + fn set_challenge_shim(this: &RegisterRequest, val: &str); + #[wasm_bindgen(method, getter = "version")] + fn version_shim(this: &RegisterRequest) -> String; #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &RegisterRequest, val: &str); + fn set_version_shim(this: &RegisterRequest, val: &str); +} +#[doc = "The trait to access properties on the `RegisterRequest` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] +pub trait RegisterRequestGetters { + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] + fn challenge(&self) -> String; + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] + fn version(&self) -> String; +} +impl RegisterRequestGetters for RegisterRequest { + fn challenge(&self) -> String { + self.challenge_shim() + } + fn version(&self) -> String { + self.version_shim() + } } impl RegisterRequest { #[doc = "Construct a new `RegisterRequest`."] @@ -28,14 +53,14 @@ impl RegisterRequest { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] pub fn challenge(&mut self, val: &str) -> &mut Self { - self.challenge_shim(val); + self.set_challenge_shim(val); self } #[doc = "Change the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterRequest`*"] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RegisterResponse.rs b/crates/web-sys/src/features/gen_RegisterResponse.rs index eb73afa5f2c..1c82a9b0658 100644 --- a/crates/web-sys/src/features/gen_RegisterResponse.rs +++ b/crates/web-sys/src/features/gen_RegisterResponse.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] pub type RegisterResponse; + #[wasm_bindgen(method, getter = "clientData")] + fn client_data_shim(this: &RegisterResponse) -> String; #[wasm_bindgen(method, setter = "clientData")] - fn client_data_shim(this: &RegisterResponse, val: &str); + fn set_client_data_shim(this: &RegisterResponse, val: &str); + #[wasm_bindgen(method, getter = "errorCode")] + fn error_code_shim(this: &RegisterResponse) -> Option; #[wasm_bindgen(method, setter = "errorCode")] - fn error_code_shim(this: &RegisterResponse, val: Option); + fn set_error_code_shim(this: &RegisterResponse, val: Option); + #[wasm_bindgen(method, getter = "errorMessage")] + fn error_message_shim(this: &RegisterResponse) -> Option; #[wasm_bindgen(method, setter = "errorMessage")] - fn error_message_shim(this: &RegisterResponse, val: Option<&str>); + fn set_error_message_shim(this: &RegisterResponse, val: Option<&str>); + #[wasm_bindgen(method, getter = "registrationData")] + fn registration_data_shim(this: &RegisterResponse) -> String; #[wasm_bindgen(method, setter = "registrationData")] - fn registration_data_shim(this: &RegisterResponse, val: &str); + fn set_registration_data_shim(this: &RegisterResponse, val: &str); + #[wasm_bindgen(method, getter = "version")] + fn version_shim(this: &RegisterResponse) -> String; #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &RegisterResponse, val: &str); + fn set_version_shim(this: &RegisterResponse, val: &str); +} +#[doc = "The trait to access properties on the `RegisterResponse` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] +pub trait RegisterResponseGetters { + #[doc = "Get the `clientData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + fn client_data(&self) -> String; + #[doc = "Get the `errorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + fn error_code(&self) -> Option; + #[doc = "Get the `errorMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + fn error_message(&self) -> Option; + #[doc = "Get the `registrationData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + fn registration_data(&self) -> String; + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] + fn version(&self) -> String; +} +impl RegisterResponseGetters for RegisterResponse { + fn client_data(&self) -> String { + self.client_data_shim() + } + fn error_code(&self) -> Option { + self.error_code_shim() + } + fn error_message(&self) -> Option { + self.error_message_shim() + } + fn registration_data(&self) -> String { + self.registration_data_shim() + } + fn version(&self) -> String { + self.version_shim() + } } impl RegisterResponse { #[doc = "Construct a new `RegisterResponse`."] @@ -34,35 +86,35 @@ impl RegisterResponse { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] pub fn client_data(&mut self, val: &str) -> &mut Self { - self.client_data_shim(val); + self.set_client_data_shim(val); self } #[doc = "Change the `errorCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] pub fn error_code(&mut self, val: Option) -> &mut Self { - self.error_code_shim(val); + self.set_error_code_shim(val); self } #[doc = "Change the `errorMessage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] pub fn error_message(&mut self, val: Option<&str>) -> &mut Self { - self.error_message_shim(val); + self.set_error_message_shim(val); self } #[doc = "Change the `registrationData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] pub fn registration_data(&mut self, val: &str) -> &mut Self { - self.registration_data_shim(val); + self.set_registration_data_shim(val); self } #[doc = "Change the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisterResponse`*"] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RegisteredKey.rs b/crates/web-sys/src/features/gen_RegisteredKey.rs index 34f727cbab4..bf6f62bb681 100644 --- a/crates/web-sys/src/features/gen_RegisteredKey.rs +++ b/crates/web-sys/src/features/gen_RegisteredKey.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] pub type RegisteredKey; + #[wasm_bindgen(method, getter = "appId")] + fn app_id_shim(this: &RegisteredKey) -> Option; #[wasm_bindgen(method, setter = "appId")] - fn app_id_shim(this: &RegisteredKey, val: Option<&str>); + fn set_app_id_shim(this: &RegisteredKey, val: Option<&str>); + #[wasm_bindgen(method, getter = "keyHandle")] + fn key_handle_shim(this: &RegisteredKey) -> String; #[wasm_bindgen(method, setter = "keyHandle")] - fn key_handle_shim(this: &RegisteredKey, val: &str); + fn set_key_handle_shim(this: &RegisteredKey, val: &str); + #[wasm_bindgen(method, getter = "transports")] + fn transports_shim(this: &RegisteredKey) -> Option<::js_sys::Array>; #[wasm_bindgen(method, setter = "transports")] - fn transports_shim(this: &RegisteredKey, val: &::wasm_bindgen::JsValue); + fn set_transports_shim(this: &RegisteredKey, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "version")] + fn version_shim(this: &RegisteredKey) -> String; #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &RegisteredKey, val: &str); + fn set_version_shim(this: &RegisteredKey, val: &str); +} +#[doc = "The trait to access properties on the `RegisteredKey` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] +pub trait RegisteredKeyGetters { + #[doc = "Get the `appId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + fn app_id(&self) -> Option; + #[doc = "Get the `keyHandle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + fn key_handle(&self) -> String; + #[doc = "Get the `transports` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + fn transports(&self) -> Option<::js_sys::Array>; + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] + fn version(&self) -> String; +} +impl RegisteredKeyGetters for RegisteredKey { + fn app_id(&self) -> Option { + self.app_id_shim() + } + fn key_handle(&self) -> String { + self.key_handle_shim() + } + fn transports(&self) -> Option<::js_sys::Array> { + self.transports_shim() + } + fn version(&self) -> String { + self.version_shim() + } } impl RegisteredKey { #[doc = "Construct a new `RegisteredKey`."] @@ -32,28 +75,28 @@ impl RegisteredKey { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] pub fn app_id(&mut self, val: Option<&str>) -> &mut Self { - self.app_id_shim(val); + self.set_app_id_shim(val); self } #[doc = "Change the `keyHandle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] pub fn key_handle(&mut self, val: &str) -> &mut Self { - self.key_handle_shim(val); + self.set_key_handle_shim(val); self } #[doc = "Change the `transports` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] pub fn transports(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.transports_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_transports_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } #[doc = "Change the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegisteredKey`*"] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RegistrationOptions.rs b/crates/web-sys/src/features/gen_RegistrationOptions.rs index 8d635369a40..db6471e11dc 100644 --- a/crates/web-sys/src/features/gen_RegistrationOptions.rs +++ b/crates/web-sys/src/features/gen_RegistrationOptions.rs @@ -10,13 +10,50 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] pub type RegistrationOptions; + #[wasm_bindgen(method, getter = "scope")] + fn scope_shim(this: &RegistrationOptions) -> String; #[wasm_bindgen(method, setter = "scope")] - fn scope_shim(this: &RegistrationOptions, val: &str); + fn set_scope_shim(this: &RegistrationOptions, val: &str); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RegistrationOptions) -> String; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RegistrationOptions, val: &str); + fn set_type__shim(this: &RegistrationOptions, val: &str); + #[cfg(feature = "ServiceWorkerUpdateViaCache")] + #[wasm_bindgen(method, getter = "updateViaCache")] + fn update_via_cache_shim(this: &RegistrationOptions) -> ServiceWorkerUpdateViaCache; #[cfg(feature = "ServiceWorkerUpdateViaCache")] #[wasm_bindgen(method, setter = "updateViaCache")] - fn update_via_cache_shim(this: &RegistrationOptions, val: ServiceWorkerUpdateViaCache); + fn set_update_via_cache_shim(this: &RegistrationOptions, val: ServiceWorkerUpdateViaCache); +} +#[doc = "The trait to access properties on the `RegistrationOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] +pub trait RegistrationOptionsGetters { + #[doc = "Get the `scope` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] + fn scope(&self) -> String; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] + fn type_(&self) -> String; + #[cfg(feature = "ServiceWorkerUpdateViaCache")] + #[doc = "Get the `updateViaCache` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`, `ServiceWorkerUpdateViaCache`*"] + fn update_via_cache(&self) -> ServiceWorkerUpdateViaCache; +} +impl RegistrationOptionsGetters for RegistrationOptions { + fn scope(&self) -> String { + self.scope_shim() + } + fn type_(&self) -> String { + self.type__shim() + } + #[cfg(feature = "ServiceWorkerUpdateViaCache")] + fn update_via_cache(&self) -> ServiceWorkerUpdateViaCache { + self.update_via_cache_shim() + } } impl RegistrationOptions { #[doc = "Construct a new `RegistrationOptions`."] @@ -31,14 +68,14 @@ impl RegistrationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] pub fn scope(&mut self, val: &str) -> &mut Self { - self.scope_shim(val); + self.set_scope_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`*"] pub fn type_(&mut self, val: &str) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[cfg(feature = "ServiceWorkerUpdateViaCache")] @@ -46,7 +83,7 @@ impl RegistrationOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RegistrationOptions`, `ServiceWorkerUpdateViaCache`*"] pub fn update_via_cache(&mut self, val: ServiceWorkerUpdateViaCache) -> &mut Self { - self.update_via_cache_shim(val); + self.set_update_via_cache_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RequestDeviceOptions.rs b/crates/web-sys/src/features/gen_RequestDeviceOptions.rs index 85f4a2b5498..923267cb05e 100644 --- a/crates/web-sys/src/features/gen_RequestDeviceOptions.rs +++ b/crates/web-sys/src/features/gen_RequestDeviceOptions.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type RequestDeviceOptions; + #[wasm_bindgen(method, getter = "acceptAllDevices")] + fn accept_all_devices_shim(this: &RequestDeviceOptions) -> bool; #[wasm_bindgen(method, setter = "acceptAllDevices")] - fn accept_all_devices_shim(this: &RequestDeviceOptions, val: bool); + fn set_accept_all_devices_shim(this: &RequestDeviceOptions, val: bool); + #[wasm_bindgen(method, getter = "filters")] + fn filters_shim(this: &RequestDeviceOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); + fn set_filters_shim(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "optionalServices")] + fn optional_services_shim(this: &RequestDeviceOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "optionalServices")] - fn optional_services_shim(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); + fn set_optional_services_shim(this: &RequestDeviceOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `RequestDeviceOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] +pub trait RequestDeviceOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `acceptAllDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn accept_all_devices(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn filters(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optionalServices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestDeviceOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn optional_services(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl RequestDeviceOptionsGetters for RequestDeviceOptions { + #[cfg(web_sys_unstable_apis)] + fn accept_all_devices(&self) -> bool { + self.accept_all_devices_shim() + } + #[cfg(web_sys_unstable_apis)] + fn filters(&self) -> ::js_sys::Array { + self.filters_shim() + } + #[cfg(web_sys_unstable_apis)] + fn optional_services(&self) -> ::js_sys::Array { + self.optional_services_shim() + } } #[cfg(web_sys_unstable_apis)] impl RequestDeviceOptions { @@ -42,7 +93,7 @@ impl RequestDeviceOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn accept_all_devices(&mut self, val: bool) -> &mut Self { - self.accept_all_devices_shim(val); + self.set_accept_all_devices_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +104,7 @@ impl RequestDeviceOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +115,7 @@ impl RequestDeviceOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn optional_services(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.optional_services_shim(val); + self.set_optional_services_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RequestInit.rs b/crates/web-sys/src/features/gen_RequestInit.rs index 532bdea1691..25981dce529 100644 --- a/crates/web-sys/src/features/gen_RequestInit.rs +++ b/crates/web-sys/src/features/gen_RequestInit.rs @@ -10,37 +10,173 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] pub type RequestInit; + #[wasm_bindgen(method, getter = "body")] + fn body_shim(this: &RequestInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "body")] - fn body_shim(this: &RequestInit, val: &::wasm_bindgen::JsValue); + fn set_body_shim(this: &RequestInit, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "RequestCache")] + #[wasm_bindgen(method, getter = "cache")] + fn cache_shim(this: &RequestInit) -> RequestCache; #[cfg(feature = "RequestCache")] #[wasm_bindgen(method, setter = "cache")] - fn cache_shim(this: &RequestInit, val: RequestCache); + fn set_cache_shim(this: &RequestInit, val: RequestCache); + #[cfg(feature = "RequestCredentials")] + #[wasm_bindgen(method, getter = "credentials")] + fn credentials_shim(this: &RequestInit) -> RequestCredentials; #[cfg(feature = "RequestCredentials")] #[wasm_bindgen(method, setter = "credentials")] - fn credentials_shim(this: &RequestInit, val: RequestCredentials); + fn set_credentials_shim(this: &RequestInit, val: RequestCredentials); + #[wasm_bindgen(method, getter = "headers")] + fn headers_shim(this: &RequestInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "headers")] - fn headers_shim(this: &RequestInit, val: &::wasm_bindgen::JsValue); + fn set_headers_shim(this: &RequestInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "integrity")] + fn integrity_shim(this: &RequestInit) -> String; #[wasm_bindgen(method, setter = "integrity")] - fn integrity_shim(this: &RequestInit, val: &str); + fn set_integrity_shim(this: &RequestInit, val: &str); + #[wasm_bindgen(method, getter = "method")] + fn method_shim(this: &RequestInit) -> String; #[wasm_bindgen(method, setter = "method")] - fn method_shim(this: &RequestInit, val: &str); + fn set_method_shim(this: &RequestInit, val: &str); + #[cfg(feature = "RequestMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &RequestInit) -> RequestMode; #[cfg(feature = "RequestMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &RequestInit, val: RequestMode); + fn set_mode_shim(this: &RequestInit, val: RequestMode); + #[cfg(feature = "ObserverCallback")] + #[wasm_bindgen(method, getter = "observe")] + fn observe_shim(this: &RequestInit) -> ObserverCallback; #[cfg(feature = "ObserverCallback")] #[wasm_bindgen(method, setter = "observe")] - fn observe_shim(this: &RequestInit, val: &ObserverCallback); + fn set_observe_shim(this: &RequestInit, val: &ObserverCallback); + #[cfg(feature = "RequestRedirect")] + #[wasm_bindgen(method, getter = "redirect")] + fn redirect_shim(this: &RequestInit) -> RequestRedirect; #[cfg(feature = "RequestRedirect")] #[wasm_bindgen(method, setter = "redirect")] - fn redirect_shim(this: &RequestInit, val: RequestRedirect); + fn set_redirect_shim(this: &RequestInit, val: RequestRedirect); + #[wasm_bindgen(method, getter = "referrer")] + fn referrer_shim(this: &RequestInit) -> String; #[wasm_bindgen(method, setter = "referrer")] - fn referrer_shim(this: &RequestInit, val: &str); + fn set_referrer_shim(this: &RequestInit, val: &str); + #[cfg(feature = "ReferrerPolicy")] + #[wasm_bindgen(method, getter = "referrerPolicy")] + fn referrer_policy_shim(this: &RequestInit) -> ReferrerPolicy; #[cfg(feature = "ReferrerPolicy")] #[wasm_bindgen(method, setter = "referrerPolicy")] - fn referrer_policy_shim(this: &RequestInit, val: ReferrerPolicy); + fn set_referrer_policy_shim(this: &RequestInit, val: ReferrerPolicy); + #[cfg(feature = "AbortSignal")] + #[wasm_bindgen(method, getter = "signal")] + fn signal_shim(this: &RequestInit) -> Option; #[cfg(feature = "AbortSignal")] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &RequestInit, val: Option<&AbortSignal>); + fn set_signal_shim(this: &RequestInit, val: Option<&AbortSignal>); +} +#[doc = "The trait to access properties on the `RequestInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] +pub trait RequestInitGetters { + #[doc = "Get the `body` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + fn body(&self) -> ::wasm_bindgen::JsValue; + #[cfg(feature = "RequestCache")] + #[doc = "Get the `cache` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCache`, `RequestInit`*"] + fn cache(&self) -> RequestCache; + #[cfg(feature = "RequestCredentials")] + #[doc = "Get the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `RequestInit`*"] + fn credentials(&self) -> RequestCredentials; + #[doc = "Get the `headers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + fn headers(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `integrity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + fn integrity(&self) -> String; + #[doc = "Get the `method` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + fn method(&self) -> String; + #[cfg(feature = "RequestMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestMode`*"] + fn mode(&self) -> RequestMode; + #[cfg(feature = "ObserverCallback")] + #[doc = "Get the `observe` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`, `RequestInit`*"] + fn observe(&self) -> ObserverCallback; + #[cfg(feature = "RequestRedirect")] + #[doc = "Get the `redirect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestRedirect`*"] + fn redirect(&self) -> RequestRedirect; + #[doc = "Get the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] + fn referrer(&self) -> String; + #[cfg(feature = "ReferrerPolicy")] + #[doc = "Get the `referrerPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReferrerPolicy`, `RequestInit`*"] + fn referrer_policy(&self) -> ReferrerPolicy; + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `RequestInit`*"] + fn signal(&self) -> Option; +} +impl RequestInitGetters for RequestInit { + fn body(&self) -> ::wasm_bindgen::JsValue { + self.body_shim() + } + #[cfg(feature = "RequestCache")] + fn cache(&self) -> RequestCache { + self.cache_shim() + } + #[cfg(feature = "RequestCredentials")] + fn credentials(&self) -> RequestCredentials { + self.credentials_shim() + } + fn headers(&self) -> ::wasm_bindgen::JsValue { + self.headers_shim() + } + fn integrity(&self) -> String { + self.integrity_shim() + } + fn method(&self) -> String { + self.method_shim() + } + #[cfg(feature = "RequestMode")] + fn mode(&self) -> RequestMode { + self.mode_shim() + } + #[cfg(feature = "ObserverCallback")] + fn observe(&self) -> ObserverCallback { + self.observe_shim() + } + #[cfg(feature = "RequestRedirect")] + fn redirect(&self) -> RequestRedirect { + self.redirect_shim() + } + fn referrer(&self) -> String { + self.referrer_shim() + } + #[cfg(feature = "ReferrerPolicy")] + fn referrer_policy(&self) -> ReferrerPolicy { + self.referrer_policy_shim() + } + #[cfg(feature = "AbortSignal")] + fn signal(&self) -> Option { + self.signal_shim() + } } impl RequestInit { #[doc = "Construct a new `RequestInit`."] @@ -55,7 +191,7 @@ impl RequestInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] pub fn body(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.body_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_body_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } #[cfg(feature = "RequestCache")] @@ -63,7 +199,7 @@ impl RequestInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestCache`, `RequestInit`*"] pub fn cache(&mut self, val: RequestCache) -> &mut Self { - self.cache_shim(val); + self.set_cache_shim(val); self } #[cfg(feature = "RequestCredentials")] @@ -71,28 +207,28 @@ impl RequestInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `RequestInit`*"] pub fn credentials(&mut self, val: RequestCredentials) -> &mut Self { - self.credentials_shim(val); + self.set_credentials_shim(val); self } #[doc = "Change the `headers` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] pub fn headers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.headers_shim(val); + self.set_headers_shim(val); self } #[doc = "Change the `integrity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] pub fn integrity(&mut self, val: &str) -> &mut Self { - self.integrity_shim(val); + self.set_integrity_shim(val); self } #[doc = "Change the `method` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] pub fn method(&mut self, val: &str) -> &mut Self { - self.method_shim(val); + self.set_method_shim(val); self } #[cfg(feature = "RequestMode")] @@ -100,7 +236,7 @@ impl RequestInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestMode`*"] pub fn mode(&mut self, val: RequestMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } #[cfg(feature = "ObserverCallback")] @@ -108,7 +244,7 @@ impl RequestInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ObserverCallback`, `RequestInit`*"] pub fn observe(&mut self, val: &ObserverCallback) -> &mut Self { - self.observe_shim(val); + self.set_observe_shim(val); self } #[cfg(feature = "RequestRedirect")] @@ -116,14 +252,14 @@ impl RequestInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`, `RequestRedirect`*"] pub fn redirect(&mut self, val: RequestRedirect) -> &mut Self { - self.redirect_shim(val); + self.set_redirect_shim(val); self } #[doc = "Change the `referrer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestInit`*"] pub fn referrer(&mut self, val: &str) -> &mut Self { - self.referrer_shim(val); + self.set_referrer_shim(val); self } #[cfg(feature = "ReferrerPolicy")] @@ -131,7 +267,7 @@ impl RequestInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReferrerPolicy`, `RequestInit`*"] pub fn referrer_policy(&mut self, val: ReferrerPolicy) -> &mut Self { - self.referrer_policy_shim(val); + self.set_referrer_policy_shim(val); self } #[cfg(feature = "AbortSignal")] @@ -139,7 +275,7 @@ impl RequestInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `RequestInit`*"] pub fn signal(&mut self, val: Option<&AbortSignal>) -> &mut Self { - self.signal_shim(val); + self.set_signal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs b/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs index ea79accc1ef..7fea4704087 100644 --- a/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs +++ b/crates/web-sys/src/features/gen_RequestMediaKeySystemAccessNotification.rs @@ -10,11 +10,39 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] pub type RequestMediaKeySystemAccessNotification; + #[wasm_bindgen(method, getter = "keySystem")] + fn key_system_shim(this: &RequestMediaKeySystemAccessNotification) -> String; #[wasm_bindgen(method, setter = "keySystem")] - fn key_system_shim(this: &RequestMediaKeySystemAccessNotification, val: &str); + fn set_key_system_shim(this: &RequestMediaKeySystemAccessNotification, val: &str); + #[cfg(feature = "MediaKeySystemStatus")] + #[wasm_bindgen(method, getter = "status")] + fn status_shim(this: &RequestMediaKeySystemAccessNotification) -> MediaKeySystemStatus; #[cfg(feature = "MediaKeySystemStatus")] #[wasm_bindgen(method, setter = "status")] - fn status_shim(this: &RequestMediaKeySystemAccessNotification, val: MediaKeySystemStatus); + fn set_status_shim(this: &RequestMediaKeySystemAccessNotification, val: MediaKeySystemStatus); +} +#[doc = "The trait to access properties on the `RequestMediaKeySystemAccessNotification` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] +pub trait RequestMediaKeySystemAccessNotificationGetters { + #[doc = "Get the `keySystem` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] + fn key_system(&self) -> String; + #[cfg(feature = "MediaKeySystemStatus")] + #[doc = "Get the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemStatus`, `RequestMediaKeySystemAccessNotification`*"] + fn status(&self) -> MediaKeySystemStatus; +} +impl RequestMediaKeySystemAccessNotificationGetters for RequestMediaKeySystemAccessNotification { + fn key_system(&self) -> String { + self.key_system_shim() + } + #[cfg(feature = "MediaKeySystemStatus")] + fn status(&self) -> MediaKeySystemStatus { + self.status_shim() + } } impl RequestMediaKeySystemAccessNotification { #[cfg(feature = "MediaKeySystemStatus")] @@ -24,15 +52,15 @@ impl RequestMediaKeySystemAccessNotification { pub fn new(key_system: &str, status: MediaKeySystemStatus) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.key_system(key_system); - ret.status(status); + Self::key_system(&mut ret, key_system); + Self::status(&mut ret, status); ret } #[doc = "Change the `keySystem` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestMediaKeySystemAccessNotification`*"] pub fn key_system(&mut self, val: &str) -> &mut Self { - self.key_system_shim(val); + self.set_key_system_shim(val); self } #[cfg(feature = "MediaKeySystemStatus")] @@ -40,7 +68,7 @@ impl RequestMediaKeySystemAccessNotification { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemStatus`, `RequestMediaKeySystemAccessNotification`*"] pub fn status(&mut self, val: MediaKeySystemStatus) -> &mut Self { - self.status_shim(val); + self.set_status_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ResizeObserverOptions.rs b/crates/web-sys/src/features/gen_ResizeObserverOptions.rs index 322f2fbd507..37f776e7ef1 100644 --- a/crates/web-sys/src/features/gen_ResizeObserverOptions.rs +++ b/crates/web-sys/src/features/gen_ResizeObserverOptions.rs @@ -11,8 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ResizeObserverOptions`*"] pub type ResizeObserverOptions; #[cfg(feature = "ResizeObserverBoxOptions")] + #[wasm_bindgen(method, getter = "box")] + fn box__shim(this: &ResizeObserverOptions) -> ResizeObserverBoxOptions; + #[cfg(feature = "ResizeObserverBoxOptions")] #[wasm_bindgen(method, setter = "box")] - fn box__shim(this: &ResizeObserverOptions, val: ResizeObserverBoxOptions); + fn set_box__shim(this: &ResizeObserverOptions, val: ResizeObserverBoxOptions); +} +#[doc = "The trait to access properties on the `ResizeObserverOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ResizeObserverOptions`*"] +pub trait ResizeObserverOptionsGetters { + #[cfg(feature = "ResizeObserverBoxOptions")] + #[doc = "Get the `box` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*"] + fn box_(&self) -> ResizeObserverBoxOptions; +} +impl ResizeObserverOptionsGetters for ResizeObserverOptions { + #[cfg(feature = "ResizeObserverBoxOptions")] + fn box_(&self) -> ResizeObserverBoxOptions { + self.box__shim() + } } impl ResizeObserverOptions { #[doc = "Construct a new `ResizeObserverOptions`."] @@ -28,7 +47,7 @@ impl ResizeObserverOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResizeObserverBoxOptions`, `ResizeObserverOptions`*"] pub fn box_(&mut self, val: ResizeObserverBoxOptions) -> &mut Self { - self.box__shim(val); + self.set_box__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ResponseInit.rs b/crates/web-sys/src/features/gen_ResponseInit.rs index 4466e72567d..1f4907ac3ae 100644 --- a/crates/web-sys/src/features/gen_ResponseInit.rs +++ b/crates/web-sys/src/features/gen_ResponseInit.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] pub type ResponseInit; + #[wasm_bindgen(method, getter = "headers")] + fn headers_shim(this: &ResponseInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "headers")] - fn headers_shim(this: &ResponseInit, val: &::wasm_bindgen::JsValue); + fn set_headers_shim(this: &ResponseInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "status")] + fn status_shim(this: &ResponseInit) -> u16; #[wasm_bindgen(method, setter = "status")] - fn status_shim(this: &ResponseInit, val: u16); + fn set_status_shim(this: &ResponseInit, val: u16); + #[wasm_bindgen(method, getter = "statusText")] + fn status_text_shim(this: &ResponseInit) -> String; #[wasm_bindgen(method, setter = "statusText")] - fn status_text_shim(this: &ResponseInit, val: &str); + fn set_status_text_shim(this: &ResponseInit, val: &str); +} +#[doc = "The trait to access properties on the `ResponseInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] +pub trait ResponseInitGetters { + #[doc = "Get the `headers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + fn headers(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `status` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + fn status(&self) -> u16; + #[doc = "Get the `statusText` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] + fn status_text(&self) -> String; +} +impl ResponseInitGetters for ResponseInit { + fn headers(&self) -> ::wasm_bindgen::JsValue { + self.headers_shim() + } + fn status(&self) -> u16 { + self.status_shim() + } + fn status_text(&self) -> String { + self.status_text_shim() + } } impl ResponseInit { #[doc = "Construct a new `ResponseInit`."] @@ -30,21 +64,21 @@ impl ResponseInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] pub fn headers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.headers_shim(val); + self.set_headers_shim(val); self } #[doc = "Change the `status` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] pub fn status(&mut self, val: u16) -> &mut Self { - self.status_shim(val); + self.set_status_shim(val); self } #[doc = "Change the `statusText` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ResponseInit`*"] pub fn status_text(&mut self, val: &str) -> &mut Self { - self.status_text_shim(val); + self.set_status_text_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RsaHashedImportParams.rs b/crates/web-sys/src/features/gen_RsaHashedImportParams.rs index fd4c25042b3..412f5fe5ff0 100644 --- a/crates/web-sys/src/features/gen_RsaHashedImportParams.rs +++ b/crates/web-sys/src/features/gen_RsaHashedImportParams.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] pub type RsaHashedImportParams; + #[wasm_bindgen(method, getter = "hash")] + fn hash_shim(this: &RsaHashedImportParams) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "hash")] - fn hash_shim(this: &RsaHashedImportParams, val: &::wasm_bindgen::JsValue); + fn set_hash_shim(this: &RsaHashedImportParams, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `RsaHashedImportParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] +pub trait RsaHashedImportParamsGetters { + #[doc = "Get the `hash` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] + fn hash(&self) -> ::wasm_bindgen::JsValue; +} +impl RsaHashedImportParamsGetters for RsaHashedImportParams { + fn hash(&self) -> ::wasm_bindgen::JsValue { + self.hash_shim() + } } impl RsaHashedImportParams { #[doc = "Construct a new `RsaHashedImportParams`."] @@ -20,14 +36,14 @@ impl RsaHashedImportParams { pub fn new(hash: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.hash(hash); + Self::hash(&mut ret, hash); ret } #[doc = "Change the `hash` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaHashedImportParams`*"] pub fn hash(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.hash_shim(val); + self.set_hash_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RsaOaepParams.rs b/crates/web-sys/src/features/gen_RsaOaepParams.rs index a500ce24ee7..99e39bc9e84 100644 --- a/crates/web-sys/src/features/gen_RsaOaepParams.rs +++ b/crates/web-sys/src/features/gen_RsaOaepParams.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] pub type RsaOaepParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &RsaOaepParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &RsaOaepParams, val: &str); + fn set_name_shim(this: &RsaOaepParams, val: &str); + #[wasm_bindgen(method, getter = "label")] + fn label_shim(this: &RsaOaepParams) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "label")] - fn label_shim(this: &RsaOaepParams, val: &::js_sys::Object); + fn set_label_shim(this: &RsaOaepParams, val: &::js_sys::Object); +} +#[doc = "The trait to access properties on the `RsaOaepParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] +pub trait RsaOaepParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] + fn name(&self) -> String; + #[doc = "Get the `label` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] + fn label(&self) -> ::js_sys::Object; +} +impl RsaOaepParamsGetters for RsaOaepParams { + fn name(&self) -> String { + self.name_shim() + } + fn label(&self) -> ::js_sys::Object { + self.label_shim() + } } impl RsaOaepParams { #[doc = "Construct a new `RsaOaepParams`."] @@ -22,21 +47,21 @@ impl RsaOaepParams { pub fn new(name: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `label` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOaepParams`*"] pub fn label(&mut self, val: &::js_sys::Object) -> &mut Self { - self.label_shim(val); + self.set_label_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs b/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs index 4071e4cd036..0b85e7c93d5 100644 --- a/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs +++ b/crates/web-sys/src/features/gen_RsaOtherPrimesInfo.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] pub type RsaOtherPrimesInfo; + #[wasm_bindgen(method, getter = "d")] + fn d_shim(this: &RsaOtherPrimesInfo) -> String; #[wasm_bindgen(method, setter = "d")] - fn d_shim(this: &RsaOtherPrimesInfo, val: &str); + fn set_d_shim(this: &RsaOtherPrimesInfo, val: &str); + #[wasm_bindgen(method, getter = "r")] + fn r_shim(this: &RsaOtherPrimesInfo) -> String; #[wasm_bindgen(method, setter = "r")] - fn r_shim(this: &RsaOtherPrimesInfo, val: &str); + fn set_r_shim(this: &RsaOtherPrimesInfo, val: &str); + #[wasm_bindgen(method, getter = "t")] + fn t_shim(this: &RsaOtherPrimesInfo) -> String; #[wasm_bindgen(method, setter = "t")] - fn t_shim(this: &RsaOtherPrimesInfo, val: &str); + fn set_t_shim(this: &RsaOtherPrimesInfo, val: &str); +} +#[doc = "The trait to access properties on the `RsaOtherPrimesInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] +pub trait RsaOtherPrimesInfoGetters { + #[doc = "Get the `d` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + fn d(&self) -> String; + #[doc = "Get the `r` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + fn r(&self) -> String; + #[doc = "Get the `t` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] + fn t(&self) -> String; +} +impl RsaOtherPrimesInfoGetters for RsaOtherPrimesInfo { + fn d(&self) -> String { + self.d_shim() + } + fn r(&self) -> String { + self.r_shim() + } + fn t(&self) -> String { + self.t_shim() + } } impl RsaOtherPrimesInfo { #[doc = "Construct a new `RsaOtherPrimesInfo`."] @@ -24,30 +58,30 @@ impl RsaOtherPrimesInfo { pub fn new(d: &str, r: &str, t: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.d(d); - ret.r(r); - ret.t(t); + Self::d(&mut ret, d); + Self::r(&mut ret, r); + Self::t(&mut ret, t); ret } #[doc = "Change the `d` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] pub fn d(&mut self, val: &str) -> &mut Self { - self.d_shim(val); + self.set_d_shim(val); self } #[doc = "Change the `r` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] pub fn r(&mut self, val: &str) -> &mut Self { - self.r_shim(val); + self.set_r_shim(val); self } #[doc = "Change the `t` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaOtherPrimesInfo`*"] pub fn t(&mut self, val: &str) -> &mut Self { - self.t_shim(val); + self.set_t_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RsaPssParams.rs b/crates/web-sys/src/features/gen_RsaPssParams.rs index 49ece0023e9..4e2bd65223e 100644 --- a/crates/web-sys/src/features/gen_RsaPssParams.rs +++ b/crates/web-sys/src/features/gen_RsaPssParams.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] pub type RsaPssParams; + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &RsaPssParams) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &RsaPssParams, val: &str); + fn set_name_shim(this: &RsaPssParams, val: &str); + #[wasm_bindgen(method, getter = "saltLength")] + fn salt_length_shim(this: &RsaPssParams) -> u32; #[wasm_bindgen(method, setter = "saltLength")] - fn salt_length_shim(this: &RsaPssParams, val: u32); + fn set_salt_length_shim(this: &RsaPssParams, val: u32); +} +#[doc = "The trait to access properties on the `RsaPssParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] +pub trait RsaPssParamsGetters { + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] + fn name(&self) -> String; + #[doc = "Get the `saltLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] + fn salt_length(&self) -> u32; +} +impl RsaPssParamsGetters for RsaPssParams { + fn name(&self) -> String { + self.name_shim() + } + fn salt_length(&self) -> u32 { + self.salt_length_shim() + } } impl RsaPssParams { #[doc = "Construct a new `RsaPssParams`."] @@ -22,22 +47,22 @@ impl RsaPssParams { pub fn new(name: &str, salt_length: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); - ret.salt_length(salt_length); + Self::name(&mut ret, name); + Self::salt_length(&mut ret, salt_length); ret } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `saltLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RsaPssParams`*"] pub fn salt_length(&mut self, val: u32) -> &mut Self { - self.salt_length_shim(val); + self.set_salt_length_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcAnswerOptions.rs b/crates/web-sys/src/features/gen_RtcAnswerOptions.rs index de165d0a419..2d9c8f0cbdd 100644 --- a/crates/web-sys/src/features/gen_RtcAnswerOptions.rs +++ b/crates/web-sys/src/features/gen_RtcAnswerOptions.rs @@ -11,6 +11,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcAnswerOptions`*"] pub type RtcAnswerOptions; } +#[doc = "The trait to access properties on the `RtcAnswerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcAnswerOptions`*"] +pub trait RtcAnswerOptionsGetters {} +impl RtcAnswerOptionsGetters for RtcAnswerOptions {} impl RtcAnswerOptions { #[doc = "Construct a new `RtcAnswerOptions`."] #[doc = ""] diff --git a/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs b/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs index 7eab6969f61..d786c8f6d6d 100644 --- a/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs +++ b/crates/web-sys/src/features/gen_RtcCertificateExpiration.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] pub type RtcCertificateExpiration; + #[wasm_bindgen(method, getter = "expires")] + fn expires_shim(this: &RtcCertificateExpiration) -> f64; #[wasm_bindgen(method, setter = "expires")] - fn expires_shim(this: &RtcCertificateExpiration, val: f64); + fn set_expires_shim(this: &RtcCertificateExpiration, val: f64); +} +#[doc = "The trait to access properties on the `RtcCertificateExpiration` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] +pub trait RtcCertificateExpirationGetters { + #[doc = "Get the `expires` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] + fn expires(&self) -> f64; +} +impl RtcCertificateExpirationGetters for RtcCertificateExpiration { + fn expires(&self) -> f64 { + self.expires_shim() + } } impl RtcCertificateExpiration { #[doc = "Construct a new `RtcCertificateExpiration`."] @@ -26,7 +42,7 @@ impl RtcCertificateExpiration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCertificateExpiration`*"] pub fn expires(&mut self, val: f64) -> &mut Self { - self.expires_shim(val); + self.set_expires_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcCodecStats.rs b/crates/web-sys/src/features/gen_RtcCodecStats.rs index 3fbd0842d81..8c78676b9f2 100644 --- a/crates/web-sys/src/features/gen_RtcCodecStats.rs +++ b/crates/web-sys/src/features/gen_RtcCodecStats.rs @@ -10,23 +10,105 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] pub type RtcCodecStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcCodecStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcCodecStats, val: &str); + fn set_id_shim(this: &RtcCodecStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcCodecStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcCodecStats, val: f64); + fn set_timestamp_shim(this: &RtcCodecStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcCodecStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcCodecStats, val: RtcStatsType); + fn set_type__shim(this: &RtcCodecStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "channels")] + fn channels_shim(this: &RtcCodecStats) -> u32; #[wasm_bindgen(method, setter = "channels")] - fn channels_shim(this: &RtcCodecStats, val: u32); + fn set_channels_shim(this: &RtcCodecStats, val: u32); + #[wasm_bindgen(method, getter = "clockRate")] + fn clock_rate_shim(this: &RtcCodecStats) -> u32; #[wasm_bindgen(method, setter = "clockRate")] - fn clock_rate_shim(this: &RtcCodecStats, val: u32); + fn set_clock_rate_shim(this: &RtcCodecStats, val: u32); + #[wasm_bindgen(method, getter = "codec")] + fn codec_shim(this: &RtcCodecStats) -> String; #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &RtcCodecStats, val: &str); + fn set_codec_shim(this: &RtcCodecStats, val: &str); + #[wasm_bindgen(method, getter = "parameters")] + fn parameters_shim(this: &RtcCodecStats) -> String; #[wasm_bindgen(method, setter = "parameters")] - fn parameters_shim(this: &RtcCodecStats, val: &str); + fn set_parameters_shim(this: &RtcCodecStats, val: &str); + #[wasm_bindgen(method, getter = "payloadType")] + fn payload_type_shim(this: &RtcCodecStats) -> u32; #[wasm_bindgen(method, setter = "payloadType")] - fn payload_type_shim(this: &RtcCodecStats, val: u32); + fn set_payload_type_shim(this: &RtcCodecStats, val: u32); +} +#[doc = "The trait to access properties on the `RtcCodecStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] +pub trait RtcCodecStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`, `RtcStatsType`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + fn channels(&self) -> u32; + #[doc = "Get the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + fn clock_rate(&self) -> u32; + #[doc = "Get the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + fn codec(&self) -> String; + #[doc = "Get the `parameters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + fn parameters(&self) -> String; + #[doc = "Get the `payloadType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] + fn payload_type(&self) -> u32; +} +impl RtcCodecStatsGetters for RtcCodecStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn channels(&self) -> u32 { + self.channels_shim() + } + fn clock_rate(&self) -> u32 { + self.clock_rate_shim() + } + fn codec(&self) -> String { + self.codec_shim() + } + fn parameters(&self) -> String { + self.parameters_shim() + } + fn payload_type(&self) -> u32 { + self.payload_type_shim() + } } impl RtcCodecStats { #[doc = "Construct a new `RtcCodecStats`."] @@ -41,14 +123,14 @@ impl RtcCodecStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -56,42 +138,42 @@ impl RtcCodecStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`, `RtcStatsType`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `channels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] pub fn channels(&mut self, val: u32) -> &mut Self { - self.channels_shim(val); + self.set_channels_shim(val); self } #[doc = "Change the `clockRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] pub fn clock_rate(&mut self, val: u32) -> &mut Self { - self.clock_rate_shim(val); + self.set_clock_rate_shim(val); self } #[doc = "Change the `codec` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); + self.set_codec_shim(val); self } #[doc = "Change the `parameters` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] pub fn parameters(&mut self, val: &str) -> &mut Self { - self.parameters_shim(val); + self.set_parameters_shim(val); self } #[doc = "Change the `payloadType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcCodecStats`*"] pub fn payload_type(&mut self, val: u32) -> &mut Self { - self.payload_type_shim(val); + self.set_payload_type_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcConfiguration.rs b/crates/web-sys/src/features/gen_RtcConfiguration.rs index 9d73017a32e..aeafb90f984 100644 --- a/crates/web-sys/src/features/gen_RtcConfiguration.rs +++ b/crates/web-sys/src/features/gen_RtcConfiguration.rs @@ -11,17 +11,75 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] pub type RtcConfiguration; #[cfg(feature = "RtcBundlePolicy")] + #[wasm_bindgen(method, getter = "bundlePolicy")] + fn bundle_policy_shim(this: &RtcConfiguration) -> RtcBundlePolicy; + #[cfg(feature = "RtcBundlePolicy")] #[wasm_bindgen(method, setter = "bundlePolicy")] - fn bundle_policy_shim(this: &RtcConfiguration, val: RtcBundlePolicy); + fn set_bundle_policy_shim(this: &RtcConfiguration, val: RtcBundlePolicy); + #[wasm_bindgen(method, getter = "certificates")] + fn certificates_shim(this: &RtcConfiguration) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "certificates")] - fn certificates_shim(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); + fn set_certificates_shim(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "iceServers")] + fn ice_servers_shim(this: &RtcConfiguration) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "iceServers")] - fn ice_servers_shim(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); + fn set_ice_servers_shim(this: &RtcConfiguration, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "RtcIceTransportPolicy")] + #[wasm_bindgen(method, getter = "iceTransportPolicy")] + fn ice_transport_policy_shim(this: &RtcConfiguration) -> RtcIceTransportPolicy; #[cfg(feature = "RtcIceTransportPolicy")] #[wasm_bindgen(method, setter = "iceTransportPolicy")] - fn ice_transport_policy_shim(this: &RtcConfiguration, val: RtcIceTransportPolicy); + fn set_ice_transport_policy_shim(this: &RtcConfiguration, val: RtcIceTransportPolicy); + #[wasm_bindgen(method, getter = "peerIdentity")] + fn peer_identity_shim(this: &RtcConfiguration) -> Option; #[wasm_bindgen(method, setter = "peerIdentity")] - fn peer_identity_shim(this: &RtcConfiguration, val: Option<&str>); + fn set_peer_identity_shim(this: &RtcConfiguration, val: Option<&str>); +} +#[doc = "The trait to access properties on the `RtcConfiguration` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] +pub trait RtcConfigurationGetters { + #[cfg(feature = "RtcBundlePolicy")] + #[doc = "Get the `bundlePolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcBundlePolicy`, `RtcConfiguration`*"] + fn bundle_policy(&self) -> RtcBundlePolicy; + #[doc = "Get the `certificates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + fn certificates(&self) -> ::js_sys::Array; + #[doc = "Get the `iceServers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + fn ice_servers(&self) -> ::js_sys::Array; + #[cfg(feature = "RtcIceTransportPolicy")] + #[doc = "Get the `iceTransportPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcIceTransportPolicy`*"] + fn ice_transport_policy(&self) -> RtcIceTransportPolicy; + #[doc = "Get the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] + fn peer_identity(&self) -> Option; +} +impl RtcConfigurationGetters for RtcConfiguration { + #[cfg(feature = "RtcBundlePolicy")] + fn bundle_policy(&self) -> RtcBundlePolicy { + self.bundle_policy_shim() + } + fn certificates(&self) -> ::js_sys::Array { + self.certificates_shim() + } + fn ice_servers(&self) -> ::js_sys::Array { + self.ice_servers_shim() + } + #[cfg(feature = "RtcIceTransportPolicy")] + fn ice_transport_policy(&self) -> RtcIceTransportPolicy { + self.ice_transport_policy_shim() + } + fn peer_identity(&self) -> Option { + self.peer_identity_shim() + } } impl RtcConfiguration { #[doc = "Construct a new `RtcConfiguration`."] @@ -37,21 +95,21 @@ impl RtcConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcBundlePolicy`, `RtcConfiguration`*"] pub fn bundle_policy(&mut self, val: RtcBundlePolicy) -> &mut Self { - self.bundle_policy_shim(val); + self.set_bundle_policy_shim(val); self } #[doc = "Change the `certificates` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] pub fn certificates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.certificates_shim(val); + self.set_certificates_shim(val); self } #[doc = "Change the `iceServers` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] pub fn ice_servers(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ice_servers_shim(val); + self.set_ice_servers_shim(val); self } #[cfg(feature = "RtcIceTransportPolicy")] @@ -59,14 +117,14 @@ impl RtcConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`, `RtcIceTransportPolicy`*"] pub fn ice_transport_policy(&mut self, val: RtcIceTransportPolicy) -> &mut Self { - self.ice_transport_policy_shim(val); + self.set_ice_transport_policy_shim(val); self } #[doc = "Change the `peerIdentity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcConfiguration`*"] pub fn peer_identity(&mut self, val: Option<&str>) -> &mut Self { - self.peer_identity_shim(val); + self.set_peer_identity_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs b/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs index bf64ac7bcd1..88f95839117 100644 --- a/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcDataChannelEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] pub type RtcDataChannelEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &RtcDataChannelEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &RtcDataChannelEventInit, val: bool); + fn set_bubbles_shim(this: &RtcDataChannelEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &RtcDataChannelEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &RtcDataChannelEventInit, val: bool); + fn set_cancelable_shim(this: &RtcDataChannelEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &RtcDataChannelEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &RtcDataChannelEventInit, val: bool); + fn set_composed_shim(this: &RtcDataChannelEventInit, val: bool); + #[cfg(feature = "RtcDataChannel")] + #[wasm_bindgen(method, getter = "channel")] + fn channel_shim(this: &RtcDataChannelEventInit) -> RtcDataChannel; #[cfg(feature = "RtcDataChannel")] #[wasm_bindgen(method, setter = "channel")] - fn channel_shim(this: &RtcDataChannelEventInit, val: &RtcDataChannel); + fn set_channel_shim(this: &RtcDataChannelEventInit, val: &RtcDataChannel); +} +#[doc = "The trait to access properties on the `RtcDataChannelEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] +pub trait RtcDataChannelEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "RtcDataChannel")] + #[doc = "Get the `channel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelEventInit`*"] + fn channel(&self) -> RtcDataChannel; +} +impl RtcDataChannelEventInitGetters for RtcDataChannelEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "RtcDataChannel")] + fn channel(&self) -> RtcDataChannel { + self.channel_shim() + } } impl RtcDataChannelEventInit { #[cfg(feature = "RtcDataChannel")] @@ -28,28 +74,28 @@ impl RtcDataChannelEventInit { pub fn new(channel: &RtcDataChannel) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.channel(channel); + Self::channel(&mut ret, channel); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "RtcDataChannel")] @@ -57,7 +103,7 @@ impl RtcDataChannelEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannel`, `RtcDataChannelEventInit`*"] pub fn channel(&mut self, val: &RtcDataChannel) -> &mut Self { - self.channel_shim(val); + self.set_channel_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcDataChannelInit.rs b/crates/web-sys/src/features/gen_RtcDataChannelInit.rs index 915662ba9a1..d3709709c6e 100644 --- a/crates/web-sys/src/features/gen_RtcDataChannelInit.rs +++ b/crates/web-sys/src/features/gen_RtcDataChannelInit.rs @@ -10,20 +10,90 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] pub type RtcDataChannelInit; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcDataChannelInit) -> u16; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcDataChannelInit, val: u16); + fn set_id_shim(this: &RtcDataChannelInit, val: u16); + #[wasm_bindgen(method, getter = "maxPacketLifeTime")] + fn max_packet_life_time_shim(this: &RtcDataChannelInit) -> u16; #[wasm_bindgen(method, setter = "maxPacketLifeTime")] - fn max_packet_life_time_shim(this: &RtcDataChannelInit, val: u16); + fn set_max_packet_life_time_shim(this: &RtcDataChannelInit, val: u16); + #[wasm_bindgen(method, getter = "maxRetransmitTime")] + fn max_retransmit_time_shim(this: &RtcDataChannelInit) -> u16; #[wasm_bindgen(method, setter = "maxRetransmitTime")] - fn max_retransmit_time_shim(this: &RtcDataChannelInit, val: u16); + fn set_max_retransmit_time_shim(this: &RtcDataChannelInit, val: u16); + #[wasm_bindgen(method, getter = "maxRetransmits")] + fn max_retransmits_shim(this: &RtcDataChannelInit) -> u16; #[wasm_bindgen(method, setter = "maxRetransmits")] - fn max_retransmits_shim(this: &RtcDataChannelInit, val: u16); + fn set_max_retransmits_shim(this: &RtcDataChannelInit, val: u16); + #[wasm_bindgen(method, getter = "negotiated")] + fn negotiated_shim(this: &RtcDataChannelInit) -> bool; #[wasm_bindgen(method, setter = "negotiated")] - fn negotiated_shim(this: &RtcDataChannelInit, val: bool); + fn set_negotiated_shim(this: &RtcDataChannelInit, val: bool); + #[wasm_bindgen(method, getter = "ordered")] + fn ordered_shim(this: &RtcDataChannelInit) -> bool; #[wasm_bindgen(method, setter = "ordered")] - fn ordered_shim(this: &RtcDataChannelInit, val: bool); + fn set_ordered_shim(this: &RtcDataChannelInit, val: bool); + #[wasm_bindgen(method, getter = "protocol")] + fn protocol_shim(this: &RtcDataChannelInit) -> String; #[wasm_bindgen(method, setter = "protocol")] - fn protocol_shim(this: &RtcDataChannelInit, val: &str); + fn set_protocol_shim(this: &RtcDataChannelInit, val: &str); +} +#[doc = "The trait to access properties on the `RtcDataChannelInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] +pub trait RtcDataChannelInitGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + fn id(&self) -> u16; + #[doc = "Get the `maxPacketLifeTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + fn max_packet_life_time(&self) -> u16; + #[doc = "Get the `maxRetransmitTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + fn max_retransmit_time(&self) -> u16; + #[doc = "Get the `maxRetransmits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + fn max_retransmits(&self) -> u16; + #[doc = "Get the `negotiated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + fn negotiated(&self) -> bool; + #[doc = "Get the `ordered` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + fn ordered(&self) -> bool; + #[doc = "Get the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] + fn protocol(&self) -> String; +} +impl RtcDataChannelInitGetters for RtcDataChannelInit { + fn id(&self) -> u16 { + self.id_shim() + } + fn max_packet_life_time(&self) -> u16 { + self.max_packet_life_time_shim() + } + fn max_retransmit_time(&self) -> u16 { + self.max_retransmit_time_shim() + } + fn max_retransmits(&self) -> u16 { + self.max_retransmits_shim() + } + fn negotiated(&self) -> bool { + self.negotiated_shim() + } + fn ordered(&self) -> bool { + self.ordered_shim() + } + fn protocol(&self) -> String { + self.protocol_shim() + } } impl RtcDataChannelInit { #[doc = "Construct a new `RtcDataChannelInit`."] @@ -38,49 +108,49 @@ impl RtcDataChannelInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] pub fn id(&mut self, val: u16) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `maxPacketLifeTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] pub fn max_packet_life_time(&mut self, val: u16) -> &mut Self { - self.max_packet_life_time_shim(val); + self.set_max_packet_life_time_shim(val); self } #[doc = "Change the `maxRetransmitTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] pub fn max_retransmit_time(&mut self, val: u16) -> &mut Self { - self.max_retransmit_time_shim(val); + self.set_max_retransmit_time_shim(val); self } #[doc = "Change the `maxRetransmits` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] pub fn max_retransmits(&mut self, val: u16) -> &mut Self { - self.max_retransmits_shim(val); + self.set_max_retransmits_shim(val); self } #[doc = "Change the `negotiated` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] pub fn negotiated(&mut self, val: bool) -> &mut Self { - self.negotiated_shim(val); + self.set_negotiated_shim(val); self } #[doc = "Change the `ordered` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] pub fn ordered(&mut self, val: bool) -> &mut Self { - self.ordered_shim(val); + self.set_ordered_shim(val); self } #[doc = "Change the `protocol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDataChannelInit`*"] pub fn protocol(&mut self, val: &str) -> &mut Self { - self.protocol_shim(val); + self.set_protocol_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcFecParameters.rs b/crates/web-sys/src/features/gen_RtcFecParameters.rs index 4ac685bf15c..f6fda59a802 100644 --- a/crates/web-sys/src/features/gen_RtcFecParameters.rs +++ b/crates/web-sys/src/features/gen_RtcFecParameters.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] pub type RtcFecParameters; + #[wasm_bindgen(method, getter = "ssrc")] + fn ssrc_shim(this: &RtcFecParameters) -> u32; #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcFecParameters, val: u32); + fn set_ssrc_shim(this: &RtcFecParameters, val: u32); +} +#[doc = "The trait to access properties on the `RtcFecParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] +pub trait RtcFecParametersGetters { + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] + fn ssrc(&self) -> u32; +} +impl RtcFecParametersGetters for RtcFecParameters { + fn ssrc(&self) -> u32 { + self.ssrc_shim() + } } impl RtcFecParameters { #[doc = "Construct a new `RtcFecParameters`."] @@ -26,7 +42,7 @@ impl RtcFecParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`*"] pub fn ssrc(&mut self, val: u32) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs b/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs index 9b4637f86a8..7e25090537d 100644 --- a/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs +++ b/crates/web-sys/src/features/gen_RtcIceCandidateInit.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] pub type RtcIceCandidateInit; + #[wasm_bindgen(method, getter = "candidate")] + fn candidate_shim(this: &RtcIceCandidateInit) -> String; #[wasm_bindgen(method, setter = "candidate")] - fn candidate_shim(this: &RtcIceCandidateInit, val: &str); + fn set_candidate_shim(this: &RtcIceCandidateInit, val: &str); + #[wasm_bindgen(method, getter = "sdpMLineIndex")] + fn sdp_m_line_index_shim(this: &RtcIceCandidateInit) -> Option; #[wasm_bindgen(method, setter = "sdpMLineIndex")] - fn sdp_m_line_index_shim(this: &RtcIceCandidateInit, val: Option); + fn set_sdp_m_line_index_shim(this: &RtcIceCandidateInit, val: Option); + #[wasm_bindgen(method, getter = "sdpMid")] + fn sdp_mid_shim(this: &RtcIceCandidateInit) -> Option; #[wasm_bindgen(method, setter = "sdpMid")] - fn sdp_mid_shim(this: &RtcIceCandidateInit, val: Option<&str>); + fn set_sdp_mid_shim(this: &RtcIceCandidateInit, val: Option<&str>); +} +#[doc = "The trait to access properties on the `RtcIceCandidateInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] +pub trait RtcIceCandidateInitGetters { + #[doc = "Get the `candidate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + fn candidate(&self) -> String; + #[doc = "Get the `sdpMLineIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + fn sdp_m_line_index(&self) -> Option; + #[doc = "Get the `sdpMid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] + fn sdp_mid(&self) -> Option; +} +impl RtcIceCandidateInitGetters for RtcIceCandidateInit { + fn candidate(&self) -> String { + self.candidate_shim() + } + fn sdp_m_line_index(&self) -> Option { + self.sdp_m_line_index_shim() + } + fn sdp_mid(&self) -> Option { + self.sdp_mid_shim() + } } impl RtcIceCandidateInit { #[doc = "Construct a new `RtcIceCandidateInit`."] @@ -24,28 +58,28 @@ impl RtcIceCandidateInit { pub fn new(candidate: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.candidate(candidate); + Self::candidate(&mut ret, candidate); ret } #[doc = "Change the `candidate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] pub fn candidate(&mut self, val: &str) -> &mut Self { - self.candidate_shim(val); + self.set_candidate_shim(val); self } #[doc = "Change the `sdpMLineIndex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] pub fn sdp_m_line_index(&mut self, val: Option) -> &mut Self { - self.sdp_m_line_index_shim(val); + self.set_sdp_m_line_index_shim(val); self } #[doc = "Change the `sdpMid` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateInit`*"] pub fn sdp_mid(&mut self, val: Option<&str>) -> &mut Self { - self.sdp_mid_shim(val); + self.set_sdp_mid_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs b/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs index d2a83611f77..b6ec96c9221 100644 --- a/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs +++ b/crates/web-sys/src/features/gen_RtcIceCandidatePairStats.rs @@ -10,42 +10,208 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub type RtcIceCandidatePairStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcIceCandidatePairStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcIceCandidatePairStats, val: &str); + fn set_id_shim(this: &RtcIceCandidatePairStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcIceCandidatePairStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcIceCandidatePairStats, val: f64); + fn set_timestamp_shim(this: &RtcIceCandidatePairStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcIceCandidatePairStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcIceCandidatePairStats, val: RtcStatsType); + fn set_type__shim(this: &RtcIceCandidatePairStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "bytesReceived")] + fn bytes_received_shim(this: &RtcIceCandidatePairStats) -> f64; #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &RtcIceCandidatePairStats, val: f64); + fn set_bytes_received_shim(this: &RtcIceCandidatePairStats, val: f64); + #[wasm_bindgen(method, getter = "bytesSent")] + fn bytes_sent_shim(this: &RtcIceCandidatePairStats) -> f64; #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &RtcIceCandidatePairStats, val: f64); + fn set_bytes_sent_shim(this: &RtcIceCandidatePairStats, val: f64); + #[wasm_bindgen(method, getter = "componentId")] + fn component_id_shim(this: &RtcIceCandidatePairStats) -> u32; #[wasm_bindgen(method, setter = "componentId")] - fn component_id_shim(this: &RtcIceCandidatePairStats, val: u32); + fn set_component_id_shim(this: &RtcIceCandidatePairStats, val: u32); + #[wasm_bindgen(method, getter = "lastPacketReceivedTimestamp")] + fn last_packet_received_timestamp_shim(this: &RtcIceCandidatePairStats) -> f64; #[wasm_bindgen(method, setter = "lastPacketReceivedTimestamp")] - fn last_packet_received_timestamp_shim(this: &RtcIceCandidatePairStats, val: f64); + fn set_last_packet_received_timestamp_shim(this: &RtcIceCandidatePairStats, val: f64); + #[wasm_bindgen(method, getter = "lastPacketSentTimestamp")] + fn last_packet_sent_timestamp_shim(this: &RtcIceCandidatePairStats) -> f64; #[wasm_bindgen(method, setter = "lastPacketSentTimestamp")] - fn last_packet_sent_timestamp_shim(this: &RtcIceCandidatePairStats, val: f64); + fn set_last_packet_sent_timestamp_shim(this: &RtcIceCandidatePairStats, val: f64); + #[wasm_bindgen(method, getter = "localCandidateId")] + fn local_candidate_id_shim(this: &RtcIceCandidatePairStats) -> String; #[wasm_bindgen(method, setter = "localCandidateId")] - fn local_candidate_id_shim(this: &RtcIceCandidatePairStats, val: &str); + fn set_local_candidate_id_shim(this: &RtcIceCandidatePairStats, val: &str); + #[wasm_bindgen(method, getter = "nominated")] + fn nominated_shim(this: &RtcIceCandidatePairStats) -> bool; #[wasm_bindgen(method, setter = "nominated")] - fn nominated_shim(this: &RtcIceCandidatePairStats, val: bool); + fn set_nominated_shim(this: &RtcIceCandidatePairStats, val: bool); + #[wasm_bindgen(method, getter = "priority")] + fn priority_shim(this: &RtcIceCandidatePairStats) -> f64; #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &RtcIceCandidatePairStats, val: f64); + fn set_priority_shim(this: &RtcIceCandidatePairStats, val: f64); + #[wasm_bindgen(method, getter = "readable")] + fn readable_shim(this: &RtcIceCandidatePairStats) -> bool; #[wasm_bindgen(method, setter = "readable")] - fn readable_shim(this: &RtcIceCandidatePairStats, val: bool); + fn set_readable_shim(this: &RtcIceCandidatePairStats, val: bool); + #[wasm_bindgen(method, getter = "remoteCandidateId")] + fn remote_candidate_id_shim(this: &RtcIceCandidatePairStats) -> String; #[wasm_bindgen(method, setter = "remoteCandidateId")] - fn remote_candidate_id_shim(this: &RtcIceCandidatePairStats, val: &str); + fn set_remote_candidate_id_shim(this: &RtcIceCandidatePairStats, val: &str); + #[wasm_bindgen(method, getter = "selected")] + fn selected_shim(this: &RtcIceCandidatePairStats) -> bool; #[wasm_bindgen(method, setter = "selected")] - fn selected_shim(this: &RtcIceCandidatePairStats, val: bool); + fn set_selected_shim(this: &RtcIceCandidatePairStats, val: bool); + #[cfg(feature = "RtcStatsIceCandidatePairState")] + #[wasm_bindgen(method, getter = "state")] + fn state_shim(this: &RtcIceCandidatePairStats) -> RtcStatsIceCandidatePairState; #[cfg(feature = "RtcStatsIceCandidatePairState")] #[wasm_bindgen(method, setter = "state")] - fn state_shim(this: &RtcIceCandidatePairStats, val: RtcStatsIceCandidatePairState); + fn set_state_shim(this: &RtcIceCandidatePairStats, val: RtcStatsIceCandidatePairState); + #[wasm_bindgen(method, getter = "transportId")] + fn transport_id_shim(this: &RtcIceCandidatePairStats) -> String; #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcIceCandidatePairStats, val: &str); + fn set_transport_id_shim(this: &RtcIceCandidatePairStats, val: &str); + #[wasm_bindgen(method, getter = "writable")] + fn writable_shim(this: &RtcIceCandidatePairStats) -> bool; #[wasm_bindgen(method, setter = "writable")] - fn writable_shim(this: &RtcIceCandidatePairStats, val: bool); + fn set_writable_shim(this: &RtcIceCandidatePairStats, val: bool); +} +#[doc = "The trait to access properties on the `RtcIceCandidatePairStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] +pub trait RtcIceCandidatePairStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn bytes_received(&self) -> f64; + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn bytes_sent(&self) -> f64; + #[doc = "Get the `componentId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn component_id(&self) -> u32; + #[doc = "Get the `lastPacketReceivedTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn last_packet_received_timestamp(&self) -> f64; + #[doc = "Get the `lastPacketSentTimestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn last_packet_sent_timestamp(&self) -> f64; + #[doc = "Get the `localCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn local_candidate_id(&self) -> String; + #[doc = "Get the `nominated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn nominated(&self) -> bool; + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn priority(&self) -> f64; + #[doc = "Get the `readable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn readable(&self) -> bool; + #[doc = "Get the `remoteCandidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn remote_candidate_id(&self) -> String; + #[doc = "Get the `selected` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn selected(&self) -> bool; + #[cfg(feature = "RtcStatsIceCandidatePairState")] + #[doc = "Get the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"] + fn state(&self) -> RtcStatsIceCandidatePairState; + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn transport_id(&self) -> String; + #[doc = "Get the `writable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] + fn writable(&self) -> bool; +} +impl RtcIceCandidatePairStatsGetters for RtcIceCandidatePairStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn bytes_received(&self) -> f64 { + self.bytes_received_shim() + } + fn bytes_sent(&self) -> f64 { + self.bytes_sent_shim() + } + fn component_id(&self) -> u32 { + self.component_id_shim() + } + fn last_packet_received_timestamp(&self) -> f64 { + self.last_packet_received_timestamp_shim() + } + fn last_packet_sent_timestamp(&self) -> f64 { + self.last_packet_sent_timestamp_shim() + } + fn local_candidate_id(&self) -> String { + self.local_candidate_id_shim() + } + fn nominated(&self) -> bool { + self.nominated_shim() + } + fn priority(&self) -> f64 { + self.priority_shim() + } + fn readable(&self) -> bool { + self.readable_shim() + } + fn remote_candidate_id(&self) -> String { + self.remote_candidate_id_shim() + } + fn selected(&self) -> bool { + self.selected_shim() + } + #[cfg(feature = "RtcStatsIceCandidatePairState")] + fn state(&self) -> RtcStatsIceCandidatePairState { + self.state_shim() + } + fn transport_id(&self) -> String { + self.transport_id_shim() + } + fn writable(&self) -> bool { + self.writable_shim() + } } impl RtcIceCandidatePairStats { #[doc = "Construct a new `RtcIceCandidatePairStats`."] @@ -60,14 +226,14 @@ impl RtcIceCandidatePairStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -75,84 +241,84 @@ impl RtcIceCandidatePairStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsType`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `bytesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn bytes_received(&mut self, val: f64) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received_shim(val); self } #[doc = "Change the `bytesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent_shim(val); self } #[doc = "Change the `componentId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn component_id(&mut self, val: u32) -> &mut Self { - self.component_id_shim(val); + self.set_component_id_shim(val); self } #[doc = "Change the `lastPacketReceivedTimestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn last_packet_received_timestamp(&mut self, val: f64) -> &mut Self { - self.last_packet_received_timestamp_shim(val); + self.set_last_packet_received_timestamp_shim(val); self } #[doc = "Change the `lastPacketSentTimestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn last_packet_sent_timestamp(&mut self, val: f64) -> &mut Self { - self.last_packet_sent_timestamp_shim(val); + self.set_last_packet_sent_timestamp_shim(val); self } #[doc = "Change the `localCandidateId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn local_candidate_id(&mut self, val: &str) -> &mut Self { - self.local_candidate_id_shim(val); + self.set_local_candidate_id_shim(val); self } #[doc = "Change the `nominated` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn nominated(&mut self, val: bool) -> &mut Self { - self.nominated_shim(val); + self.set_nominated_shim(val); self } #[doc = "Change the `priority` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn priority(&mut self, val: f64) -> &mut Self { - self.priority_shim(val); + self.set_priority_shim(val); self } #[doc = "Change the `readable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn readable(&mut self, val: bool) -> &mut Self { - self.readable_shim(val); + self.set_readable_shim(val); self } #[doc = "Change the `remoteCandidateId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn remote_candidate_id(&mut self, val: &str) -> &mut Self { - self.remote_candidate_id_shim(val); + self.set_remote_candidate_id_shim(val); self } #[doc = "Change the `selected` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn selected(&mut self, val: bool) -> &mut Self { - self.selected_shim(val); + self.set_selected_shim(val); self } #[cfg(feature = "RtcStatsIceCandidatePairState")] @@ -160,21 +326,21 @@ impl RtcIceCandidatePairStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`, `RtcStatsIceCandidatePairState`*"] pub fn state(&mut self, val: RtcStatsIceCandidatePairState) -> &mut Self { - self.state_shim(val); + self.set_state_shim(val); self } #[doc = "Change the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id_shim(val); self } #[doc = "Change the `writable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidatePairStats`*"] pub fn writable(&mut self, val: bool) -> &mut Self { - self.writable_shim(val); + self.set_writable_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs b/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs index 1b0e279c135..dd81ed324b7 100644 --- a/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs +++ b/crates/web-sys/src/features/gen_RtcIceCandidateStats.rs @@ -10,26 +10,120 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] pub type RtcIceCandidateStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcIceCandidateStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcIceCandidateStats, val: &str); + fn set_id_shim(this: &RtcIceCandidateStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcIceCandidateStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcIceCandidateStats, val: f64); + fn set_timestamp_shim(this: &RtcIceCandidateStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcIceCandidateStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcIceCandidateStats, val: RtcStatsType); + fn set_type__shim(this: &RtcIceCandidateStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "candidateId")] + fn candidate_id_shim(this: &RtcIceCandidateStats) -> String; #[wasm_bindgen(method, setter = "candidateId")] - fn candidate_id_shim(this: &RtcIceCandidateStats, val: &str); + fn set_candidate_id_shim(this: &RtcIceCandidateStats, val: &str); + #[cfg(feature = "RtcStatsIceCandidateType")] + #[wasm_bindgen(method, getter = "candidateType")] + fn candidate_type_shim(this: &RtcIceCandidateStats) -> RtcStatsIceCandidateType; #[cfg(feature = "RtcStatsIceCandidateType")] #[wasm_bindgen(method, setter = "candidateType")] - fn candidate_type_shim(this: &RtcIceCandidateStats, val: RtcStatsIceCandidateType); + fn set_candidate_type_shim(this: &RtcIceCandidateStats, val: RtcStatsIceCandidateType); + #[wasm_bindgen(method, getter = "componentId")] + fn component_id_shim(this: &RtcIceCandidateStats) -> String; #[wasm_bindgen(method, setter = "componentId")] - fn component_id_shim(this: &RtcIceCandidateStats, val: &str); + fn set_component_id_shim(this: &RtcIceCandidateStats, val: &str); + #[wasm_bindgen(method, getter = "ipAddress")] + fn ip_address_shim(this: &RtcIceCandidateStats) -> String; #[wasm_bindgen(method, setter = "ipAddress")] - fn ip_address_shim(this: &RtcIceCandidateStats, val: &str); + fn set_ip_address_shim(this: &RtcIceCandidateStats, val: &str); + #[wasm_bindgen(method, getter = "portNumber")] + fn port_number_shim(this: &RtcIceCandidateStats) -> i32; #[wasm_bindgen(method, setter = "portNumber")] - fn port_number_shim(this: &RtcIceCandidateStats, val: i32); + fn set_port_number_shim(this: &RtcIceCandidateStats, val: i32); + #[wasm_bindgen(method, getter = "transport")] + fn transport_shim(this: &RtcIceCandidateStats) -> String; #[wasm_bindgen(method, setter = "transport")] - fn transport_shim(this: &RtcIceCandidateStats, val: &str); + fn set_transport_shim(this: &RtcIceCandidateStats, val: &str); +} +#[doc = "The trait to access properties on the `RtcIceCandidateStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] +pub trait RtcIceCandidateStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsType`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `candidateId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + fn candidate_id(&self) -> String; + #[cfg(feature = "RtcStatsIceCandidateType")] + #[doc = "Get the `candidateType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsIceCandidateType`*"] + fn candidate_type(&self) -> RtcStatsIceCandidateType; + #[doc = "Get the `componentId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + fn component_id(&self) -> String; + #[doc = "Get the `ipAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + fn ip_address(&self) -> String; + #[doc = "Get the `portNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + fn port_number(&self) -> i32; + #[doc = "Get the `transport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] + fn transport(&self) -> String; +} +impl RtcIceCandidateStatsGetters for RtcIceCandidateStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn candidate_id(&self) -> String { + self.candidate_id_shim() + } + #[cfg(feature = "RtcStatsIceCandidateType")] + fn candidate_type(&self) -> RtcStatsIceCandidateType { + self.candidate_type_shim() + } + fn component_id(&self) -> String { + self.component_id_shim() + } + fn ip_address(&self) -> String { + self.ip_address_shim() + } + fn port_number(&self) -> i32 { + self.port_number_shim() + } + fn transport(&self) -> String { + self.transport_shim() + } } impl RtcIceCandidateStats { #[doc = "Construct a new `RtcIceCandidateStats`."] @@ -44,14 +138,14 @@ impl RtcIceCandidateStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -59,14 +153,14 @@ impl RtcIceCandidateStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsType`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `candidateId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] pub fn candidate_id(&mut self, val: &str) -> &mut Self { - self.candidate_id_shim(val); + self.set_candidate_id_shim(val); self } #[cfg(feature = "RtcStatsIceCandidateType")] @@ -74,35 +168,35 @@ impl RtcIceCandidateStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`, `RtcStatsIceCandidateType`*"] pub fn candidate_type(&mut self, val: RtcStatsIceCandidateType) -> &mut Self { - self.candidate_type_shim(val); + self.set_candidate_type_shim(val); self } #[doc = "Change the `componentId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] pub fn component_id(&mut self, val: &str) -> &mut Self { - self.component_id_shim(val); + self.set_component_id_shim(val); self } #[doc = "Change the `ipAddress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] pub fn ip_address(&mut self, val: &str) -> &mut Self { - self.ip_address_shim(val); + self.set_ip_address_shim(val); self } #[doc = "Change the `portNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] pub fn port_number(&mut self, val: i32) -> &mut Self { - self.port_number_shim(val); + self.set_port_number_shim(val); self } #[doc = "Change the `transport` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidateStats`*"] pub fn transport(&mut self, val: &str) -> &mut Self { - self.transport_shim(val); + self.set_transport_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceComponentStats.rs b/crates/web-sys/src/features/gen_RtcIceComponentStats.rs index b9d84119d9d..dae7d0aa4a7 100644 --- a/crates/web-sys/src/features/gen_RtcIceComponentStats.rs +++ b/crates/web-sys/src/features/gen_RtcIceComponentStats.rs @@ -10,23 +10,105 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] pub type RtcIceComponentStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcIceComponentStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcIceComponentStats, val: &str); + fn set_id_shim(this: &RtcIceComponentStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcIceComponentStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcIceComponentStats, val: f64); + fn set_timestamp_shim(this: &RtcIceComponentStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcIceComponentStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcIceComponentStats, val: RtcStatsType); + fn set_type__shim(this: &RtcIceComponentStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "activeConnection")] + fn active_connection_shim(this: &RtcIceComponentStats) -> bool; #[wasm_bindgen(method, setter = "activeConnection")] - fn active_connection_shim(this: &RtcIceComponentStats, val: bool); + fn set_active_connection_shim(this: &RtcIceComponentStats, val: bool); + #[wasm_bindgen(method, getter = "bytesReceived")] + fn bytes_received_shim(this: &RtcIceComponentStats) -> u32; #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &RtcIceComponentStats, val: u32); + fn set_bytes_received_shim(this: &RtcIceComponentStats, val: u32); + #[wasm_bindgen(method, getter = "bytesSent")] + fn bytes_sent_shim(this: &RtcIceComponentStats) -> u32; #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &RtcIceComponentStats, val: u32); + fn set_bytes_sent_shim(this: &RtcIceComponentStats, val: u32); + #[wasm_bindgen(method, getter = "component")] + fn component_shim(this: &RtcIceComponentStats) -> i32; #[wasm_bindgen(method, setter = "component")] - fn component_shim(this: &RtcIceComponentStats, val: i32); + fn set_component_shim(this: &RtcIceComponentStats, val: i32); + #[wasm_bindgen(method, getter = "transportId")] + fn transport_id_shim(this: &RtcIceComponentStats) -> String; #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcIceComponentStats, val: &str); + fn set_transport_id_shim(this: &RtcIceComponentStats, val: &str); +} +#[doc = "The trait to access properties on the `RtcIceComponentStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] +pub trait RtcIceComponentStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`, `RtcStatsType`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `activeConnection` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + fn active_connection(&self) -> bool; + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + fn bytes_received(&self) -> u32; + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + fn bytes_sent(&self) -> u32; + #[doc = "Get the `component` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + fn component(&self) -> i32; + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] + fn transport_id(&self) -> String; +} +impl RtcIceComponentStatsGetters for RtcIceComponentStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn active_connection(&self) -> bool { + self.active_connection_shim() + } + fn bytes_received(&self) -> u32 { + self.bytes_received_shim() + } + fn bytes_sent(&self) -> u32 { + self.bytes_sent_shim() + } + fn component(&self) -> i32 { + self.component_shim() + } + fn transport_id(&self) -> String { + self.transport_id_shim() + } } impl RtcIceComponentStats { #[doc = "Construct a new `RtcIceComponentStats`."] @@ -41,14 +123,14 @@ impl RtcIceComponentStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -56,42 +138,42 @@ impl RtcIceComponentStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`, `RtcStatsType`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `activeConnection` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] pub fn active_connection(&mut self, val: bool) -> &mut Self { - self.active_connection_shim(val); + self.set_active_connection_shim(val); self } #[doc = "Change the `bytesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] pub fn bytes_received(&mut self, val: u32) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received_shim(val); self } #[doc = "Change the `bytesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] pub fn bytes_sent(&mut self, val: u32) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent_shim(val); self } #[doc = "Change the `component` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] pub fn component(&mut self, val: i32) -> &mut Self { - self.component_shim(val); + self.set_component_shim(val); self } #[doc = "Change the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceComponentStats`*"] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIceServer.rs b/crates/web-sys/src/features/gen_RtcIceServer.rs index 23937c63109..ab9c4fbfd52 100644 --- a/crates/web-sys/src/features/gen_RtcIceServer.rs +++ b/crates/web-sys/src/features/gen_RtcIceServer.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] pub type RtcIceServer; + #[wasm_bindgen(method, getter = "credential")] + fn credential_shim(this: &RtcIceServer) -> String; #[wasm_bindgen(method, setter = "credential")] - fn credential_shim(this: &RtcIceServer, val: &str); + fn set_credential_shim(this: &RtcIceServer, val: &str); + #[cfg(feature = "RtcIceCredentialType")] + #[wasm_bindgen(method, getter = "credentialType")] + fn credential_type_shim(this: &RtcIceServer) -> RtcIceCredentialType; #[cfg(feature = "RtcIceCredentialType")] #[wasm_bindgen(method, setter = "credentialType")] - fn credential_type_shim(this: &RtcIceServer, val: RtcIceCredentialType); + fn set_credential_type_shim(this: &RtcIceServer, val: RtcIceCredentialType); + #[wasm_bindgen(method, getter = "url")] + fn url_shim(this: &RtcIceServer) -> String; #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &RtcIceServer, val: &str); + fn set_url_shim(this: &RtcIceServer, val: &str); + #[wasm_bindgen(method, getter = "urls")] + fn urls_shim(this: &RtcIceServer) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "urls")] - fn urls_shim(this: &RtcIceServer, val: &::wasm_bindgen::JsValue); + fn set_urls_shim(this: &RtcIceServer, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "username")] + fn username_shim(this: &RtcIceServer) -> String; #[wasm_bindgen(method, setter = "username")] - fn username_shim(this: &RtcIceServer, val: &str); + fn set_username_shim(this: &RtcIceServer, val: &str); +} +#[doc = "The trait to access properties on the `RtcIceServer` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] +pub trait RtcIceServerGetters { + #[doc = "Get the `credential` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + fn credential(&self) -> String; + #[cfg(feature = "RtcIceCredentialType")] + #[doc = "Get the `credentialType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCredentialType`, `RtcIceServer`*"] + fn credential_type(&self) -> RtcIceCredentialType; + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + fn url(&self) -> String; + #[doc = "Get the `urls` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + fn urls(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `username` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] + fn username(&self) -> String; +} +impl RtcIceServerGetters for RtcIceServer { + fn credential(&self) -> String { + self.credential_shim() + } + #[cfg(feature = "RtcIceCredentialType")] + fn credential_type(&self) -> RtcIceCredentialType { + self.credential_type_shim() + } + fn url(&self) -> String { + self.url_shim() + } + fn urls(&self) -> ::wasm_bindgen::JsValue { + self.urls_shim() + } + fn username(&self) -> String { + self.username_shim() + } } impl RtcIceServer { #[doc = "Construct a new `RtcIceServer`."] @@ -35,7 +90,7 @@ impl RtcIceServer { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] pub fn credential(&mut self, val: &str) -> &mut Self { - self.credential_shim(val); + self.set_credential_shim(val); self } #[cfg(feature = "RtcIceCredentialType")] @@ -43,28 +98,28 @@ impl RtcIceServer { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCredentialType`, `RtcIceServer`*"] pub fn credential_type(&mut self, val: RtcIceCredentialType) -> &mut Self { - self.credential_type_shim(val); + self.set_credential_type_shim(val); self } #[doc = "Change the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url_shim(val); self } #[doc = "Change the `urls` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] pub fn urls(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.urls_shim(val); + self.set_urls_shim(val); self } #[doc = "Change the `username` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceServer`*"] pub fn username(&mut self, val: &str) -> &mut Self { - self.username_shim(val); + self.set_username_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs b/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs index 03e7922f9fc..17941007a15 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityAssertion.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] pub type RtcIdentityAssertion; + #[wasm_bindgen(method, getter = "idp")] + fn idp_shim(this: &RtcIdentityAssertion) -> String; #[wasm_bindgen(method, setter = "idp")] - fn idp_shim(this: &RtcIdentityAssertion, val: &str); + fn set_idp_shim(this: &RtcIdentityAssertion, val: &str); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &RtcIdentityAssertion) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &RtcIdentityAssertion, val: &str); + fn set_name_shim(this: &RtcIdentityAssertion, val: &str); +} +#[doc = "The trait to access properties on the `RtcIdentityAssertion` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] +pub trait RtcIdentityAssertionGetters { + #[doc = "Get the `idp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] + fn idp(&self) -> String; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] + fn name(&self) -> String; +} +impl RtcIdentityAssertionGetters for RtcIdentityAssertion { + fn idp(&self) -> String { + self.idp_shim() + } + fn name(&self) -> String { + self.name_shim() + } } impl RtcIdentityAssertion { #[doc = "Construct a new `RtcIdentityAssertion`."] @@ -28,14 +53,14 @@ impl RtcIdentityAssertion { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] pub fn idp(&mut self, val: &str) -> &mut Self { - self.idp_shim(val); + self.set_idp_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertion`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs b/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs index 186af70aded..9476bf5c5dd 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityAssertionResult.rs @@ -10,11 +10,39 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] pub type RtcIdentityAssertionResult; + #[wasm_bindgen(method, getter = "assertion")] + fn assertion_shim(this: &RtcIdentityAssertionResult) -> String; #[wasm_bindgen(method, setter = "assertion")] - fn assertion_shim(this: &RtcIdentityAssertionResult, val: &str); + fn set_assertion_shim(this: &RtcIdentityAssertionResult, val: &str); + #[cfg(feature = "RtcIdentityProviderDetails")] + #[wasm_bindgen(method, getter = "idp")] + fn idp_shim(this: &RtcIdentityAssertionResult) -> RtcIdentityProviderDetails; #[cfg(feature = "RtcIdentityProviderDetails")] #[wasm_bindgen(method, setter = "idp")] - fn idp_shim(this: &RtcIdentityAssertionResult, val: &RtcIdentityProviderDetails); + fn set_idp_shim(this: &RtcIdentityAssertionResult, val: &RtcIdentityProviderDetails); +} +#[doc = "The trait to access properties on the `RtcIdentityAssertionResult` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] +pub trait RtcIdentityAssertionResultGetters { + #[doc = "Get the `assertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] + fn assertion(&self) -> String; + #[cfg(feature = "RtcIdentityProviderDetails")] + #[doc = "Get the `idp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`, `RtcIdentityProviderDetails`*"] + fn idp(&self) -> RtcIdentityProviderDetails; +} +impl RtcIdentityAssertionResultGetters for RtcIdentityAssertionResult { + fn assertion(&self) -> String { + self.assertion_shim() + } + #[cfg(feature = "RtcIdentityProviderDetails")] + fn idp(&self) -> RtcIdentityProviderDetails { + self.idp_shim() + } } impl RtcIdentityAssertionResult { #[cfg(feature = "RtcIdentityProviderDetails")] @@ -24,15 +52,15 @@ impl RtcIdentityAssertionResult { pub fn new(assertion: &str, idp: &RtcIdentityProviderDetails) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.assertion(assertion); - ret.idp(idp); + Self::assertion(&mut ret, assertion); + Self::idp(&mut ret, idp); ret } #[doc = "Change the `assertion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`*"] pub fn assertion(&mut self, val: &str) -> &mut Self { - self.assertion_shim(val); + self.set_assertion_shim(val); self } #[cfg(feature = "RtcIdentityProviderDetails")] @@ -40,7 +68,7 @@ impl RtcIdentityAssertionResult { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityAssertionResult`, `RtcIdentityProviderDetails`*"] pub fn idp(&mut self, val: &RtcIdentityProviderDetails) -> &mut Self { - self.idp_shim(val); + self.set_idp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityProvider.rs b/crates/web-sys/src/features/gen_RtcIdentityProvider.rs index b2d6b76b5b0..6affb0e8764 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityProvider.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityProvider.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] pub type RtcIdentityProvider; + #[wasm_bindgen(method, getter = "generateAssertion")] + fn generate_assertion_shim(this: &RtcIdentityProvider) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "generateAssertion")] - fn generate_assertion_shim(this: &RtcIdentityProvider, val: &::js_sys::Function); + fn set_generate_assertion_shim(this: &RtcIdentityProvider, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "validateAssertion")] + fn validate_assertion_shim(this: &RtcIdentityProvider) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "validateAssertion")] - fn validate_assertion_shim(this: &RtcIdentityProvider, val: &::js_sys::Function); + fn set_validate_assertion_shim(this: &RtcIdentityProvider, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `RtcIdentityProvider` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] +pub trait RtcIdentityProviderGetters { + #[doc = "Get the `generateAssertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] + fn generate_assertion(&self) -> ::js_sys::Function; + #[doc = "Get the `validateAssertion` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] + fn validate_assertion(&self) -> ::js_sys::Function; +} +impl RtcIdentityProviderGetters for RtcIdentityProvider { + fn generate_assertion(&self) -> ::js_sys::Function { + self.generate_assertion_shim() + } + fn validate_assertion(&self) -> ::js_sys::Function { + self.validate_assertion_shim() + } } impl RtcIdentityProvider { #[doc = "Construct a new `RtcIdentityProvider`."] @@ -25,22 +50,22 @@ impl RtcIdentityProvider { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.generate_assertion(generate_assertion); - ret.validate_assertion(validate_assertion); + Self::generate_assertion(&mut ret, generate_assertion); + Self::validate_assertion(&mut ret, validate_assertion); ret } #[doc = "Change the `generateAssertion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] pub fn generate_assertion(&mut self, val: &::js_sys::Function) -> &mut Self { - self.generate_assertion_shim(val); + self.set_generate_assertion_shim(val); self } #[doc = "Change the `validateAssertion` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProvider`*"] pub fn validate_assertion(&mut self, val: &::js_sys::Function) -> &mut Self { - self.validate_assertion_shim(val); + self.set_validate_assertion_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs b/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs index 948c99eabda..63793c8fc72 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityProviderDetails.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] pub type RtcIdentityProviderDetails; + #[wasm_bindgen(method, getter = "domain")] + fn domain_shim(this: &RtcIdentityProviderDetails) -> String; #[wasm_bindgen(method, setter = "domain")] - fn domain_shim(this: &RtcIdentityProviderDetails, val: &str); + fn set_domain_shim(this: &RtcIdentityProviderDetails, val: &str); + #[wasm_bindgen(method, getter = "protocol")] + fn protocol_shim(this: &RtcIdentityProviderDetails) -> String; #[wasm_bindgen(method, setter = "protocol")] - fn protocol_shim(this: &RtcIdentityProviderDetails, val: &str); + fn set_protocol_shim(this: &RtcIdentityProviderDetails, val: &str); +} +#[doc = "The trait to access properties on the `RtcIdentityProviderDetails` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] +pub trait RtcIdentityProviderDetailsGetters { + #[doc = "Get the `domain` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] + fn domain(&self) -> String; + #[doc = "Get the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] + fn protocol(&self) -> String; +} +impl RtcIdentityProviderDetailsGetters for RtcIdentityProviderDetails { + fn domain(&self) -> String { + self.domain_shim() + } + fn protocol(&self) -> String { + self.protocol_shim() + } } impl RtcIdentityProviderDetails { #[doc = "Construct a new `RtcIdentityProviderDetails`."] @@ -22,21 +47,21 @@ impl RtcIdentityProviderDetails { pub fn new(domain: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.domain(domain); + Self::domain(&mut ret, domain); ret } #[doc = "Change the `domain` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] pub fn domain(&mut self, val: &str) -> &mut Self { - self.domain_shim(val); + self.set_domain_shim(val); self } #[doc = "Change the `protocol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderDetails`*"] pub fn protocol(&mut self, val: &str) -> &mut Self { - self.protocol_shim(val); + self.set_protocol_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs b/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs index b4ee75df20c..afa194bb67f 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityProviderOptions.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] pub type RtcIdentityProviderOptions; + #[wasm_bindgen(method, getter = "peerIdentity")] + fn peer_identity_shim(this: &RtcIdentityProviderOptions) -> String; #[wasm_bindgen(method, setter = "peerIdentity")] - fn peer_identity_shim(this: &RtcIdentityProviderOptions, val: &str); + fn set_peer_identity_shim(this: &RtcIdentityProviderOptions, val: &str); + #[wasm_bindgen(method, getter = "protocol")] + fn protocol_shim(this: &RtcIdentityProviderOptions) -> String; #[wasm_bindgen(method, setter = "protocol")] - fn protocol_shim(this: &RtcIdentityProviderOptions, val: &str); + fn set_protocol_shim(this: &RtcIdentityProviderOptions, val: &str); + #[wasm_bindgen(method, getter = "usernameHint")] + fn username_hint_shim(this: &RtcIdentityProviderOptions) -> String; #[wasm_bindgen(method, setter = "usernameHint")] - fn username_hint_shim(this: &RtcIdentityProviderOptions, val: &str); + fn set_username_hint_shim(this: &RtcIdentityProviderOptions, val: &str); +} +#[doc = "The trait to access properties on the `RtcIdentityProviderOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] +pub trait RtcIdentityProviderOptionsGetters { + #[doc = "Get the `peerIdentity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + fn peer_identity(&self) -> String; + #[doc = "Get the `protocol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + fn protocol(&self) -> String; + #[doc = "Get the `usernameHint` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] + fn username_hint(&self) -> String; +} +impl RtcIdentityProviderOptionsGetters for RtcIdentityProviderOptions { + fn peer_identity(&self) -> String { + self.peer_identity_shim() + } + fn protocol(&self) -> String { + self.protocol_shim() + } + fn username_hint(&self) -> String { + self.username_hint_shim() + } } impl RtcIdentityProviderOptions { #[doc = "Construct a new `RtcIdentityProviderOptions`."] @@ -30,21 +64,21 @@ impl RtcIdentityProviderOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] pub fn peer_identity(&mut self, val: &str) -> &mut Self { - self.peer_identity_shim(val); + self.set_peer_identity_shim(val); self } #[doc = "Change the `protocol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] pub fn protocol(&mut self, val: &str) -> &mut Self { - self.protocol_shim(val); + self.set_protocol_shim(val); self } #[doc = "Change the `usernameHint` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityProviderOptions`*"] pub fn username_hint(&mut self, val: &str) -> &mut Self { - self.username_hint_shim(val); + self.set_username_hint_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs b/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs index 3c86139a6e4..c231da7f7a9 100644 --- a/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs +++ b/crates/web-sys/src/features/gen_RtcIdentityValidationResult.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] pub type RtcIdentityValidationResult; + #[wasm_bindgen(method, getter = "contents")] + fn contents_shim(this: &RtcIdentityValidationResult) -> String; #[wasm_bindgen(method, setter = "contents")] - fn contents_shim(this: &RtcIdentityValidationResult, val: &str); + fn set_contents_shim(this: &RtcIdentityValidationResult, val: &str); + #[wasm_bindgen(method, getter = "identity")] + fn identity_shim(this: &RtcIdentityValidationResult) -> String; #[wasm_bindgen(method, setter = "identity")] - fn identity_shim(this: &RtcIdentityValidationResult, val: &str); + fn set_identity_shim(this: &RtcIdentityValidationResult, val: &str); +} +#[doc = "The trait to access properties on the `RtcIdentityValidationResult` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] +pub trait RtcIdentityValidationResultGetters { + #[doc = "Get the `contents` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] + fn contents(&self) -> String; + #[doc = "Get the `identity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] + fn identity(&self) -> String; +} +impl RtcIdentityValidationResultGetters for RtcIdentityValidationResult { + fn contents(&self) -> String { + self.contents_shim() + } + fn identity(&self) -> String { + self.identity_shim() + } } impl RtcIdentityValidationResult { #[doc = "Construct a new `RtcIdentityValidationResult`."] @@ -22,22 +47,22 @@ impl RtcIdentityValidationResult { pub fn new(contents: &str, identity: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.contents(contents); - ret.identity(identity); + Self::contents(&mut ret, contents); + Self::identity(&mut ret, identity); ret } #[doc = "Change the `contents` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] pub fn contents(&mut self, val: &str) -> &mut Self { - self.contents_shim(val); + self.set_contents_shim(val); self } #[doc = "Change the `identity` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIdentityValidationResult`*"] pub fn identity(&mut self, val: &str) -> &mut Self { - self.identity_shim(val); + self.set_identity_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs b/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs index 4d8ff7ecc6c..cf625cc7830 100644 --- a/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcInboundRtpStreamStats.rs @@ -10,55 +10,281 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub type RtcInboundRtpStreamStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcInboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcInboundRtpStreamStats, val: &str); + fn set_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcInboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcInboundRtpStreamStats, val: f64); + fn set_timestamp_shim(this: &RtcInboundRtpStreamStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcInboundRtpStreamStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcInboundRtpStreamStats, val: RtcStatsType); + fn set_type__shim(this: &RtcInboundRtpStreamStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "bitrateMean")] + fn bitrate_mean_shim(this: &RtcInboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "bitrateMean")] - fn bitrate_mean_shim(this: &RtcInboundRtpStreamStats, val: f64); + fn set_bitrate_mean_shim(this: &RtcInboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "bitrateStdDev")] + fn bitrate_std_dev_shim(this: &RtcInboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "bitrateStdDev")] - fn bitrate_std_dev_shim(this: &RtcInboundRtpStreamStats, val: f64); + fn set_bitrate_std_dev_shim(this: &RtcInboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "codecId")] + fn codec_id_shim(this: &RtcInboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "codecId")] - fn codec_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + fn set_codec_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "firCount")] + fn fir_count_shim(this: &RtcInboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "firCount")] - fn fir_count_shim(this: &RtcInboundRtpStreamStats, val: u32); + fn set_fir_count_shim(this: &RtcInboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "framerateMean")] + fn framerate_mean_shim(this: &RtcInboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "framerateMean")] - fn framerate_mean_shim(this: &RtcInboundRtpStreamStats, val: f64); + fn set_framerate_mean_shim(this: &RtcInboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "framerateStdDev")] + fn framerate_std_dev_shim(this: &RtcInboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "framerateStdDev")] - fn framerate_std_dev_shim(this: &RtcInboundRtpStreamStats, val: f64); + fn set_framerate_std_dev_shim(this: &RtcInboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "isRemote")] + fn is_remote_shim(this: &RtcInboundRtpStreamStats) -> bool; #[wasm_bindgen(method, setter = "isRemote")] - fn is_remote_shim(this: &RtcInboundRtpStreamStats, val: bool); + fn set_is_remote_shim(this: &RtcInboundRtpStreamStats, val: bool); + #[wasm_bindgen(method, getter = "mediaTrackId")] + fn media_track_id_shim(this: &RtcInboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "mediaTrackId")] - fn media_track_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + fn set_media_track_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "mediaType")] + fn media_type_shim(this: &RtcInboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "mediaType")] - fn media_type_shim(this: &RtcInboundRtpStreamStats, val: &str); + fn set_media_type_shim(this: &RtcInboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "nackCount")] + fn nack_count_shim(this: &RtcInboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "nackCount")] - fn nack_count_shim(this: &RtcInboundRtpStreamStats, val: u32); + fn set_nack_count_shim(this: &RtcInboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "pliCount")] + fn pli_count_shim(this: &RtcInboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "pliCount")] - fn pli_count_shim(this: &RtcInboundRtpStreamStats, val: u32); + fn set_pli_count_shim(this: &RtcInboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "remoteId")] + fn remote_id_shim(this: &RtcInboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "remoteId")] - fn remote_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + fn set_remote_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "ssrc")] + fn ssrc_shim(this: &RtcInboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcInboundRtpStreamStats, val: &str); + fn set_ssrc_shim(this: &RtcInboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "transportId")] + fn transport_id_shim(this: &RtcInboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + fn set_transport_id_shim(this: &RtcInboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "bytesReceived")] + fn bytes_received_shim(this: &RtcInboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &RtcInboundRtpStreamStats, val: f64); + fn set_bytes_received_shim(this: &RtcInboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "discardedPackets")] + fn discarded_packets_shim(this: &RtcInboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "discardedPackets")] - fn discarded_packets_shim(this: &RtcInboundRtpStreamStats, val: u32); + fn set_discarded_packets_shim(this: &RtcInboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "framesDecoded")] + fn frames_decoded_shim(this: &RtcInboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "framesDecoded")] - fn frames_decoded_shim(this: &RtcInboundRtpStreamStats, val: u32); + fn set_frames_decoded_shim(this: &RtcInboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "jitter")] + fn jitter_shim(this: &RtcInboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "jitter")] - fn jitter_shim(this: &RtcInboundRtpStreamStats, val: f64); + fn set_jitter_shim(this: &RtcInboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "packetsLost")] + fn packets_lost_shim(this: &RtcInboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "packetsLost")] - fn packets_lost_shim(this: &RtcInboundRtpStreamStats, val: u32); + fn set_packets_lost_shim(this: &RtcInboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "packetsReceived")] + fn packets_received_shim(this: &RtcInboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "packetsReceived")] - fn packets_received_shim(this: &RtcInboundRtpStreamStats, val: u32); + fn set_packets_received_shim(this: &RtcInboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "roundTripTime")] + fn round_trip_time_shim(this: &RtcInboundRtpStreamStats) -> i32; #[wasm_bindgen(method, setter = "roundTripTime")] - fn round_trip_time_shim(this: &RtcInboundRtpStreamStats, val: i32); + fn set_round_trip_time_shim(this: &RtcInboundRtpStreamStats, val: i32); +} +#[doc = "The trait to access properties on the `RtcInboundRtpStreamStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] +pub trait RtcInboundRtpStreamStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`, `RtcStatsType`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn bitrate_mean(&self) -> f64; + #[doc = "Get the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn bitrate_std_dev(&self) -> f64; + #[doc = "Get the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn codec_id(&self) -> String; + #[doc = "Get the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn fir_count(&self) -> u32; + #[doc = "Get the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn framerate_mean(&self) -> f64; + #[doc = "Get the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn framerate_std_dev(&self) -> f64; + #[doc = "Get the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn is_remote(&self) -> bool; + #[doc = "Get the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn media_track_id(&self) -> String; + #[doc = "Get the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn media_type(&self) -> String; + #[doc = "Get the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn nack_count(&self) -> u32; + #[doc = "Get the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn pli_count(&self) -> u32; + #[doc = "Get the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn remote_id(&self) -> String; + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn ssrc(&self) -> String; + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn transport_id(&self) -> String; + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn bytes_received(&self) -> f64; + #[doc = "Get the `discardedPackets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn discarded_packets(&self) -> u32; + #[doc = "Get the `framesDecoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn frames_decoded(&self) -> u32; + #[doc = "Get the `jitter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn jitter(&self) -> f64; + #[doc = "Get the `packetsLost` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn packets_lost(&self) -> u32; + #[doc = "Get the `packetsReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn packets_received(&self) -> u32; + #[doc = "Get the `roundTripTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] + fn round_trip_time(&self) -> i32; +} +impl RtcInboundRtpStreamStatsGetters for RtcInboundRtpStreamStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn bitrate_mean(&self) -> f64 { + self.bitrate_mean_shim() + } + fn bitrate_std_dev(&self) -> f64 { + self.bitrate_std_dev_shim() + } + fn codec_id(&self) -> String { + self.codec_id_shim() + } + fn fir_count(&self) -> u32 { + self.fir_count_shim() + } + fn framerate_mean(&self) -> f64 { + self.framerate_mean_shim() + } + fn framerate_std_dev(&self) -> f64 { + self.framerate_std_dev_shim() + } + fn is_remote(&self) -> bool { + self.is_remote_shim() + } + fn media_track_id(&self) -> String { + self.media_track_id_shim() + } + fn media_type(&self) -> String { + self.media_type_shim() + } + fn nack_count(&self) -> u32 { + self.nack_count_shim() + } + fn pli_count(&self) -> u32 { + self.pli_count_shim() + } + fn remote_id(&self) -> String { + self.remote_id_shim() + } + fn ssrc(&self) -> String { + self.ssrc_shim() + } + fn transport_id(&self) -> String { + self.transport_id_shim() + } + fn bytes_received(&self) -> f64 { + self.bytes_received_shim() + } + fn discarded_packets(&self) -> u32 { + self.discarded_packets_shim() + } + fn frames_decoded(&self) -> u32 { + self.frames_decoded_shim() + } + fn jitter(&self) -> f64 { + self.jitter_shim() + } + fn packets_lost(&self) -> u32 { + self.packets_lost_shim() + } + fn packets_received(&self) -> u32 { + self.packets_received_shim() + } + fn round_trip_time(&self) -> i32 { + self.round_trip_time_shim() + } } impl RtcInboundRtpStreamStats { #[doc = "Construct a new `RtcInboundRtpStreamStats`."] @@ -73,14 +299,14 @@ impl RtcInboundRtpStreamStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -88,154 +314,154 @@ impl RtcInboundRtpStreamStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`, `RtcStatsType`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `bitrateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn bitrate_mean(&mut self, val: f64) -> &mut Self { - self.bitrate_mean_shim(val); + self.set_bitrate_mean_shim(val); self } #[doc = "Change the `bitrateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self { - self.bitrate_std_dev_shim(val); + self.set_bitrate_std_dev_shim(val); self } #[doc = "Change the `codecId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn codec_id(&mut self, val: &str) -> &mut Self { - self.codec_id_shim(val); + self.set_codec_id_shim(val); self } #[doc = "Change the `firCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn fir_count(&mut self, val: u32) -> &mut Self { - self.fir_count_shim(val); + self.set_fir_count_shim(val); self } #[doc = "Change the `framerateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn framerate_mean(&mut self, val: f64) -> &mut Self { - self.framerate_mean_shim(val); + self.set_framerate_mean_shim(val); self } #[doc = "Change the `framerateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self { - self.framerate_std_dev_shim(val); + self.set_framerate_std_dev_shim(val); self } #[doc = "Change the `isRemote` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn is_remote(&mut self, val: bool) -> &mut Self { - self.is_remote_shim(val); + self.set_is_remote_shim(val); self } #[doc = "Change the `mediaTrackId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn media_track_id(&mut self, val: &str) -> &mut Self { - self.media_track_id_shim(val); + self.set_media_track_id_shim(val); self } #[doc = "Change the `mediaType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn media_type(&mut self, val: &str) -> &mut Self { - self.media_type_shim(val); + self.set_media_type_shim(val); self } #[doc = "Change the `nackCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn nack_count(&mut self, val: u32) -> &mut Self { - self.nack_count_shim(val); + self.set_nack_count_shim(val); self } #[doc = "Change the `pliCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn pli_count(&mut self, val: u32) -> &mut Self { - self.pli_count_shim(val); + self.set_pli_count_shim(val); self } #[doc = "Change the `remoteId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn remote_id(&mut self, val: &str) -> &mut Self { - self.remote_id_shim(val); + self.set_remote_id_shim(val); self } #[doc = "Change the `ssrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn ssrc(&mut self, val: &str) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc_shim(val); self } #[doc = "Change the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id_shim(val); self } #[doc = "Change the `bytesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn bytes_received(&mut self, val: f64) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received_shim(val); self } #[doc = "Change the `discardedPackets` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn discarded_packets(&mut self, val: u32) -> &mut Self { - self.discarded_packets_shim(val); + self.set_discarded_packets_shim(val); self } #[doc = "Change the `framesDecoded` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn frames_decoded(&mut self, val: u32) -> &mut Self { - self.frames_decoded_shim(val); + self.set_frames_decoded_shim(val); self } #[doc = "Change the `jitter` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn jitter(&mut self, val: f64) -> &mut Self { - self.jitter_shim(val); + self.set_jitter_shim(val); self } #[doc = "Change the `packetsLost` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn packets_lost(&mut self, val: u32) -> &mut Self { - self.packets_lost_shim(val); + self.set_packets_lost_shim(val); self } #[doc = "Change the `packetsReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn packets_received(&mut self, val: u32) -> &mut Self { - self.packets_received_shim(val); + self.set_packets_received_shim(val); self } #[doc = "Change the `roundTripTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcInboundRtpStreamStats`*"] pub fn round_trip_time(&mut self, val: i32) -> &mut Self { - self.round_trip_time_shim(val); + self.set_round_trip_time_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs b/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs index 3ee36c181b7..3b63585b9cd 100644 --- a/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcMediaStreamStats.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] pub type RtcMediaStreamStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcMediaStreamStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcMediaStreamStats, val: &str); + fn set_id_shim(this: &RtcMediaStreamStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcMediaStreamStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcMediaStreamStats, val: f64); + fn set_timestamp_shim(this: &RtcMediaStreamStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcMediaStreamStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcMediaStreamStats, val: RtcStatsType); + fn set_type__shim(this: &RtcMediaStreamStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "streamIdentifier")] + fn stream_identifier_shim(this: &RtcMediaStreamStats) -> String; #[wasm_bindgen(method, setter = "streamIdentifier")] - fn stream_identifier_shim(this: &RtcMediaStreamStats, val: &str); + fn set_stream_identifier_shim(this: &RtcMediaStreamStats, val: &str); + #[wasm_bindgen(method, getter = "trackIds")] + fn track_ids_shim(this: &RtcMediaStreamStats) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "trackIds")] - fn track_ids_shim(this: &RtcMediaStreamStats, val: &::wasm_bindgen::JsValue); + fn set_track_ids_shim(this: &RtcMediaStreamStats, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `RtcMediaStreamStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] +pub trait RtcMediaStreamStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`, `RtcStatsType`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `streamIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + fn stream_identifier(&self) -> String; + #[doc = "Get the `trackIds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] + fn track_ids(&self) -> ::js_sys::Array; +} +impl RtcMediaStreamStatsGetters for RtcMediaStreamStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn stream_identifier(&self) -> String { + self.stream_identifier_shim() + } + fn track_ids(&self) -> ::js_sys::Array { + self.track_ids_shim() + } } impl RtcMediaStreamStats { #[doc = "Construct a new `RtcMediaStreamStats`."] @@ -35,14 +90,14 @@ impl RtcMediaStreamStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -50,21 +105,21 @@ impl RtcMediaStreamStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`, `RtcStatsType`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `streamIdentifier` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] pub fn stream_identifier(&mut self, val: &str) -> &mut Self { - self.stream_identifier_shim(val); + self.set_stream_identifier_shim(val); self } #[doc = "Change the `trackIds` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamStats`*"] pub fn track_ids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.track_ids_shim(val); + self.set_track_ids_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs b/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs index 81b5fd0deda..33daf9c7152 100644 --- a/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs +++ b/crates/web-sys/src/features/gen_RtcMediaStreamTrackStats.rs @@ -10,41 +10,204 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub type RtcMediaStreamTrackStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcMediaStreamTrackStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcMediaStreamTrackStats, val: &str); + fn set_id_shim(this: &RtcMediaStreamTrackStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcMediaStreamTrackStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcMediaStreamTrackStats, val: f64); + fn set_timestamp_shim(this: &RtcMediaStreamTrackStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcMediaStreamTrackStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcMediaStreamTrackStats, val: RtcStatsType); + fn set_type__shim(this: &RtcMediaStreamTrackStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "audioLevel")] + fn audio_level_shim(this: &RtcMediaStreamTrackStats) -> f64; #[wasm_bindgen(method, setter = "audioLevel")] - fn audio_level_shim(this: &RtcMediaStreamTrackStats, val: f64); + fn set_audio_level_shim(this: &RtcMediaStreamTrackStats, val: f64); + #[wasm_bindgen(method, getter = "echoReturnLoss")] + fn echo_return_loss_shim(this: &RtcMediaStreamTrackStats) -> f64; #[wasm_bindgen(method, setter = "echoReturnLoss")] - fn echo_return_loss_shim(this: &RtcMediaStreamTrackStats, val: f64); + fn set_echo_return_loss_shim(this: &RtcMediaStreamTrackStats, val: f64); + #[wasm_bindgen(method, getter = "echoReturnLossEnhancement")] + fn echo_return_loss_enhancement_shim(this: &RtcMediaStreamTrackStats) -> f64; #[wasm_bindgen(method, setter = "echoReturnLossEnhancement")] - fn echo_return_loss_enhancement_shim(this: &RtcMediaStreamTrackStats, val: f64); + fn set_echo_return_loss_enhancement_shim(this: &RtcMediaStreamTrackStats, val: f64); + #[wasm_bindgen(method, getter = "frameHeight")] + fn frame_height_shim(this: &RtcMediaStreamTrackStats) -> u32; #[wasm_bindgen(method, setter = "frameHeight")] - fn frame_height_shim(this: &RtcMediaStreamTrackStats, val: u32); + fn set_frame_height_shim(this: &RtcMediaStreamTrackStats, val: u32); + #[wasm_bindgen(method, getter = "frameWidth")] + fn frame_width_shim(this: &RtcMediaStreamTrackStats) -> u32; #[wasm_bindgen(method, setter = "frameWidth")] - fn frame_width_shim(this: &RtcMediaStreamTrackStats, val: u32); + fn set_frame_width_shim(this: &RtcMediaStreamTrackStats, val: u32); + #[wasm_bindgen(method, getter = "framesCorrupted")] + fn frames_corrupted_shim(this: &RtcMediaStreamTrackStats) -> u32; #[wasm_bindgen(method, setter = "framesCorrupted")] - fn frames_corrupted_shim(this: &RtcMediaStreamTrackStats, val: u32); + fn set_frames_corrupted_shim(this: &RtcMediaStreamTrackStats, val: u32); + #[wasm_bindgen(method, getter = "framesDecoded")] + fn frames_decoded_shim(this: &RtcMediaStreamTrackStats) -> u32; #[wasm_bindgen(method, setter = "framesDecoded")] - fn frames_decoded_shim(this: &RtcMediaStreamTrackStats, val: u32); + fn set_frames_decoded_shim(this: &RtcMediaStreamTrackStats, val: u32); + #[wasm_bindgen(method, getter = "framesDropped")] + fn frames_dropped_shim(this: &RtcMediaStreamTrackStats) -> u32; #[wasm_bindgen(method, setter = "framesDropped")] - fn frames_dropped_shim(this: &RtcMediaStreamTrackStats, val: u32); + fn set_frames_dropped_shim(this: &RtcMediaStreamTrackStats, val: u32); + #[wasm_bindgen(method, getter = "framesPerSecond")] + fn frames_per_second_shim(this: &RtcMediaStreamTrackStats) -> f64; #[wasm_bindgen(method, setter = "framesPerSecond")] - fn frames_per_second_shim(this: &RtcMediaStreamTrackStats, val: f64); + fn set_frames_per_second_shim(this: &RtcMediaStreamTrackStats, val: f64); + #[wasm_bindgen(method, getter = "framesReceived")] + fn frames_received_shim(this: &RtcMediaStreamTrackStats) -> u32; #[wasm_bindgen(method, setter = "framesReceived")] - fn frames_received_shim(this: &RtcMediaStreamTrackStats, val: u32); + fn set_frames_received_shim(this: &RtcMediaStreamTrackStats, val: u32); + #[wasm_bindgen(method, getter = "framesSent")] + fn frames_sent_shim(this: &RtcMediaStreamTrackStats) -> u32; #[wasm_bindgen(method, setter = "framesSent")] - fn frames_sent_shim(this: &RtcMediaStreamTrackStats, val: u32); + fn set_frames_sent_shim(this: &RtcMediaStreamTrackStats, val: u32); + #[wasm_bindgen(method, getter = "remoteSource")] + fn remote_source_shim(this: &RtcMediaStreamTrackStats) -> bool; #[wasm_bindgen(method, setter = "remoteSource")] - fn remote_source_shim(this: &RtcMediaStreamTrackStats, val: bool); + fn set_remote_source_shim(this: &RtcMediaStreamTrackStats, val: bool); + #[wasm_bindgen(method, getter = "ssrcIds")] + fn ssrc_ids_shim(this: &RtcMediaStreamTrackStats) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "ssrcIds")] - fn ssrc_ids_shim(this: &RtcMediaStreamTrackStats, val: &::wasm_bindgen::JsValue); + fn set_ssrc_ids_shim(this: &RtcMediaStreamTrackStats, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "trackIdentifier")] + fn track_identifier_shim(this: &RtcMediaStreamTrackStats) -> String; #[wasm_bindgen(method, setter = "trackIdentifier")] - fn track_identifier_shim(this: &RtcMediaStreamTrackStats, val: &str); + fn set_track_identifier_shim(this: &RtcMediaStreamTrackStats, val: &str); +} +#[doc = "The trait to access properties on the `RtcMediaStreamTrackStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] +pub trait RtcMediaStreamTrackStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`, `RtcStatsType`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn audio_level(&self) -> f64; + #[doc = "Get the `echoReturnLoss` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn echo_return_loss(&self) -> f64; + #[doc = "Get the `echoReturnLossEnhancement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn echo_return_loss_enhancement(&self) -> f64; + #[doc = "Get the `frameHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn frame_height(&self) -> u32; + #[doc = "Get the `frameWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn frame_width(&self) -> u32; + #[doc = "Get the `framesCorrupted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn frames_corrupted(&self) -> u32; + #[doc = "Get the `framesDecoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn frames_decoded(&self) -> u32; + #[doc = "Get the `framesDropped` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn frames_dropped(&self) -> u32; + #[doc = "Get the `framesPerSecond` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn frames_per_second(&self) -> f64; + #[doc = "Get the `framesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn frames_received(&self) -> u32; + #[doc = "Get the `framesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn frames_sent(&self) -> u32; + #[doc = "Get the `remoteSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn remote_source(&self) -> bool; + #[doc = "Get the `ssrcIds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn ssrc_ids(&self) -> ::js_sys::Array; + #[doc = "Get the `trackIdentifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] + fn track_identifier(&self) -> String; +} +impl RtcMediaStreamTrackStatsGetters for RtcMediaStreamTrackStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn audio_level(&self) -> f64 { + self.audio_level_shim() + } + fn echo_return_loss(&self) -> f64 { + self.echo_return_loss_shim() + } + fn echo_return_loss_enhancement(&self) -> f64 { + self.echo_return_loss_enhancement_shim() + } + fn frame_height(&self) -> u32 { + self.frame_height_shim() + } + fn frame_width(&self) -> u32 { + self.frame_width_shim() + } + fn frames_corrupted(&self) -> u32 { + self.frames_corrupted_shim() + } + fn frames_decoded(&self) -> u32 { + self.frames_decoded_shim() + } + fn frames_dropped(&self) -> u32 { + self.frames_dropped_shim() + } + fn frames_per_second(&self) -> f64 { + self.frames_per_second_shim() + } + fn frames_received(&self) -> u32 { + self.frames_received_shim() + } + fn frames_sent(&self) -> u32 { + self.frames_sent_shim() + } + fn remote_source(&self) -> bool { + self.remote_source_shim() + } + fn ssrc_ids(&self) -> ::js_sys::Array { + self.ssrc_ids_shim() + } + fn track_identifier(&self) -> String { + self.track_identifier_shim() + } } impl RtcMediaStreamTrackStats { #[doc = "Construct a new `RtcMediaStreamTrackStats`."] @@ -59,14 +222,14 @@ impl RtcMediaStreamTrackStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -74,105 +237,105 @@ impl RtcMediaStreamTrackStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`, `RtcStatsType`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `audioLevel` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn audio_level(&mut self, val: f64) -> &mut Self { - self.audio_level_shim(val); + self.set_audio_level_shim(val); self } #[doc = "Change the `echoReturnLoss` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn echo_return_loss(&mut self, val: f64) -> &mut Self { - self.echo_return_loss_shim(val); + self.set_echo_return_loss_shim(val); self } #[doc = "Change the `echoReturnLossEnhancement` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn echo_return_loss_enhancement(&mut self, val: f64) -> &mut Self { - self.echo_return_loss_enhancement_shim(val); + self.set_echo_return_loss_enhancement_shim(val); self } #[doc = "Change the `frameHeight` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn frame_height(&mut self, val: u32) -> &mut Self { - self.frame_height_shim(val); + self.set_frame_height_shim(val); self } #[doc = "Change the `frameWidth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn frame_width(&mut self, val: u32) -> &mut Self { - self.frame_width_shim(val); + self.set_frame_width_shim(val); self } #[doc = "Change the `framesCorrupted` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn frames_corrupted(&mut self, val: u32) -> &mut Self { - self.frames_corrupted_shim(val); + self.set_frames_corrupted_shim(val); self } #[doc = "Change the `framesDecoded` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn frames_decoded(&mut self, val: u32) -> &mut Self { - self.frames_decoded_shim(val); + self.set_frames_decoded_shim(val); self } #[doc = "Change the `framesDropped` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn frames_dropped(&mut self, val: u32) -> &mut Self { - self.frames_dropped_shim(val); + self.set_frames_dropped_shim(val); self } #[doc = "Change the `framesPerSecond` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn frames_per_second(&mut self, val: f64) -> &mut Self { - self.frames_per_second_shim(val); + self.set_frames_per_second_shim(val); self } #[doc = "Change the `framesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn frames_received(&mut self, val: u32) -> &mut Self { - self.frames_received_shim(val); + self.set_frames_received_shim(val); self } #[doc = "Change the `framesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn frames_sent(&mut self, val: u32) -> &mut Self { - self.frames_sent_shim(val); + self.set_frames_sent_shim(val); self } #[doc = "Change the `remoteSource` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn remote_source(&mut self, val: bool) -> &mut Self { - self.remote_source_shim(val); + self.set_remote_source_shim(val); self } #[doc = "Change the `ssrcIds` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn ssrc_ids(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ssrc_ids_shim(val); + self.set_ssrc_ids_shim(val); self } #[doc = "Change the `trackIdentifier` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcMediaStreamTrackStats`*"] pub fn track_identifier(&mut self, val: &str) -> &mut Self { - self.track_identifier_shim(val); + self.set_track_identifier_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcOfferAnswerOptions.rs b/crates/web-sys/src/features/gen_RtcOfferAnswerOptions.rs index dc4330d9cd4..24200e14be3 100644 --- a/crates/web-sys/src/features/gen_RtcOfferAnswerOptions.rs +++ b/crates/web-sys/src/features/gen_RtcOfferAnswerOptions.rs @@ -11,6 +11,11 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcOfferAnswerOptions`*"] pub type RtcOfferAnswerOptions; } +#[doc = "The trait to access properties on the `RtcOfferAnswerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcOfferAnswerOptions`*"] +pub trait RtcOfferAnswerOptionsGetters {} +impl RtcOfferAnswerOptionsGetters for RtcOfferAnswerOptions {} impl RtcOfferAnswerOptions { #[doc = "Construct a new `RtcOfferAnswerOptions`."] #[doc = ""] diff --git a/crates/web-sys/src/features/gen_RtcOfferOptions.rs b/crates/web-sys/src/features/gen_RtcOfferOptions.rs index 11082e23695..cb741b90289 100644 --- a/crates/web-sys/src/features/gen_RtcOfferOptions.rs +++ b/crates/web-sys/src/features/gen_RtcOfferOptions.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] pub type RtcOfferOptions; + #[wasm_bindgen(method, getter = "iceRestart")] + fn ice_restart_shim(this: &RtcOfferOptions) -> bool; #[wasm_bindgen(method, setter = "iceRestart")] - fn ice_restart_shim(this: &RtcOfferOptions, val: bool); + fn set_ice_restart_shim(this: &RtcOfferOptions, val: bool); + #[wasm_bindgen(method, getter = "offerToReceiveAudio")] + fn offer_to_receive_audio_shim(this: &RtcOfferOptions) -> bool; #[wasm_bindgen(method, setter = "offerToReceiveAudio")] - fn offer_to_receive_audio_shim(this: &RtcOfferOptions, val: bool); + fn set_offer_to_receive_audio_shim(this: &RtcOfferOptions, val: bool); + #[wasm_bindgen(method, getter = "offerToReceiveVideo")] + fn offer_to_receive_video_shim(this: &RtcOfferOptions) -> bool; #[wasm_bindgen(method, setter = "offerToReceiveVideo")] - fn offer_to_receive_video_shim(this: &RtcOfferOptions, val: bool); + fn set_offer_to_receive_video_shim(this: &RtcOfferOptions, val: bool); +} +#[doc = "The trait to access properties on the `RtcOfferOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] +pub trait RtcOfferOptionsGetters { + #[doc = "Get the `iceRestart` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + fn ice_restart(&self) -> bool; + #[doc = "Get the `offerToReceiveAudio` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + fn offer_to_receive_audio(&self) -> bool; + #[doc = "Get the `offerToReceiveVideo` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] + fn offer_to_receive_video(&self) -> bool; +} +impl RtcOfferOptionsGetters for RtcOfferOptions { + fn ice_restart(&self) -> bool { + self.ice_restart_shim() + } + fn offer_to_receive_audio(&self) -> bool { + self.offer_to_receive_audio_shim() + } + fn offer_to_receive_video(&self) -> bool { + self.offer_to_receive_video_shim() + } } impl RtcOfferOptions { #[doc = "Construct a new `RtcOfferOptions`."] @@ -30,21 +64,21 @@ impl RtcOfferOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] pub fn ice_restart(&mut self, val: bool) -> &mut Self { - self.ice_restart_shim(val); + self.set_ice_restart_shim(val); self } #[doc = "Change the `offerToReceiveAudio` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] pub fn offer_to_receive_audio(&mut self, val: bool) -> &mut Self { - self.offer_to_receive_audio_shim(val); + self.set_offer_to_receive_audio_shim(val); self } #[doc = "Change the `offerToReceiveVideo` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOfferOptions`*"] pub fn offer_to_receive_video(&mut self, val: bool) -> &mut Self { - self.offer_to_receive_video_shim(val); + self.set_offer_to_receive_video_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs b/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs index 34881d1b56f..200ae040542 100644 --- a/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcOutboundRtpStreamStats.rs @@ -10,51 +10,259 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub type RtcOutboundRtpStreamStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcOutboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + fn set_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcOutboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcOutboundRtpStreamStats, val: f64); + fn set_timestamp_shim(this: &RtcOutboundRtpStreamStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcOutboundRtpStreamStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcOutboundRtpStreamStats, val: RtcStatsType); + fn set_type__shim(this: &RtcOutboundRtpStreamStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "bitrateMean")] + fn bitrate_mean_shim(this: &RtcOutboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "bitrateMean")] - fn bitrate_mean_shim(this: &RtcOutboundRtpStreamStats, val: f64); + fn set_bitrate_mean_shim(this: &RtcOutboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "bitrateStdDev")] + fn bitrate_std_dev_shim(this: &RtcOutboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "bitrateStdDev")] - fn bitrate_std_dev_shim(this: &RtcOutboundRtpStreamStats, val: f64); + fn set_bitrate_std_dev_shim(this: &RtcOutboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "codecId")] + fn codec_id_shim(this: &RtcOutboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "codecId")] - fn codec_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + fn set_codec_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "firCount")] + fn fir_count_shim(this: &RtcOutboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "firCount")] - fn fir_count_shim(this: &RtcOutboundRtpStreamStats, val: u32); + fn set_fir_count_shim(this: &RtcOutboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "framerateMean")] + fn framerate_mean_shim(this: &RtcOutboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "framerateMean")] - fn framerate_mean_shim(this: &RtcOutboundRtpStreamStats, val: f64); + fn set_framerate_mean_shim(this: &RtcOutboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "framerateStdDev")] + fn framerate_std_dev_shim(this: &RtcOutboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "framerateStdDev")] - fn framerate_std_dev_shim(this: &RtcOutboundRtpStreamStats, val: f64); + fn set_framerate_std_dev_shim(this: &RtcOutboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "isRemote")] + fn is_remote_shim(this: &RtcOutboundRtpStreamStats) -> bool; #[wasm_bindgen(method, setter = "isRemote")] - fn is_remote_shim(this: &RtcOutboundRtpStreamStats, val: bool); + fn set_is_remote_shim(this: &RtcOutboundRtpStreamStats, val: bool); + #[wasm_bindgen(method, getter = "mediaTrackId")] + fn media_track_id_shim(this: &RtcOutboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "mediaTrackId")] - fn media_track_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + fn set_media_track_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "mediaType")] + fn media_type_shim(this: &RtcOutboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "mediaType")] - fn media_type_shim(this: &RtcOutboundRtpStreamStats, val: &str); + fn set_media_type_shim(this: &RtcOutboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "nackCount")] + fn nack_count_shim(this: &RtcOutboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "nackCount")] - fn nack_count_shim(this: &RtcOutboundRtpStreamStats, val: u32); + fn set_nack_count_shim(this: &RtcOutboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "pliCount")] + fn pli_count_shim(this: &RtcOutboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "pliCount")] - fn pli_count_shim(this: &RtcOutboundRtpStreamStats, val: u32); + fn set_pli_count_shim(this: &RtcOutboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "remoteId")] + fn remote_id_shim(this: &RtcOutboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "remoteId")] - fn remote_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + fn set_remote_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "ssrc")] + fn ssrc_shim(this: &RtcOutboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcOutboundRtpStreamStats, val: &str); + fn set_ssrc_shim(this: &RtcOutboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "transportId")] + fn transport_id_shim(this: &RtcOutboundRtpStreamStats) -> String; #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + fn set_transport_id_shim(this: &RtcOutboundRtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "bytesSent")] + fn bytes_sent_shim(this: &RtcOutboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &RtcOutboundRtpStreamStats, val: f64); + fn set_bytes_sent_shim(this: &RtcOutboundRtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "droppedFrames")] + fn dropped_frames_shim(this: &RtcOutboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "droppedFrames")] - fn dropped_frames_shim(this: &RtcOutboundRtpStreamStats, val: u32); + fn set_dropped_frames_shim(this: &RtcOutboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "framesEncoded")] + fn frames_encoded_shim(this: &RtcOutboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "framesEncoded")] - fn frames_encoded_shim(this: &RtcOutboundRtpStreamStats, val: u32); + fn set_frames_encoded_shim(this: &RtcOutboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "packetsSent")] + fn packets_sent_shim(this: &RtcOutboundRtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "packetsSent")] - fn packets_sent_shim(this: &RtcOutboundRtpStreamStats, val: u32); + fn set_packets_sent_shim(this: &RtcOutboundRtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "targetBitrate")] + fn target_bitrate_shim(this: &RtcOutboundRtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "targetBitrate")] - fn target_bitrate_shim(this: &RtcOutboundRtpStreamStats, val: f64); + fn set_target_bitrate_shim(this: &RtcOutboundRtpStreamStats, val: f64); +} +#[doc = "The trait to access properties on the `RtcOutboundRtpStreamStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] +pub trait RtcOutboundRtpStreamStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`, `RtcStatsType`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn bitrate_mean(&self) -> f64; + #[doc = "Get the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn bitrate_std_dev(&self) -> f64; + #[doc = "Get the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn codec_id(&self) -> String; + #[doc = "Get the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn fir_count(&self) -> u32; + #[doc = "Get the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn framerate_mean(&self) -> f64; + #[doc = "Get the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn framerate_std_dev(&self) -> f64; + #[doc = "Get the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn is_remote(&self) -> bool; + #[doc = "Get the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn media_track_id(&self) -> String; + #[doc = "Get the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn media_type(&self) -> String; + #[doc = "Get the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn nack_count(&self) -> u32; + #[doc = "Get the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn pli_count(&self) -> u32; + #[doc = "Get the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn remote_id(&self) -> String; + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn ssrc(&self) -> String; + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn transport_id(&self) -> String; + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn bytes_sent(&self) -> f64; + #[doc = "Get the `droppedFrames` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn dropped_frames(&self) -> u32; + #[doc = "Get the `framesEncoded` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn frames_encoded(&self) -> u32; + #[doc = "Get the `packetsSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn packets_sent(&self) -> u32; + #[doc = "Get the `targetBitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] + fn target_bitrate(&self) -> f64; +} +impl RtcOutboundRtpStreamStatsGetters for RtcOutboundRtpStreamStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn bitrate_mean(&self) -> f64 { + self.bitrate_mean_shim() + } + fn bitrate_std_dev(&self) -> f64 { + self.bitrate_std_dev_shim() + } + fn codec_id(&self) -> String { + self.codec_id_shim() + } + fn fir_count(&self) -> u32 { + self.fir_count_shim() + } + fn framerate_mean(&self) -> f64 { + self.framerate_mean_shim() + } + fn framerate_std_dev(&self) -> f64 { + self.framerate_std_dev_shim() + } + fn is_remote(&self) -> bool { + self.is_remote_shim() + } + fn media_track_id(&self) -> String { + self.media_track_id_shim() + } + fn media_type(&self) -> String { + self.media_type_shim() + } + fn nack_count(&self) -> u32 { + self.nack_count_shim() + } + fn pli_count(&self) -> u32 { + self.pli_count_shim() + } + fn remote_id(&self) -> String { + self.remote_id_shim() + } + fn ssrc(&self) -> String { + self.ssrc_shim() + } + fn transport_id(&self) -> String { + self.transport_id_shim() + } + fn bytes_sent(&self) -> f64 { + self.bytes_sent_shim() + } + fn dropped_frames(&self) -> u32 { + self.dropped_frames_shim() + } + fn frames_encoded(&self) -> u32 { + self.frames_encoded_shim() + } + fn packets_sent(&self) -> u32 { + self.packets_sent_shim() + } + fn target_bitrate(&self) -> f64 { + self.target_bitrate_shim() + } } impl RtcOutboundRtpStreamStats { #[doc = "Construct a new `RtcOutboundRtpStreamStats`."] @@ -69,14 +277,14 @@ impl RtcOutboundRtpStreamStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -84,140 +292,140 @@ impl RtcOutboundRtpStreamStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`, `RtcStatsType`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `bitrateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn bitrate_mean(&mut self, val: f64) -> &mut Self { - self.bitrate_mean_shim(val); + self.set_bitrate_mean_shim(val); self } #[doc = "Change the `bitrateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self { - self.bitrate_std_dev_shim(val); + self.set_bitrate_std_dev_shim(val); self } #[doc = "Change the `codecId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn codec_id(&mut self, val: &str) -> &mut Self { - self.codec_id_shim(val); + self.set_codec_id_shim(val); self } #[doc = "Change the `firCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn fir_count(&mut self, val: u32) -> &mut Self { - self.fir_count_shim(val); + self.set_fir_count_shim(val); self } #[doc = "Change the `framerateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn framerate_mean(&mut self, val: f64) -> &mut Self { - self.framerate_mean_shim(val); + self.set_framerate_mean_shim(val); self } #[doc = "Change the `framerateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self { - self.framerate_std_dev_shim(val); + self.set_framerate_std_dev_shim(val); self } #[doc = "Change the `isRemote` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn is_remote(&mut self, val: bool) -> &mut Self { - self.is_remote_shim(val); + self.set_is_remote_shim(val); self } #[doc = "Change the `mediaTrackId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn media_track_id(&mut self, val: &str) -> &mut Self { - self.media_track_id_shim(val); + self.set_media_track_id_shim(val); self } #[doc = "Change the `mediaType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn media_type(&mut self, val: &str) -> &mut Self { - self.media_type_shim(val); + self.set_media_type_shim(val); self } #[doc = "Change the `nackCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn nack_count(&mut self, val: u32) -> &mut Self { - self.nack_count_shim(val); + self.set_nack_count_shim(val); self } #[doc = "Change the `pliCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn pli_count(&mut self, val: u32) -> &mut Self { - self.pli_count_shim(val); + self.set_pli_count_shim(val); self } #[doc = "Change the `remoteId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn remote_id(&mut self, val: &str) -> &mut Self { - self.remote_id_shim(val); + self.set_remote_id_shim(val); self } #[doc = "Change the `ssrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn ssrc(&mut self, val: &str) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc_shim(val); self } #[doc = "Change the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id_shim(val); self } #[doc = "Change the `bytesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent_shim(val); self } #[doc = "Change the `droppedFrames` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn dropped_frames(&mut self, val: u32) -> &mut Self { - self.dropped_frames_shim(val); + self.set_dropped_frames_shim(val); self } #[doc = "Change the `framesEncoded` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn frames_encoded(&mut self, val: u32) -> &mut Self { - self.frames_encoded_shim(val); + self.set_frames_encoded_shim(val); self } #[doc = "Change the `packetsSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn packets_sent(&mut self, val: u32) -> &mut Self { - self.packets_sent_shim(val); + self.set_packets_sent_shim(val); self } #[doc = "Change the `targetBitrate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcOutboundRtpStreamStats`*"] pub fn target_bitrate(&mut self, val: f64) -> &mut Self { - self.target_bitrate_shim(val); + self.set_target_bitrate_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs b/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs index b82a2c9e22e..537cffdb972 100644 --- a/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcPeerConnectionIceEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] pub type RtcPeerConnectionIceEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &RtcPeerConnectionIceEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &RtcPeerConnectionIceEventInit, val: bool); + fn set_bubbles_shim(this: &RtcPeerConnectionIceEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &RtcPeerConnectionIceEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &RtcPeerConnectionIceEventInit, val: bool); + fn set_cancelable_shim(this: &RtcPeerConnectionIceEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &RtcPeerConnectionIceEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &RtcPeerConnectionIceEventInit, val: bool); + fn set_composed_shim(this: &RtcPeerConnectionIceEventInit, val: bool); + #[cfg(feature = "RtcIceCandidate")] + #[wasm_bindgen(method, getter = "candidate")] + fn candidate_shim(this: &RtcPeerConnectionIceEventInit) -> Option; #[cfg(feature = "RtcIceCandidate")] #[wasm_bindgen(method, setter = "candidate")] - fn candidate_shim(this: &RtcPeerConnectionIceEventInit, val: Option<&RtcIceCandidate>); + fn set_candidate_shim(this: &RtcPeerConnectionIceEventInit, val: Option<&RtcIceCandidate>); +} +#[doc = "The trait to access properties on the `RtcPeerConnectionIceEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] +pub trait RtcPeerConnectionIceEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "RtcIceCandidate")] + #[doc = "Get the `candidate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcPeerConnectionIceEventInit`*"] + fn candidate(&self) -> Option; +} +impl RtcPeerConnectionIceEventInitGetters for RtcPeerConnectionIceEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "RtcIceCandidate")] + fn candidate(&self) -> Option { + self.candidate_shim() + } } impl RtcPeerConnectionIceEventInit { #[doc = "Construct a new `RtcPeerConnectionIceEventInit`."] @@ -33,21 +79,21 @@ impl RtcPeerConnectionIceEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcPeerConnectionIceEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "RtcIceCandidate")] @@ -55,7 +101,7 @@ impl RtcPeerConnectionIceEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcIceCandidate`, `RtcPeerConnectionIceEventInit`*"] pub fn candidate(&mut self, val: Option<&RtcIceCandidate>) -> &mut Self { - self.candidate_shim(val); + self.set_candidate_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtcpParameters.rs b/crates/web-sys/src/features/gen_RtcRtcpParameters.rs index 37fa913401f..7fc89322ba5 100644 --- a/crates/web-sys/src/features/gen_RtcRtcpParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtcpParameters.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] pub type RtcRtcpParameters; + #[wasm_bindgen(method, getter = "cname")] + fn cname_shim(this: &RtcRtcpParameters) -> String; #[wasm_bindgen(method, setter = "cname")] - fn cname_shim(this: &RtcRtcpParameters, val: &str); + fn set_cname_shim(this: &RtcRtcpParameters, val: &str); + #[wasm_bindgen(method, getter = "reducedSize")] + fn reduced_size_shim(this: &RtcRtcpParameters) -> bool; #[wasm_bindgen(method, setter = "reducedSize")] - fn reduced_size_shim(this: &RtcRtcpParameters, val: bool); + fn set_reduced_size_shim(this: &RtcRtcpParameters, val: bool); +} +#[doc = "The trait to access properties on the `RtcRtcpParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] +pub trait RtcRtcpParametersGetters { + #[doc = "Get the `cname` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] + fn cname(&self) -> String; + #[doc = "Get the `reducedSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] + fn reduced_size(&self) -> bool; +} +impl RtcRtcpParametersGetters for RtcRtcpParameters { + fn cname(&self) -> String { + self.cname_shim() + } + fn reduced_size(&self) -> bool { + self.reduced_size_shim() + } } impl RtcRtcpParameters { #[doc = "Construct a new `RtcRtcpParameters`."] @@ -28,14 +53,14 @@ impl RtcRtcpParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] pub fn cname(&mut self, val: &str) -> &mut Self { - self.cname_shim(val); + self.set_cname_shim(val); self } #[doc = "Change the `reducedSize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`*"] pub fn reduced_size(&mut self, val: bool) -> &mut Self { - self.reduced_size_shim(val); + self.set_reduced_size_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs b/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs index b0b0fa4f9de..7ebf335ab99 100644 --- a/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs +++ b/crates/web-sys/src/features/gen_RtcRtpCapabilities.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] pub type RtcRtpCapabilities; + #[wasm_bindgen(method, getter = "codecs")] + fn codecs_shim(this: &RtcRtpCapabilities) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "codecs")] - fn codecs_shim(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); + fn set_codecs_shim(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "headerExtensions")] + fn header_extensions_shim(this: &RtcRtpCapabilities) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "headerExtensions")] - fn header_extensions_shim(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); + fn set_header_extensions_shim(this: &RtcRtpCapabilities, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `RtcRtpCapabilities` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] +pub trait RtcRtpCapabilitiesGetters { + #[doc = "Get the `codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] + fn codecs(&self) -> ::js_sys::Array; + #[doc = "Get the `headerExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] + fn header_extensions(&self) -> ::js_sys::Array; +} +impl RtcRtpCapabilitiesGetters for RtcRtpCapabilities { + fn codecs(&self) -> ::js_sys::Array { + self.codecs_shim() + } + fn header_extensions(&self) -> ::js_sys::Array { + self.header_extensions_shim() + } } impl RtcRtpCapabilities { #[doc = "Construct a new `RtcRtpCapabilities`."] @@ -25,22 +50,22 @@ impl RtcRtpCapabilities { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.codecs(codecs); - ret.header_extensions(header_extensions); + Self::codecs(&mut ret, codecs); + Self::header_extensions(&mut ret, header_extensions); ret } #[doc = "Change the `codecs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] pub fn codecs(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.codecs_shim(val); + self.set_codecs_shim(val); self } #[doc = "Change the `headerExtensions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCapabilities`*"] pub fn header_extensions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.header_extensions_shim(val); + self.set_header_extensions_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs b/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs index 1e229356986..292f26570cf 100644 --- a/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs +++ b/crates/web-sys/src/features/gen_RtcRtpCodecCapability.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] pub type RtcRtpCodecCapability; + #[wasm_bindgen(method, getter = "channels")] + fn channels_shim(this: &RtcRtpCodecCapability) -> u16; #[wasm_bindgen(method, setter = "channels")] - fn channels_shim(this: &RtcRtpCodecCapability, val: u16); + fn set_channels_shim(this: &RtcRtpCodecCapability, val: u16); + #[wasm_bindgen(method, getter = "clockRate")] + fn clock_rate_shim(this: &RtcRtpCodecCapability) -> u32; #[wasm_bindgen(method, setter = "clockRate")] - fn clock_rate_shim(this: &RtcRtpCodecCapability, val: u32); + fn set_clock_rate_shim(this: &RtcRtpCodecCapability, val: u32); + #[wasm_bindgen(method, getter = "mimeType")] + fn mime_type_shim(this: &RtcRtpCodecCapability) -> String; #[wasm_bindgen(method, setter = "mimeType")] - fn mime_type_shim(this: &RtcRtpCodecCapability, val: &str); + fn set_mime_type_shim(this: &RtcRtpCodecCapability, val: &str); + #[wasm_bindgen(method, getter = "sdpFmtpLine")] + fn sdp_fmtp_line_shim(this: &RtcRtpCodecCapability) -> String; #[wasm_bindgen(method, setter = "sdpFmtpLine")] - fn sdp_fmtp_line_shim(this: &RtcRtpCodecCapability, val: &str); + fn set_sdp_fmtp_line_shim(this: &RtcRtpCodecCapability, val: &str); +} +#[doc = "The trait to access properties on the `RtcRtpCodecCapability` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] +pub trait RtcRtpCodecCapabilityGetters { + #[doc = "Get the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + fn channels(&self) -> u16; + #[doc = "Get the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + fn clock_rate(&self) -> u32; + #[doc = "Get the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + fn mime_type(&self) -> String; + #[doc = "Get the `sdpFmtpLine` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] + fn sdp_fmtp_line(&self) -> String; +} +impl RtcRtpCodecCapabilityGetters for RtcRtpCodecCapability { + fn channels(&self) -> u16 { + self.channels_shim() + } + fn clock_rate(&self) -> u32 { + self.clock_rate_shim() + } + fn mime_type(&self) -> String { + self.mime_type_shim() + } + fn sdp_fmtp_line(&self) -> String { + self.sdp_fmtp_line_shim() + } } impl RtcRtpCodecCapability { #[doc = "Construct a new `RtcRtpCodecCapability`."] @@ -26,36 +69,36 @@ impl RtcRtpCodecCapability { pub fn new(clock_rate: u32, mime_type: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.clock_rate(clock_rate); - ret.mime_type(mime_type); + Self::clock_rate(&mut ret, clock_rate); + Self::mime_type(&mut ret, mime_type); ret } #[doc = "Change the `channels` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] pub fn channels(&mut self, val: u16) -> &mut Self { - self.channels_shim(val); + self.set_channels_shim(val); self } #[doc = "Change the `clockRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] pub fn clock_rate(&mut self, val: u32) -> &mut Self { - self.clock_rate_shim(val); + self.set_clock_rate_shim(val); self } #[doc = "Change the `mimeType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] pub fn mime_type(&mut self, val: &str) -> &mut Self { - self.mime_type_shim(val); + self.set_mime_type_shim(val); self } #[doc = "Change the `sdpFmtpLine` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecCapability`*"] pub fn sdp_fmtp_line(&mut self, val: &str) -> &mut Self { - self.sdp_fmtp_line_shim(val); + self.set_sdp_fmtp_line_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs b/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs index 0293a310175..2a751f96794 100644 --- a/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpCodecParameters.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] pub type RtcRtpCodecParameters; + #[wasm_bindgen(method, getter = "channels")] + fn channels_shim(this: &RtcRtpCodecParameters) -> u16; #[wasm_bindgen(method, setter = "channels")] - fn channels_shim(this: &RtcRtpCodecParameters, val: u16); + fn set_channels_shim(this: &RtcRtpCodecParameters, val: u16); + #[wasm_bindgen(method, getter = "clockRate")] + fn clock_rate_shim(this: &RtcRtpCodecParameters) -> u32; #[wasm_bindgen(method, setter = "clockRate")] - fn clock_rate_shim(this: &RtcRtpCodecParameters, val: u32); + fn set_clock_rate_shim(this: &RtcRtpCodecParameters, val: u32); + #[wasm_bindgen(method, getter = "mimeType")] + fn mime_type_shim(this: &RtcRtpCodecParameters) -> String; #[wasm_bindgen(method, setter = "mimeType")] - fn mime_type_shim(this: &RtcRtpCodecParameters, val: &str); + fn set_mime_type_shim(this: &RtcRtpCodecParameters, val: &str); + #[wasm_bindgen(method, getter = "payloadType")] + fn payload_type_shim(this: &RtcRtpCodecParameters) -> u16; #[wasm_bindgen(method, setter = "payloadType")] - fn payload_type_shim(this: &RtcRtpCodecParameters, val: u16); + fn set_payload_type_shim(this: &RtcRtpCodecParameters, val: u16); + #[wasm_bindgen(method, getter = "sdpFmtpLine")] + fn sdp_fmtp_line_shim(this: &RtcRtpCodecParameters) -> String; #[wasm_bindgen(method, setter = "sdpFmtpLine")] - fn sdp_fmtp_line_shim(this: &RtcRtpCodecParameters, val: &str); + fn set_sdp_fmtp_line_shim(this: &RtcRtpCodecParameters, val: &str); +} +#[doc = "The trait to access properties on the `RtcRtpCodecParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] +pub trait RtcRtpCodecParametersGetters { + #[doc = "Get the `channels` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + fn channels(&self) -> u16; + #[doc = "Get the `clockRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + fn clock_rate(&self) -> u32; + #[doc = "Get the `mimeType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + fn mime_type(&self) -> String; + #[doc = "Get the `payloadType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + fn payload_type(&self) -> u16; + #[doc = "Get the `sdpFmtpLine` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] + fn sdp_fmtp_line(&self) -> String; +} +impl RtcRtpCodecParametersGetters for RtcRtpCodecParameters { + fn channels(&self) -> u16 { + self.channels_shim() + } + fn clock_rate(&self) -> u32 { + self.clock_rate_shim() + } + fn mime_type(&self) -> String { + self.mime_type_shim() + } + fn payload_type(&self) -> u16 { + self.payload_type_shim() + } + fn sdp_fmtp_line(&self) -> String { + self.sdp_fmtp_line_shim() + } } impl RtcRtpCodecParameters { #[doc = "Construct a new `RtcRtpCodecParameters`."] @@ -34,35 +86,35 @@ impl RtcRtpCodecParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] pub fn channels(&mut self, val: u16) -> &mut Self { - self.channels_shim(val); + self.set_channels_shim(val); self } #[doc = "Change the `clockRate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] pub fn clock_rate(&mut self, val: u32) -> &mut Self { - self.clock_rate_shim(val); + self.set_clock_rate_shim(val); self } #[doc = "Change the `mimeType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] pub fn mime_type(&mut self, val: &str) -> &mut Self { - self.mime_type_shim(val); + self.set_mime_type_shim(val); self } #[doc = "Change the `payloadType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] pub fn payload_type(&mut self, val: u16) -> &mut Self { - self.payload_type_shim(val); + self.set_payload_type_shim(val); self } #[doc = "Change the `sdpFmtpLine` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpCodecParameters`*"] pub fn sdp_fmtp_line(&mut self, val: &str) -> &mut Self { - self.sdp_fmtp_line_shim(val); + self.set_sdp_fmtp_line_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs b/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs index 5cec0c96708..7d39d7277b0 100644 --- a/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs +++ b/crates/web-sys/src/features/gen_RtcRtpContributingSource.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] pub type RtcRtpContributingSource; + #[wasm_bindgen(method, getter = "audioLevel")] + fn audio_level_shim(this: &RtcRtpContributingSource) -> f64; #[wasm_bindgen(method, setter = "audioLevel")] - fn audio_level_shim(this: &RtcRtpContributingSource, val: f64); + fn set_audio_level_shim(this: &RtcRtpContributingSource, val: f64); + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &RtcRtpContributingSource) -> u32; #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &RtcRtpContributingSource, val: u32); + fn set_source_shim(this: &RtcRtpContributingSource, val: u32); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcRtpContributingSource) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcRtpContributingSource, val: f64); + fn set_timestamp_shim(this: &RtcRtpContributingSource, val: f64); +} +#[doc = "The trait to access properties on the `RtcRtpContributingSource` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] +pub trait RtcRtpContributingSourceGetters { + #[doc = "Get the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + fn audio_level(&self) -> f64; + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + fn source(&self) -> u32; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] + fn timestamp(&self) -> f64; +} +impl RtcRtpContributingSourceGetters for RtcRtpContributingSource { + fn audio_level(&self) -> f64 { + self.audio_level_shim() + } + fn source(&self) -> u32 { + self.source_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } } impl RtcRtpContributingSource { #[doc = "Construct a new `RtcRtpContributingSource`."] @@ -24,29 +58,29 @@ impl RtcRtpContributingSource { pub fn new(source: u32, timestamp: f64) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.source(source); - ret.timestamp(timestamp); + Self::source(&mut ret, source); + Self::timestamp(&mut ret, timestamp); ret } #[doc = "Change the `audioLevel` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] pub fn audio_level(&mut self, val: f64) -> &mut Self { - self.audio_level_shim(val); + self.set_audio_level_shim(val); self } #[doc = "Change the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] pub fn source(&mut self, val: u32) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpContributingSource`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs b/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs index 1c8e1ed3b00..20e2fbab2cb 100644 --- a/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpEncodingParameters.rs @@ -10,30 +10,147 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] pub type RtcRtpEncodingParameters; + #[wasm_bindgen(method, getter = "active")] + fn active_shim(this: &RtcRtpEncodingParameters) -> bool; #[wasm_bindgen(method, setter = "active")] - fn active_shim(this: &RtcRtpEncodingParameters, val: bool); + fn set_active_shim(this: &RtcRtpEncodingParameters, val: bool); + #[cfg(feature = "RtcDegradationPreference")] + #[wasm_bindgen(method, getter = "degradationPreference")] + fn degradation_preference_shim(this: &RtcRtpEncodingParameters) -> RtcDegradationPreference; #[cfg(feature = "RtcDegradationPreference")] #[wasm_bindgen(method, setter = "degradationPreference")] - fn degradation_preference_shim(this: &RtcRtpEncodingParameters, val: RtcDegradationPreference); + fn set_degradation_preference_shim( + this: &RtcRtpEncodingParameters, + val: RtcDegradationPreference, + ); + #[cfg(feature = "RtcFecParameters")] + #[wasm_bindgen(method, getter = "fec")] + fn fec_shim(this: &RtcRtpEncodingParameters) -> RtcFecParameters; #[cfg(feature = "RtcFecParameters")] #[wasm_bindgen(method, setter = "fec")] - fn fec_shim(this: &RtcRtpEncodingParameters, val: &RtcFecParameters); + fn set_fec_shim(this: &RtcRtpEncodingParameters, val: &RtcFecParameters); + #[wasm_bindgen(method, getter = "maxBitrate")] + fn max_bitrate_shim(this: &RtcRtpEncodingParameters) -> u32; #[wasm_bindgen(method, setter = "maxBitrate")] - fn max_bitrate_shim(this: &RtcRtpEncodingParameters, val: u32); + fn set_max_bitrate_shim(this: &RtcRtpEncodingParameters, val: u32); + #[cfg(feature = "RtcPriorityType")] + #[wasm_bindgen(method, getter = "priority")] + fn priority_shim(this: &RtcRtpEncodingParameters) -> RtcPriorityType; #[cfg(feature = "RtcPriorityType")] #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &RtcRtpEncodingParameters, val: RtcPriorityType); + fn set_priority_shim(this: &RtcRtpEncodingParameters, val: RtcPriorityType); + #[wasm_bindgen(method, getter = "rid")] + fn rid_shim(this: &RtcRtpEncodingParameters) -> String; #[wasm_bindgen(method, setter = "rid")] - fn rid_shim(this: &RtcRtpEncodingParameters, val: &str); + fn set_rid_shim(this: &RtcRtpEncodingParameters, val: &str); + #[cfg(feature = "RtcRtxParameters")] + #[wasm_bindgen(method, getter = "rtx")] + fn rtx_shim(this: &RtcRtpEncodingParameters) -> RtcRtxParameters; #[cfg(feature = "RtcRtxParameters")] #[wasm_bindgen(method, setter = "rtx")] - fn rtx_shim(this: &RtcRtpEncodingParameters, val: &RtcRtxParameters); + fn set_rtx_shim(this: &RtcRtpEncodingParameters, val: &RtcRtxParameters); + #[wasm_bindgen(method, getter = "scalabilityMode")] + fn scalability_mode_shim(this: &RtcRtpEncodingParameters) -> String; #[wasm_bindgen(method, setter = "scalabilityMode")] - fn scalability_mode_shim(this: &RtcRtpEncodingParameters, val: &str); + fn set_scalability_mode_shim(this: &RtcRtpEncodingParameters, val: &str); + #[wasm_bindgen(method, getter = "scaleResolutionDownBy")] + fn scale_resolution_down_by_shim(this: &RtcRtpEncodingParameters) -> f32; #[wasm_bindgen(method, setter = "scaleResolutionDownBy")] - fn scale_resolution_down_by_shim(this: &RtcRtpEncodingParameters, val: f32); + fn set_scale_resolution_down_by_shim(this: &RtcRtpEncodingParameters, val: f32); + #[wasm_bindgen(method, getter = "ssrc")] + fn ssrc_shim(this: &RtcRtpEncodingParameters) -> u32; #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcRtpEncodingParameters, val: u32); + fn set_ssrc_shim(this: &RtcRtpEncodingParameters, val: u32); +} +#[doc = "The trait to access properties on the `RtcRtpEncodingParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] +pub trait RtcRtpEncodingParametersGetters { + #[doc = "Get the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + fn active(&self) -> bool; + #[cfg(feature = "RtcDegradationPreference")] + #[doc = "Get the `degradationPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcDegradationPreference`, `RtcRtpEncodingParameters`*"] + fn degradation_preference(&self) -> RtcDegradationPreference; + #[cfg(feature = "RtcFecParameters")] + #[doc = "Get the `fec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`, `RtcRtpEncodingParameters`*"] + fn fec(&self) -> RtcFecParameters; + #[doc = "Get the `maxBitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + fn max_bitrate(&self) -> u32; + #[cfg(feature = "RtcPriorityType")] + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcPriorityType`, `RtcRtpEncodingParameters`*"] + fn priority(&self) -> RtcPriorityType; + #[doc = "Get the `rid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + fn rid(&self) -> String; + #[cfg(feature = "RtcRtxParameters")] + #[doc = "Get the `rtx` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`, `RtcRtxParameters`*"] + fn rtx(&self) -> RtcRtxParameters; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `scalabilityMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn scalability_mode(&self) -> String; + #[doc = "Get the `scaleResolutionDownBy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + fn scale_resolution_down_by(&self) -> f32; + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] + fn ssrc(&self) -> u32; +} +impl RtcRtpEncodingParametersGetters for RtcRtpEncodingParameters { + fn active(&self) -> bool { + self.active_shim() + } + #[cfg(feature = "RtcDegradationPreference")] + fn degradation_preference(&self) -> RtcDegradationPreference { + self.degradation_preference_shim() + } + #[cfg(feature = "RtcFecParameters")] + fn fec(&self) -> RtcFecParameters { + self.fec_shim() + } + fn max_bitrate(&self) -> u32 { + self.max_bitrate_shim() + } + #[cfg(feature = "RtcPriorityType")] + fn priority(&self) -> RtcPriorityType { + self.priority_shim() + } + fn rid(&self) -> String { + self.rid_shim() + } + #[cfg(feature = "RtcRtxParameters")] + fn rtx(&self) -> RtcRtxParameters { + self.rtx_shim() + } + #[cfg(web_sys_unstable_apis)] + fn scalability_mode(&self) -> String { + self.scalability_mode_shim() + } + fn scale_resolution_down_by(&self) -> f32 { + self.scale_resolution_down_by_shim() + } + fn ssrc(&self) -> u32 { + self.ssrc_shim() + } } impl RtcRtpEncodingParameters { #[doc = "Construct a new `RtcRtpEncodingParameters`."] @@ -48,7 +165,7 @@ impl RtcRtpEncodingParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] pub fn active(&mut self, val: bool) -> &mut Self { - self.active_shim(val); + self.set_active_shim(val); self } #[cfg(feature = "RtcDegradationPreference")] @@ -56,7 +173,7 @@ impl RtcRtpEncodingParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcDegradationPreference`, `RtcRtpEncodingParameters`*"] pub fn degradation_preference(&mut self, val: RtcDegradationPreference) -> &mut Self { - self.degradation_preference_shim(val); + self.set_degradation_preference_shim(val); self } #[cfg(feature = "RtcFecParameters")] @@ -64,14 +181,14 @@ impl RtcRtpEncodingParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcFecParameters`, `RtcRtpEncodingParameters`*"] pub fn fec(&mut self, val: &RtcFecParameters) -> &mut Self { - self.fec_shim(val); + self.set_fec_shim(val); self } #[doc = "Change the `maxBitrate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] pub fn max_bitrate(&mut self, val: u32) -> &mut Self { - self.max_bitrate_shim(val); + self.set_max_bitrate_shim(val); self } #[cfg(feature = "RtcPriorityType")] @@ -79,14 +196,14 @@ impl RtcRtpEncodingParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcPriorityType`, `RtcRtpEncodingParameters`*"] pub fn priority(&mut self, val: RtcPriorityType) -> &mut Self { - self.priority_shim(val); + self.set_priority_shim(val); self } #[doc = "Change the `rid` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] pub fn rid(&mut self, val: &str) -> &mut Self { - self.rid_shim(val); + self.set_rid_shim(val); self } #[cfg(feature = "RtcRtxParameters")] @@ -94,7 +211,7 @@ impl RtcRtpEncodingParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`, `RtcRtxParameters`*"] pub fn rtx(&mut self, val: &RtcRtxParameters) -> &mut Self { - self.rtx_shim(val); + self.set_rtx_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -105,21 +222,21 @@ impl RtcRtpEncodingParameters { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn scalability_mode(&mut self, val: &str) -> &mut Self { - self.scalability_mode_shim(val); + self.set_scalability_mode_shim(val); self } #[doc = "Change the `scaleResolutionDownBy` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] pub fn scale_resolution_down_by(&mut self, val: f32) -> &mut Self { - self.scale_resolution_down_by_shim(val); + self.set_scale_resolution_down_by_shim(val); self } #[doc = "Change the `ssrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpEncodingParameters`*"] pub fn ssrc(&mut self, val: u32) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs index 3a263a719e0..616b58c7be1 100644 --- a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs +++ b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionCapability.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] pub type RtcRtpHeaderExtensionCapability; + #[wasm_bindgen(method, getter = "uri")] + fn uri_shim(this: &RtcRtpHeaderExtensionCapability) -> String; #[wasm_bindgen(method, setter = "uri")] - fn uri_shim(this: &RtcRtpHeaderExtensionCapability, val: &str); + fn set_uri_shim(this: &RtcRtpHeaderExtensionCapability, val: &str); +} +#[doc = "The trait to access properties on the `RtcRtpHeaderExtensionCapability` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] +pub trait RtcRtpHeaderExtensionCapabilityGetters { + #[doc = "Get the `uri` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] + fn uri(&self) -> String; +} +impl RtcRtpHeaderExtensionCapabilityGetters for RtcRtpHeaderExtensionCapability { + fn uri(&self) -> String { + self.uri_shim() + } } impl RtcRtpHeaderExtensionCapability { #[doc = "Construct a new `RtcRtpHeaderExtensionCapability`."] @@ -20,14 +36,14 @@ impl RtcRtpHeaderExtensionCapability { pub fn new(uri: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.uri(uri); + Self::uri(&mut ret, uri); ret } #[doc = "Change the `uri` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionCapability`*"] pub fn uri(&mut self, val: &str) -> &mut Self { - self.uri_shim(val); + self.set_uri_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs index bd09da10daf..5b7ad94e8a2 100644 --- a/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpHeaderExtensionParameters.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] pub type RtcRtpHeaderExtensionParameters; + #[wasm_bindgen(method, getter = "encrypted")] + fn encrypted_shim(this: &RtcRtpHeaderExtensionParameters) -> bool; #[wasm_bindgen(method, setter = "encrypted")] - fn encrypted_shim(this: &RtcRtpHeaderExtensionParameters, val: bool); + fn set_encrypted_shim(this: &RtcRtpHeaderExtensionParameters, val: bool); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcRtpHeaderExtensionParameters) -> u16; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcRtpHeaderExtensionParameters, val: u16); + fn set_id_shim(this: &RtcRtpHeaderExtensionParameters, val: u16); + #[wasm_bindgen(method, getter = "uri")] + fn uri_shim(this: &RtcRtpHeaderExtensionParameters) -> String; #[wasm_bindgen(method, setter = "uri")] - fn uri_shim(this: &RtcRtpHeaderExtensionParameters, val: &str); + fn set_uri_shim(this: &RtcRtpHeaderExtensionParameters, val: &str); +} +#[doc = "The trait to access properties on the `RtcRtpHeaderExtensionParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] +pub trait RtcRtpHeaderExtensionParametersGetters { + #[doc = "Get the `encrypted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + fn encrypted(&self) -> bool; + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + fn id(&self) -> u16; + #[doc = "Get the `uri` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] + fn uri(&self) -> String; +} +impl RtcRtpHeaderExtensionParametersGetters for RtcRtpHeaderExtensionParameters { + fn encrypted(&self) -> bool { + self.encrypted_shim() + } + fn id(&self) -> u16 { + self.id_shim() + } + fn uri(&self) -> String { + self.uri_shim() + } } impl RtcRtpHeaderExtensionParameters { #[doc = "Construct a new `RtcRtpHeaderExtensionParameters`."] @@ -30,21 +64,21 @@ impl RtcRtpHeaderExtensionParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] pub fn encrypted(&mut self, val: bool) -> &mut Self { - self.encrypted_shim(val); + self.set_encrypted_shim(val); self } #[doc = "Change the `id` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] pub fn id(&mut self, val: u16) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `uri` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpHeaderExtensionParameters`*"] pub fn uri(&mut self, val: &str) -> &mut Self { - self.uri_shim(val); + self.set_uri_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpParameters.rs b/crates/web-sys/src/features/gen_RtcRtpParameters.rs index 1b260e0ea55..f887acf63d6 100644 --- a/crates/web-sys/src/features/gen_RtcRtpParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtpParameters.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] pub type RtcRtpParameters; + #[wasm_bindgen(method, getter = "codecs")] + fn codecs_shim(this: &RtcRtpParameters) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "codecs")] - fn codecs_shim(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + fn set_codecs_shim(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "encodings")] + fn encodings_shim(this: &RtcRtpParameters) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "encodings")] - fn encodings_shim(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + fn set_encodings_shim(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "headerExtensions")] + fn header_extensions_shim(this: &RtcRtpParameters) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "headerExtensions")] - fn header_extensions_shim(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + fn set_header_extensions_shim(this: &RtcRtpParameters, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "RtcRtcpParameters")] + #[wasm_bindgen(method, getter = "rtcp")] + fn rtcp_shim(this: &RtcRtpParameters) -> RtcRtcpParameters; #[cfg(feature = "RtcRtcpParameters")] #[wasm_bindgen(method, setter = "rtcp")] - fn rtcp_shim(this: &RtcRtpParameters, val: &RtcRtcpParameters); + fn set_rtcp_shim(this: &RtcRtpParameters, val: &RtcRtcpParameters); +} +#[doc = "The trait to access properties on the `RtcRtpParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] +pub trait RtcRtpParametersGetters { + #[doc = "Get the `codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + fn codecs(&self) -> ::js_sys::Array; + #[doc = "Get the `encodings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + fn encodings(&self) -> ::js_sys::Array; + #[doc = "Get the `headerExtensions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] + fn header_extensions(&self) -> ::js_sys::Array; + #[cfg(feature = "RtcRtcpParameters")] + #[doc = "Get the `rtcp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"] + fn rtcp(&self) -> RtcRtcpParameters; +} +impl RtcRtpParametersGetters for RtcRtpParameters { + fn codecs(&self) -> ::js_sys::Array { + self.codecs_shim() + } + fn encodings(&self) -> ::js_sys::Array { + self.encodings_shim() + } + fn header_extensions(&self) -> ::js_sys::Array { + self.header_extensions_shim() + } + #[cfg(feature = "RtcRtcpParameters")] + fn rtcp(&self) -> RtcRtcpParameters { + self.rtcp_shim() + } } impl RtcRtpParameters { #[doc = "Construct a new `RtcRtpParameters`."] @@ -33,21 +79,21 @@ impl RtcRtpParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] pub fn codecs(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.codecs_shim(val); + self.set_codecs_shim(val); self } #[doc = "Change the `encodings` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] pub fn encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.encodings_shim(val); + self.set_encodings_shim(val); self } #[doc = "Change the `headerExtensions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpParameters`*"] pub fn header_extensions(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.header_extensions_shim(val); + self.set_header_extensions_shim(val); self } #[cfg(feature = "RtcRtcpParameters")] @@ -55,7 +101,7 @@ impl RtcRtpParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtcpParameters`, `RtcRtpParameters`*"] pub fn rtcp(&mut self, val: &RtcRtcpParameters) -> &mut Self { - self.rtcp_shim(val); + self.set_rtcp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs b/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs index 3983d4b3827..0aa0c9198ab 100644 --- a/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs +++ b/crates/web-sys/src/features/gen_RtcRtpSourceEntry.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] pub type RtcRtpSourceEntry; + #[wasm_bindgen(method, getter = "audioLevel")] + fn audio_level_shim(this: &RtcRtpSourceEntry) -> f64; #[wasm_bindgen(method, setter = "audioLevel")] - fn audio_level_shim(this: &RtcRtpSourceEntry, val: f64); + fn set_audio_level_shim(this: &RtcRtpSourceEntry, val: f64); + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &RtcRtpSourceEntry) -> u32; #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &RtcRtpSourceEntry, val: u32); + fn set_source_shim(this: &RtcRtpSourceEntry, val: u32); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcRtpSourceEntry) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcRtpSourceEntry, val: f64); + fn set_timestamp_shim(this: &RtcRtpSourceEntry, val: f64); + #[wasm_bindgen(method, getter = "voiceActivityFlag")] + fn voice_activity_flag_shim(this: &RtcRtpSourceEntry) -> Option; #[wasm_bindgen(method, setter = "voiceActivityFlag")] - fn voice_activity_flag_shim(this: &RtcRtpSourceEntry, val: Option); + fn set_voice_activity_flag_shim(this: &RtcRtpSourceEntry, val: Option); + #[cfg(feature = "RtcRtpSourceEntryType")] + #[wasm_bindgen(method, getter = "sourceType")] + fn source_type_shim(this: &RtcRtpSourceEntry) -> RtcRtpSourceEntryType; #[cfg(feature = "RtcRtpSourceEntryType")] #[wasm_bindgen(method, setter = "sourceType")] - fn source_type_shim(this: &RtcRtpSourceEntry, val: RtcRtpSourceEntryType); + fn set_source_type_shim(this: &RtcRtpSourceEntry, val: RtcRtpSourceEntryType); +} +#[doc = "The trait to access properties on the `RtcRtpSourceEntry` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] +pub trait RtcRtpSourceEntryGetters { + #[doc = "Get the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + fn audio_level(&self) -> f64; + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + fn source(&self) -> u32; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + fn timestamp(&self) -> f64; + #[doc = "Get the `voiceActivityFlag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] + fn voice_activity_flag(&self) -> Option; + #[cfg(feature = "RtcRtpSourceEntryType")] + #[doc = "Get the `sourceType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`, `RtcRtpSourceEntryType`*"] + fn source_type(&self) -> RtcRtpSourceEntryType; +} +impl RtcRtpSourceEntryGetters for RtcRtpSourceEntry { + fn audio_level(&self) -> f64 { + self.audio_level_shim() + } + fn source(&self) -> u32 { + self.source_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + fn voice_activity_flag(&self) -> Option { + self.voice_activity_flag_shim() + } + #[cfg(feature = "RtcRtpSourceEntryType")] + fn source_type(&self) -> RtcRtpSourceEntryType { + self.source_type_shim() + } } impl RtcRtpSourceEntry { #[cfg(feature = "RtcRtpSourceEntryType")] @@ -30,37 +85,37 @@ impl RtcRtpSourceEntry { pub fn new(source: u32, timestamp: f64, source_type: RtcRtpSourceEntryType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.source(source); - ret.timestamp(timestamp); - ret.source_type(source_type); + Self::source(&mut ret, source); + Self::timestamp(&mut ret, timestamp); + Self::source_type(&mut ret, source_type); ret } #[doc = "Change the `audioLevel` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] pub fn audio_level(&mut self, val: f64) -> &mut Self { - self.audio_level_shim(val); + self.set_audio_level_shim(val); self } #[doc = "Change the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] pub fn source(&mut self, val: u32) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[doc = "Change the `voiceActivityFlag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`*"] pub fn voice_activity_flag(&mut self, val: Option) -> &mut Self { - self.voice_activity_flag_shim(val); + self.set_voice_activity_flag_shim(val); self } #[cfg(feature = "RtcRtpSourceEntryType")] @@ -68,7 +123,7 @@ impl RtcRtpSourceEntry { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSourceEntry`, `RtcRtpSourceEntryType`*"] pub fn source_type(&mut self, val: RtcRtpSourceEntryType) -> &mut Self { - self.source_type_shim(val); + self.set_source_type_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs b/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs index 3b58feee346..4222531d792 100644 --- a/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs +++ b/crates/web-sys/src/features/gen_RtcRtpSynchronizationSource.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] pub type RtcRtpSynchronizationSource; + #[wasm_bindgen(method, getter = "audioLevel")] + fn audio_level_shim(this: &RtcRtpSynchronizationSource) -> f64; #[wasm_bindgen(method, setter = "audioLevel")] - fn audio_level_shim(this: &RtcRtpSynchronizationSource, val: f64); + fn set_audio_level_shim(this: &RtcRtpSynchronizationSource, val: f64); + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &RtcRtpSynchronizationSource) -> u32; #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &RtcRtpSynchronizationSource, val: u32); + fn set_source_shim(this: &RtcRtpSynchronizationSource, val: u32); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcRtpSynchronizationSource) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcRtpSynchronizationSource, val: f64); + fn set_timestamp_shim(this: &RtcRtpSynchronizationSource, val: f64); + #[wasm_bindgen(method, getter = "voiceActivityFlag")] + fn voice_activity_flag_shim(this: &RtcRtpSynchronizationSource) -> Option; #[wasm_bindgen(method, setter = "voiceActivityFlag")] - fn voice_activity_flag_shim(this: &RtcRtpSynchronizationSource, val: Option); + fn set_voice_activity_flag_shim(this: &RtcRtpSynchronizationSource, val: Option); +} +#[doc = "The trait to access properties on the `RtcRtpSynchronizationSource` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] +pub trait RtcRtpSynchronizationSourceGetters { + #[doc = "Get the `audioLevel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + fn audio_level(&self) -> f64; + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + fn source(&self) -> u32; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + fn timestamp(&self) -> f64; + #[doc = "Get the `voiceActivityFlag` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] + fn voice_activity_flag(&self) -> Option; +} +impl RtcRtpSynchronizationSourceGetters for RtcRtpSynchronizationSource { + fn audio_level(&self) -> f64 { + self.audio_level_shim() + } + fn source(&self) -> u32 { + self.source_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + fn voice_activity_flag(&self) -> Option { + self.voice_activity_flag_shim() + } } impl RtcRtpSynchronizationSource { #[doc = "Construct a new `RtcRtpSynchronizationSource`."] @@ -26,36 +69,36 @@ impl RtcRtpSynchronizationSource { pub fn new(source: u32, timestamp: f64) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.source(source); - ret.timestamp(timestamp); + Self::source(&mut ret, source); + Self::timestamp(&mut ret, timestamp); ret } #[doc = "Change the `audioLevel` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] pub fn audio_level(&mut self, val: f64) -> &mut Self { - self.audio_level_shim(val); + self.set_audio_level_shim(val); self } #[doc = "Change the `source` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] pub fn source(&mut self, val: u32) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[doc = "Change the `voiceActivityFlag` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpSynchronizationSource`*"] pub fn voice_activity_flag(&mut self, val: Option) -> &mut Self { - self.voice_activity_flag_shim(val); + self.set_voice_activity_flag_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs b/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs index 47fbc05961d..f04b8afd171 100644 --- a/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs +++ b/crates/web-sys/src/features/gen_RtcRtpTransceiverInit.rs @@ -11,12 +11,49 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] pub type RtcRtpTransceiverInit; #[cfg(feature = "RtcRtpTransceiverDirection")] + #[wasm_bindgen(method, getter = "direction")] + fn direction_shim(this: &RtcRtpTransceiverInit) -> RtcRtpTransceiverDirection; + #[cfg(feature = "RtcRtpTransceiverDirection")] #[wasm_bindgen(method, setter = "direction")] - fn direction_shim(this: &RtcRtpTransceiverInit, val: RtcRtpTransceiverDirection); + fn set_direction_shim(this: &RtcRtpTransceiverInit, val: RtcRtpTransceiverDirection); + #[wasm_bindgen(method, getter = "sendEncodings")] + fn send_encodings_shim(this: &RtcRtpTransceiverInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "sendEncodings")] - fn send_encodings_shim(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); + fn set_send_encodings_shim(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "streams")] + fn streams_shim(this: &RtcRtpTransceiverInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "streams")] - fn streams_shim(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); + fn set_streams_shim(this: &RtcRtpTransceiverInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `RtcRtpTransceiverInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] +pub trait RtcRtpTransceiverInitGetters { + #[cfg(feature = "RtcRtpTransceiverDirection")] + #[doc = "Get the `direction` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverDirection`, `RtcRtpTransceiverInit`*"] + fn direction(&self) -> RtcRtpTransceiverDirection; + #[doc = "Get the `sendEncodings` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] + fn send_encodings(&self) -> ::js_sys::Array; + #[doc = "Get the `streams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] + fn streams(&self) -> ::js_sys::Array; +} +impl RtcRtpTransceiverInitGetters for RtcRtpTransceiverInit { + #[cfg(feature = "RtcRtpTransceiverDirection")] + fn direction(&self) -> RtcRtpTransceiverDirection { + self.direction_shim() + } + fn send_encodings(&self) -> ::js_sys::Array { + self.send_encodings_shim() + } + fn streams(&self) -> ::js_sys::Array { + self.streams_shim() + } } impl RtcRtpTransceiverInit { #[doc = "Construct a new `RtcRtpTransceiverInit`."] @@ -32,21 +69,21 @@ impl RtcRtpTransceiverInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverDirection`, `RtcRtpTransceiverInit`*"] pub fn direction(&mut self, val: RtcRtpTransceiverDirection) -> &mut Self { - self.direction_shim(val); + self.set_direction_shim(val); self } #[doc = "Change the `sendEncodings` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] pub fn send_encodings(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.send_encodings_shim(val); + self.set_send_encodings_shim(val); self } #[doc = "Change the `streams` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiverInit`*"] pub fn streams(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.streams_shim(val); + self.set_streams_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcRtxParameters.rs b/crates/web-sys/src/features/gen_RtcRtxParameters.rs index 29aba89a545..04da5a43cd4 100644 --- a/crates/web-sys/src/features/gen_RtcRtxParameters.rs +++ b/crates/web-sys/src/features/gen_RtcRtxParameters.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] pub type RtcRtxParameters; + #[wasm_bindgen(method, getter = "ssrc")] + fn ssrc_shim(this: &RtcRtxParameters) -> u32; #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcRtxParameters, val: u32); + fn set_ssrc_shim(this: &RtcRtxParameters, val: u32); +} +#[doc = "The trait to access properties on the `RtcRtxParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] +pub trait RtcRtxParametersGetters { + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] + fn ssrc(&self) -> u32; +} +impl RtcRtxParametersGetters for RtcRtxParameters { + fn ssrc(&self) -> u32 { + self.ssrc_shim() + } } impl RtcRtxParameters { #[doc = "Construct a new `RtcRtxParameters`."] @@ -26,7 +42,7 @@ impl RtcRtxParameters { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtxParameters`*"] pub fn ssrc(&mut self, val: u32) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs b/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs index e0b20763b49..fe180ec3ac3 100644 --- a/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs +++ b/crates/web-sys/src/features/gen_RtcSessionDescriptionInit.rs @@ -10,11 +10,39 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] pub type RtcSessionDescriptionInit; + #[wasm_bindgen(method, getter = "sdp")] + fn sdp_shim(this: &RtcSessionDescriptionInit) -> String; #[wasm_bindgen(method, setter = "sdp")] - fn sdp_shim(this: &RtcSessionDescriptionInit, val: &str); + fn set_sdp_shim(this: &RtcSessionDescriptionInit, val: &str); + #[cfg(feature = "RtcSdpType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcSessionDescriptionInit) -> RtcSdpType; #[cfg(feature = "RtcSdpType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcSessionDescriptionInit, val: RtcSdpType); + fn set_type__shim(this: &RtcSessionDescriptionInit, val: RtcSdpType); +} +#[doc = "The trait to access properties on the `RtcSessionDescriptionInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] +pub trait RtcSessionDescriptionInitGetters { + #[doc = "Get the `sdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] + fn sdp(&self) -> String; + #[cfg(feature = "RtcSdpType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcSdpType`, `RtcSessionDescriptionInit`*"] + fn type_(&self) -> RtcSdpType; +} +impl RtcSessionDescriptionInitGetters for RtcSessionDescriptionInit { + fn sdp(&self) -> String { + self.sdp_shim() + } + #[cfg(feature = "RtcSdpType")] + fn type_(&self) -> RtcSdpType { + self.type__shim() + } } impl RtcSessionDescriptionInit { #[cfg(feature = "RtcSdpType")] @@ -24,14 +52,14 @@ impl RtcSessionDescriptionInit { pub fn new(type_: RtcSdpType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.type_(type_); + Self::type_(&mut ret, type_); ret } #[doc = "Change the `sdp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcSessionDescriptionInit`*"] pub fn sdp(&mut self, val: &str) -> &mut Self { - self.sdp_shim(val); + self.set_sdp_shim(val); self } #[cfg(feature = "RtcSdpType")] @@ -39,7 +67,7 @@ impl RtcSessionDescriptionInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcSdpType`, `RtcSessionDescriptionInit`*"] pub fn type_(&mut self, val: RtcSdpType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcStats.rs b/crates/web-sys/src/features/gen_RtcStats.rs index ecbb178de3f..022e21b038c 100644 --- a/crates/web-sys/src/features/gen_RtcStats.rs +++ b/crates/web-sys/src/features/gen_RtcStats.rs @@ -10,13 +10,50 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] pub type RtcStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcStats, val: &str); + fn set_id_shim(this: &RtcStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcStats, val: f64); + fn set_timestamp_shim(this: &RtcStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcStats, val: RtcStatsType); + fn set_type__shim(this: &RtcStats, val: RtcStatsType); +} +#[doc = "The trait to access properties on the `RtcStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] +pub trait RtcStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStats`, `RtcStatsType`*"] + fn type_(&self) -> RtcStatsType; +} +impl RtcStatsGetters for RtcStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } } impl RtcStats { #[doc = "Construct a new `RtcStats`."] @@ -31,14 +68,14 @@ impl RtcStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -46,7 +83,7 @@ impl RtcStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStats`, `RtcStatsType`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs b/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs index a08365bf1a0..a87f4a0eda1 100644 --- a/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs +++ b/crates/web-sys/src/features/gen_RtcStatsReportInternal.rs @@ -10,55 +10,263 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub type RtcStatsReportInternal; + #[wasm_bindgen(method, getter = "closed")] + fn closed_shim(this: &RtcStatsReportInternal) -> bool; #[wasm_bindgen(method, setter = "closed")] - fn closed_shim(this: &RtcStatsReportInternal, val: bool); + fn set_closed_shim(this: &RtcStatsReportInternal, val: bool); + #[wasm_bindgen(method, getter = "codecStats")] + fn codec_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "codecStats")] - fn codec_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_codec_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "iceCandidatePairStats")] + fn ice_candidate_pair_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "iceCandidatePairStats")] - fn ice_candidate_pair_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_ice_candidate_pair_stats_shim( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); + #[wasm_bindgen(method, getter = "iceCandidateStats")] + fn ice_candidate_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "iceCandidateStats")] - fn ice_candidate_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_ice_candidate_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "iceComponentStats")] + fn ice_component_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "iceComponentStats")] - fn ice_component_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_ice_component_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "iceRestarts")] + fn ice_restarts_shim(this: &RtcStatsReportInternal) -> u32; #[wasm_bindgen(method, setter = "iceRestarts")] - fn ice_restarts_shim(this: &RtcStatsReportInternal, val: u32); + fn set_ice_restarts_shim(this: &RtcStatsReportInternal, val: u32); + #[wasm_bindgen(method, getter = "iceRollbacks")] + fn ice_rollbacks_shim(this: &RtcStatsReportInternal) -> u32; #[wasm_bindgen(method, setter = "iceRollbacks")] - fn ice_rollbacks_shim(this: &RtcStatsReportInternal, val: u32); + fn set_ice_rollbacks_shim(this: &RtcStatsReportInternal, val: u32); + #[wasm_bindgen(method, getter = "inboundRTPStreamStats")] + fn inbound_rtp_stream_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "inboundRTPStreamStats")] - fn inbound_rtp_stream_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_inbound_rtp_stream_stats_shim( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); + #[wasm_bindgen(method, getter = "localSdp")] + fn local_sdp_shim(this: &RtcStatsReportInternal) -> String; #[wasm_bindgen(method, setter = "localSdp")] - fn local_sdp_shim(this: &RtcStatsReportInternal, val: &str); + fn set_local_sdp_shim(this: &RtcStatsReportInternal, val: &str); + #[wasm_bindgen(method, getter = "mediaStreamStats")] + fn media_stream_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "mediaStreamStats")] - fn media_stream_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_media_stream_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "mediaStreamTrackStats")] + fn media_stream_track_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "mediaStreamTrackStats")] - fn media_stream_track_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_media_stream_track_stats_shim( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); + #[wasm_bindgen(method, getter = "offerer")] + fn offerer_shim(this: &RtcStatsReportInternal) -> bool; #[wasm_bindgen(method, setter = "offerer")] - fn offerer_shim(this: &RtcStatsReportInternal, val: bool); + fn set_offerer_shim(this: &RtcStatsReportInternal, val: bool); + #[wasm_bindgen(method, getter = "outboundRTPStreamStats")] + fn outbound_rtp_stream_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "outboundRTPStreamStats")] - fn outbound_rtp_stream_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_outbound_rtp_stream_stats_shim( + this: &RtcStatsReportInternal, + val: &::wasm_bindgen::JsValue, + ); + #[wasm_bindgen(method, getter = "pcid")] + fn pcid_shim(this: &RtcStatsReportInternal) -> String; #[wasm_bindgen(method, setter = "pcid")] - fn pcid_shim(this: &RtcStatsReportInternal, val: &str); + fn set_pcid_shim(this: &RtcStatsReportInternal, val: &str); + #[wasm_bindgen(method, getter = "rawLocalCandidates")] + fn raw_local_candidates_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "rawLocalCandidates")] - fn raw_local_candidates_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_raw_local_candidates_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "rawRemoteCandidates")] + fn raw_remote_candidates_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "rawRemoteCandidates")] - fn raw_remote_candidates_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_raw_remote_candidates_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "remoteSdp")] + fn remote_sdp_shim(this: &RtcStatsReportInternal) -> String; #[wasm_bindgen(method, setter = "remoteSdp")] - fn remote_sdp_shim(this: &RtcStatsReportInternal, val: &str); + fn set_remote_sdp_shim(this: &RtcStatsReportInternal, val: &str); + #[wasm_bindgen(method, getter = "rtpContributingSourceStats")] + fn rtp_contributing_source_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "rtpContributingSourceStats")] - fn rtp_contributing_source_stats_shim( + fn set_rtp_contributing_source_stats_shim( this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue, ); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcStatsReportInternal) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcStatsReportInternal, val: f64); + fn set_timestamp_shim(this: &RtcStatsReportInternal, val: f64); + #[wasm_bindgen(method, getter = "transportStats")] + fn transport_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "transportStats")] - fn transport_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + fn set_transport_stats_shim(this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "trickledIceCandidateStats")] + fn trickled_ice_candidate_stats_shim(this: &RtcStatsReportInternal) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "trickledIceCandidateStats")] - fn trickled_ice_candidate_stats_shim( + fn set_trickled_ice_candidate_stats_shim( this: &RtcStatsReportInternal, val: &::wasm_bindgen::JsValue, ); } +#[doc = "The trait to access properties on the `RtcStatsReportInternal` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] +pub trait RtcStatsReportInternalGetters { + #[doc = "Get the `closed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn closed(&self) -> bool; + #[doc = "Get the `codecStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn codec_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `iceCandidatePairStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn ice_candidate_pair_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `iceCandidateStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn ice_candidate_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `iceComponentStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn ice_component_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `iceRestarts` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn ice_restarts(&self) -> u32; + #[doc = "Get the `iceRollbacks` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn ice_rollbacks(&self) -> u32; + #[doc = "Get the `inboundRTPStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn inbound_rtp_stream_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `localSdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn local_sdp(&self) -> String; + #[doc = "Get the `mediaStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn media_stream_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `mediaStreamTrackStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn media_stream_track_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `offerer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn offerer(&self) -> bool; + #[doc = "Get the `outboundRTPStreamStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn outbound_rtp_stream_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `pcid` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn pcid(&self) -> String; + #[doc = "Get the `rawLocalCandidates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn raw_local_candidates(&self) -> ::js_sys::Array; + #[doc = "Get the `rawRemoteCandidates` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn raw_remote_candidates(&self) -> ::js_sys::Array; + #[doc = "Get the `remoteSdp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn remote_sdp(&self) -> String; + #[doc = "Get the `rtpContributingSourceStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn rtp_contributing_source_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn timestamp(&self) -> f64; + #[doc = "Get the `transportStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn transport_stats(&self) -> ::js_sys::Array; + #[doc = "Get the `trickledIceCandidateStats` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] + fn trickled_ice_candidate_stats(&self) -> ::js_sys::Array; +} +impl RtcStatsReportInternalGetters for RtcStatsReportInternal { + fn closed(&self) -> bool { + self.closed_shim() + } + fn codec_stats(&self) -> ::js_sys::Array { + self.codec_stats_shim() + } + fn ice_candidate_pair_stats(&self) -> ::js_sys::Array { + self.ice_candidate_pair_stats_shim() + } + fn ice_candidate_stats(&self) -> ::js_sys::Array { + self.ice_candidate_stats_shim() + } + fn ice_component_stats(&self) -> ::js_sys::Array { + self.ice_component_stats_shim() + } + fn ice_restarts(&self) -> u32 { + self.ice_restarts_shim() + } + fn ice_rollbacks(&self) -> u32 { + self.ice_rollbacks_shim() + } + fn inbound_rtp_stream_stats(&self) -> ::js_sys::Array { + self.inbound_rtp_stream_stats_shim() + } + fn local_sdp(&self) -> String { + self.local_sdp_shim() + } + fn media_stream_stats(&self) -> ::js_sys::Array { + self.media_stream_stats_shim() + } + fn media_stream_track_stats(&self) -> ::js_sys::Array { + self.media_stream_track_stats_shim() + } + fn offerer(&self) -> bool { + self.offerer_shim() + } + fn outbound_rtp_stream_stats(&self) -> ::js_sys::Array { + self.outbound_rtp_stream_stats_shim() + } + fn pcid(&self) -> String { + self.pcid_shim() + } + fn raw_local_candidates(&self) -> ::js_sys::Array { + self.raw_local_candidates_shim() + } + fn raw_remote_candidates(&self) -> ::js_sys::Array { + self.raw_remote_candidates_shim() + } + fn remote_sdp(&self) -> String { + self.remote_sdp_shim() + } + fn rtp_contributing_source_stats(&self) -> ::js_sys::Array { + self.rtp_contributing_source_stats_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + fn transport_stats(&self) -> ::js_sys::Array { + self.transport_stats_shim() + } + fn trickled_ice_candidate_stats(&self) -> ::js_sys::Array { + self.trickled_ice_candidate_stats_shim() + } +} impl RtcStatsReportInternal { #[doc = "Construct a new `RtcStatsReportInternal`."] #[doc = ""] @@ -72,147 +280,147 @@ impl RtcStatsReportInternal { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn closed(&mut self, val: bool) -> &mut Self { - self.closed_shim(val); + self.set_closed_shim(val); self } #[doc = "Change the `codecStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn codec_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.codec_stats_shim(val); + self.set_codec_stats_shim(val); self } #[doc = "Change the `iceCandidatePairStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn ice_candidate_pair_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ice_candidate_pair_stats_shim(val); + self.set_ice_candidate_pair_stats_shim(val); self } #[doc = "Change the `iceCandidateStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn ice_candidate_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ice_candidate_stats_shim(val); + self.set_ice_candidate_stats_shim(val); self } #[doc = "Change the `iceComponentStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn ice_component_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.ice_component_stats_shim(val); + self.set_ice_component_stats_shim(val); self } #[doc = "Change the `iceRestarts` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn ice_restarts(&mut self, val: u32) -> &mut Self { - self.ice_restarts_shim(val); + self.set_ice_restarts_shim(val); self } #[doc = "Change the `iceRollbacks` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn ice_rollbacks(&mut self, val: u32) -> &mut Self { - self.ice_rollbacks_shim(val); + self.set_ice_rollbacks_shim(val); self } #[doc = "Change the `inboundRTPStreamStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn inbound_rtp_stream_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.inbound_rtp_stream_stats_shim(val); + self.set_inbound_rtp_stream_stats_shim(val); self } #[doc = "Change the `localSdp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn local_sdp(&mut self, val: &str) -> &mut Self { - self.local_sdp_shim(val); + self.set_local_sdp_shim(val); self } #[doc = "Change the `mediaStreamStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn media_stream_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.media_stream_stats_shim(val); + self.set_media_stream_stats_shim(val); self } #[doc = "Change the `mediaStreamTrackStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn media_stream_track_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.media_stream_track_stats_shim(val); + self.set_media_stream_track_stats_shim(val); self } #[doc = "Change the `offerer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn offerer(&mut self, val: bool) -> &mut Self { - self.offerer_shim(val); + self.set_offerer_shim(val); self } #[doc = "Change the `outboundRTPStreamStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn outbound_rtp_stream_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.outbound_rtp_stream_stats_shim(val); + self.set_outbound_rtp_stream_stats_shim(val); self } #[doc = "Change the `pcid` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn pcid(&mut self, val: &str) -> &mut Self { - self.pcid_shim(val); + self.set_pcid_shim(val); self } #[doc = "Change the `rawLocalCandidates` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn raw_local_candidates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.raw_local_candidates_shim(val); + self.set_raw_local_candidates_shim(val); self } #[doc = "Change the `rawRemoteCandidates` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn raw_remote_candidates(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.raw_remote_candidates_shim(val); + self.set_raw_remote_candidates_shim(val); self } #[doc = "Change the `remoteSdp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn remote_sdp(&mut self, val: &str) -> &mut Self { - self.remote_sdp_shim(val); + self.set_remote_sdp_shim(val); self } #[doc = "Change the `rtpContributingSourceStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn rtp_contributing_source_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.rtp_contributing_source_stats_shim(val); + self.set_rtp_contributing_source_stats_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[doc = "Change the `transportStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn transport_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.transport_stats_shim(val); + self.set_transport_stats_shim(val); self } #[doc = "Change the `trickledIceCandidateStats` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsReportInternal`*"] pub fn trickled_ice_candidate_stats(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.trickled_ice_candidate_stats_shim(val); + self.set_trickled_ice_candidate_stats_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcTrackEventInit.rs b/crates/web-sys/src/features/gen_RtcTrackEventInit.rs index 03ef80243d1..da92919a837 100644 --- a/crates/web-sys/src/features/gen_RtcTrackEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcTrackEventInit.rs @@ -10,23 +10,102 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] pub type RtcTrackEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &RtcTrackEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &RtcTrackEventInit, val: bool); + fn set_bubbles_shim(this: &RtcTrackEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &RtcTrackEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &RtcTrackEventInit, val: bool); + fn set_cancelable_shim(this: &RtcTrackEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &RtcTrackEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &RtcTrackEventInit, val: bool); + fn set_composed_shim(this: &RtcTrackEventInit, val: bool); + #[cfg(feature = "RtcRtpReceiver")] + #[wasm_bindgen(method, getter = "receiver")] + fn receiver_shim(this: &RtcTrackEventInit) -> RtcRtpReceiver; #[cfg(feature = "RtcRtpReceiver")] #[wasm_bindgen(method, setter = "receiver")] - fn receiver_shim(this: &RtcTrackEventInit, val: &RtcRtpReceiver); + fn set_receiver_shim(this: &RtcTrackEventInit, val: &RtcRtpReceiver); + #[wasm_bindgen(method, getter = "streams")] + fn streams_shim(this: &RtcTrackEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "streams")] - fn streams_shim(this: &RtcTrackEventInit, val: &::wasm_bindgen::JsValue); + fn set_streams_shim(this: &RtcTrackEventInit, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "MediaStreamTrack")] + #[wasm_bindgen(method, getter = "track")] + fn track_shim(this: &RtcTrackEventInit) -> MediaStreamTrack; #[cfg(feature = "MediaStreamTrack")] #[wasm_bindgen(method, setter = "track")] - fn track_shim(this: &RtcTrackEventInit, val: &MediaStreamTrack); + fn set_track_shim(this: &RtcTrackEventInit, val: &MediaStreamTrack); + #[cfg(feature = "RtcRtpTransceiver")] + #[wasm_bindgen(method, getter = "transceiver")] + fn transceiver_shim(this: &RtcTrackEventInit) -> RtcRtpTransceiver; #[cfg(feature = "RtcRtpTransceiver")] #[wasm_bindgen(method, setter = "transceiver")] - fn transceiver_shim(this: &RtcTrackEventInit, val: &RtcRtpTransceiver); + fn set_transceiver_shim(this: &RtcTrackEventInit, val: &RtcRtpTransceiver); +} +#[doc = "The trait to access properties on the `RtcTrackEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] +pub trait RtcTrackEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "RtcRtpReceiver")] + #[doc = "Get the `receiver` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcTrackEventInit`*"] + fn receiver(&self) -> RtcRtpReceiver; + #[doc = "Get the `streams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] + fn streams(&self) -> ::js_sys::Array; + #[cfg(feature = "MediaStreamTrack")] + #[doc = "Get the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `RtcTrackEventInit`*"] + fn track(&self) -> MediaStreamTrack; + #[cfg(feature = "RtcRtpTransceiver")] + #[doc = "Get the `transceiver` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcTrackEventInit`*"] + fn transceiver(&self) -> RtcRtpTransceiver; +} +impl RtcTrackEventInitGetters for RtcTrackEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "RtcRtpReceiver")] + fn receiver(&self) -> RtcRtpReceiver { + self.receiver_shim() + } + fn streams(&self) -> ::js_sys::Array { + self.streams_shim() + } + #[cfg(feature = "MediaStreamTrack")] + fn track(&self) -> MediaStreamTrack { + self.track_shim() + } + #[cfg(feature = "RtcRtpTransceiver")] + fn transceiver(&self) -> RtcRtpTransceiver { + self.transceiver_shim() + } } impl RtcTrackEventInit { #[cfg(all( @@ -44,30 +123,30 @@ impl RtcTrackEventInit { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.receiver(receiver); - ret.track(track); - ret.transceiver(transceiver); + Self::receiver(&mut ret, receiver); + Self::track(&mut ret, track); + Self::transceiver(&mut ret, transceiver); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "RtcRtpReceiver")] @@ -75,14 +154,14 @@ impl RtcTrackEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`, `RtcTrackEventInit`*"] pub fn receiver(&mut self, val: &RtcRtpReceiver) -> &mut Self { - self.receiver_shim(val); + self.set_receiver_shim(val); self } #[doc = "Change the `streams` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTrackEventInit`*"] pub fn streams(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.streams_shim(val); + self.set_streams_shim(val); self } #[cfg(feature = "MediaStreamTrack")] @@ -90,7 +169,7 @@ impl RtcTrackEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `MediaStreamTrack`, `RtcTrackEventInit`*"] pub fn track(&mut self, val: &MediaStreamTrack) -> &mut Self { - self.track_shim(val); + self.set_track_shim(val); self } #[cfg(feature = "RtcRtpTransceiver")] @@ -98,7 +177,7 @@ impl RtcTrackEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcRtpTransceiver`, `RtcTrackEventInit`*"] pub fn transceiver(&mut self, val: &RtcRtpTransceiver) -> &mut Self { - self.transceiver_shim(val); + self.set_transceiver_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcTransportStats.rs b/crates/web-sys/src/features/gen_RtcTransportStats.rs index d76e5bb3220..6a3fe5a44e5 100644 --- a/crates/web-sys/src/features/gen_RtcTransportStats.rs +++ b/crates/web-sys/src/features/gen_RtcTransportStats.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] pub type RtcTransportStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcTransportStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcTransportStats, val: &str); + fn set_id_shim(this: &RtcTransportStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcTransportStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcTransportStats, val: f64); + fn set_timestamp_shim(this: &RtcTransportStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcTransportStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcTransportStats, val: RtcStatsType); + fn set_type__shim(this: &RtcTransportStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "bytesReceived")] + fn bytes_received_shim(this: &RtcTransportStats) -> u32; #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &RtcTransportStats, val: u32); + fn set_bytes_received_shim(this: &RtcTransportStats, val: u32); + #[wasm_bindgen(method, getter = "bytesSent")] + fn bytes_sent_shim(this: &RtcTransportStats) -> u32; #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &RtcTransportStats, val: u32); + fn set_bytes_sent_shim(this: &RtcTransportStats, val: u32); +} +#[doc = "The trait to access properties on the `RtcTransportStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] +pub trait RtcTransportStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcTransportStats`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + fn bytes_received(&self) -> u32; + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] + fn bytes_sent(&self) -> u32; +} +impl RtcTransportStatsGetters for RtcTransportStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn bytes_received(&self) -> u32 { + self.bytes_received_shim() + } + fn bytes_sent(&self) -> u32 { + self.bytes_sent_shim() + } } impl RtcTransportStats { #[doc = "Construct a new `RtcTransportStats`."] @@ -35,14 +90,14 @@ impl RtcTransportStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -50,21 +105,21 @@ impl RtcTransportStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcTransportStats`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `bytesReceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] pub fn bytes_received(&mut self, val: u32) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received_shim(val); self } #[doc = "Change the `bytesSent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcTransportStats`*"] pub fn bytes_sent(&mut self, val: u32) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs b/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs index 5232911bd6a..184d9871393 100644 --- a/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_RtcdtmfToneChangeEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] pub type RtcdtmfToneChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &RtcdtmfToneChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &RtcdtmfToneChangeEventInit, val: bool); + fn set_bubbles_shim(this: &RtcdtmfToneChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &RtcdtmfToneChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &RtcdtmfToneChangeEventInit, val: bool); + fn set_cancelable_shim(this: &RtcdtmfToneChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &RtcdtmfToneChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &RtcdtmfToneChangeEventInit, val: bool); + fn set_composed_shim(this: &RtcdtmfToneChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "tone")] + fn tone_shim(this: &RtcdtmfToneChangeEventInit) -> String; #[wasm_bindgen(method, setter = "tone")] - fn tone_shim(this: &RtcdtmfToneChangeEventInit, val: &str); + fn set_tone_shim(this: &RtcdtmfToneChangeEventInit, val: &str); +} +#[doc = "The trait to access properties on the `RtcdtmfToneChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] +pub trait RtcdtmfToneChangeEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `tone` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] + fn tone(&self) -> String; +} +impl RtcdtmfToneChangeEventInitGetters for RtcdtmfToneChangeEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn tone(&self) -> String { + self.tone_shim() + } } impl RtcdtmfToneChangeEventInit { #[doc = "Construct a new `RtcdtmfToneChangeEventInit`."] @@ -32,28 +75,28 @@ impl RtcdtmfToneChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `tone` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcdtmfToneChangeEventInit`*"] pub fn tone(&mut self, val: &str) -> &mut Self { - self.tone_shim(val); + self.set_tone_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs b/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs index 76ba0860223..6cdafc3ff3f 100644 --- a/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs +++ b/crates/web-sys/src/features/gen_RtcrtpContributingSourceStats.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] pub type RtcrtpContributingSourceStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcrtpContributingSourceStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcrtpContributingSourceStats, val: &str); + fn set_id_shim(this: &RtcrtpContributingSourceStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcrtpContributingSourceStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcrtpContributingSourceStats, val: f64); + fn set_timestamp_shim(this: &RtcrtpContributingSourceStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcrtpContributingSourceStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcrtpContributingSourceStats, val: RtcStatsType); + fn set_type__shim(this: &RtcrtpContributingSourceStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "contributorSsrc")] + fn contributor_ssrc_shim(this: &RtcrtpContributingSourceStats) -> u32; #[wasm_bindgen(method, setter = "contributorSsrc")] - fn contributor_ssrc_shim(this: &RtcrtpContributingSourceStats, val: u32); + fn set_contributor_ssrc_shim(this: &RtcrtpContributingSourceStats, val: u32); + #[wasm_bindgen(method, getter = "inboundRtpStreamId")] + fn inbound_rtp_stream_id_shim(this: &RtcrtpContributingSourceStats) -> String; #[wasm_bindgen(method, setter = "inboundRtpStreamId")] - fn inbound_rtp_stream_id_shim(this: &RtcrtpContributingSourceStats, val: &str); + fn set_inbound_rtp_stream_id_shim(this: &RtcrtpContributingSourceStats, val: &str); +} +#[doc = "The trait to access properties on the `RtcrtpContributingSourceStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] +pub trait RtcrtpContributingSourceStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpContributingSourceStats`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `contributorSsrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + fn contributor_ssrc(&self) -> u32; + #[doc = "Get the `inboundRtpStreamId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] + fn inbound_rtp_stream_id(&self) -> String; +} +impl RtcrtpContributingSourceStatsGetters for RtcrtpContributingSourceStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn contributor_ssrc(&self) -> u32 { + self.contributor_ssrc_shim() + } + fn inbound_rtp_stream_id(&self) -> String { + self.inbound_rtp_stream_id_shim() + } } impl RtcrtpContributingSourceStats { #[doc = "Construct a new `RtcrtpContributingSourceStats`."] @@ -35,14 +90,14 @@ impl RtcrtpContributingSourceStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -50,21 +105,21 @@ impl RtcrtpContributingSourceStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpContributingSourceStats`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `contributorSsrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] pub fn contributor_ssrc(&mut self, val: u32) -> &mut Self { - self.contributor_ssrc_shim(val); + self.set_contributor_ssrc_shim(val); self } #[doc = "Change the `inboundRtpStreamId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpContributingSourceStats`*"] pub fn inbound_rtp_stream_id(&mut self, val: &str) -> &mut Self { - self.inbound_rtp_stream_id_shim(val); + self.set_inbound_rtp_stream_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs b/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs index f33e1127499..6d009e51832 100644 --- a/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs +++ b/crates/web-sys/src/features/gen_RtcrtpStreamStats.rs @@ -10,41 +10,204 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub type RtcrtpStreamStats; + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &RtcrtpStreamStats) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &RtcrtpStreamStats, val: &str); + fn set_id_shim(this: &RtcrtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &RtcrtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &RtcrtpStreamStats, val: f64); + fn set_timestamp_shim(this: &RtcrtpStreamStats, val: f64); + #[cfg(feature = "RtcStatsType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &RtcrtpStreamStats) -> RtcStatsType; #[cfg(feature = "RtcStatsType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &RtcrtpStreamStats, val: RtcStatsType); + fn set_type__shim(this: &RtcrtpStreamStats, val: RtcStatsType); + #[wasm_bindgen(method, getter = "bitrateMean")] + fn bitrate_mean_shim(this: &RtcrtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "bitrateMean")] - fn bitrate_mean_shim(this: &RtcrtpStreamStats, val: f64); + fn set_bitrate_mean_shim(this: &RtcrtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "bitrateStdDev")] + fn bitrate_std_dev_shim(this: &RtcrtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "bitrateStdDev")] - fn bitrate_std_dev_shim(this: &RtcrtpStreamStats, val: f64); + fn set_bitrate_std_dev_shim(this: &RtcrtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "codecId")] + fn codec_id_shim(this: &RtcrtpStreamStats) -> String; #[wasm_bindgen(method, setter = "codecId")] - fn codec_id_shim(this: &RtcrtpStreamStats, val: &str); + fn set_codec_id_shim(this: &RtcrtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "firCount")] + fn fir_count_shim(this: &RtcrtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "firCount")] - fn fir_count_shim(this: &RtcrtpStreamStats, val: u32); + fn set_fir_count_shim(this: &RtcrtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "framerateMean")] + fn framerate_mean_shim(this: &RtcrtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "framerateMean")] - fn framerate_mean_shim(this: &RtcrtpStreamStats, val: f64); + fn set_framerate_mean_shim(this: &RtcrtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "framerateStdDev")] + fn framerate_std_dev_shim(this: &RtcrtpStreamStats) -> f64; #[wasm_bindgen(method, setter = "framerateStdDev")] - fn framerate_std_dev_shim(this: &RtcrtpStreamStats, val: f64); + fn set_framerate_std_dev_shim(this: &RtcrtpStreamStats, val: f64); + #[wasm_bindgen(method, getter = "isRemote")] + fn is_remote_shim(this: &RtcrtpStreamStats) -> bool; #[wasm_bindgen(method, setter = "isRemote")] - fn is_remote_shim(this: &RtcrtpStreamStats, val: bool); + fn set_is_remote_shim(this: &RtcrtpStreamStats, val: bool); + #[wasm_bindgen(method, getter = "mediaTrackId")] + fn media_track_id_shim(this: &RtcrtpStreamStats) -> String; #[wasm_bindgen(method, setter = "mediaTrackId")] - fn media_track_id_shim(this: &RtcrtpStreamStats, val: &str); + fn set_media_track_id_shim(this: &RtcrtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "mediaType")] + fn media_type_shim(this: &RtcrtpStreamStats) -> String; #[wasm_bindgen(method, setter = "mediaType")] - fn media_type_shim(this: &RtcrtpStreamStats, val: &str); + fn set_media_type_shim(this: &RtcrtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "nackCount")] + fn nack_count_shim(this: &RtcrtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "nackCount")] - fn nack_count_shim(this: &RtcrtpStreamStats, val: u32); + fn set_nack_count_shim(this: &RtcrtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "pliCount")] + fn pli_count_shim(this: &RtcrtpStreamStats) -> u32; #[wasm_bindgen(method, setter = "pliCount")] - fn pli_count_shim(this: &RtcrtpStreamStats, val: u32); + fn set_pli_count_shim(this: &RtcrtpStreamStats, val: u32); + #[wasm_bindgen(method, getter = "remoteId")] + fn remote_id_shim(this: &RtcrtpStreamStats) -> String; #[wasm_bindgen(method, setter = "remoteId")] - fn remote_id_shim(this: &RtcrtpStreamStats, val: &str); + fn set_remote_id_shim(this: &RtcrtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "ssrc")] + fn ssrc_shim(this: &RtcrtpStreamStats) -> String; #[wasm_bindgen(method, setter = "ssrc")] - fn ssrc_shim(this: &RtcrtpStreamStats, val: &str); + fn set_ssrc_shim(this: &RtcrtpStreamStats, val: &str); + #[wasm_bindgen(method, getter = "transportId")] + fn transport_id_shim(this: &RtcrtpStreamStats) -> String; #[wasm_bindgen(method, setter = "transportId")] - fn transport_id_shim(this: &RtcrtpStreamStats, val: &str); + fn set_transport_id_shim(this: &RtcrtpStreamStats, val: &str); +} +#[doc = "The trait to access properties on the `RtcrtpStreamStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] +pub trait RtcrtpStreamStatsGetters { + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn id(&self) -> String; + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn timestamp(&self) -> f64; + #[cfg(feature = "RtcStatsType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"] + fn type_(&self) -> RtcStatsType; + #[doc = "Get the `bitrateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn bitrate_mean(&self) -> f64; + #[doc = "Get the `bitrateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn bitrate_std_dev(&self) -> f64; + #[doc = "Get the `codecId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn codec_id(&self) -> String; + #[doc = "Get the `firCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn fir_count(&self) -> u32; + #[doc = "Get the `framerateMean` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn framerate_mean(&self) -> f64; + #[doc = "Get the `framerateStdDev` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn framerate_std_dev(&self) -> f64; + #[doc = "Get the `isRemote` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn is_remote(&self) -> bool; + #[doc = "Get the `mediaTrackId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn media_track_id(&self) -> String; + #[doc = "Get the `mediaType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn media_type(&self) -> String; + #[doc = "Get the `nackCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn nack_count(&self) -> u32; + #[doc = "Get the `pliCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn pli_count(&self) -> u32; + #[doc = "Get the `remoteId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn remote_id(&self) -> String; + #[doc = "Get the `ssrc` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn ssrc(&self) -> String; + #[doc = "Get the `transportId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] + fn transport_id(&self) -> String; +} +impl RtcrtpStreamStatsGetters for RtcrtpStreamStats { + fn id(&self) -> String { + self.id_shim() + } + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(feature = "RtcStatsType")] + fn type_(&self) -> RtcStatsType { + self.type__shim() + } + fn bitrate_mean(&self) -> f64 { + self.bitrate_mean_shim() + } + fn bitrate_std_dev(&self) -> f64 { + self.bitrate_std_dev_shim() + } + fn codec_id(&self) -> String { + self.codec_id_shim() + } + fn fir_count(&self) -> u32 { + self.fir_count_shim() + } + fn framerate_mean(&self) -> f64 { + self.framerate_mean_shim() + } + fn framerate_std_dev(&self) -> f64 { + self.framerate_std_dev_shim() + } + fn is_remote(&self) -> bool { + self.is_remote_shim() + } + fn media_track_id(&self) -> String { + self.media_track_id_shim() + } + fn media_type(&self) -> String { + self.media_type_shim() + } + fn nack_count(&self) -> u32 { + self.nack_count_shim() + } + fn pli_count(&self) -> u32 { + self.pli_count_shim() + } + fn remote_id(&self) -> String { + self.remote_id_shim() + } + fn ssrc(&self) -> String { + self.ssrc_shim() + } + fn transport_id(&self) -> String { + self.transport_id_shim() + } } impl RtcrtpStreamStats { #[doc = "Construct a new `RtcrtpStreamStats`."] @@ -59,14 +222,14 @@ impl RtcrtpStreamStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[doc = "Change the `timestamp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(feature = "RtcStatsType")] @@ -74,105 +237,105 @@ impl RtcrtpStreamStats { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcStatsType`, `RtcrtpStreamStats`*"] pub fn type_(&mut self, val: RtcStatsType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `bitrateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn bitrate_mean(&mut self, val: f64) -> &mut Self { - self.bitrate_mean_shim(val); + self.set_bitrate_mean_shim(val); self } #[doc = "Change the `bitrateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn bitrate_std_dev(&mut self, val: f64) -> &mut Self { - self.bitrate_std_dev_shim(val); + self.set_bitrate_std_dev_shim(val); self } #[doc = "Change the `codecId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn codec_id(&mut self, val: &str) -> &mut Self { - self.codec_id_shim(val); + self.set_codec_id_shim(val); self } #[doc = "Change the `firCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn fir_count(&mut self, val: u32) -> &mut Self { - self.fir_count_shim(val); + self.set_fir_count_shim(val); self } #[doc = "Change the `framerateMean` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn framerate_mean(&mut self, val: f64) -> &mut Self { - self.framerate_mean_shim(val); + self.set_framerate_mean_shim(val); self } #[doc = "Change the `framerateStdDev` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn framerate_std_dev(&mut self, val: f64) -> &mut Self { - self.framerate_std_dev_shim(val); + self.set_framerate_std_dev_shim(val); self } #[doc = "Change the `isRemote` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn is_remote(&mut self, val: bool) -> &mut Self { - self.is_remote_shim(val); + self.set_is_remote_shim(val); self } #[doc = "Change the `mediaTrackId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn media_track_id(&mut self, val: &str) -> &mut Self { - self.media_track_id_shim(val); + self.set_media_track_id_shim(val); self } #[doc = "Change the `mediaType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn media_type(&mut self, val: &str) -> &mut Self { - self.media_type_shim(val); + self.set_media_type_shim(val); self } #[doc = "Change the `nackCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn nack_count(&mut self, val: u32) -> &mut Self { - self.nack_count_shim(val); + self.set_nack_count_shim(val); self } #[doc = "Change the `pliCount` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn pli_count(&mut self, val: u32) -> &mut Self { - self.pli_count_shim(val); + self.set_pli_count_shim(val); self } #[doc = "Change the `remoteId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn remote_id(&mut self, val: &str) -> &mut Self { - self.remote_id_shim(val); + self.set_remote_id_shim(val); self } #[doc = "Change the `ssrc` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn ssrc(&mut self, val: &str) -> &mut Self { - self.ssrc_shim(val); + self.set_ssrc_shim(val); self } #[doc = "Change the `transportId` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RtcrtpStreamStats`*"] pub fn transport_id(&mut self, val: &str) -> &mut Self { - self.transport_id_shim(val); + self.set_transport_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs b/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs index 9502619bfac..edbfaf975ce 100644 --- a/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs +++ b/crates/web-sys/src/features/gen_SaveFilePickerOptions.rs @@ -14,16 +14,95 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SaveFilePickerOptions; + #[wasm_bindgen(method, getter = "excludeAcceptAllOption")] + fn exclude_accept_all_option_shim(this: &SaveFilePickerOptions) -> bool; #[wasm_bindgen(method, setter = "excludeAcceptAllOption")] - fn exclude_accept_all_option_shim(this: &SaveFilePickerOptions, val: bool); + fn set_exclude_accept_all_option_shim(this: &SaveFilePickerOptions, val: bool); + #[wasm_bindgen(method, getter = "id")] + fn id_shim(this: &SaveFilePickerOptions) -> String; #[wasm_bindgen(method, setter = "id")] - fn id_shim(this: &SaveFilePickerOptions, val: &str); + fn set_id_shim(this: &SaveFilePickerOptions, val: &str); + #[wasm_bindgen(method, getter = "startIn")] + fn start_in_shim(this: &SaveFilePickerOptions) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "startIn")] - fn start_in_shim(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); + fn set_start_in_shim(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "types")] + fn types_shim(this: &SaveFilePickerOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "types")] - fn types_shim(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); + fn set_types_shim(this: &SaveFilePickerOptions, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "suggestedName")] + fn suggested_name_shim(this: &SaveFilePickerOptions) -> Option; #[wasm_bindgen(method, setter = "suggestedName")] - fn suggested_name_shim(this: &SaveFilePickerOptions, val: Option<&str>); + fn set_suggested_name_shim(this: &SaveFilePickerOptions, val: Option<&str>); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `SaveFilePickerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] +pub trait SaveFilePickerOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `excludeAcceptAllOption` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn exclude_accept_all_option(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `id` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn id(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `startIn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn start_in(&self) -> ::wasm_bindgen::JsValue; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `types` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn types(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `suggestedName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SaveFilePickerOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn suggested_name(&self) -> Option; +} +#[cfg(web_sys_unstable_apis)] +impl SaveFilePickerOptionsGetters for SaveFilePickerOptions { + #[cfg(web_sys_unstable_apis)] + fn exclude_accept_all_option(&self) -> bool { + self.exclude_accept_all_option_shim() + } + #[cfg(web_sys_unstable_apis)] + fn id(&self) -> String { + self.id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn start_in(&self) -> ::wasm_bindgen::JsValue { + self.start_in_shim() + } + #[cfg(web_sys_unstable_apis)] + fn types(&self) -> ::js_sys::Array { + self.types_shim() + } + #[cfg(web_sys_unstable_apis)] + fn suggested_name(&self) -> Option { + self.suggested_name_shim() + } } #[cfg(web_sys_unstable_apis)] impl SaveFilePickerOptions { @@ -46,7 +125,7 @@ impl SaveFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn exclude_accept_all_option(&mut self, val: bool) -> &mut Self { - self.exclude_accept_all_option_shim(val); + self.set_exclude_accept_all_option_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +136,7 @@ impl SaveFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn id(&mut self, val: &str) -> &mut Self { - self.id_shim(val); + self.set_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +147,7 @@ impl SaveFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn start_in(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.start_in_shim(val); + self.set_start_in_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -79,7 +158,7 @@ impl SaveFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.types_shim(val); + self.set_types_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -90,7 +169,7 @@ impl SaveFilePickerOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn suggested_name(&mut self, val: Option<&str>) -> &mut Self { - self.suggested_name_shim(val); + self.set_suggested_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs b/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs index a913bd85edc..b257a1a60c6 100644 --- a/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs +++ b/crates/web-sys/src/features/gen_SchedulerPostTaskOptions.rs @@ -14,14 +14,71 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SchedulerPostTaskOptions; + #[wasm_bindgen(method, getter = "delay")] + fn delay_shim(this: &SchedulerPostTaskOptions) -> f64; #[wasm_bindgen(method, setter = "delay")] - fn delay_shim(this: &SchedulerPostTaskOptions, val: f64); + fn set_delay_shim(this: &SchedulerPostTaskOptions, val: f64); + #[cfg(feature = "TaskPriority")] + #[wasm_bindgen(method, getter = "priority")] + fn priority_shim(this: &SchedulerPostTaskOptions) -> TaskPriority; #[cfg(feature = "TaskPriority")] #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &SchedulerPostTaskOptions, val: TaskPriority); + fn set_priority_shim(this: &SchedulerPostTaskOptions, val: TaskPriority); + #[cfg(feature = "AbortSignal")] + #[wasm_bindgen(method, getter = "signal")] + fn signal_shim(this: &SchedulerPostTaskOptions) -> AbortSignal; #[cfg(feature = "AbortSignal")] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &SchedulerPostTaskOptions, val: &AbortSignal); + fn set_signal_shim(this: &SchedulerPostTaskOptions, val: &AbortSignal); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `SchedulerPostTaskOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"] +pub trait SchedulerPostTaskOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `delay` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn delay(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "TaskPriority")] + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SchedulerPostTaskOptions`, `TaskPriority`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn priority(&self) -> TaskPriority; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `SchedulerPostTaskOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn signal(&self) -> AbortSignal; +} +#[cfg(web_sys_unstable_apis)] +impl SchedulerPostTaskOptionsGetters for SchedulerPostTaskOptions { + #[cfg(web_sys_unstable_apis)] + fn delay(&self) -> f64 { + self.delay_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "TaskPriority")] + fn priority(&self) -> TaskPriority { + self.priority_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + fn signal(&self) -> AbortSignal { + self.signal_shim() + } } #[cfg(web_sys_unstable_apis)] impl SchedulerPostTaskOptions { @@ -44,7 +101,7 @@ impl SchedulerPostTaskOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn delay(&mut self, val: f64) -> &mut Self { - self.delay_shim(val); + self.set_delay_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -56,7 +113,7 @@ impl SchedulerPostTaskOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn priority(&mut self, val: TaskPriority) -> &mut Self { - self.priority_shim(val); + self.set_priority_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +125,7 @@ impl SchedulerPostTaskOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs b/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs index b412d88ad14..8ca862f69aa 100644 --- a/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs +++ b/crates/web-sys/src/features/gen_ScrollIntoViewOptions.rs @@ -11,14 +11,57 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`*"] pub type ScrollIntoViewOptions; #[cfg(feature = "ScrollBehavior")] + #[wasm_bindgen(method, getter = "behavior")] + fn behavior_shim(this: &ScrollIntoViewOptions) -> ScrollBehavior; + #[cfg(feature = "ScrollBehavior")] #[wasm_bindgen(method, setter = "behavior")] - fn behavior_shim(this: &ScrollIntoViewOptions, val: ScrollBehavior); + fn set_behavior_shim(this: &ScrollIntoViewOptions, val: ScrollBehavior); + #[cfg(feature = "ScrollLogicalPosition")] + #[wasm_bindgen(method, getter = "block")] + fn block_shim(this: &ScrollIntoViewOptions) -> ScrollLogicalPosition; #[cfg(feature = "ScrollLogicalPosition")] #[wasm_bindgen(method, setter = "block")] - fn block_shim(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); + fn set_block_shim(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); + #[cfg(feature = "ScrollLogicalPosition")] + #[wasm_bindgen(method, getter = "inline")] + fn inline_shim(this: &ScrollIntoViewOptions) -> ScrollLogicalPosition; #[cfg(feature = "ScrollLogicalPosition")] #[wasm_bindgen(method, setter = "inline")] - fn inline_shim(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); + fn set_inline_shim(this: &ScrollIntoViewOptions, val: ScrollLogicalPosition); +} +#[doc = "The trait to access properties on the `ScrollIntoViewOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`*"] +pub trait ScrollIntoViewOptionsGetters { + #[cfg(feature = "ScrollBehavior")] + #[doc = "Get the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollIntoViewOptions`*"] + fn behavior(&self) -> ScrollBehavior; + #[cfg(feature = "ScrollLogicalPosition")] + #[doc = "Get the `block` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] + fn block(&self) -> ScrollLogicalPosition; + #[cfg(feature = "ScrollLogicalPosition")] + #[doc = "Get the `inline` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] + fn inline(&self) -> ScrollLogicalPosition; +} +impl ScrollIntoViewOptionsGetters for ScrollIntoViewOptions { + #[cfg(feature = "ScrollBehavior")] + fn behavior(&self) -> ScrollBehavior { + self.behavior_shim() + } + #[cfg(feature = "ScrollLogicalPosition")] + fn block(&self) -> ScrollLogicalPosition { + self.block_shim() + } + #[cfg(feature = "ScrollLogicalPosition")] + fn inline(&self) -> ScrollLogicalPosition { + self.inline_shim() + } } impl ScrollIntoViewOptions { #[doc = "Construct a new `ScrollIntoViewOptions`."] @@ -34,7 +77,7 @@ impl ScrollIntoViewOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollIntoViewOptions`*"] pub fn behavior(&mut self, val: ScrollBehavior) -> &mut Self { - self.behavior_shim(val); + self.set_behavior_shim(val); self } #[cfg(feature = "ScrollLogicalPosition")] @@ -42,7 +85,7 @@ impl ScrollIntoViewOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] pub fn block(&mut self, val: ScrollLogicalPosition) -> &mut Self { - self.block_shim(val); + self.set_block_shim(val); self } #[cfg(feature = "ScrollLogicalPosition")] @@ -50,7 +93,7 @@ impl ScrollIntoViewOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollIntoViewOptions`, `ScrollLogicalPosition`*"] pub fn inline(&mut self, val: ScrollLogicalPosition) -> &mut Self { - self.inline_shim(val); + self.set_inline_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ScrollOptions.rs b/crates/web-sys/src/features/gen_ScrollOptions.rs index 2357199aa50..2b0b8803d9a 100644 --- a/crates/web-sys/src/features/gen_ScrollOptions.rs +++ b/crates/web-sys/src/features/gen_ScrollOptions.rs @@ -11,8 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ScrollOptions`*"] pub type ScrollOptions; #[cfg(feature = "ScrollBehavior")] + #[wasm_bindgen(method, getter = "behavior")] + fn behavior_shim(this: &ScrollOptions) -> ScrollBehavior; + #[cfg(feature = "ScrollBehavior")] #[wasm_bindgen(method, setter = "behavior")] - fn behavior_shim(this: &ScrollOptions, val: ScrollBehavior); + fn set_behavior_shim(this: &ScrollOptions, val: ScrollBehavior); +} +#[doc = "The trait to access properties on the `ScrollOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ScrollOptions`*"] +pub trait ScrollOptionsGetters { + #[cfg(feature = "ScrollBehavior")] + #[doc = "Get the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollOptions`*"] + fn behavior(&self) -> ScrollBehavior; +} +impl ScrollOptionsGetters for ScrollOptions { + #[cfg(feature = "ScrollBehavior")] + fn behavior(&self) -> ScrollBehavior { + self.behavior_shim() + } } impl ScrollOptions { #[doc = "Construct a new `ScrollOptions`."] @@ -28,7 +47,7 @@ impl ScrollOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollOptions`*"] pub fn behavior(&mut self, val: ScrollBehavior) -> &mut Self { - self.behavior_shim(val); + self.set_behavior_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ScrollToOptions.rs b/crates/web-sys/src/features/gen_ScrollToOptions.rs index d529c5913a8..bdfd117e41d 100644 --- a/crates/web-sys/src/features/gen_ScrollToOptions.rs +++ b/crates/web-sys/src/features/gen_ScrollToOptions.rs @@ -11,12 +11,49 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] pub type ScrollToOptions; #[cfg(feature = "ScrollBehavior")] + #[wasm_bindgen(method, getter = "behavior")] + fn behavior_shim(this: &ScrollToOptions) -> ScrollBehavior; + #[cfg(feature = "ScrollBehavior")] #[wasm_bindgen(method, setter = "behavior")] - fn behavior_shim(this: &ScrollToOptions, val: ScrollBehavior); + fn set_behavior_shim(this: &ScrollToOptions, val: ScrollBehavior); + #[wasm_bindgen(method, getter = "left")] + fn left_shim(this: &ScrollToOptions) -> f64; #[wasm_bindgen(method, setter = "left")] - fn left_shim(this: &ScrollToOptions, val: f64); + fn set_left_shim(this: &ScrollToOptions, val: f64); + #[wasm_bindgen(method, getter = "top")] + fn top_shim(this: &ScrollToOptions) -> f64; #[wasm_bindgen(method, setter = "top")] - fn top_shim(this: &ScrollToOptions, val: f64); + fn set_top_shim(this: &ScrollToOptions, val: f64); +} +#[doc = "The trait to access properties on the `ScrollToOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] +pub trait ScrollToOptionsGetters { + #[cfg(feature = "ScrollBehavior")] + #[doc = "Get the `behavior` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollToOptions`*"] + fn behavior(&self) -> ScrollBehavior; + #[doc = "Get the `left` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] + fn left(&self) -> f64; + #[doc = "Get the `top` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] + fn top(&self) -> f64; +} +impl ScrollToOptionsGetters for ScrollToOptions { + #[cfg(feature = "ScrollBehavior")] + fn behavior(&self) -> ScrollBehavior { + self.behavior_shim() + } + fn left(&self) -> f64 { + self.left_shim() + } + fn top(&self) -> f64 { + self.top_shim() + } } impl ScrollToOptions { #[doc = "Construct a new `ScrollToOptions`."] @@ -32,21 +69,21 @@ impl ScrollToOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollBehavior`, `ScrollToOptions`*"] pub fn behavior(&mut self, val: ScrollBehavior) -> &mut Self { - self.behavior_shim(val); + self.set_behavior_shim(val); self } #[doc = "Change the `left` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] pub fn left(&mut self, val: f64) -> &mut Self { - self.left_shim(val); + self.set_left_shim(val); self } #[doc = "Change the `top` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollToOptions`*"] pub fn top(&mut self, val: f64) -> &mut Self { - self.top_shim(val); + self.set_top_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs b/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs index 79eb87f27ec..164d2b7473a 100644 --- a/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_ScrollViewChangeEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] pub type ScrollViewChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &ScrollViewChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ScrollViewChangeEventInit, val: bool); + fn set_bubbles_shim(this: &ScrollViewChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &ScrollViewChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ScrollViewChangeEventInit, val: bool); + fn set_cancelable_shim(this: &ScrollViewChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &ScrollViewChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ScrollViewChangeEventInit, val: bool); + fn set_composed_shim(this: &ScrollViewChangeEventInit, val: bool); + #[cfg(feature = "ScrollState")] + #[wasm_bindgen(method, getter = "state")] + fn state_shim(this: &ScrollViewChangeEventInit) -> ScrollState; #[cfg(feature = "ScrollState")] #[wasm_bindgen(method, setter = "state")] - fn state_shim(this: &ScrollViewChangeEventInit, val: ScrollState); + fn set_state_shim(this: &ScrollViewChangeEventInit, val: ScrollState); +} +#[doc = "The trait to access properties on the `ScrollViewChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] +pub trait ScrollViewChangeEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "ScrollState")] + #[doc = "Get the `state` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ScrollState`, `ScrollViewChangeEventInit`*"] + fn state(&self) -> ScrollState; +} +impl ScrollViewChangeEventInitGetters for ScrollViewChangeEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "ScrollState")] + fn state(&self) -> ScrollState { + self.state_shim() + } } impl ScrollViewChangeEventInit { #[doc = "Construct a new `ScrollViewChangeEventInit`."] @@ -33,21 +79,21 @@ impl ScrollViewChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollViewChangeEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "ScrollState")] @@ -55,7 +101,7 @@ impl ScrollViewChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ScrollState`, `ScrollViewChangeEventInit`*"] pub fn state(&mut self, val: ScrollState) -> &mut Self { - self.state_shim(val); + self.set_state_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs b/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs index 2f86bc879fb..55ee6d31229 100644 --- a/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs +++ b/crates/web-sys/src/features/gen_SecurityPolicyViolationEventInit.rs @@ -10,40 +10,187 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub type SecurityPolicyViolationEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &SecurityPolicyViolationEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SecurityPolicyViolationEventInit, val: bool); + fn set_bubbles_shim(this: &SecurityPolicyViolationEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &SecurityPolicyViolationEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SecurityPolicyViolationEventInit, val: bool); + fn set_cancelable_shim(this: &SecurityPolicyViolationEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &SecurityPolicyViolationEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SecurityPolicyViolationEventInit, val: bool); + fn set_composed_shim(this: &SecurityPolicyViolationEventInit, val: bool); + #[wasm_bindgen(method, getter = "blockedURI")] + fn blocked_uri_shim(this: &SecurityPolicyViolationEventInit) -> String; #[wasm_bindgen(method, setter = "blockedURI")] - fn blocked_uri_shim(this: &SecurityPolicyViolationEventInit, val: &str); + fn set_blocked_uri_shim(this: &SecurityPolicyViolationEventInit, val: &str); + #[wasm_bindgen(method, getter = "columnNumber")] + fn column_number_shim(this: &SecurityPolicyViolationEventInit) -> i32; #[wasm_bindgen(method, setter = "columnNumber")] - fn column_number_shim(this: &SecurityPolicyViolationEventInit, val: i32); + fn set_column_number_shim(this: &SecurityPolicyViolationEventInit, val: i32); #[cfg(feature = "SecurityPolicyViolationEventDisposition")] - #[wasm_bindgen(method, setter = "disposition")] + #[wasm_bindgen(method, getter = "disposition")] fn disposition_shim( this: &SecurityPolicyViolationEventInit, + ) -> SecurityPolicyViolationEventDisposition; + #[cfg(feature = "SecurityPolicyViolationEventDisposition")] + #[wasm_bindgen(method, setter = "disposition")] + fn set_disposition_shim( + this: &SecurityPolicyViolationEventInit, val: SecurityPolicyViolationEventDisposition, ); + #[wasm_bindgen(method, getter = "documentURI")] + fn document_uri_shim(this: &SecurityPolicyViolationEventInit) -> String; #[wasm_bindgen(method, setter = "documentURI")] - fn document_uri_shim(this: &SecurityPolicyViolationEventInit, val: &str); + fn set_document_uri_shim(this: &SecurityPolicyViolationEventInit, val: &str); + #[wasm_bindgen(method, getter = "effectiveDirective")] + fn effective_directive_shim(this: &SecurityPolicyViolationEventInit) -> String; #[wasm_bindgen(method, setter = "effectiveDirective")] - fn effective_directive_shim(this: &SecurityPolicyViolationEventInit, val: &str); + fn set_effective_directive_shim(this: &SecurityPolicyViolationEventInit, val: &str); + #[wasm_bindgen(method, getter = "lineNumber")] + fn line_number_shim(this: &SecurityPolicyViolationEventInit) -> i32; #[wasm_bindgen(method, setter = "lineNumber")] - fn line_number_shim(this: &SecurityPolicyViolationEventInit, val: i32); + fn set_line_number_shim(this: &SecurityPolicyViolationEventInit, val: i32); + #[wasm_bindgen(method, getter = "originalPolicy")] + fn original_policy_shim(this: &SecurityPolicyViolationEventInit) -> String; #[wasm_bindgen(method, setter = "originalPolicy")] - fn original_policy_shim(this: &SecurityPolicyViolationEventInit, val: &str); + fn set_original_policy_shim(this: &SecurityPolicyViolationEventInit, val: &str); + #[wasm_bindgen(method, getter = "referrer")] + fn referrer_shim(this: &SecurityPolicyViolationEventInit) -> String; #[wasm_bindgen(method, setter = "referrer")] - fn referrer_shim(this: &SecurityPolicyViolationEventInit, val: &str); + fn set_referrer_shim(this: &SecurityPolicyViolationEventInit, val: &str); + #[wasm_bindgen(method, getter = "sample")] + fn sample_shim(this: &SecurityPolicyViolationEventInit) -> String; #[wasm_bindgen(method, setter = "sample")] - fn sample_shim(this: &SecurityPolicyViolationEventInit, val: &str); + fn set_sample_shim(this: &SecurityPolicyViolationEventInit, val: &str); + #[wasm_bindgen(method, getter = "sourceFile")] + fn source_file_shim(this: &SecurityPolicyViolationEventInit) -> String; #[wasm_bindgen(method, setter = "sourceFile")] - fn source_file_shim(this: &SecurityPolicyViolationEventInit, val: &str); + fn set_source_file_shim(this: &SecurityPolicyViolationEventInit, val: &str); + #[wasm_bindgen(method, getter = "statusCode")] + fn status_code_shim(this: &SecurityPolicyViolationEventInit) -> u16; #[wasm_bindgen(method, setter = "statusCode")] - fn status_code_shim(this: &SecurityPolicyViolationEventInit, val: u16); + fn set_status_code_shim(this: &SecurityPolicyViolationEventInit, val: u16); + #[wasm_bindgen(method, getter = "violatedDirective")] + fn violated_directive_shim(this: &SecurityPolicyViolationEventInit) -> String; #[wasm_bindgen(method, setter = "violatedDirective")] - fn violated_directive_shim(this: &SecurityPolicyViolationEventInit, val: &str); + fn set_violated_directive_shim(this: &SecurityPolicyViolationEventInit, val: &str); +} +#[doc = "The trait to access properties on the `SecurityPolicyViolationEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] +pub trait SecurityPolicyViolationEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `blockedURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn blocked_uri(&self) -> String; + #[doc = "Get the `columnNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn column_number(&self) -> i32; + #[cfg(feature = "SecurityPolicyViolationEventDisposition")] + #[doc = "Get the `disposition` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventDisposition`, `SecurityPolicyViolationEventInit`*"] + fn disposition(&self) -> SecurityPolicyViolationEventDisposition; + #[doc = "Get the `documentURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn document_uri(&self) -> String; + #[doc = "Get the `effectiveDirective` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn effective_directive(&self) -> String; + #[doc = "Get the `lineNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn line_number(&self) -> i32; + #[doc = "Get the `originalPolicy` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn original_policy(&self) -> String; + #[doc = "Get the `referrer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn referrer(&self) -> String; + #[doc = "Get the `sample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn sample(&self) -> String; + #[doc = "Get the `sourceFile` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn source_file(&self) -> String; + #[doc = "Get the `statusCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn status_code(&self) -> u16; + #[doc = "Get the `violatedDirective` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] + fn violated_directive(&self) -> String; +} +impl SecurityPolicyViolationEventInitGetters for SecurityPolicyViolationEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn blocked_uri(&self) -> String { + self.blocked_uri_shim() + } + fn column_number(&self) -> i32 { + self.column_number_shim() + } + #[cfg(feature = "SecurityPolicyViolationEventDisposition")] + fn disposition(&self) -> SecurityPolicyViolationEventDisposition { + self.disposition_shim() + } + fn document_uri(&self) -> String { + self.document_uri_shim() + } + fn effective_directive(&self) -> String { + self.effective_directive_shim() + } + fn line_number(&self) -> i32 { + self.line_number_shim() + } + fn original_policy(&self) -> String { + self.original_policy_shim() + } + fn referrer(&self) -> String { + self.referrer_shim() + } + fn sample(&self) -> String { + self.sample_shim() + } + fn source_file(&self) -> String { + self.source_file_shim() + } + fn status_code(&self) -> u16 { + self.status_code_shim() + } + fn violated_directive(&self) -> String { + self.violated_directive_shim() + } } impl SecurityPolicyViolationEventInit { #[doc = "Construct a new `SecurityPolicyViolationEventInit`."] @@ -58,35 +205,35 @@ impl SecurityPolicyViolationEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `blockedURI` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn blocked_uri(&mut self, val: &str) -> &mut Self { - self.blocked_uri_shim(val); + self.set_blocked_uri_shim(val); self } #[doc = "Change the `columnNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn column_number(&mut self, val: i32) -> &mut Self { - self.column_number_shim(val); + self.set_column_number_shim(val); self } #[cfg(feature = "SecurityPolicyViolationEventDisposition")] @@ -94,70 +241,70 @@ impl SecurityPolicyViolationEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventDisposition`, `SecurityPolicyViolationEventInit`*"] pub fn disposition(&mut self, val: SecurityPolicyViolationEventDisposition) -> &mut Self { - self.disposition_shim(val); + self.set_disposition_shim(val); self } #[doc = "Change the `documentURI` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn document_uri(&mut self, val: &str) -> &mut Self { - self.document_uri_shim(val); + self.set_document_uri_shim(val); self } #[doc = "Change the `effectiveDirective` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn effective_directive(&mut self, val: &str) -> &mut Self { - self.effective_directive_shim(val); + self.set_effective_directive_shim(val); self } #[doc = "Change the `lineNumber` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn line_number(&mut self, val: i32) -> &mut Self { - self.line_number_shim(val); + self.set_line_number_shim(val); self } #[doc = "Change the `originalPolicy` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn original_policy(&mut self, val: &str) -> &mut Self { - self.original_policy_shim(val); + self.set_original_policy_shim(val); self } #[doc = "Change the `referrer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn referrer(&mut self, val: &str) -> &mut Self { - self.referrer_shim(val); + self.set_referrer_shim(val); self } #[doc = "Change the `sample` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn sample(&mut self, val: &str) -> &mut Self { - self.sample_shim(val); + self.set_sample_shim(val); self } #[doc = "Change the `sourceFile` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn source_file(&mut self, val: &str) -> &mut Self { - self.source_file_shim(val); + self.set_source_file_shim(val); self } #[doc = "Change the `statusCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn status_code(&mut self, val: u16) -> &mut Self { - self.status_code_shim(val); + self.set_status_code_shim(val); self } #[doc = "Change the `violatedDirective` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SecurityPolicyViolationEventInit`*"] pub fn violated_directive(&mut self, val: &str) -> &mut Self { - self.violated_directive_shim(val); + self.set_violated_directive_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialInputSignals.rs b/crates/web-sys/src/features/gen_SerialInputSignals.rs index bac6b8f7679..a9289daf10b 100644 --- a/crates/web-sys/src/features/gen_SerialInputSignals.rs +++ b/crates/web-sys/src/features/gen_SerialInputSignals.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialInputSignals; + #[wasm_bindgen(method, getter = "clearToSend")] + fn clear_to_send_shim(this: &SerialInputSignals) -> bool; #[wasm_bindgen(method, setter = "clearToSend")] - fn clear_to_send_shim(this: &SerialInputSignals, val: bool); + fn set_clear_to_send_shim(this: &SerialInputSignals, val: bool); + #[wasm_bindgen(method, getter = "dataCarrierDetect")] + fn data_carrier_detect_shim(this: &SerialInputSignals) -> bool; #[wasm_bindgen(method, setter = "dataCarrierDetect")] - fn data_carrier_detect_shim(this: &SerialInputSignals, val: bool); + fn set_data_carrier_detect_shim(this: &SerialInputSignals, val: bool); + #[wasm_bindgen(method, getter = "dataSetReady")] + fn data_set_ready_shim(this: &SerialInputSignals) -> bool; #[wasm_bindgen(method, setter = "dataSetReady")] - fn data_set_ready_shim(this: &SerialInputSignals, val: bool); + fn set_data_set_ready_shim(this: &SerialInputSignals, val: bool); + #[wasm_bindgen(method, getter = "ringIndicator")] + fn ring_indicator_shim(this: &SerialInputSignals) -> bool; #[wasm_bindgen(method, setter = "ringIndicator")] - fn ring_indicator_shim(this: &SerialInputSignals, val: bool); + fn set_ring_indicator_shim(this: &SerialInputSignals, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `SerialInputSignals` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] +pub trait SerialInputSignalsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `clearToSend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn clear_to_send(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataCarrierDetect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data_carrier_detect(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataSetReady` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data_set_ready(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `ringIndicator` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialInputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn ring_indicator(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl SerialInputSignalsGetters for SerialInputSignals { + #[cfg(web_sys_unstable_apis)] + fn clear_to_send(&self) -> bool { + self.clear_to_send_shim() + } + #[cfg(web_sys_unstable_apis)] + fn data_carrier_detect(&self) -> bool { + self.data_carrier_detect_shim() + } + #[cfg(web_sys_unstable_apis)] + fn data_set_ready(&self) -> bool { + self.data_set_ready_shim() + } + #[cfg(web_sys_unstable_apis)] + fn ring_indicator(&self) -> bool { + self.ring_indicator_shim() + } } #[cfg(web_sys_unstable_apis)] impl SerialInputSignals { @@ -39,10 +104,10 @@ impl SerialInputSignals { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.clear_to_send(clear_to_send); - ret.data_carrier_detect(data_carrier_detect); - ret.data_set_ready(data_set_ready); - ret.ring_indicator(ring_indicator); + Self::clear_to_send(&mut ret, clear_to_send); + Self::data_carrier_detect(&mut ret, data_carrier_detect); + Self::data_set_ready(&mut ret, data_set_ready); + Self::ring_indicator(&mut ret, ring_indicator); ret } #[cfg(web_sys_unstable_apis)] @@ -53,7 +118,7 @@ impl SerialInputSignals { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn clear_to_send(&mut self, val: bool) -> &mut Self { - self.clear_to_send_shim(val); + self.set_clear_to_send_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +129,7 @@ impl SerialInputSignals { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data_carrier_detect(&mut self, val: bool) -> &mut Self { - self.data_carrier_detect_shim(val); + self.set_data_carrier_detect_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -75,7 +140,7 @@ impl SerialInputSignals { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data_set_ready(&mut self, val: bool) -> &mut Self { - self.data_set_ready_shim(val); + self.set_data_set_ready_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -86,7 +151,7 @@ impl SerialInputSignals { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn ring_indicator(&mut self, val: bool) -> &mut Self { - self.ring_indicator_shim(val); + self.set_ring_indicator_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialOptions.rs b/crates/web-sys/src/features/gen_SerialOptions.rs index 02b78361511..c061d93fac5 100644 --- a/crates/web-sys/src/features/gen_SerialOptions.rs +++ b/crates/web-sys/src/features/gen_SerialOptions.rs @@ -14,20 +14,119 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialOptions; + #[wasm_bindgen(method, getter = "baudRate")] + fn baud_rate_shim(this: &SerialOptions) -> u32; #[wasm_bindgen(method, setter = "baudRate")] - fn baud_rate_shim(this: &SerialOptions, val: u32); + fn set_baud_rate_shim(this: &SerialOptions, val: u32); + #[wasm_bindgen(method, getter = "bufferSize")] + fn buffer_size_shim(this: &SerialOptions) -> u32; #[wasm_bindgen(method, setter = "bufferSize")] - fn buffer_size_shim(this: &SerialOptions, val: u32); + fn set_buffer_size_shim(this: &SerialOptions, val: u32); + #[wasm_bindgen(method, getter = "dataBits")] + fn data_bits_shim(this: &SerialOptions) -> u8; #[wasm_bindgen(method, setter = "dataBits")] - fn data_bits_shim(this: &SerialOptions, val: u8); + fn set_data_bits_shim(this: &SerialOptions, val: u8); + #[cfg(feature = "FlowControlType")] + #[wasm_bindgen(method, getter = "flowControl")] + fn flow_control_shim(this: &SerialOptions) -> FlowControlType; #[cfg(feature = "FlowControlType")] #[wasm_bindgen(method, setter = "flowControl")] - fn flow_control_shim(this: &SerialOptions, val: FlowControlType); + fn set_flow_control_shim(this: &SerialOptions, val: FlowControlType); + #[cfg(feature = "ParityType")] + #[wasm_bindgen(method, getter = "parity")] + fn parity_shim(this: &SerialOptions) -> ParityType; #[cfg(feature = "ParityType")] #[wasm_bindgen(method, setter = "parity")] - fn parity_shim(this: &SerialOptions, val: ParityType); + fn set_parity_shim(this: &SerialOptions, val: ParityType); + #[wasm_bindgen(method, getter = "stopBits")] + fn stop_bits_shim(this: &SerialOptions) -> u8; #[wasm_bindgen(method, setter = "stopBits")] - fn stop_bits_shim(this: &SerialOptions, val: u8); + fn set_stop_bits_shim(this: &SerialOptions, val: u8); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `SerialOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] +pub trait SerialOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `baudRate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn baud_rate(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bufferSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn buffer_size(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataBits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data_bits(&self) -> u8; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FlowControlType")] + #[doc = "Get the `flowControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `FlowControlType`, `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn flow_control(&self) -> FlowControlType; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ParityType")] + #[doc = "Get the `parity` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ParityType`, `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn parity(&self) -> ParityType; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stopBits` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stop_bits(&self) -> u8; +} +#[cfg(web_sys_unstable_apis)] +impl SerialOptionsGetters for SerialOptions { + #[cfg(web_sys_unstable_apis)] + fn baud_rate(&self) -> u32 { + self.baud_rate_shim() + } + #[cfg(web_sys_unstable_apis)] + fn buffer_size(&self) -> u32 { + self.buffer_size_shim() + } + #[cfg(web_sys_unstable_apis)] + fn data_bits(&self) -> u8 { + self.data_bits_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "FlowControlType")] + fn flow_control(&self) -> FlowControlType { + self.flow_control_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "ParityType")] + fn parity(&self) -> ParityType { + self.parity_shim() + } + #[cfg(web_sys_unstable_apis)] + fn stop_bits(&self) -> u8 { + self.stop_bits_shim() + } } #[cfg(web_sys_unstable_apis)] impl SerialOptions { @@ -40,7 +139,7 @@ impl SerialOptions { pub fn new(baud_rate: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.baud_rate(baud_rate); + Self::baud_rate(&mut ret, baud_rate); ret } #[cfg(web_sys_unstable_apis)] @@ -51,7 +150,7 @@ impl SerialOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn baud_rate(&mut self, val: u32) -> &mut Self { - self.baud_rate_shim(val); + self.set_baud_rate_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -62,7 +161,7 @@ impl SerialOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn buffer_size(&mut self, val: u32) -> &mut Self { - self.buffer_size_shim(val); + self.set_buffer_size_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -73,7 +172,7 @@ impl SerialOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data_bits(&mut self, val: u8) -> &mut Self { - self.data_bits_shim(val); + self.set_data_bits_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -85,7 +184,7 @@ impl SerialOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn flow_control(&mut self, val: FlowControlType) -> &mut Self { - self.flow_control_shim(val); + self.set_flow_control_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -97,7 +196,7 @@ impl SerialOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn parity(&mut self, val: ParityType) -> &mut Self { - self.parity_shim(val); + self.set_parity_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -108,7 +207,7 @@ impl SerialOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stop_bits(&mut self, val: u8) -> &mut Self { - self.stop_bits_shim(val); + self.set_stop_bits_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialOutputSignals.rs b/crates/web-sys/src/features/gen_SerialOutputSignals.rs index 73b3fb9764a..97192c6642b 100644 --- a/crates/web-sys/src/features/gen_SerialOutputSignals.rs +++ b/crates/web-sys/src/features/gen_SerialOutputSignals.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialOutputSignals; + #[wasm_bindgen(method, getter = "break")] + fn break__shim(this: &SerialOutputSignals) -> bool; #[wasm_bindgen(method, setter = "break")] - fn break__shim(this: &SerialOutputSignals, val: bool); + fn set_break__shim(this: &SerialOutputSignals, val: bool); + #[wasm_bindgen(method, getter = "dataTerminalReady")] + fn data_terminal_ready_shim(this: &SerialOutputSignals) -> bool; #[wasm_bindgen(method, setter = "dataTerminalReady")] - fn data_terminal_ready_shim(this: &SerialOutputSignals, val: bool); + fn set_data_terminal_ready_shim(this: &SerialOutputSignals, val: bool); + #[wasm_bindgen(method, getter = "requestToSend")] + fn request_to_send_shim(this: &SerialOutputSignals) -> bool; #[wasm_bindgen(method, setter = "requestToSend")] - fn request_to_send_shim(this: &SerialOutputSignals, val: bool); + fn set_request_to_send_shim(this: &SerialOutputSignals, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `SerialOutputSignals` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] +pub trait SerialOutputSignalsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `break` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn break_(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `dataTerminalReady` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn data_terminal_ready(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requestToSend` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialOutputSignals`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn request_to_send(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl SerialOutputSignalsGetters for SerialOutputSignals { + #[cfg(web_sys_unstable_apis)] + fn break_(&self) -> bool { + self.break__shim() + } + #[cfg(web_sys_unstable_apis)] + fn data_terminal_ready(&self) -> bool { + self.data_terminal_ready_shim() + } + #[cfg(web_sys_unstable_apis)] + fn request_to_send(&self) -> bool { + self.request_to_send_shim() + } } #[cfg(web_sys_unstable_apis)] impl SerialOutputSignals { @@ -42,7 +93,7 @@ impl SerialOutputSignals { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn break_(&mut self, val: bool) -> &mut Self { - self.break__shim(val); + self.set_break__shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +104,7 @@ impl SerialOutputSignals { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn data_terminal_ready(&mut self, val: bool) -> &mut Self { - self.data_terminal_ready_shim(val); + self.set_data_terminal_ready_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +115,7 @@ impl SerialOutputSignals { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn request_to_send(&mut self, val: bool) -> &mut Self { - self.request_to_send_shim(val); + self.set_request_to_send_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialPortFilter.rs b/crates/web-sys/src/features/gen_SerialPortFilter.rs index e1f876619bf..acbd076c099 100644 --- a/crates/web-sys/src/features/gen_SerialPortFilter.rs +++ b/crates/web-sys/src/features/gen_SerialPortFilter.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialPortFilter; + #[wasm_bindgen(method, getter = "usbProductId")] + fn usb_product_id_shim(this: &SerialPortFilter) -> u16; #[wasm_bindgen(method, setter = "usbProductId")] - fn usb_product_id_shim(this: &SerialPortFilter, val: u16); + fn set_usb_product_id_shim(this: &SerialPortFilter, val: u16); + #[wasm_bindgen(method, getter = "usbVendorId")] + fn usb_vendor_id_shim(this: &SerialPortFilter) -> u16; #[wasm_bindgen(method, setter = "usbVendorId")] - fn usb_vendor_id_shim(this: &SerialPortFilter, val: u16); + fn set_usb_vendor_id_shim(this: &SerialPortFilter, val: u16); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `SerialPortFilter` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] +pub trait SerialPortFilterGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usbProductId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usb_product_id(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usbVendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usb_vendor_id(&self) -> u16; +} +#[cfg(web_sys_unstable_apis)] +impl SerialPortFilterGetters for SerialPortFilter { + #[cfg(web_sys_unstable_apis)] + fn usb_product_id(&self) -> u16 { + self.usb_product_id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usb_vendor_id(&self) -> u16 { + self.usb_vendor_id_shim() + } } #[cfg(web_sys_unstable_apis)] impl SerialPortFilter { @@ -40,7 +77,7 @@ impl SerialPortFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usb_product_id(&mut self, val: u16) -> &mut Self { - self.usb_product_id_shim(val); + self.set_usb_product_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl SerialPortFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usb_vendor_id(&mut self, val: u16) -> &mut Self { - self.usb_vendor_id_shim(val); + self.set_usb_vendor_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialPortInfo.rs b/crates/web-sys/src/features/gen_SerialPortInfo.rs index 90953d2923b..d07f234bc1c 100644 --- a/crates/web-sys/src/features/gen_SerialPortInfo.rs +++ b/crates/web-sys/src/features/gen_SerialPortInfo.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialPortInfo; + #[wasm_bindgen(method, getter = "usbProductId")] + fn usb_product_id_shim(this: &SerialPortInfo) -> u16; #[wasm_bindgen(method, setter = "usbProductId")] - fn usb_product_id_shim(this: &SerialPortInfo, val: u16); + fn set_usb_product_id_shim(this: &SerialPortInfo, val: u16); + #[wasm_bindgen(method, getter = "usbVendorId")] + fn usb_vendor_id_shim(this: &SerialPortInfo) -> u16; #[wasm_bindgen(method, setter = "usbVendorId")] - fn usb_vendor_id_shim(this: &SerialPortInfo, val: u16); + fn set_usb_vendor_id_shim(this: &SerialPortInfo, val: u16); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `SerialPortInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] +pub trait SerialPortInfoGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usbProductId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usb_product_id(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `usbVendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn usb_vendor_id(&self) -> u16; +} +#[cfg(web_sys_unstable_apis)] +impl SerialPortInfoGetters for SerialPortInfo { + #[cfg(web_sys_unstable_apis)] + fn usb_product_id(&self) -> u16 { + self.usb_product_id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn usb_vendor_id(&self) -> u16 { + self.usb_vendor_id_shim() + } } #[cfg(web_sys_unstable_apis)] impl SerialPortInfo { @@ -40,7 +77,7 @@ impl SerialPortInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usb_product_id(&mut self, val: u16) -> &mut Self { - self.usb_product_id_shim(val); + self.set_usb_product_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl SerialPortInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn usb_vendor_id(&mut self, val: u16) -> &mut Self { - self.usb_vendor_id_shim(val); + self.set_usb_vendor_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs b/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs index 34238c807e0..fe58d4340a4 100644 --- a/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs +++ b/crates/web-sys/src/features/gen_SerialPortRequestOptions.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SerialPortRequestOptions; + #[wasm_bindgen(method, getter = "filters")] + fn filters_shim(this: &SerialPortRequestOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &SerialPortRequestOptions, val: &::wasm_bindgen::JsValue); + fn set_filters_shim(this: &SerialPortRequestOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `SerialPortRequestOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SerialPortRequestOptions`*"] +pub trait SerialPortRequestOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SerialPortRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn filters(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl SerialPortRequestOptionsGetters for SerialPortRequestOptions { + #[cfg(web_sys_unstable_apis)] + fn filters(&self) -> ::js_sys::Array { + self.filters_shim() + } } #[cfg(web_sys_unstable_apis)] impl SerialPortRequestOptions { @@ -38,7 +61,7 @@ impl SerialPortRequestOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ServerSocketOptions.rs b/crates/web-sys/src/features/gen_ServerSocketOptions.rs index 95133d8c0ef..2f7d6d741e9 100644 --- a/crates/web-sys/src/features/gen_ServerSocketOptions.rs +++ b/crates/web-sys/src/features/gen_ServerSocketOptions.rs @@ -11,8 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`*"] pub type ServerSocketOptions; #[cfg(feature = "TcpSocketBinaryType")] + #[wasm_bindgen(method, getter = "binaryType")] + fn binary_type_shim(this: &ServerSocketOptions) -> TcpSocketBinaryType; + #[cfg(feature = "TcpSocketBinaryType")] #[wasm_bindgen(method, setter = "binaryType")] - fn binary_type_shim(this: &ServerSocketOptions, val: TcpSocketBinaryType); + fn set_binary_type_shim(this: &ServerSocketOptions, val: TcpSocketBinaryType); +} +#[doc = "The trait to access properties on the `ServerSocketOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`*"] +pub trait ServerSocketOptionsGetters { + #[cfg(feature = "TcpSocketBinaryType")] + #[doc = "Get the `binaryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`, `TcpSocketBinaryType`*"] + fn binary_type(&self) -> TcpSocketBinaryType; +} +impl ServerSocketOptionsGetters for ServerSocketOptions { + #[cfg(feature = "TcpSocketBinaryType")] + fn binary_type(&self) -> TcpSocketBinaryType { + self.binary_type_shim() + } } impl ServerSocketOptions { #[doc = "Construct a new `ServerSocketOptions`."] @@ -28,7 +47,7 @@ impl ServerSocketOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ServerSocketOptions`, `TcpSocketBinaryType`*"] pub fn binary_type(&mut self, val: TcpSocketBinaryType) -> &mut Self { - self.binary_type_shim(val); + self.set_binary_type_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ShadowRootInit.rs b/crates/web-sys/src/features/gen_ShadowRootInit.rs index e86cf54eebb..a0f7c69546f 100644 --- a/crates/web-sys/src/features/gen_ShadowRootInit.rs +++ b/crates/web-sys/src/features/gen_ShadowRootInit.rs @@ -11,8 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`*"] pub type ShadowRootInit; #[cfg(feature = "ShadowRootMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &ShadowRootInit) -> ShadowRootMode; + #[cfg(feature = "ShadowRootMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &ShadowRootInit, val: ShadowRootMode); + fn set_mode_shim(this: &ShadowRootInit, val: ShadowRootMode); +} +#[doc = "The trait to access properties on the `ShadowRootInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`*"] +pub trait ShadowRootInitGetters { + #[cfg(feature = "ShadowRootMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`, `ShadowRootMode`*"] + fn mode(&self) -> ShadowRootMode; +} +impl ShadowRootInitGetters for ShadowRootInit { + #[cfg(feature = "ShadowRootMode")] + fn mode(&self) -> ShadowRootMode { + self.mode_shim() + } } impl ShadowRootInit { #[cfg(feature = "ShadowRootMode")] @@ -22,7 +41,7 @@ impl ShadowRootInit { pub fn new(mode: ShadowRootMode) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.mode(mode); + Self::mode(&mut ret, mode); ret } #[cfg(feature = "ShadowRootMode")] @@ -30,7 +49,7 @@ impl ShadowRootInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShadowRootInit`, `ShadowRootMode`*"] pub fn mode(&mut self, val: ShadowRootMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ShareData.rs b/crates/web-sys/src/features/gen_ShareData.rs index 5a8110527a4..f42c2570e2a 100644 --- a/crates/web-sys/src/features/gen_ShareData.rs +++ b/crates/web-sys/src/features/gen_ShareData.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] pub type ShareData; + #[wasm_bindgen(method, getter = "files")] + fn files_shim(this: &ShareData) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "files")] - fn files_shim(this: &ShareData, val: &::wasm_bindgen::JsValue); + fn set_files_shim(this: &ShareData, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "text")] + fn text_shim(this: &ShareData) -> String; #[wasm_bindgen(method, setter = "text")] - fn text_shim(this: &ShareData, val: &str); + fn set_text_shim(this: &ShareData, val: &str); + #[wasm_bindgen(method, getter = "title")] + fn title_shim(this: &ShareData) -> String; #[wasm_bindgen(method, setter = "title")] - fn title_shim(this: &ShareData, val: &str); + fn set_title_shim(this: &ShareData, val: &str); + #[wasm_bindgen(method, getter = "url")] + fn url_shim(this: &ShareData) -> String; #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &ShareData, val: &str); + fn set_url_shim(this: &ShareData, val: &str); +} +#[doc = "The trait to access properties on the `ShareData` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ShareData`*"] +pub trait ShareDataGetters { + #[doc = "Get the `files` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + fn files(&self) -> ::js_sys::Array; + #[doc = "Get the `text` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + fn text(&self) -> String; + #[doc = "Get the `title` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + fn title(&self) -> String; + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] + fn url(&self) -> String; +} +impl ShareDataGetters for ShareData { + fn files(&self) -> ::js_sys::Array { + self.files_shim() + } + fn text(&self) -> String { + self.text_shim() + } + fn title(&self) -> String { + self.title_shim() + } + fn url(&self) -> String { + self.url_shim() + } } impl ShareData { #[doc = "Construct a new `ShareData`."] @@ -32,28 +75,28 @@ impl ShareData { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] pub fn files(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.files_shim(val); + self.set_files_shim(val); self } #[doc = "Change the `text` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] pub fn text(&mut self, val: &str) -> &mut Self { - self.text_shim(val); + self.set_text_shim(val); self } #[doc = "Change the `title` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] pub fn title(&mut self, val: &str) -> &mut Self { - self.title_shim(val); + self.set_title_shim(val); self } #[doc = "Change the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ShareData`*"] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SignResponse.rs b/crates/web-sys/src/features/gen_SignResponse.rs index 22a21bb2d05..69f268d355b 100644 --- a/crates/web-sys/src/features/gen_SignResponse.rs +++ b/crates/web-sys/src/features/gen_SignResponse.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] pub type SignResponse; + #[wasm_bindgen(method, getter = "clientData")] + fn client_data_shim(this: &SignResponse) -> String; #[wasm_bindgen(method, setter = "clientData")] - fn client_data_shim(this: &SignResponse, val: &str); + fn set_client_data_shim(this: &SignResponse, val: &str); + #[wasm_bindgen(method, getter = "errorCode")] + fn error_code_shim(this: &SignResponse) -> Option; #[wasm_bindgen(method, setter = "errorCode")] - fn error_code_shim(this: &SignResponse, val: Option); + fn set_error_code_shim(this: &SignResponse, val: Option); + #[wasm_bindgen(method, getter = "errorMessage")] + fn error_message_shim(this: &SignResponse) -> Option; #[wasm_bindgen(method, setter = "errorMessage")] - fn error_message_shim(this: &SignResponse, val: Option<&str>); + fn set_error_message_shim(this: &SignResponse, val: Option<&str>); + #[wasm_bindgen(method, getter = "keyHandle")] + fn key_handle_shim(this: &SignResponse) -> String; #[wasm_bindgen(method, setter = "keyHandle")] - fn key_handle_shim(this: &SignResponse, val: &str); + fn set_key_handle_shim(this: &SignResponse, val: &str); + #[wasm_bindgen(method, getter = "signatureData")] + fn signature_data_shim(this: &SignResponse) -> String; #[wasm_bindgen(method, setter = "signatureData")] - fn signature_data_shim(this: &SignResponse, val: &str); + fn set_signature_data_shim(this: &SignResponse, val: &str); +} +#[doc = "The trait to access properties on the `SignResponse` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] +pub trait SignResponseGetters { + #[doc = "Get the `clientData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + fn client_data(&self) -> String; + #[doc = "Get the `errorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + fn error_code(&self) -> Option; + #[doc = "Get the `errorMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + fn error_message(&self) -> Option; + #[doc = "Get the `keyHandle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + fn key_handle(&self) -> String; + #[doc = "Get the `signatureData` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] + fn signature_data(&self) -> String; +} +impl SignResponseGetters for SignResponse { + fn client_data(&self) -> String { + self.client_data_shim() + } + fn error_code(&self) -> Option { + self.error_code_shim() + } + fn error_message(&self) -> Option { + self.error_message_shim() + } + fn key_handle(&self) -> String { + self.key_handle_shim() + } + fn signature_data(&self) -> String { + self.signature_data_shim() + } } impl SignResponse { #[doc = "Construct a new `SignResponse`."] @@ -34,35 +86,35 @@ impl SignResponse { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] pub fn client_data(&mut self, val: &str) -> &mut Self { - self.client_data_shim(val); + self.set_client_data_shim(val); self } #[doc = "Change the `errorCode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] pub fn error_code(&mut self, val: Option) -> &mut Self { - self.error_code_shim(val); + self.set_error_code_shim(val); self } #[doc = "Change the `errorMessage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] pub fn error_message(&mut self, val: Option<&str>) -> &mut Self { - self.error_message_shim(val); + self.set_error_message_shim(val); self } #[doc = "Change the `keyHandle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] pub fn key_handle(&mut self, val: &str) -> &mut Self { - self.key_handle_shim(val); + self.set_key_handle_shim(val); self } #[doc = "Change the `signatureData` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SignResponse`*"] pub fn signature_data(&mut self, val: &str) -> &mut Self { - self.signature_data_shim(val); + self.set_signature_data_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SocketElement.rs b/crates/web-sys/src/features/gen_SocketElement.rs index cb535c7c6d2..bceda9194fb 100644 --- a/crates/web-sys/src/features/gen_SocketElement.rs +++ b/crates/web-sys/src/features/gen_SocketElement.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] pub type SocketElement; + #[wasm_bindgen(method, getter = "active")] + fn active_shim(this: &SocketElement) -> bool; #[wasm_bindgen(method, setter = "active")] - fn active_shim(this: &SocketElement, val: bool); + fn set_active_shim(this: &SocketElement, val: bool); + #[wasm_bindgen(method, getter = "host")] + fn host_shim(this: &SocketElement) -> String; #[wasm_bindgen(method, setter = "host")] - fn host_shim(this: &SocketElement, val: &str); + fn set_host_shim(this: &SocketElement, val: &str); + #[wasm_bindgen(method, getter = "port")] + fn port_shim(this: &SocketElement) -> u32; #[wasm_bindgen(method, setter = "port")] - fn port_shim(this: &SocketElement, val: u32); + fn set_port_shim(this: &SocketElement, val: u32); + #[wasm_bindgen(method, getter = "received")] + fn received_shim(this: &SocketElement) -> f64; #[wasm_bindgen(method, setter = "received")] - fn received_shim(this: &SocketElement, val: f64); + fn set_received_shim(this: &SocketElement, val: f64); + #[wasm_bindgen(method, getter = "sent")] + fn sent_shim(this: &SocketElement) -> f64; #[wasm_bindgen(method, setter = "sent")] - fn sent_shim(this: &SocketElement, val: f64); + fn set_sent_shim(this: &SocketElement, val: f64); + #[wasm_bindgen(method, getter = "tcp")] + fn tcp_shim(this: &SocketElement) -> bool; #[wasm_bindgen(method, setter = "tcp")] - fn tcp_shim(this: &SocketElement, val: bool); + fn set_tcp_shim(this: &SocketElement, val: bool); +} +#[doc = "The trait to access properties on the `SocketElement` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] +pub trait SocketElementGetters { + #[doc = "Get the `active` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + fn active(&self) -> bool; + #[doc = "Get the `host` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + fn host(&self) -> String; + #[doc = "Get the `port` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + fn port(&self) -> u32; + #[doc = "Get the `received` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + fn received(&self) -> f64; + #[doc = "Get the `sent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + fn sent(&self) -> f64; + #[doc = "Get the `tcp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] + fn tcp(&self) -> bool; +} +impl SocketElementGetters for SocketElement { + fn active(&self) -> bool { + self.active_shim() + } + fn host(&self) -> String { + self.host_shim() + } + fn port(&self) -> u32 { + self.port_shim() + } + fn received(&self) -> f64 { + self.received_shim() + } + fn sent(&self) -> f64 { + self.sent_shim() + } + fn tcp(&self) -> bool { + self.tcp_shim() + } } impl SocketElement { #[doc = "Construct a new `SocketElement`."] @@ -36,42 +97,42 @@ impl SocketElement { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] pub fn active(&mut self, val: bool) -> &mut Self { - self.active_shim(val); + self.set_active_shim(val); self } #[doc = "Change the `host` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] pub fn host(&mut self, val: &str) -> &mut Self { - self.host_shim(val); + self.set_host_shim(val); self } #[doc = "Change the `port` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] pub fn port(&mut self, val: u32) -> &mut Self { - self.port_shim(val); + self.set_port_shim(val); self } #[doc = "Change the `received` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] pub fn received(&mut self, val: f64) -> &mut Self { - self.received_shim(val); + self.set_received_shim(val); self } #[doc = "Change the `sent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] pub fn sent(&mut self, val: f64) -> &mut Self { - self.sent_shim(val); + self.set_sent_shim(val); self } #[doc = "Change the `tcp` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketElement`*"] pub fn tcp(&mut self, val: bool) -> &mut Self { - self.tcp_shim(val); + self.set_tcp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SocketOptions.rs b/crates/web-sys/src/features/gen_SocketOptions.rs index 18c27e4f0d5..9f71b5cc970 100644 --- a/crates/web-sys/src/features/gen_SocketOptions.rs +++ b/crates/web-sys/src/features/gen_SocketOptions.rs @@ -11,10 +11,38 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] pub type SocketOptions; #[cfg(feature = "TcpSocketBinaryType")] + #[wasm_bindgen(method, getter = "binaryType")] + fn binary_type_shim(this: &SocketOptions) -> TcpSocketBinaryType; + #[cfg(feature = "TcpSocketBinaryType")] #[wasm_bindgen(method, setter = "binaryType")] - fn binary_type_shim(this: &SocketOptions, val: TcpSocketBinaryType); + fn set_binary_type_shim(this: &SocketOptions, val: TcpSocketBinaryType); + #[wasm_bindgen(method, getter = "useSecureTransport")] + fn use_secure_transport_shim(this: &SocketOptions) -> bool; #[wasm_bindgen(method, setter = "useSecureTransport")] - fn use_secure_transport_shim(this: &SocketOptions, val: bool); + fn set_use_secure_transport_shim(this: &SocketOptions, val: bool); +} +#[doc = "The trait to access properties on the `SocketOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] +pub trait SocketOptionsGetters { + #[cfg(feature = "TcpSocketBinaryType")] + #[doc = "Get the `binaryType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketOptions`, `TcpSocketBinaryType`*"] + fn binary_type(&self) -> TcpSocketBinaryType; + #[doc = "Get the `useSecureTransport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] + fn use_secure_transport(&self) -> bool; +} +impl SocketOptionsGetters for SocketOptions { + #[cfg(feature = "TcpSocketBinaryType")] + fn binary_type(&self) -> TcpSocketBinaryType { + self.binary_type_shim() + } + fn use_secure_transport(&self) -> bool { + self.use_secure_transport_shim() + } } impl SocketOptions { #[doc = "Construct a new `SocketOptions`."] @@ -30,14 +58,14 @@ impl SocketOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketOptions`, `TcpSocketBinaryType`*"] pub fn binary_type(&mut self, val: TcpSocketBinaryType) -> &mut Self { - self.binary_type_shim(val); + self.set_binary_type_shim(val); self } #[doc = "Change the `useSecureTransport` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketOptions`*"] pub fn use_secure_transport(&mut self, val: bool) -> &mut Self { - self.use_secure_transport_shim(val); + self.set_use_secure_transport_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SocketsDict.rs b/crates/web-sys/src/features/gen_SocketsDict.rs index 8623ebb50a4..51a3ce4e9b4 100644 --- a/crates/web-sys/src/features/gen_SocketsDict.rs +++ b/crates/web-sys/src/features/gen_SocketsDict.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] pub type SocketsDict; + #[wasm_bindgen(method, getter = "received")] + fn received_shim(this: &SocketsDict) -> f64; #[wasm_bindgen(method, setter = "received")] - fn received_shim(this: &SocketsDict, val: f64); + fn set_received_shim(this: &SocketsDict, val: f64); + #[wasm_bindgen(method, getter = "sent")] + fn sent_shim(this: &SocketsDict) -> f64; #[wasm_bindgen(method, setter = "sent")] - fn sent_shim(this: &SocketsDict, val: f64); + fn set_sent_shim(this: &SocketsDict, val: f64); + #[wasm_bindgen(method, getter = "sockets")] + fn sockets_shim(this: &SocketsDict) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "sockets")] - fn sockets_shim(this: &SocketsDict, val: &::wasm_bindgen::JsValue); + fn set_sockets_shim(this: &SocketsDict, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `SocketsDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] +pub trait SocketsDictGetters { + #[doc = "Get the `received` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + fn received(&self) -> f64; + #[doc = "Get the `sent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + fn sent(&self) -> f64; + #[doc = "Get the `sockets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] + fn sockets(&self) -> ::js_sys::Array; +} +impl SocketsDictGetters for SocketsDict { + fn received(&self) -> f64 { + self.received_shim() + } + fn sent(&self) -> f64 { + self.sent_shim() + } + fn sockets(&self) -> ::js_sys::Array { + self.sockets_shim() + } } impl SocketsDict { #[doc = "Construct a new `SocketsDict`."] @@ -30,21 +64,21 @@ impl SocketsDict { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] pub fn received(&mut self, val: f64) -> &mut Self { - self.received_shim(val); + self.set_received_shim(val); self } #[doc = "Change the `sent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] pub fn sent(&mut self, val: f64) -> &mut Self { - self.sent_shim(val); + self.set_sent_shim(val); self } #[doc = "Change the `sockets` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SocketsDict`*"] pub fn sockets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.sockets_shim(val); + self.set_sockets_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs b/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs index 6781c3939d3..c042160a01f 100644 --- a/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs +++ b/crates/web-sys/src/features/gen_SpeechRecognitionErrorInit.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] pub type SpeechRecognitionErrorInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &SpeechRecognitionErrorInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SpeechRecognitionErrorInit, val: bool); + fn set_bubbles_shim(this: &SpeechRecognitionErrorInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &SpeechRecognitionErrorInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SpeechRecognitionErrorInit, val: bool); + fn set_cancelable_shim(this: &SpeechRecognitionErrorInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &SpeechRecognitionErrorInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SpeechRecognitionErrorInit, val: bool); + fn set_composed_shim(this: &SpeechRecognitionErrorInit, val: bool); + #[cfg(feature = "SpeechRecognitionErrorCode")] + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &SpeechRecognitionErrorInit) -> SpeechRecognitionErrorCode; #[cfg(feature = "SpeechRecognitionErrorCode")] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &SpeechRecognitionErrorInit, val: SpeechRecognitionErrorCode); + fn set_error_shim(this: &SpeechRecognitionErrorInit, val: SpeechRecognitionErrorCode); + #[wasm_bindgen(method, getter = "message")] + fn message_shim(this: &SpeechRecognitionErrorInit) -> String; #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &SpeechRecognitionErrorInit, val: &str); + fn set_message_shim(this: &SpeechRecognitionErrorInit, val: &str); +} +#[doc = "The trait to access properties on the `SpeechRecognitionErrorInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] +pub trait SpeechRecognitionErrorInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "SpeechRecognitionErrorCode")] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorCode`, `SpeechRecognitionErrorInit`*"] + fn error(&self) -> SpeechRecognitionErrorCode; + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] + fn message(&self) -> String; +} +impl SpeechRecognitionErrorInitGetters for SpeechRecognitionErrorInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "SpeechRecognitionErrorCode")] + fn error(&self) -> SpeechRecognitionErrorCode { + self.error_shim() + } + fn message(&self) -> String { + self.message_shim() + } } impl SpeechRecognitionErrorInit { #[doc = "Construct a new `SpeechRecognitionErrorInit`."] @@ -35,21 +90,21 @@ impl SpeechRecognitionErrorInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "SpeechRecognitionErrorCode")] @@ -57,14 +112,14 @@ impl SpeechRecognitionErrorInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorCode`, `SpeechRecognitionErrorInit`*"] pub fn error(&mut self, val: SpeechRecognitionErrorCode) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } #[doc = "Change the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionErrorInit`*"] pub fn message(&mut self, val: &str) -> &mut Self { - self.message_shim(val); + self.set_message_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs b/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs index 8db88b7b80f..16ba39d2ae4 100644 --- a/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs +++ b/crates/web-sys/src/features/gen_SpeechRecognitionEventInit.rs @@ -10,22 +10,101 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] pub type SpeechRecognitionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &SpeechRecognitionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SpeechRecognitionEventInit, val: bool); + fn set_bubbles_shim(this: &SpeechRecognitionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &SpeechRecognitionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SpeechRecognitionEventInit, val: bool); + fn set_cancelable_shim(this: &SpeechRecognitionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &SpeechRecognitionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SpeechRecognitionEventInit, val: bool); + fn set_composed_shim(this: &SpeechRecognitionEventInit, val: bool); + #[cfg(feature = "Document")] + #[wasm_bindgen(method, getter = "emma")] + fn emma_shim(this: &SpeechRecognitionEventInit) -> Option; #[cfg(feature = "Document")] #[wasm_bindgen(method, setter = "emma")] - fn emma_shim(this: &SpeechRecognitionEventInit, val: Option<&Document>); + fn set_emma_shim(this: &SpeechRecognitionEventInit, val: Option<&Document>); + #[wasm_bindgen(method, getter = "interpretation")] + fn interpretation_shim(this: &SpeechRecognitionEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "interpretation")] - fn interpretation_shim(this: &SpeechRecognitionEventInit, val: &::wasm_bindgen::JsValue); + fn set_interpretation_shim(this: &SpeechRecognitionEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "resultIndex")] + fn result_index_shim(this: &SpeechRecognitionEventInit) -> u32; #[wasm_bindgen(method, setter = "resultIndex")] - fn result_index_shim(this: &SpeechRecognitionEventInit, val: u32); + fn set_result_index_shim(this: &SpeechRecognitionEventInit, val: u32); + #[cfg(feature = "SpeechRecognitionResultList")] + #[wasm_bindgen(method, getter = "results")] + fn results_shim(this: &SpeechRecognitionEventInit) -> Option; #[cfg(feature = "SpeechRecognitionResultList")] #[wasm_bindgen(method, setter = "results")] - fn results_shim(this: &SpeechRecognitionEventInit, val: Option<&SpeechRecognitionResultList>); + fn set_results_shim( + this: &SpeechRecognitionEventInit, + val: Option<&SpeechRecognitionResultList>, + ); +} +#[doc = "The trait to access properties on the `SpeechRecognitionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] +pub trait SpeechRecognitionEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "Document")] + #[doc = "Get the `emma` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Document`, `SpeechRecognitionEventInit`*"] + fn emma(&self) -> Option; + #[doc = "Get the `interpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + fn interpretation(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `resultIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] + fn result_index(&self) -> u32; + #[cfg(feature = "SpeechRecognitionResultList")] + #[doc = "Get the `results` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`, `SpeechRecognitionResultList`*"] + fn results(&self) -> Option; +} +impl SpeechRecognitionEventInitGetters for SpeechRecognitionEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "Document")] + fn emma(&self) -> Option { + self.emma_shim() + } + fn interpretation(&self) -> ::wasm_bindgen::JsValue { + self.interpretation_shim() + } + fn result_index(&self) -> u32 { + self.result_index_shim() + } + #[cfg(feature = "SpeechRecognitionResultList")] + fn results(&self) -> Option { + self.results_shim() + } } impl SpeechRecognitionEventInit { #[doc = "Construct a new `SpeechRecognitionEventInit`."] @@ -40,21 +119,21 @@ impl SpeechRecognitionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "Document")] @@ -62,21 +141,21 @@ impl SpeechRecognitionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Document`, `SpeechRecognitionEventInit`*"] pub fn emma(&mut self, val: Option<&Document>) -> &mut Self { - self.emma_shim(val); + self.set_emma_shim(val); self } #[doc = "Change the `interpretation` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] pub fn interpretation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.interpretation_shim(val); + self.set_interpretation_shim(val); self } #[doc = "Change the `resultIndex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`*"] pub fn result_index(&mut self, val: u32) -> &mut Self { - self.result_index_shim(val); + self.set_result_index_shim(val); self } #[cfg(feature = "SpeechRecognitionResultList")] @@ -84,7 +163,7 @@ impl SpeechRecognitionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEventInit`, `SpeechRecognitionResultList`*"] pub fn results(&mut self, val: Option<&SpeechRecognitionResultList>) -> &mut Self { - self.results_shim(val); + self.set_results_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs b/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs index 54fe4337561..7f6da070f6b 100644 --- a/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_SpeechSynthesisErrorEventInit.rs @@ -10,26 +10,120 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] pub type SpeechSynthesisErrorEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &SpeechSynthesisErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SpeechSynthesisErrorEventInit, val: bool); + fn set_bubbles_shim(this: &SpeechSynthesisErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &SpeechSynthesisErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SpeechSynthesisErrorEventInit, val: bool); + fn set_cancelable_shim(this: &SpeechSynthesisErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &SpeechSynthesisErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SpeechSynthesisErrorEventInit, val: bool); + fn set_composed_shim(this: &SpeechSynthesisErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "charIndex")] + fn char_index_shim(this: &SpeechSynthesisErrorEventInit) -> u32; #[wasm_bindgen(method, setter = "charIndex")] - fn char_index_shim(this: &SpeechSynthesisErrorEventInit, val: u32); + fn set_char_index_shim(this: &SpeechSynthesisErrorEventInit, val: u32); + #[wasm_bindgen(method, getter = "charLength")] + fn char_length_shim(this: &SpeechSynthesisErrorEventInit) -> Option; #[wasm_bindgen(method, setter = "charLength")] - fn char_length_shim(this: &SpeechSynthesisErrorEventInit, val: Option); + fn set_char_length_shim(this: &SpeechSynthesisErrorEventInit, val: Option); + #[wasm_bindgen(method, getter = "elapsedTime")] + fn elapsed_time_shim(this: &SpeechSynthesisErrorEventInit) -> f32; #[wasm_bindgen(method, setter = "elapsedTime")] - fn elapsed_time_shim(this: &SpeechSynthesisErrorEventInit, val: f32); + fn set_elapsed_time_shim(this: &SpeechSynthesisErrorEventInit, val: f32); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &SpeechSynthesisErrorEventInit) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &SpeechSynthesisErrorEventInit, val: &str); + fn set_name_shim(this: &SpeechSynthesisErrorEventInit, val: &str); + #[cfg(feature = "SpeechSynthesisUtterance")] + #[wasm_bindgen(method, getter = "utterance")] + fn utterance_shim(this: &SpeechSynthesisErrorEventInit) -> SpeechSynthesisUtterance; #[cfg(feature = "SpeechSynthesisUtterance")] #[wasm_bindgen(method, setter = "utterance")] - fn utterance_shim(this: &SpeechSynthesisErrorEventInit, val: &SpeechSynthesisUtterance); + fn set_utterance_shim(this: &SpeechSynthesisErrorEventInit, val: &SpeechSynthesisUtterance); + #[cfg(feature = "SpeechSynthesisErrorCode")] + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &SpeechSynthesisErrorEventInit) -> SpeechSynthesisErrorCode; #[cfg(feature = "SpeechSynthesisErrorCode")] #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &SpeechSynthesisErrorEventInit, val: SpeechSynthesisErrorCode); + fn set_error_shim(this: &SpeechSynthesisErrorEventInit, val: SpeechSynthesisErrorCode); +} +#[doc = "The trait to access properties on the `SpeechSynthesisErrorEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] +pub trait SpeechSynthesisErrorEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `charIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + fn char_index(&self) -> u32; + #[doc = "Get the `charLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + fn char_length(&self) -> Option; + #[doc = "Get the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + fn elapsed_time(&self) -> f32; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] + fn name(&self) -> String; + #[cfg(feature = "SpeechSynthesisUtterance")] + #[doc = "Get the `utterance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`, `SpeechSynthesisUtterance`*"] + fn utterance(&self) -> SpeechSynthesisUtterance; + #[cfg(feature = "SpeechSynthesisErrorCode")] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorCode`, `SpeechSynthesisErrorEventInit`*"] + fn error(&self) -> SpeechSynthesisErrorCode; +} +impl SpeechSynthesisErrorEventInitGetters for SpeechSynthesisErrorEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn char_index(&self) -> u32 { + self.char_index_shim() + } + fn char_length(&self) -> Option { + self.char_length_shim() + } + fn elapsed_time(&self) -> f32 { + self.elapsed_time_shim() + } + fn name(&self) -> String { + self.name_shim() + } + #[cfg(feature = "SpeechSynthesisUtterance")] + fn utterance(&self) -> SpeechSynthesisUtterance { + self.utterance_shim() + } + #[cfg(feature = "SpeechSynthesisErrorCode")] + fn error(&self) -> SpeechSynthesisErrorCode { + self.error_shim() + } } impl SpeechSynthesisErrorEventInit { #[cfg(all( @@ -42,57 +136,57 @@ impl SpeechSynthesisErrorEventInit { pub fn new(utterance: &SpeechSynthesisUtterance, error: SpeechSynthesisErrorCode) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.utterance(utterance); - ret.error(error); + Self::utterance(&mut ret, utterance); + Self::error(&mut ret, error); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `charIndex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] pub fn char_index(&mut self, val: u32) -> &mut Self { - self.char_index_shim(val); + self.set_char_index_shim(val); self } #[doc = "Change the `charLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] pub fn char_length(&mut self, val: Option) -> &mut Self { - self.char_length_shim(val); + self.set_char_length_shim(val); self } #[doc = "Change the `elapsedTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { - self.elapsed_time_shim(val); + self.set_elapsed_time_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(feature = "SpeechSynthesisUtterance")] @@ -100,7 +194,7 @@ impl SpeechSynthesisErrorEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorEventInit`, `SpeechSynthesisUtterance`*"] pub fn utterance(&mut self, val: &SpeechSynthesisUtterance) -> &mut Self { - self.utterance_shim(val); + self.set_utterance_shim(val); self } #[cfg(feature = "SpeechSynthesisErrorCode")] @@ -108,7 +202,7 @@ impl SpeechSynthesisErrorEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisErrorCode`, `SpeechSynthesisErrorEventInit`*"] pub fn error(&mut self, val: SpeechSynthesisErrorCode) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs b/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs index 3726366ad20..638710045fd 100644 --- a/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs +++ b/crates/web-sys/src/features/gen_SpeechSynthesisEventInit.rs @@ -10,23 +10,105 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] pub type SpeechSynthesisEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &SpeechSynthesisEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SpeechSynthesisEventInit, val: bool); + fn set_bubbles_shim(this: &SpeechSynthesisEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &SpeechSynthesisEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SpeechSynthesisEventInit, val: bool); + fn set_cancelable_shim(this: &SpeechSynthesisEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &SpeechSynthesisEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SpeechSynthesisEventInit, val: bool); + fn set_composed_shim(this: &SpeechSynthesisEventInit, val: bool); + #[wasm_bindgen(method, getter = "charIndex")] + fn char_index_shim(this: &SpeechSynthesisEventInit) -> u32; #[wasm_bindgen(method, setter = "charIndex")] - fn char_index_shim(this: &SpeechSynthesisEventInit, val: u32); + fn set_char_index_shim(this: &SpeechSynthesisEventInit, val: u32); + #[wasm_bindgen(method, getter = "charLength")] + fn char_length_shim(this: &SpeechSynthesisEventInit) -> Option; #[wasm_bindgen(method, setter = "charLength")] - fn char_length_shim(this: &SpeechSynthesisEventInit, val: Option); + fn set_char_length_shim(this: &SpeechSynthesisEventInit, val: Option); + #[wasm_bindgen(method, getter = "elapsedTime")] + fn elapsed_time_shim(this: &SpeechSynthesisEventInit) -> f32; #[wasm_bindgen(method, setter = "elapsedTime")] - fn elapsed_time_shim(this: &SpeechSynthesisEventInit, val: f32); + fn set_elapsed_time_shim(this: &SpeechSynthesisEventInit, val: f32); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &SpeechSynthesisEventInit) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &SpeechSynthesisEventInit, val: &str); + fn set_name_shim(this: &SpeechSynthesisEventInit, val: &str); + #[cfg(feature = "SpeechSynthesisUtterance")] + #[wasm_bindgen(method, getter = "utterance")] + fn utterance_shim(this: &SpeechSynthesisEventInit) -> SpeechSynthesisUtterance; #[cfg(feature = "SpeechSynthesisUtterance")] #[wasm_bindgen(method, setter = "utterance")] - fn utterance_shim(this: &SpeechSynthesisEventInit, val: &SpeechSynthesisUtterance); + fn set_utterance_shim(this: &SpeechSynthesisEventInit, val: &SpeechSynthesisUtterance); +} +#[doc = "The trait to access properties on the `SpeechSynthesisEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] +pub trait SpeechSynthesisEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `charIndex` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + fn char_index(&self) -> u32; + #[doc = "Get the `charLength` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + fn char_length(&self) -> Option; + #[doc = "Get the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + fn elapsed_time(&self) -> f32; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] + fn name(&self) -> String; + #[cfg(feature = "SpeechSynthesisUtterance")] + #[doc = "Get the `utterance` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`, `SpeechSynthesisUtterance`*"] + fn utterance(&self) -> SpeechSynthesisUtterance; +} +impl SpeechSynthesisEventInitGetters for SpeechSynthesisEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn char_index(&self) -> u32 { + self.char_index_shim() + } + fn char_length(&self) -> Option { + self.char_length_shim() + } + fn elapsed_time(&self) -> f32 { + self.elapsed_time_shim() + } + fn name(&self) -> String { + self.name_shim() + } + #[cfg(feature = "SpeechSynthesisUtterance")] + fn utterance(&self) -> SpeechSynthesisUtterance { + self.utterance_shim() + } } impl SpeechSynthesisEventInit { #[cfg(feature = "SpeechSynthesisUtterance")] @@ -36,56 +118,56 @@ impl SpeechSynthesisEventInit { pub fn new(utterance: &SpeechSynthesisUtterance) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.utterance(utterance); + Self::utterance(&mut ret, utterance); ret } #[doc = "Change the `bubbles` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `charIndex` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] pub fn char_index(&mut self, val: u32) -> &mut Self { - self.char_index_shim(val); + self.set_char_index_shim(val); self } #[doc = "Change the `charLength` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] pub fn char_length(&mut self, val: Option) -> &mut Self { - self.char_length_shim(val); + self.set_char_length_shim(val); self } #[doc = "Change the `elapsedTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { - self.elapsed_time_shim(val); + self.set_elapsed_time_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(feature = "SpeechSynthesisUtterance")] @@ -93,7 +175,7 @@ impl SpeechSynthesisEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEventInit`, `SpeechSynthesisUtterance`*"] pub fn utterance(&mut self, val: &SpeechSynthesisUtterance) -> &mut Self { - self.utterance_shim(val); + self.set_utterance_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_StereoPannerOptions.rs b/crates/web-sys/src/features/gen_StereoPannerOptions.rs index 792a024f70c..d757ee38dcb 100644 --- a/crates/web-sys/src/features/gen_StereoPannerOptions.rs +++ b/crates/web-sys/src/features/gen_StereoPannerOptions.rs @@ -10,16 +10,65 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] pub type StereoPannerOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &StereoPannerOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &StereoPannerOptions, val: u32); + fn set_channel_count_shim(this: &StereoPannerOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &StereoPannerOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &StereoPannerOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &StereoPannerOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &StereoPannerOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &StereoPannerOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &StereoPannerOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "pan")] + fn pan_shim(this: &StereoPannerOptions) -> f32; #[wasm_bindgen(method, setter = "pan")] - fn pan_shim(this: &StereoPannerOptions, val: f32); + fn set_pan_shim(this: &StereoPannerOptions, val: f32); +} +#[doc = "The trait to access properties on the `StereoPannerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] +pub trait StereoPannerOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `StereoPannerOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `StereoPannerOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `pan` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] + fn pan(&self) -> f32; +} +impl StereoPannerOptionsGetters for StereoPannerOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn pan(&self) -> f32 { + self.pan_shim() + } } impl StereoPannerOptions { #[doc = "Construct a new `StereoPannerOptions`."] @@ -34,7 +83,7 @@ impl StereoPannerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -42,7 +91,7 @@ impl StereoPannerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `StereoPannerOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -50,14 +99,14 @@ impl StereoPannerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `StereoPannerOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `pan` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StereoPannerOptions`*"] pub fn pan(&mut self, val: f32) -> &mut Self { - self.pan_shim(val); + self.set_pan_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_StorageEstimate.rs b/crates/web-sys/src/features/gen_StorageEstimate.rs index 242dc68778c..2d227d56a98 100644 --- a/crates/web-sys/src/features/gen_StorageEstimate.rs +++ b/crates/web-sys/src/features/gen_StorageEstimate.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] pub type StorageEstimate; + #[wasm_bindgen(method, getter = "quota")] + fn quota_shim(this: &StorageEstimate) -> f64; #[wasm_bindgen(method, setter = "quota")] - fn quota_shim(this: &StorageEstimate, val: f64); + fn set_quota_shim(this: &StorageEstimate, val: f64); + #[wasm_bindgen(method, getter = "usage")] + fn usage_shim(this: &StorageEstimate) -> f64; #[wasm_bindgen(method, setter = "usage")] - fn usage_shim(this: &StorageEstimate, val: f64); + fn set_usage_shim(this: &StorageEstimate, val: f64); +} +#[doc = "The trait to access properties on the `StorageEstimate` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] +pub trait StorageEstimateGetters { + #[doc = "Get the `quota` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] + fn quota(&self) -> f64; + #[doc = "Get the `usage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] + fn usage(&self) -> f64; +} +impl StorageEstimateGetters for StorageEstimate { + fn quota(&self) -> f64 { + self.quota_shim() + } + fn usage(&self) -> f64 { + self.usage_shim() + } } impl StorageEstimate { #[doc = "Construct a new `StorageEstimate`."] @@ -28,14 +53,14 @@ impl StorageEstimate { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] pub fn quota(&mut self, val: f64) -> &mut Self { - self.quota_shim(val); + self.set_quota_shim(val); self } #[doc = "Change the `usage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEstimate`*"] pub fn usage(&mut self, val: f64) -> &mut Self { - self.usage_shim(val); + self.set_usage_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_StorageEventInit.rs b/crates/web-sys/src/features/gen_StorageEventInit.rs index 5c42540d6d6..5dad1161eef 100644 --- a/crates/web-sys/src/features/gen_StorageEventInit.rs +++ b/crates/web-sys/src/features/gen_StorageEventInit.rs @@ -10,23 +10,105 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] pub type StorageEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &StorageEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &StorageEventInit, val: bool); + fn set_bubbles_shim(this: &StorageEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &StorageEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &StorageEventInit, val: bool); + fn set_cancelable_shim(this: &StorageEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &StorageEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &StorageEventInit, val: bool); + fn set_composed_shim(this: &StorageEventInit, val: bool); + #[wasm_bindgen(method, getter = "key")] + fn key_shim(this: &StorageEventInit) -> Option; #[wasm_bindgen(method, setter = "key")] - fn key_shim(this: &StorageEventInit, val: Option<&str>); + fn set_key_shim(this: &StorageEventInit, val: Option<&str>); + #[wasm_bindgen(method, getter = "newValue")] + fn new_value_shim(this: &StorageEventInit) -> Option; #[wasm_bindgen(method, setter = "newValue")] - fn new_value_shim(this: &StorageEventInit, val: Option<&str>); + fn set_new_value_shim(this: &StorageEventInit, val: Option<&str>); + #[wasm_bindgen(method, getter = "oldValue")] + fn old_value_shim(this: &StorageEventInit) -> Option; #[wasm_bindgen(method, setter = "oldValue")] - fn old_value_shim(this: &StorageEventInit, val: Option<&str>); + fn set_old_value_shim(this: &StorageEventInit, val: Option<&str>); + #[cfg(feature = "Storage")] + #[wasm_bindgen(method, getter = "storageArea")] + fn storage_area_shim(this: &StorageEventInit) -> Option; #[cfg(feature = "Storage")] #[wasm_bindgen(method, setter = "storageArea")] - fn storage_area_shim(this: &StorageEventInit, val: Option<&Storage>); + fn set_storage_area_shim(this: &StorageEventInit, val: Option<&Storage>); + #[wasm_bindgen(method, getter = "url")] + fn url_shim(this: &StorageEventInit) -> String; #[wasm_bindgen(method, setter = "url")] - fn url_shim(this: &StorageEventInit, val: &str); + fn set_url_shim(this: &StorageEventInit, val: &str); +} +#[doc = "The trait to access properties on the `StorageEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] +pub trait StorageEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `key` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + fn key(&self) -> Option; + #[doc = "Get the `newValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + fn new_value(&self) -> Option; + #[doc = "Get the `oldValue` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + fn old_value(&self) -> Option; + #[cfg(feature = "Storage")] + #[doc = "Get the `storageArea` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Storage`, `StorageEventInit`*"] + fn storage_area(&self) -> Option; + #[doc = "Get the `url` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] + fn url(&self) -> String; +} +impl StorageEventInitGetters for StorageEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn key(&self) -> Option { + self.key_shim() + } + fn new_value(&self) -> Option { + self.new_value_shim() + } + fn old_value(&self) -> Option { + self.old_value_shim() + } + #[cfg(feature = "Storage")] + fn storage_area(&self) -> Option { + self.storage_area_shim() + } + fn url(&self) -> String { + self.url_shim() + } } impl StorageEventInit { #[doc = "Construct a new `StorageEventInit`."] @@ -41,42 +123,42 @@ impl StorageEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `key` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] pub fn key(&mut self, val: Option<&str>) -> &mut Self { - self.key_shim(val); + self.set_key_shim(val); self } #[doc = "Change the `newValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] pub fn new_value(&mut self, val: Option<&str>) -> &mut Self { - self.new_value_shim(val); + self.set_new_value_shim(val); self } #[doc = "Change the `oldValue` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] pub fn old_value(&mut self, val: Option<&str>) -> &mut Self { - self.old_value_shim(val); + self.set_old_value_shim(val); self } #[cfg(feature = "Storage")] @@ -84,14 +166,14 @@ impl StorageEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Storage`, `StorageEventInit`*"] pub fn storage_area(&mut self, val: Option<&Storage>) -> &mut Self { - self.storage_area_shim(val); + self.set_storage_area_shim(val); self } #[doc = "Change the `url` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StorageEventInit`*"] pub fn url(&mut self, val: &str) -> &mut Self { - self.url_shim(val); + self.set_url_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_StreamPipeOptions.rs b/crates/web-sys/src/features/gen_StreamPipeOptions.rs index d9c02acc745..e65aebff379 100644 --- a/crates/web-sys/src/features/gen_StreamPipeOptions.rs +++ b/crates/web-sys/src/features/gen_StreamPipeOptions.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] pub type StreamPipeOptions; + #[wasm_bindgen(method, getter = "preventAbort")] + fn prevent_abort_shim(this: &StreamPipeOptions) -> bool; #[wasm_bindgen(method, setter = "preventAbort")] - fn prevent_abort_shim(this: &StreamPipeOptions, val: bool); + fn set_prevent_abort_shim(this: &StreamPipeOptions, val: bool); + #[wasm_bindgen(method, getter = "preventCancel")] + fn prevent_cancel_shim(this: &StreamPipeOptions) -> bool; #[wasm_bindgen(method, setter = "preventCancel")] - fn prevent_cancel_shim(this: &StreamPipeOptions, val: bool); + fn set_prevent_cancel_shim(this: &StreamPipeOptions, val: bool); + #[wasm_bindgen(method, getter = "preventClose")] + fn prevent_close_shim(this: &StreamPipeOptions) -> bool; #[wasm_bindgen(method, setter = "preventClose")] - fn prevent_close_shim(this: &StreamPipeOptions, val: bool); + fn set_prevent_close_shim(this: &StreamPipeOptions, val: bool); + #[cfg(feature = "AbortSignal")] + #[wasm_bindgen(method, getter = "signal")] + fn signal_shim(this: &StreamPipeOptions) -> AbortSignal; #[cfg(feature = "AbortSignal")] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &StreamPipeOptions, val: &AbortSignal); + fn set_signal_shim(this: &StreamPipeOptions, val: &AbortSignal); +} +#[doc = "The trait to access properties on the `StreamPipeOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] +pub trait StreamPipeOptionsGetters { + #[doc = "Get the `preventAbort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + fn prevent_abort(&self) -> bool; + #[doc = "Get the `preventCancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + fn prevent_cancel(&self) -> bool; + #[doc = "Get the `preventClose` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] + fn prevent_close(&self) -> bool; + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `StreamPipeOptions`*"] + fn signal(&self) -> AbortSignal; +} +impl StreamPipeOptionsGetters for StreamPipeOptions { + fn prevent_abort(&self) -> bool { + self.prevent_abort_shim() + } + fn prevent_cancel(&self) -> bool { + self.prevent_cancel_shim() + } + fn prevent_close(&self) -> bool { + self.prevent_close_shim() + } + #[cfg(feature = "AbortSignal")] + fn signal(&self) -> AbortSignal { + self.signal_shim() + } } impl StreamPipeOptions { #[doc = "Construct a new `StreamPipeOptions`."] @@ -33,21 +79,21 @@ impl StreamPipeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] pub fn prevent_abort(&mut self, val: bool) -> &mut Self { - self.prevent_abort_shim(val); + self.set_prevent_abort_shim(val); self } #[doc = "Change the `preventCancel` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] pub fn prevent_cancel(&mut self, val: bool) -> &mut Self { - self.prevent_cancel_shim(val); + self.set_prevent_cancel_shim(val); self } #[doc = "Change the `preventClose` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StreamPipeOptions`*"] pub fn prevent_close(&mut self, val: bool) -> &mut Self { - self.prevent_close_shim(val); + self.set_prevent_close_shim(val); self } #[cfg(feature = "AbortSignal")] @@ -55,7 +101,7 @@ impl StreamPipeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `StreamPipeOptions`*"] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs b/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs index cf84e4807e9..aece5075eb0 100644 --- a/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_StyleRuleChangeEventInit.rs @@ -10,18 +10,76 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] pub type StyleRuleChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &StyleRuleChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &StyleRuleChangeEventInit, val: bool); + fn set_bubbles_shim(this: &StyleRuleChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &StyleRuleChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &StyleRuleChangeEventInit, val: bool); + fn set_cancelable_shim(this: &StyleRuleChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &StyleRuleChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &StyleRuleChangeEventInit, val: bool); + fn set_composed_shim(this: &StyleRuleChangeEventInit, val: bool); + #[cfg(feature = "CssRule")] + #[wasm_bindgen(method, getter = "rule")] + fn rule_shim(this: &StyleRuleChangeEventInit) -> Option; #[cfg(feature = "CssRule")] #[wasm_bindgen(method, setter = "rule")] - fn rule_shim(this: &StyleRuleChangeEventInit, val: Option<&CssRule>); + fn set_rule_shim(this: &StyleRuleChangeEventInit, val: Option<&CssRule>); + #[cfg(feature = "CssStyleSheet")] + #[wasm_bindgen(method, getter = "stylesheet")] + fn stylesheet_shim(this: &StyleRuleChangeEventInit) -> Option; #[cfg(feature = "CssStyleSheet")] #[wasm_bindgen(method, setter = "stylesheet")] - fn stylesheet_shim(this: &StyleRuleChangeEventInit, val: Option<&CssStyleSheet>); + fn set_stylesheet_shim(this: &StyleRuleChangeEventInit, val: Option<&CssStyleSheet>); +} +#[doc = "The trait to access properties on the `StyleRuleChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] +pub trait StyleRuleChangeEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "CssRule")] + #[doc = "Get the `rule` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssRule`, `StyleRuleChangeEventInit`*"] + fn rule(&self) -> Option; + #[cfg(feature = "CssStyleSheet")] + #[doc = "Get the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleRuleChangeEventInit`*"] + fn stylesheet(&self) -> Option; +} +impl StyleRuleChangeEventInitGetters for StyleRuleChangeEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "CssRule")] + fn rule(&self) -> Option { + self.rule_shim() + } + #[cfg(feature = "CssStyleSheet")] + fn stylesheet(&self) -> Option { + self.stylesheet_shim() + } } impl StyleRuleChangeEventInit { #[doc = "Construct a new `StyleRuleChangeEventInit`."] @@ -36,21 +94,21 @@ impl StyleRuleChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleRuleChangeEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "CssRule")] @@ -58,7 +116,7 @@ impl StyleRuleChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssRule`, `StyleRuleChangeEventInit`*"] pub fn rule(&mut self, val: Option<&CssRule>) -> &mut Self { - self.rule_shim(val); + self.set_rule_shim(val); self } #[cfg(feature = "CssStyleSheet")] @@ -66,7 +124,7 @@ impl StyleRuleChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleRuleChangeEventInit`*"] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { - self.stylesheet_shim(val); + self.set_stylesheet_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs b/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs index 547d1124cb7..ae0b3255bc3 100644 --- a/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_StyleSheetApplicableStateChangeEventInit.rs @@ -10,21 +10,76 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] pub type StyleSheetApplicableStateChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &StyleSheetApplicableStateChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + fn set_bubbles_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &StyleSheetApplicableStateChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + fn set_cancelable_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &StyleSheetApplicableStateChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + fn set_composed_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "applicable")] + fn applicable_shim(this: &StyleSheetApplicableStateChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "applicable")] - fn applicable_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + fn set_applicable_shim(this: &StyleSheetApplicableStateChangeEventInit, val: bool); + #[cfg(feature = "CssStyleSheet")] + #[wasm_bindgen(method, getter = "stylesheet")] + fn stylesheet_shim(this: &StyleSheetApplicableStateChangeEventInit) -> Option; #[cfg(feature = "CssStyleSheet")] #[wasm_bindgen(method, setter = "stylesheet")] - fn stylesheet_shim( + fn set_stylesheet_shim( this: &StyleSheetApplicableStateChangeEventInit, val: Option<&CssStyleSheet>, ); } +#[doc = "The trait to access properties on the `StyleSheetApplicableStateChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] +pub trait StyleSheetApplicableStateChangeEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `applicable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] + fn applicable(&self) -> bool; + #[cfg(feature = "CssStyleSheet")] + #[doc = "Get the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetApplicableStateChangeEventInit`*"] + fn stylesheet(&self) -> Option; +} +impl StyleSheetApplicableStateChangeEventInitGetters for StyleSheetApplicableStateChangeEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn applicable(&self) -> bool { + self.applicable_shim() + } + #[cfg(feature = "CssStyleSheet")] + fn stylesheet(&self) -> Option { + self.stylesheet_shim() + } +} impl StyleSheetApplicableStateChangeEventInit { #[doc = "Construct a new `StyleSheetApplicableStateChangeEventInit`."] #[doc = ""] @@ -38,28 +93,28 @@ impl StyleSheetApplicableStateChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `applicable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetApplicableStateChangeEventInit`*"] pub fn applicable(&mut self, val: bool) -> &mut Self { - self.applicable_shim(val); + self.set_applicable_shim(val); self } #[cfg(feature = "CssStyleSheet")] @@ -67,7 +122,7 @@ impl StyleSheetApplicableStateChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetApplicableStateChangeEventInit`*"] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { - self.stylesheet_shim(val); + self.set_stylesheet_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs b/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs index 4aeb6e4fc4a..f8886cbef37 100644 --- a/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_StyleSheetChangeEventInit.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] pub type StyleSheetChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &StyleSheetChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &StyleSheetChangeEventInit, val: bool); + fn set_bubbles_shim(this: &StyleSheetChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &StyleSheetChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &StyleSheetChangeEventInit, val: bool); + fn set_cancelable_shim(this: &StyleSheetChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &StyleSheetChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &StyleSheetChangeEventInit, val: bool); + fn set_composed_shim(this: &StyleSheetChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "documentSheet")] + fn document_sheet_shim(this: &StyleSheetChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "documentSheet")] - fn document_sheet_shim(this: &StyleSheetChangeEventInit, val: bool); + fn set_document_sheet_shim(this: &StyleSheetChangeEventInit, val: bool); + #[cfg(feature = "CssStyleSheet")] + #[wasm_bindgen(method, getter = "stylesheet")] + fn stylesheet_shim(this: &StyleSheetChangeEventInit) -> Option; #[cfg(feature = "CssStyleSheet")] #[wasm_bindgen(method, setter = "stylesheet")] - fn stylesheet_shim(this: &StyleSheetChangeEventInit, val: Option<&CssStyleSheet>); + fn set_stylesheet_shim(this: &StyleSheetChangeEventInit, val: Option<&CssStyleSheet>); +} +#[doc = "The trait to access properties on the `StyleSheetChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] +pub trait StyleSheetChangeEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `documentSheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] + fn document_sheet(&self) -> bool; + #[cfg(feature = "CssStyleSheet")] + #[doc = "Get the `stylesheet` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetChangeEventInit`*"] + fn stylesheet(&self) -> Option; +} +impl StyleSheetChangeEventInitGetters for StyleSheetChangeEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn document_sheet(&self) -> bool { + self.document_sheet_shim() + } + #[cfg(feature = "CssStyleSheet")] + fn stylesheet(&self) -> Option { + self.stylesheet_shim() + } } impl StyleSheetChangeEventInit { #[doc = "Construct a new `StyleSheetChangeEventInit`."] @@ -35,28 +90,28 @@ impl StyleSheetChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `documentSheet` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `StyleSheetChangeEventInit`*"] pub fn document_sheet(&mut self, val: bool) -> &mut Self { - self.document_sheet_shim(val); + self.set_document_sheet_shim(val); self } #[cfg(feature = "CssStyleSheet")] @@ -64,7 +119,7 @@ impl StyleSheetChangeEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `CssStyleSheet`, `StyleSheetChangeEventInit`*"] pub fn stylesheet(&mut self, val: Option<&CssStyleSheet>) -> &mut Self { - self.stylesheet_shim(val); + self.set_stylesheet_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SubmitEventInit.rs b/crates/web-sys/src/features/gen_SubmitEventInit.rs index 1fa2555e874..3ae230e0cd5 100644 --- a/crates/web-sys/src/features/gen_SubmitEventInit.rs +++ b/crates/web-sys/src/features/gen_SubmitEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] pub type SubmitEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &SubmitEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &SubmitEventInit, val: bool); + fn set_bubbles_shim(this: &SubmitEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &SubmitEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &SubmitEventInit, val: bool); + fn set_cancelable_shim(this: &SubmitEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &SubmitEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &SubmitEventInit, val: bool); + fn set_composed_shim(this: &SubmitEventInit, val: bool); + #[cfg(feature = "HtmlElement")] + #[wasm_bindgen(method, getter = "submitter")] + fn submitter_shim(this: &SubmitEventInit) -> Option; #[cfg(feature = "HtmlElement")] #[wasm_bindgen(method, setter = "submitter")] - fn submitter_shim(this: &SubmitEventInit, val: Option<&HtmlElement>); + fn set_submitter_shim(this: &SubmitEventInit, val: Option<&HtmlElement>); +} +#[doc = "The trait to access properties on the `SubmitEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] +pub trait SubmitEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "HtmlElement")] + #[doc = "Get the `submitter` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlElement`, `SubmitEventInit`*"] + fn submitter(&self) -> Option; +} +impl SubmitEventInitGetters for SubmitEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "HtmlElement")] + fn submitter(&self) -> Option { + self.submitter_shim() + } } impl SubmitEventInit { #[doc = "Construct a new `SubmitEventInit`."] @@ -33,21 +79,21 @@ impl SubmitEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SubmitEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "HtmlElement")] @@ -55,7 +101,7 @@ impl SubmitEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HtmlElement`, `SubmitEventInit`*"] pub fn submitter(&mut self, val: Option<&HtmlElement>) -> &mut Self { - self.submitter_shim(val); + self.set_submitter_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SvcOutputMetadata.rs b/crates/web-sys/src/features/gen_SvcOutputMetadata.rs index f48c035565d..46e2e058efe 100644 --- a/crates/web-sys/src/features/gen_SvcOutputMetadata.rs +++ b/crates/web-sys/src/features/gen_SvcOutputMetadata.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type SvcOutputMetadata; + #[wasm_bindgen(method, getter = "temporalLayerId")] + fn temporal_layer_id_shim(this: &SvcOutputMetadata) -> u32; #[wasm_bindgen(method, setter = "temporalLayerId")] - fn temporal_layer_id_shim(this: &SvcOutputMetadata, val: u32); + fn set_temporal_layer_id_shim(this: &SvcOutputMetadata, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `SvcOutputMetadata` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SvcOutputMetadata`*"] +pub trait SvcOutputMetadataGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `temporalLayerId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvcOutputMetadata`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn temporal_layer_id(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl SvcOutputMetadataGetters for SvcOutputMetadata { + #[cfg(web_sys_unstable_apis)] + fn temporal_layer_id(&self) -> u32 { + self.temporal_layer_id_shim() + } } #[cfg(web_sys_unstable_apis)] impl SvcOutputMetadata { @@ -38,7 +61,7 @@ impl SvcOutputMetadata { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn temporal_layer_id(&mut self, val: u32) -> &mut Self { - self.temporal_layer_id_shim(val); + self.set_temporal_layer_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs b/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs index 4d83aa30982..bf6df862516 100644 --- a/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs +++ b/crates/web-sys/src/features/gen_SvgBoundingBoxOptions.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] pub type SvgBoundingBoxOptions; + #[wasm_bindgen(method, getter = "clipped")] + fn clipped_shim(this: &SvgBoundingBoxOptions) -> bool; #[wasm_bindgen(method, setter = "clipped")] - fn clipped_shim(this: &SvgBoundingBoxOptions, val: bool); + fn set_clipped_shim(this: &SvgBoundingBoxOptions, val: bool); + #[wasm_bindgen(method, getter = "fill")] + fn fill_shim(this: &SvgBoundingBoxOptions) -> bool; #[wasm_bindgen(method, setter = "fill")] - fn fill_shim(this: &SvgBoundingBoxOptions, val: bool); + fn set_fill_shim(this: &SvgBoundingBoxOptions, val: bool); + #[wasm_bindgen(method, getter = "markers")] + fn markers_shim(this: &SvgBoundingBoxOptions) -> bool; #[wasm_bindgen(method, setter = "markers")] - fn markers_shim(this: &SvgBoundingBoxOptions, val: bool); + fn set_markers_shim(this: &SvgBoundingBoxOptions, val: bool); + #[wasm_bindgen(method, getter = "stroke")] + fn stroke_shim(this: &SvgBoundingBoxOptions) -> bool; #[wasm_bindgen(method, setter = "stroke")] - fn stroke_shim(this: &SvgBoundingBoxOptions, val: bool); + fn set_stroke_shim(this: &SvgBoundingBoxOptions, val: bool); +} +#[doc = "The trait to access properties on the `SvgBoundingBoxOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] +pub trait SvgBoundingBoxOptionsGetters { + #[doc = "Get the `clipped` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + fn clipped(&self) -> bool; + #[doc = "Get the `fill` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + fn fill(&self) -> bool; + #[doc = "Get the `markers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + fn markers(&self) -> bool; + #[doc = "Get the `stroke` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] + fn stroke(&self) -> bool; +} +impl SvgBoundingBoxOptionsGetters for SvgBoundingBoxOptions { + fn clipped(&self) -> bool { + self.clipped_shim() + } + fn fill(&self) -> bool { + self.fill_shim() + } + fn markers(&self) -> bool { + self.markers_shim() + } + fn stroke(&self) -> bool { + self.stroke_shim() + } } impl SvgBoundingBoxOptions { #[doc = "Construct a new `SvgBoundingBoxOptions`."] @@ -32,28 +75,28 @@ impl SvgBoundingBoxOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] pub fn clipped(&mut self, val: bool) -> &mut Self { - self.clipped_shim(val); + self.set_clipped_shim(val); self } #[doc = "Change the `fill` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] pub fn fill(&mut self, val: bool) -> &mut Self { - self.fill_shim(val); + self.set_fill_shim(val); self } #[doc = "Change the `markers` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] pub fn markers(&mut self, val: bool) -> &mut Self { - self.markers_shim(val); + self.set_markers_shim(val); self } #[doc = "Change the `stroke` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"] pub fn stroke(&mut self, val: bool) -> &mut Self { - self.stroke_shim(val); + self.set_stroke_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TaskControllerInit.rs b/crates/web-sys/src/features/gen_TaskControllerInit.rs index 87fb5cbf035..aa1735495a8 100644 --- a/crates/web-sys/src/features/gen_TaskControllerInit.rs +++ b/crates/web-sys/src/features/gen_TaskControllerInit.rs @@ -15,8 +15,34 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type TaskControllerInit; #[cfg(feature = "TaskPriority")] + #[wasm_bindgen(method, getter = "priority")] + fn priority_shim(this: &TaskControllerInit) -> TaskPriority; + #[cfg(feature = "TaskPriority")] #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &TaskControllerInit, val: TaskPriority); + fn set_priority_shim(this: &TaskControllerInit, val: TaskPriority); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `TaskControllerInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TaskControllerInit`*"] +pub trait TaskControllerInitGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "TaskPriority")] + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskControllerInit`, `TaskPriority`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn priority(&self) -> TaskPriority; +} +#[cfg(web_sys_unstable_apis)] +impl TaskControllerInitGetters for TaskControllerInit { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "TaskPriority")] + fn priority(&self) -> TaskPriority { + self.priority_shim() + } } #[cfg(web_sys_unstable_apis)] impl TaskControllerInit { @@ -40,7 +66,7 @@ impl TaskControllerInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn priority(&mut self, val: TaskPriority) -> &mut Self { - self.priority_shim(val); + self.set_priority_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs b/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs index c2fc50429fa..f3f48f0146a 100644 --- a/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_TaskPriorityChangeEventInit.rs @@ -14,15 +14,83 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type TaskPriorityChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &TaskPriorityChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TaskPriorityChangeEventInit, val: bool); + fn set_bubbles_shim(this: &TaskPriorityChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &TaskPriorityChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TaskPriorityChangeEventInit, val: bool); + fn set_cancelable_shim(this: &TaskPriorityChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &TaskPriorityChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TaskPriorityChangeEventInit, val: bool); + fn set_composed_shim(this: &TaskPriorityChangeEventInit, val: bool); + #[cfg(feature = "TaskPriority")] + #[wasm_bindgen(method, getter = "previousPriority")] + fn previous_priority_shim(this: &TaskPriorityChangeEventInit) -> TaskPriority; #[cfg(feature = "TaskPriority")] #[wasm_bindgen(method, setter = "previousPriority")] - fn previous_priority_shim(this: &TaskPriorityChangeEventInit, val: TaskPriority); + fn set_previous_priority_shim(this: &TaskPriorityChangeEventInit, val: TaskPriority); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `TaskPriorityChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] +pub trait TaskPriorityChangeEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "TaskPriority")] + #[doc = "Get the `previousPriority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskPriority`, `TaskPriorityChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn previous_priority(&self) -> TaskPriority; +} +#[cfg(web_sys_unstable_apis)] +impl TaskPriorityChangeEventInitGetters for TaskPriorityChangeEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "TaskPriority")] + fn previous_priority(&self) -> TaskPriority { + self.previous_priority_shim() + } } #[cfg(web_sys_unstable_apis)] impl TaskPriorityChangeEventInit { @@ -36,7 +104,7 @@ impl TaskPriorityChangeEventInit { pub fn new(previous_priority: TaskPriority) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.previous_priority(previous_priority); + Self::previous_priority(&mut ret, previous_priority); ret } #[cfg(web_sys_unstable_apis)] @@ -47,7 +115,7 @@ impl TaskPriorityChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +126,7 @@ impl TaskPriorityChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +137,7 @@ impl TaskPriorityChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +149,7 @@ impl TaskPriorityChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn previous_priority(&mut self, val: TaskPriority) -> &mut Self { - self.previous_priority_shim(val); + self.set_previous_priority_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs b/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs index 99b837c6d73..3a506e0ed10 100644 --- a/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs +++ b/crates/web-sys/src/features/gen_TaskSignalAnyInit.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type TaskSignalAnyInit; + #[wasm_bindgen(method, getter = "priority")] + fn priority_shim(this: &TaskSignalAnyInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "priority")] - fn priority_shim(this: &TaskSignalAnyInit, val: &::wasm_bindgen::JsValue); + fn set_priority_shim(this: &TaskSignalAnyInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `TaskSignalAnyInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TaskSignalAnyInit`*"] +pub trait TaskSignalAnyInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `priority` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TaskSignalAnyInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn priority(&self) -> ::wasm_bindgen::JsValue; +} +#[cfg(web_sys_unstable_apis)] +impl TaskSignalAnyInitGetters for TaskSignalAnyInit { + #[cfg(web_sys_unstable_apis)] + fn priority(&self) -> ::wasm_bindgen::JsValue { + self.priority_shim() + } } #[cfg(web_sys_unstable_apis)] impl TaskSignalAnyInit { @@ -38,7 +61,7 @@ impl TaskSignalAnyInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn priority(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.priority_shim(val); + self.set_priority_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs b/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs index 480782339ae..1492f9c99cc 100644 --- a/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs +++ b/crates/web-sys/src/features/gen_TcpServerSocketEventInit.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] pub type TcpServerSocketEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &TcpServerSocketEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TcpServerSocketEventInit, val: bool); + fn set_bubbles_shim(this: &TcpServerSocketEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &TcpServerSocketEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TcpServerSocketEventInit, val: bool); + fn set_cancelable_shim(this: &TcpServerSocketEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &TcpServerSocketEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TcpServerSocketEventInit, val: bool); + fn set_composed_shim(this: &TcpServerSocketEventInit, val: bool); + #[cfg(feature = "TcpSocket")] + #[wasm_bindgen(method, getter = "socket")] + fn socket_shim(this: &TcpServerSocketEventInit) -> Option; #[cfg(feature = "TcpSocket")] #[wasm_bindgen(method, setter = "socket")] - fn socket_shim(this: &TcpServerSocketEventInit, val: Option<&TcpSocket>); + fn set_socket_shim(this: &TcpServerSocketEventInit, val: Option<&TcpSocket>); +} +#[doc = "The trait to access properties on the `TcpServerSocketEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] +pub trait TcpServerSocketEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] + fn composed(&self) -> bool; + #[cfg(feature = "TcpSocket")] + #[doc = "Get the `socket` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`, `TcpSocket`*"] + fn socket(&self) -> Option; +} +impl TcpServerSocketEventInitGetters for TcpServerSocketEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(feature = "TcpSocket")] + fn socket(&self) -> Option { + self.socket_shim() + } } impl TcpServerSocketEventInit { #[doc = "Construct a new `TcpServerSocketEventInit`."] @@ -33,21 +79,21 @@ impl TcpServerSocketEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(feature = "TcpSocket")] @@ -55,7 +101,7 @@ impl TcpServerSocketEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpServerSocketEventInit`, `TcpSocket`*"] pub fn socket(&mut self, val: Option<&TcpSocket>) -> &mut Self { - self.socket_shim(val); + self.set_socket_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs b/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs index 8ce673d4787..684f6c2ed31 100644 --- a/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs +++ b/crates/web-sys/src/features/gen_TcpSocketErrorEventInit.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] pub type TcpSocketErrorEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &TcpSocketErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TcpSocketErrorEventInit, val: bool); + fn set_bubbles_shim(this: &TcpSocketErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &TcpSocketErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TcpSocketErrorEventInit, val: bool); + fn set_cancelable_shim(this: &TcpSocketErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &TcpSocketErrorEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TcpSocketErrorEventInit, val: bool); + fn set_composed_shim(this: &TcpSocketErrorEventInit, val: bool); + #[wasm_bindgen(method, getter = "message")] + fn message_shim(this: &TcpSocketErrorEventInit) -> String; #[wasm_bindgen(method, setter = "message")] - fn message_shim(this: &TcpSocketErrorEventInit, val: &str); + fn set_message_shim(this: &TcpSocketErrorEventInit, val: &str); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &TcpSocketErrorEventInit) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &TcpSocketErrorEventInit, val: &str); + fn set_name_shim(this: &TcpSocketErrorEventInit, val: &str); +} +#[doc = "The trait to access properties on the `TcpSocketErrorEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] +pub trait TcpSocketErrorEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `message` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + fn message(&self) -> String; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] + fn name(&self) -> String; +} +impl TcpSocketErrorEventInitGetters for TcpSocketErrorEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn message(&self) -> String { + self.message_shim() + } + fn name(&self) -> String { + self.name_shim() + } } impl TcpSocketErrorEventInit { #[doc = "Construct a new `TcpSocketErrorEventInit`."] @@ -34,35 +86,35 @@ impl TcpSocketErrorEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `message` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] pub fn message(&mut self, val: &str) -> &mut Self { - self.message_shim(val); + self.set_message_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketErrorEventInit`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TcpSocketEventInit.rs b/crates/web-sys/src/features/gen_TcpSocketEventInit.rs index c73323b4dde..dc777eb61c2 100644 --- a/crates/web-sys/src/features/gen_TcpSocketEventInit.rs +++ b/crates/web-sys/src/features/gen_TcpSocketEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] pub type TcpSocketEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &TcpSocketEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TcpSocketEventInit, val: bool); + fn set_bubbles_shim(this: &TcpSocketEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &TcpSocketEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TcpSocketEventInit, val: bool); + fn set_cancelable_shim(this: &TcpSocketEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &TcpSocketEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TcpSocketEventInit, val: bool); + fn set_composed_shim(this: &TcpSocketEventInit, val: bool); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &TcpSocketEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &TcpSocketEventInit, val: &::wasm_bindgen::JsValue); + fn set_data_shim(this: &TcpSocketEventInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `TcpSocketEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] +pub trait TcpSocketEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] + fn data(&self) -> ::wasm_bindgen::JsValue; +} +impl TcpSocketEventInitGetters for TcpSocketEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn data(&self) -> ::wasm_bindgen::JsValue { + self.data_shim() + } } impl TcpSocketEventInit { #[doc = "Construct a new `TcpSocketEventInit`."] @@ -32,28 +75,28 @@ impl TcpSocketEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TcpSocketEventInit`*"] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TextDecodeOptions.rs b/crates/web-sys/src/features/gen_TextDecodeOptions.rs index ad37701b64f..fd2b1b0090b 100644 --- a/crates/web-sys/src/features/gen_TextDecodeOptions.rs +++ b/crates/web-sys/src/features/gen_TextDecodeOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] pub type TextDecodeOptions; + #[wasm_bindgen(method, getter = "stream")] + fn stream_shim(this: &TextDecodeOptions) -> bool; #[wasm_bindgen(method, setter = "stream")] - fn stream_shim(this: &TextDecodeOptions, val: bool); + fn set_stream_shim(this: &TextDecodeOptions, val: bool); +} +#[doc = "The trait to access properties on the `TextDecodeOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] +pub trait TextDecodeOptionsGetters { + #[doc = "Get the `stream` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] + fn stream(&self) -> bool; +} +impl TextDecodeOptionsGetters for TextDecodeOptions { + fn stream(&self) -> bool { + self.stream_shim() + } } impl TextDecodeOptions { #[doc = "Construct a new `TextDecodeOptions`."] @@ -26,7 +42,7 @@ impl TextDecodeOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TextDecodeOptions`*"] pub fn stream(&mut self, val: bool) -> &mut Self { - self.stream_shim(val); + self.set_stream_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TextDecoderOptions.rs b/crates/web-sys/src/features/gen_TextDecoderOptions.rs index ece2e78e5df..02d3ec60e07 100644 --- a/crates/web-sys/src/features/gen_TextDecoderOptions.rs +++ b/crates/web-sys/src/features/gen_TextDecoderOptions.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] pub type TextDecoderOptions; + #[wasm_bindgen(method, getter = "fatal")] + fn fatal_shim(this: &TextDecoderOptions) -> bool; #[wasm_bindgen(method, setter = "fatal")] - fn fatal_shim(this: &TextDecoderOptions, val: bool); + fn set_fatal_shim(this: &TextDecoderOptions, val: bool); +} +#[doc = "The trait to access properties on the `TextDecoderOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] +pub trait TextDecoderOptionsGetters { + #[doc = "Get the `fatal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] + fn fatal(&self) -> bool; +} +impl TextDecoderOptionsGetters for TextDecoderOptions { + fn fatal(&self) -> bool { + self.fatal_shim() + } } impl TextDecoderOptions { #[doc = "Construct a new `TextDecoderOptions`."] @@ -26,7 +42,7 @@ impl TextDecoderOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TextDecoderOptions`*"] pub fn fatal(&mut self, val: bool) -> &mut Self { - self.fatal_shim(val); + self.set_fatal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TouchEventInit.rs b/crates/web-sys/src/features/gen_TouchEventInit.rs index 4cec29ce0b4..bfc60e228e4 100644 --- a/crates/web-sys/src/features/gen_TouchEventInit.rs +++ b/crates/web-sys/src/features/gen_TouchEventInit.rs @@ -10,49 +10,248 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub type TouchEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TouchEventInit, val: bool); + fn set_bubbles_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TouchEventInit, val: bool); + fn set_cancelable_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TouchEventInit, val: bool); + fn set_composed_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &TouchEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &TouchEventInit, val: i32); + fn set_detail_shim(this: &TouchEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &TouchEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &TouchEventInit, val: Option<&Window>); + fn set_view_shim(this: &TouchEventInit, val: Option<&Window>); + #[wasm_bindgen(method, getter = "altKey")] + fn alt_key_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &TouchEventInit, val: bool); + fn set_alt_key_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "ctrlKey")] + fn ctrl_key_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &TouchEventInit, val: bool); + fn set_ctrl_key_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "metaKey")] + fn meta_key_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &TouchEventInit, val: bool); + fn set_meta_key_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierAltGraph")] + fn modifier_alt_graph_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &TouchEventInit, val: bool); + fn set_modifier_alt_graph_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierCapsLock")] + fn modifier_caps_lock_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &TouchEventInit, val: bool); + fn set_modifier_caps_lock_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFn")] + fn modifier_fn_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &TouchEventInit, val: bool); + fn set_modifier_fn_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFnLock")] + fn modifier_fn_lock_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &TouchEventInit, val: bool); + fn set_modifier_fn_lock_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierNumLock")] + fn modifier_num_lock_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &TouchEventInit, val: bool); + fn set_modifier_num_lock_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierOS")] + fn modifier_os_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &TouchEventInit, val: bool); + fn set_modifier_os_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierScrollLock")] + fn modifier_scroll_lock_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &TouchEventInit, val: bool); + fn set_modifier_scroll_lock_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbol")] + fn modifier_symbol_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &TouchEventInit, val: bool); + fn set_modifier_symbol_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + fn modifier_symbol_lock_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &TouchEventInit, val: bool); + fn set_modifier_symbol_lock_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "shiftKey")] + fn shift_key_shim(this: &TouchEventInit) -> bool; #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &TouchEventInit, val: bool); + fn set_shift_key_shim(this: &TouchEventInit, val: bool); + #[wasm_bindgen(method, getter = "changedTouches")] + fn changed_touches_shim(this: &TouchEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "changedTouches")] - fn changed_touches_shim(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + fn set_changed_touches_shim(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "targetTouches")] + fn target_touches_shim(this: &TouchEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "targetTouches")] - fn target_touches_shim(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + fn set_target_touches_shim(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "touches")] + fn touches_shim(this: &TouchEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "touches")] - fn touches_shim(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); + fn set_touches_shim(this: &TouchEventInit, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `TouchEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] +pub trait TouchEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`, `Window`*"] + fn view(&self) -> Option; + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn alt_key(&self) -> bool; + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn ctrl_key(&self) -> bool; + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn meta_key(&self) -> bool; + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn modifier_alt_graph(&self) -> bool; + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn modifier_caps_lock(&self) -> bool; + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn modifier_fn(&self) -> bool; + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn modifier_fn_lock(&self) -> bool; + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn modifier_num_lock(&self) -> bool; + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn modifier_os(&self) -> bool; + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn modifier_scroll_lock(&self) -> bool; + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn modifier_symbol(&self) -> bool; + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn modifier_symbol_lock(&self) -> bool; + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn shift_key(&self) -> bool; + #[doc = "Get the `changedTouches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn changed_touches(&self) -> ::js_sys::Array; + #[doc = "Get the `targetTouches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn target_touches(&self) -> ::js_sys::Array; + #[doc = "Get the `touches` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] + fn touches(&self) -> ::js_sys::Array; +} +impl TouchEventInitGetters for TouchEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + fn alt_key(&self) -> bool { + self.alt_key_shim() + } + fn ctrl_key(&self) -> bool { + self.ctrl_key_shim() + } + fn meta_key(&self) -> bool { + self.meta_key_shim() + } + fn modifier_alt_graph(&self) -> bool { + self.modifier_alt_graph_shim() + } + fn modifier_caps_lock(&self) -> bool { + self.modifier_caps_lock_shim() + } + fn modifier_fn(&self) -> bool { + self.modifier_fn_shim() + } + fn modifier_fn_lock(&self) -> bool { + self.modifier_fn_lock_shim() + } + fn modifier_num_lock(&self) -> bool { + self.modifier_num_lock_shim() + } + fn modifier_os(&self) -> bool { + self.modifier_os_shim() + } + fn modifier_scroll_lock(&self) -> bool { + self.modifier_scroll_lock_shim() + } + fn modifier_symbol(&self) -> bool { + self.modifier_symbol_shim() + } + fn modifier_symbol_lock(&self) -> bool { + self.modifier_symbol_lock_shim() + } + fn shift_key(&self) -> bool { + self.shift_key_shim() + } + fn changed_touches(&self) -> ::js_sys::Array { + self.changed_touches_shim() + } + fn target_touches(&self) -> ::js_sys::Array { + self.target_touches_shim() + } + fn touches(&self) -> ::js_sys::Array { + self.touches_shim() + } } impl TouchEventInit { #[doc = "Construct a new `TouchEventInit`."] @@ -67,28 +266,28 @@ impl TouchEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -96,119 +295,119 @@ impl TouchEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[doc = "Change the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key_shim(val); self } #[doc = "Change the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key_shim(val); self } #[doc = "Change the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key_shim(val); self } #[doc = "Change the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph_shim(val); self } #[doc = "Change the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock_shim(val); self } #[doc = "Change the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn_shim(val); self } #[doc = "Change the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock_shim(val); self } #[doc = "Change the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock_shim(val); self } #[doc = "Change the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os_shim(val); self } #[doc = "Change the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock_shim(val); self } #[doc = "Change the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol_shim(val); self } #[doc = "Change the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock_shim(val); self } #[doc = "Change the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key_shim(val); self } #[doc = "Change the `changedTouches` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn changed_touches(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.changed_touches_shim(val); + self.set_changed_touches_shim(val); self } #[doc = "Change the `targetTouches` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn target_touches(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.target_touches_shim(val); + self.set_target_touches_shim(val); self } #[doc = "Change the `touches` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchEventInit`*"] pub fn touches(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.touches_shim(val); + self.set_touches_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TouchInit.rs b/crates/web-sys/src/features/gen_TouchInit.rs index a9c5cc1745a..ed5f235ee57 100644 --- a/crates/web-sys/src/features/gen_TouchInit.rs +++ b/crates/web-sys/src/features/gen_TouchInit.rs @@ -10,31 +10,149 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub type TouchInit; + #[wasm_bindgen(method, getter = "clientX")] + fn client_x_shim(this: &TouchInit) -> i32; #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &TouchInit, val: i32); + fn set_client_x_shim(this: &TouchInit, val: i32); + #[wasm_bindgen(method, getter = "clientY")] + fn client_y_shim(this: &TouchInit) -> i32; #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &TouchInit, val: i32); + fn set_client_y_shim(this: &TouchInit, val: i32); + #[wasm_bindgen(method, getter = "force")] + fn force_shim(this: &TouchInit) -> f32; #[wasm_bindgen(method, setter = "force")] - fn force_shim(this: &TouchInit, val: f32); + fn set_force_shim(this: &TouchInit, val: f32); + #[wasm_bindgen(method, getter = "identifier")] + fn identifier_shim(this: &TouchInit) -> i32; #[wasm_bindgen(method, setter = "identifier")] - fn identifier_shim(this: &TouchInit, val: i32); + fn set_identifier_shim(this: &TouchInit, val: i32); + #[wasm_bindgen(method, getter = "pageX")] + fn page_x_shim(this: &TouchInit) -> i32; #[wasm_bindgen(method, setter = "pageX")] - fn page_x_shim(this: &TouchInit, val: i32); + fn set_page_x_shim(this: &TouchInit, val: i32); + #[wasm_bindgen(method, getter = "pageY")] + fn page_y_shim(this: &TouchInit) -> i32; #[wasm_bindgen(method, setter = "pageY")] - fn page_y_shim(this: &TouchInit, val: i32); + fn set_page_y_shim(this: &TouchInit, val: i32); + #[wasm_bindgen(method, getter = "radiusX")] + fn radius_x_shim(this: &TouchInit) -> f32; #[wasm_bindgen(method, setter = "radiusX")] - fn radius_x_shim(this: &TouchInit, val: f32); + fn set_radius_x_shim(this: &TouchInit, val: f32); + #[wasm_bindgen(method, getter = "radiusY")] + fn radius_y_shim(this: &TouchInit) -> f32; #[wasm_bindgen(method, setter = "radiusY")] - fn radius_y_shim(this: &TouchInit, val: f32); + fn set_radius_y_shim(this: &TouchInit, val: f32); + #[wasm_bindgen(method, getter = "rotationAngle")] + fn rotation_angle_shim(this: &TouchInit) -> f32; #[wasm_bindgen(method, setter = "rotationAngle")] - fn rotation_angle_shim(this: &TouchInit, val: f32); + fn set_rotation_angle_shim(this: &TouchInit, val: f32); + #[wasm_bindgen(method, getter = "screenX")] + fn screen_x_shim(this: &TouchInit) -> i32; #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &TouchInit, val: i32); + fn set_screen_x_shim(this: &TouchInit, val: i32); + #[wasm_bindgen(method, getter = "screenY")] + fn screen_y_shim(this: &TouchInit) -> i32; #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &TouchInit, val: i32); + fn set_screen_y_shim(this: &TouchInit, val: i32); + #[cfg(feature = "EventTarget")] + #[wasm_bindgen(method, getter = "target")] + fn target_shim(this: &TouchInit) -> EventTarget; #[cfg(feature = "EventTarget")] #[wasm_bindgen(method, setter = "target")] - fn target_shim(this: &TouchInit, val: &EventTarget); + fn set_target_shim(this: &TouchInit, val: &EventTarget); +} +#[doc = "The trait to access properties on the `TouchInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] +pub trait TouchInitGetters { + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn client_x(&self) -> i32; + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn client_y(&self) -> i32; + #[doc = "Get the `force` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn force(&self) -> f32; + #[doc = "Get the `identifier` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn identifier(&self) -> i32; + #[doc = "Get the `pageX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn page_x(&self) -> i32; + #[doc = "Get the `pageY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn page_y(&self) -> i32; + #[doc = "Get the `radiusX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn radius_x(&self) -> f32; + #[doc = "Get the `radiusY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn radius_y(&self) -> f32; + #[doc = "Get the `rotationAngle` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn rotation_angle(&self) -> f32; + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn screen_x(&self) -> i32; + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] + fn screen_y(&self) -> i32; + #[cfg(feature = "EventTarget")] + #[doc = "Get the `target` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"] + fn target(&self) -> EventTarget; +} +impl TouchInitGetters for TouchInit { + fn client_x(&self) -> i32 { + self.client_x_shim() + } + fn client_y(&self) -> i32 { + self.client_y_shim() + } + fn force(&self) -> f32 { + self.force_shim() + } + fn identifier(&self) -> i32 { + self.identifier_shim() + } + fn page_x(&self) -> i32 { + self.page_x_shim() + } + fn page_y(&self) -> i32 { + self.page_y_shim() + } + fn radius_x(&self) -> f32 { + self.radius_x_shim() + } + fn radius_y(&self) -> f32 { + self.radius_y_shim() + } + fn rotation_angle(&self) -> f32 { + self.rotation_angle_shim() + } + fn screen_x(&self) -> i32 { + self.screen_x_shim() + } + fn screen_y(&self) -> i32 { + self.screen_y_shim() + } + #[cfg(feature = "EventTarget")] + fn target(&self) -> EventTarget { + self.target_shim() + } } impl TouchInit { #[cfg(feature = "EventTarget")] @@ -44,85 +162,85 @@ impl TouchInit { pub fn new(identifier: i32, target: &EventTarget) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.identifier(identifier); - ret.target(target); + Self::identifier(&mut ret, identifier); + Self::target(&mut ret, target); ret } #[doc = "Change the `clientX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x_shim(val); self } #[doc = "Change the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y_shim(val); self } #[doc = "Change the `force` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn force(&mut self, val: f32) -> &mut Self { - self.force_shim(val); + self.set_force_shim(val); self } #[doc = "Change the `identifier` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn identifier(&mut self, val: i32) -> &mut Self { - self.identifier_shim(val); + self.set_identifier_shim(val); self } #[doc = "Change the `pageX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn page_x(&mut self, val: i32) -> &mut Self { - self.page_x_shim(val); + self.set_page_x_shim(val); self } #[doc = "Change the `pageY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn page_y(&mut self, val: i32) -> &mut Self { - self.page_y_shim(val); + self.set_page_y_shim(val); self } #[doc = "Change the `radiusX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn radius_x(&mut self, val: f32) -> &mut Self { - self.radius_x_shim(val); + self.set_radius_x_shim(val); self } #[doc = "Change the `radiusY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn radius_y(&mut self, val: f32) -> &mut Self { - self.radius_y_shim(val); + self.set_radius_y_shim(val); self } #[doc = "Change the `rotationAngle` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn rotation_angle(&mut self, val: f32) -> &mut Self { - self.rotation_angle_shim(val); + self.set_rotation_angle_shim(val); self } #[doc = "Change the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x_shim(val); self } #[doc = "Change the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TouchInit`*"] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y_shim(val); self } #[cfg(feature = "EventTarget")] @@ -130,7 +248,7 @@ impl TouchInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `TouchInit`*"] pub fn target(&mut self, val: &EventTarget) -> &mut Self { - self.target_shim(val); + self.set_target_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TrackEventInit.rs b/crates/web-sys/src/features/gen_TrackEventInit.rs index 18ede672b91..c2b0a1f4ea3 100644 --- a/crates/web-sys/src/features/gen_TrackEventInit.rs +++ b/crates/web-sys/src/features/gen_TrackEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] pub type TrackEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &TrackEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TrackEventInit, val: bool); + fn set_bubbles_shim(this: &TrackEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &TrackEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TrackEventInit, val: bool); + fn set_cancelable_shim(this: &TrackEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &TrackEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TrackEventInit, val: bool); + fn set_composed_shim(this: &TrackEventInit, val: bool); + #[wasm_bindgen(method, getter = "track")] + fn track_shim(this: &TrackEventInit) -> Option<::js_sys::Object>; #[wasm_bindgen(method, setter = "track")] - fn track_shim(this: &TrackEventInit, val: Option<&::js_sys::Object>); + fn set_track_shim(this: &TrackEventInit, val: Option<&::js_sys::Object>); +} +#[doc = "The trait to access properties on the `TrackEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] +pub trait TrackEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `track` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] + fn track(&self) -> Option<::js_sys::Object>; +} +impl TrackEventInitGetters for TrackEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn track(&self) -> Option<::js_sys::Object> { + self.track_shim() + } } impl TrackEventInit { #[doc = "Construct a new `TrackEventInit`."] @@ -32,28 +75,28 @@ impl TrackEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `track` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TrackEventInit`*"] pub fn track(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { - self.track_shim(val); + self.set_track_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_Transformer.rs b/crates/web-sys/src/features/gen_Transformer.rs index 02cb29200b1..ad557ccef82 100644 --- a/crates/web-sys/src/features/gen_Transformer.rs +++ b/crates/web-sys/src/features/gen_Transformer.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] pub type Transformer; + #[wasm_bindgen(method, getter = "flush")] + fn flush_shim(this: &Transformer) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "flush")] - fn flush_shim(this: &Transformer, val: &::js_sys::Function); + fn set_flush_shim(this: &Transformer, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "readableType")] + fn readable_type_shim(this: &Transformer) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "readableType")] - fn readable_type_shim(this: &Transformer, val: &::wasm_bindgen::JsValue); + fn set_readable_type_shim(this: &Transformer, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "start")] + fn start_shim(this: &Transformer) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "start")] - fn start_shim(this: &Transformer, val: &::js_sys::Function); + fn set_start_shim(this: &Transformer, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "transform")] + fn transform_shim(this: &Transformer) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "transform")] - fn transform_shim(this: &Transformer, val: &::js_sys::Function); + fn set_transform_shim(this: &Transformer, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "writableType")] + fn writable_type_shim(this: &Transformer) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "writableType")] - fn writable_type_shim(this: &Transformer, val: &::wasm_bindgen::JsValue); + fn set_writable_type_shim(this: &Transformer, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `Transformer` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `Transformer`*"] +pub trait TransformerGetters { + #[doc = "Get the `flush` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + fn flush(&self) -> ::js_sys::Function; + #[doc = "Get the `readableType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + fn readable_type(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + fn start(&self) -> ::js_sys::Function; + #[doc = "Get the `transform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + fn transform(&self) -> ::js_sys::Function; + #[doc = "Get the `writableType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] + fn writable_type(&self) -> ::wasm_bindgen::JsValue; +} +impl TransformerGetters for Transformer { + fn flush(&self) -> ::js_sys::Function { + self.flush_shim() + } + fn readable_type(&self) -> ::wasm_bindgen::JsValue { + self.readable_type_shim() + } + fn start(&self) -> ::js_sys::Function { + self.start_shim() + } + fn transform(&self) -> ::js_sys::Function { + self.transform_shim() + } + fn writable_type(&self) -> ::wasm_bindgen::JsValue { + self.writable_type_shim() + } } impl Transformer { #[doc = "Construct a new `Transformer`."] @@ -34,35 +86,35 @@ impl Transformer { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] pub fn flush(&mut self, val: &::js_sys::Function) -> &mut Self { - self.flush_shim(val); + self.set_flush_shim(val); self } #[doc = "Change the `readableType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] pub fn readable_type(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.readable_type_shim(val); + self.set_readable_type_shim(val); self } #[doc = "Change the `start` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self { - self.start_shim(val); + self.set_start_shim(val); self } #[doc = "Change the `transform` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] pub fn transform(&mut self, val: &::js_sys::Function) -> &mut Self { - self.transform_shim(val); + self.set_transform_shim(val); self } #[doc = "Change the `writableType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `Transformer`*"] pub fn writable_type(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.writable_type_shim(val); + self.set_writable_type_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TransitionEventInit.rs b/crates/web-sys/src/features/gen_TransitionEventInit.rs index a6d000fd7b6..b38535b6fe6 100644 --- a/crates/web-sys/src/features/gen_TransitionEventInit.rs +++ b/crates/web-sys/src/features/gen_TransitionEventInit.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] pub type TransitionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &TransitionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &TransitionEventInit, val: bool); + fn set_bubbles_shim(this: &TransitionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &TransitionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &TransitionEventInit, val: bool); + fn set_cancelable_shim(this: &TransitionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &TransitionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &TransitionEventInit, val: bool); + fn set_composed_shim(this: &TransitionEventInit, val: bool); + #[wasm_bindgen(method, getter = "elapsedTime")] + fn elapsed_time_shim(this: &TransitionEventInit) -> f32; #[wasm_bindgen(method, setter = "elapsedTime")] - fn elapsed_time_shim(this: &TransitionEventInit, val: f32); + fn set_elapsed_time_shim(this: &TransitionEventInit, val: f32); + #[wasm_bindgen(method, getter = "propertyName")] + fn property_name_shim(this: &TransitionEventInit) -> String; #[wasm_bindgen(method, setter = "propertyName")] - fn property_name_shim(this: &TransitionEventInit, val: &str); + fn set_property_name_shim(this: &TransitionEventInit, val: &str); + #[wasm_bindgen(method, getter = "pseudoElement")] + fn pseudo_element_shim(this: &TransitionEventInit) -> String; #[wasm_bindgen(method, setter = "pseudoElement")] - fn pseudo_element_shim(this: &TransitionEventInit, val: &str); + fn set_pseudo_element_shim(this: &TransitionEventInit, val: &str); +} +#[doc = "The trait to access properties on the `TransitionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] +pub trait TransitionEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `elapsedTime` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + fn elapsed_time(&self) -> f32; + #[doc = "Get the `propertyName` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + fn property_name(&self) -> String; + #[doc = "Get the `pseudoElement` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] + fn pseudo_element(&self) -> String; +} +impl TransitionEventInitGetters for TransitionEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn elapsed_time(&self) -> f32 { + self.elapsed_time_shim() + } + fn property_name(&self) -> String { + self.property_name_shim() + } + fn pseudo_element(&self) -> String { + self.pseudo_element_shim() + } } impl TransitionEventInit { #[doc = "Construct a new `TransitionEventInit`."] @@ -36,42 +97,42 @@ impl TransitionEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `elapsedTime` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] pub fn elapsed_time(&mut self, val: f32) -> &mut Self { - self.elapsed_time_shim(val); + self.set_elapsed_time_shim(val); self } #[doc = "Change the `propertyName` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] pub fn property_name(&mut self, val: &str) -> &mut Self { - self.property_name_shim(val); + self.set_property_name_shim(val); self } #[doc = "Change the `pseudoElement` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TransitionEventInit`*"] pub fn pseudo_element(&mut self, val: &str) -> &mut Self { - self.pseudo_element_shim(val); + self.set_pseudo_element_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_TreeCellInfo.rs b/crates/web-sys/src/features/gen_TreeCellInfo.rs index 6d46b866721..5ac13e94449 100644 --- a/crates/web-sys/src/features/gen_TreeCellInfo.rs +++ b/crates/web-sys/src/features/gen_TreeCellInfo.rs @@ -10,10 +10,35 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] pub type TreeCellInfo; + #[wasm_bindgen(method, getter = "childElt")] + fn child_elt_shim(this: &TreeCellInfo) -> String; #[wasm_bindgen(method, setter = "childElt")] - fn child_elt_shim(this: &TreeCellInfo, val: &str); + fn set_child_elt_shim(this: &TreeCellInfo, val: &str); + #[wasm_bindgen(method, getter = "row")] + fn row_shim(this: &TreeCellInfo) -> i32; #[wasm_bindgen(method, setter = "row")] - fn row_shim(this: &TreeCellInfo, val: i32); + fn set_row_shim(this: &TreeCellInfo, val: i32); +} +#[doc = "The trait to access properties on the `TreeCellInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] +pub trait TreeCellInfoGetters { + #[doc = "Get the `childElt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] + fn child_elt(&self) -> String; + #[doc = "Get the `row` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] + fn row(&self) -> i32; +} +impl TreeCellInfoGetters for TreeCellInfo { + fn child_elt(&self) -> String { + self.child_elt_shim() + } + fn row(&self) -> i32 { + self.row_shim() + } } impl TreeCellInfo { #[doc = "Construct a new `TreeCellInfo`."] @@ -28,14 +53,14 @@ impl TreeCellInfo { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] pub fn child_elt(&mut self, val: &str) -> &mut Self { - self.child_elt_shim(val); + self.set_child_elt_shim(val); self } #[doc = "Change the `row` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `TreeCellInfo`*"] pub fn row(&mut self, val: i32) -> &mut Self { - self.row_shim(val); + self.set_row_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_U2fClientData.rs b/crates/web-sys/src/features/gen_U2fClientData.rs index e633e97f4d6..d5c7e5995ec 100644 --- a/crates/web-sys/src/features/gen_U2fClientData.rs +++ b/crates/web-sys/src/features/gen_U2fClientData.rs @@ -10,12 +10,46 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] pub type U2fClientData; + #[wasm_bindgen(method, getter = "challenge")] + fn challenge_shim(this: &U2fClientData) -> String; #[wasm_bindgen(method, setter = "challenge")] - fn challenge_shim(this: &U2fClientData, val: &str); + fn set_challenge_shim(this: &U2fClientData, val: &str); + #[wasm_bindgen(method, getter = "origin")] + fn origin_shim(this: &U2fClientData) -> String; #[wasm_bindgen(method, setter = "origin")] - fn origin_shim(this: &U2fClientData, val: &str); + fn set_origin_shim(this: &U2fClientData, val: &str); + #[wasm_bindgen(method, getter = "typ")] + fn typ_shim(this: &U2fClientData) -> String; #[wasm_bindgen(method, setter = "typ")] - fn typ_shim(this: &U2fClientData, val: &str); + fn set_typ_shim(this: &U2fClientData, val: &str); +} +#[doc = "The trait to access properties on the `U2fClientData` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] +pub trait U2fClientDataGetters { + #[doc = "Get the `challenge` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + fn challenge(&self) -> String; + #[doc = "Get the `origin` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + fn origin(&self) -> String; + #[doc = "Get the `typ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] + fn typ(&self) -> String; +} +impl U2fClientDataGetters for U2fClientData { + fn challenge(&self) -> String { + self.challenge_shim() + } + fn origin(&self) -> String { + self.origin_shim() + } + fn typ(&self) -> String { + self.typ_shim() + } } impl U2fClientData { #[doc = "Construct a new `U2fClientData`."] @@ -30,21 +64,21 @@ impl U2fClientData { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] pub fn challenge(&mut self, val: &str) -> &mut Self { - self.challenge_shim(val); + self.set_challenge_shim(val); self } #[doc = "Change the `origin` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] pub fn origin(&mut self, val: &str) -> &mut Self { - self.origin_shim(val); + self.set_origin_shim(val); self } #[doc = "Change the `typ` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `U2fClientData`*"] pub fn typ(&mut self, val: &str) -> &mut Self { - self.typ_shim(val); + self.set_typ_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UdpMessageEventInit.rs b/crates/web-sys/src/features/gen_UdpMessageEventInit.rs index 201113bd26f..b7b45fa178b 100644 --- a/crates/web-sys/src/features/gen_UdpMessageEventInit.rs +++ b/crates/web-sys/src/features/gen_UdpMessageEventInit.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] pub type UdpMessageEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &UdpMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &UdpMessageEventInit, val: bool); + fn set_bubbles_shim(this: &UdpMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &UdpMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &UdpMessageEventInit, val: bool); + fn set_cancelable_shim(this: &UdpMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &UdpMessageEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &UdpMessageEventInit, val: bool); + fn set_composed_shim(this: &UdpMessageEventInit, val: bool); + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &UdpMessageEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &UdpMessageEventInit, val: &::wasm_bindgen::JsValue); + fn set_data_shim(this: &UdpMessageEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "remoteAddress")] + fn remote_address_shim(this: &UdpMessageEventInit) -> String; #[wasm_bindgen(method, setter = "remoteAddress")] - fn remote_address_shim(this: &UdpMessageEventInit, val: &str); + fn set_remote_address_shim(this: &UdpMessageEventInit, val: &str); + #[wasm_bindgen(method, getter = "remotePort")] + fn remote_port_shim(this: &UdpMessageEventInit) -> u16; #[wasm_bindgen(method, setter = "remotePort")] - fn remote_port_shim(this: &UdpMessageEventInit, val: u16); + fn set_remote_port_shim(this: &UdpMessageEventInit, val: u16); +} +#[doc = "The trait to access properties on the `UdpMessageEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] +pub trait UdpMessageEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + fn data(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `remoteAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + fn remote_address(&self) -> String; + #[doc = "Get the `remotePort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] + fn remote_port(&self) -> u16; +} +impl UdpMessageEventInitGetters for UdpMessageEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn data(&self) -> ::wasm_bindgen::JsValue { + self.data_shim() + } + fn remote_address(&self) -> String { + self.remote_address_shim() + } + fn remote_port(&self) -> u16 { + self.remote_port_shim() + } } impl UdpMessageEventInit { #[doc = "Construct a new `UdpMessageEventInit`."] @@ -36,42 +97,42 @@ impl UdpMessageEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] pub fn data(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.data_shim(val); + self.set_data_shim(val); self } #[doc = "Change the `remoteAddress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] pub fn remote_address(&mut self, val: &str) -> &mut Self { - self.remote_address_shim(val); + self.set_remote_address_shim(val); self } #[doc = "Change the `remotePort` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpMessageEventInit`*"] pub fn remote_port(&mut self, val: u16) -> &mut Self { - self.remote_port_shim(val); + self.set_remote_port_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UdpOptions.rs b/crates/web-sys/src/features/gen_UdpOptions.rs index f890c614629..8c558fc6980 100644 --- a/crates/web-sys/src/features/gen_UdpOptions.rs +++ b/crates/web-sys/src/features/gen_UdpOptions.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] pub type UdpOptions; + #[wasm_bindgen(method, getter = "addressReuse")] + fn address_reuse_shim(this: &UdpOptions) -> bool; #[wasm_bindgen(method, setter = "addressReuse")] - fn address_reuse_shim(this: &UdpOptions, val: bool); + fn set_address_reuse_shim(this: &UdpOptions, val: bool); + #[wasm_bindgen(method, getter = "localAddress")] + fn local_address_shim(this: &UdpOptions) -> String; #[wasm_bindgen(method, setter = "localAddress")] - fn local_address_shim(this: &UdpOptions, val: &str); + fn set_local_address_shim(this: &UdpOptions, val: &str); + #[wasm_bindgen(method, getter = "localPort")] + fn local_port_shim(this: &UdpOptions) -> u16; #[wasm_bindgen(method, setter = "localPort")] - fn local_port_shim(this: &UdpOptions, val: u16); + fn set_local_port_shim(this: &UdpOptions, val: u16); + #[wasm_bindgen(method, getter = "loopback")] + fn loopback_shim(this: &UdpOptions) -> bool; #[wasm_bindgen(method, setter = "loopback")] - fn loopback_shim(this: &UdpOptions, val: bool); + fn set_loopback_shim(this: &UdpOptions, val: bool); + #[wasm_bindgen(method, getter = "remoteAddress")] + fn remote_address_shim(this: &UdpOptions) -> String; #[wasm_bindgen(method, setter = "remoteAddress")] - fn remote_address_shim(this: &UdpOptions, val: &str); + fn set_remote_address_shim(this: &UdpOptions, val: &str); + #[wasm_bindgen(method, getter = "remotePort")] + fn remote_port_shim(this: &UdpOptions) -> u16; #[wasm_bindgen(method, setter = "remotePort")] - fn remote_port_shim(this: &UdpOptions, val: u16); + fn set_remote_port_shim(this: &UdpOptions, val: u16); +} +#[doc = "The trait to access properties on the `UdpOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] +pub trait UdpOptionsGetters { + #[doc = "Get the `addressReuse` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + fn address_reuse(&self) -> bool; + #[doc = "Get the `localAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + fn local_address(&self) -> String; + #[doc = "Get the `localPort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + fn local_port(&self) -> u16; + #[doc = "Get the `loopback` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + fn loopback(&self) -> bool; + #[doc = "Get the `remoteAddress` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + fn remote_address(&self) -> String; + #[doc = "Get the `remotePort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] + fn remote_port(&self) -> u16; +} +impl UdpOptionsGetters for UdpOptions { + fn address_reuse(&self) -> bool { + self.address_reuse_shim() + } + fn local_address(&self) -> String { + self.local_address_shim() + } + fn local_port(&self) -> u16 { + self.local_port_shim() + } + fn loopback(&self) -> bool { + self.loopback_shim() + } + fn remote_address(&self) -> String { + self.remote_address_shim() + } + fn remote_port(&self) -> u16 { + self.remote_port_shim() + } } impl UdpOptions { #[doc = "Construct a new `UdpOptions`."] @@ -36,42 +97,42 @@ impl UdpOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] pub fn address_reuse(&mut self, val: bool) -> &mut Self { - self.address_reuse_shim(val); + self.set_address_reuse_shim(val); self } #[doc = "Change the `localAddress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] pub fn local_address(&mut self, val: &str) -> &mut Self { - self.local_address_shim(val); + self.set_local_address_shim(val); self } #[doc = "Change the `localPort` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] pub fn local_port(&mut self, val: u16) -> &mut Self { - self.local_port_shim(val); + self.set_local_port_shim(val); self } #[doc = "Change the `loopback` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] pub fn loopback(&mut self, val: bool) -> &mut Self { - self.loopback_shim(val); + self.set_loopback_shim(val); self } #[doc = "Change the `remoteAddress` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] pub fn remote_address(&mut self, val: &str) -> &mut Self { - self.remote_address_shim(val); + self.set_remote_address_shim(val); self } #[doc = "Change the `remotePort` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UdpOptions`*"] pub fn remote_port(&mut self, val: u16) -> &mut Self { - self.remote_port_shim(val); + self.set_remote_port_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UiEventInit.rs b/crates/web-sys/src/features/gen_UiEventInit.rs index de144f4ed4d..d4668e4ac73 100644 --- a/crates/web-sys/src/features/gen_UiEventInit.rs +++ b/crates/web-sys/src/features/gen_UiEventInit.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] pub type UiEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &UiEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &UiEventInit, val: bool); + fn set_bubbles_shim(this: &UiEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &UiEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &UiEventInit, val: bool); + fn set_cancelable_shim(this: &UiEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &UiEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &UiEventInit, val: bool); + fn set_composed_shim(this: &UiEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &UiEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &UiEventInit, val: i32); + fn set_detail_shim(this: &UiEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &UiEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &UiEventInit, val: Option<&Window>); + fn set_view_shim(this: &UiEventInit, val: Option<&Window>); +} +#[doc = "The trait to access properties on the `UiEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] +pub trait UiEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UiEventInit`, `Window`*"] + fn view(&self) -> Option; +} +impl UiEventInitGetters for UiEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } } impl UiEventInit { #[doc = "Construct a new `UiEventInit`."] @@ -35,28 +90,28 @@ impl UiEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -64,7 +119,7 @@ impl UiEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UiEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UnderlyingSink.rs b/crates/web-sys/src/features/gen_UnderlyingSink.rs index 458fc583361..31b413ced52 100644 --- a/crates/web-sys/src/features/gen_UnderlyingSink.rs +++ b/crates/web-sys/src/features/gen_UnderlyingSink.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] pub type UnderlyingSink; + #[wasm_bindgen(method, getter = "abort")] + fn abort_shim(this: &UnderlyingSink) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "abort")] - fn abort_shim(this: &UnderlyingSink, val: &::js_sys::Function); + fn set_abort_shim(this: &UnderlyingSink, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "close")] + fn close_shim(this: &UnderlyingSink) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "close")] - fn close_shim(this: &UnderlyingSink, val: &::js_sys::Function); + fn set_close_shim(this: &UnderlyingSink, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "start")] + fn start_shim(this: &UnderlyingSink) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "start")] - fn start_shim(this: &UnderlyingSink, val: &::js_sys::Function); + fn set_start_shim(this: &UnderlyingSink, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &UnderlyingSink) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &UnderlyingSink, val: &::wasm_bindgen::JsValue); + fn set_type__shim(this: &UnderlyingSink, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "write")] + fn write_shim(this: &UnderlyingSink) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "write")] - fn write_shim(this: &UnderlyingSink, val: &::js_sys::Function); + fn set_write_shim(this: &UnderlyingSink, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `UnderlyingSink` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] +pub trait UnderlyingSinkGetters { + #[doc = "Get the `abort` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + fn abort(&self) -> ::js_sys::Function; + #[doc = "Get the `close` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + fn close(&self) -> ::js_sys::Function; + #[doc = "Get the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + fn start(&self) -> ::js_sys::Function; + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + fn type_(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `write` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] + fn write(&self) -> ::js_sys::Function; +} +impl UnderlyingSinkGetters for UnderlyingSink { + fn abort(&self) -> ::js_sys::Function { + self.abort_shim() + } + fn close(&self) -> ::js_sys::Function { + self.close_shim() + } + fn start(&self) -> ::js_sys::Function { + self.start_shim() + } + fn type_(&self) -> ::wasm_bindgen::JsValue { + self.type__shim() + } + fn write(&self) -> ::js_sys::Function { + self.write_shim() + } } impl UnderlyingSink { #[doc = "Construct a new `UnderlyingSink`."] @@ -34,35 +86,35 @@ impl UnderlyingSink { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] pub fn abort(&mut self, val: &::js_sys::Function) -> &mut Self { - self.abort_shim(val); + self.set_abort_shim(val); self } #[doc = "Change the `close` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] pub fn close(&mut self, val: &::js_sys::Function) -> &mut Self { - self.close_shim(val); + self.set_close_shim(val); self } #[doc = "Change the `start` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self { - self.start_shim(val); + self.set_start_shim(val); self } #[doc = "Change the `type` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] pub fn type_(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } #[doc = "Change the `write` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSink`*"] pub fn write(&mut self, val: &::js_sys::Function) -> &mut Self { - self.write_shim(val); + self.set_write_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UnderlyingSource.rs b/crates/web-sys/src/features/gen_UnderlyingSource.rs index 99efecb0e14..e2d0ca096bf 100644 --- a/crates/web-sys/src/features/gen_UnderlyingSource.rs +++ b/crates/web-sys/src/features/gen_UnderlyingSource.rs @@ -10,17 +10,72 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] pub type UnderlyingSource; + #[wasm_bindgen(method, getter = "autoAllocateChunkSize")] + fn auto_allocate_chunk_size_shim(this: &UnderlyingSource) -> f64; #[wasm_bindgen(method, setter = "autoAllocateChunkSize")] - fn auto_allocate_chunk_size_shim(this: &UnderlyingSource, val: f64); + fn set_auto_allocate_chunk_size_shim(this: &UnderlyingSource, val: f64); + #[wasm_bindgen(method, getter = "cancel")] + fn cancel_shim(this: &UnderlyingSource) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "cancel")] - fn cancel_shim(this: &UnderlyingSource, val: &::js_sys::Function); + fn set_cancel_shim(this: &UnderlyingSource, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "pull")] + fn pull_shim(this: &UnderlyingSource) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "pull")] - fn pull_shim(this: &UnderlyingSource, val: &::js_sys::Function); + fn set_pull_shim(this: &UnderlyingSource, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "start")] + fn start_shim(this: &UnderlyingSource) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "start")] - fn start_shim(this: &UnderlyingSource, val: &::js_sys::Function); + fn set_start_shim(this: &UnderlyingSource, val: &::js_sys::Function); + #[cfg(feature = "ReadableStreamType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &UnderlyingSource) -> ReadableStreamType; #[cfg(feature = "ReadableStreamType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &UnderlyingSource, val: ReadableStreamType); + fn set_type__shim(this: &UnderlyingSource, val: ReadableStreamType); +} +#[doc = "The trait to access properties on the `UnderlyingSource` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] +pub trait UnderlyingSourceGetters { + #[doc = "Get the `autoAllocateChunkSize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + fn auto_allocate_chunk_size(&self) -> f64; + #[doc = "Get the `cancel` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + fn cancel(&self) -> ::js_sys::Function; + #[doc = "Get the `pull` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + fn pull(&self) -> ::js_sys::Function; + #[doc = "Get the `start` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] + fn start(&self) -> ::js_sys::Function; + #[cfg(feature = "ReadableStreamType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ReadableStreamType`, `UnderlyingSource`*"] + fn type_(&self) -> ReadableStreamType; +} +impl UnderlyingSourceGetters for UnderlyingSource { + fn auto_allocate_chunk_size(&self) -> f64 { + self.auto_allocate_chunk_size_shim() + } + fn cancel(&self) -> ::js_sys::Function { + self.cancel_shim() + } + fn pull(&self) -> ::js_sys::Function { + self.pull_shim() + } + fn start(&self) -> ::js_sys::Function { + self.start_shim() + } + #[cfg(feature = "ReadableStreamType")] + fn type_(&self) -> ReadableStreamType { + self.type__shim() + } } impl UnderlyingSource { #[doc = "Construct a new `UnderlyingSource`."] @@ -35,28 +90,28 @@ impl UnderlyingSource { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] pub fn auto_allocate_chunk_size(&mut self, val: f64) -> &mut Self { - self.auto_allocate_chunk_size_shim(val); + self.set_auto_allocate_chunk_size_shim(val); self } #[doc = "Change the `cancel` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] pub fn cancel(&mut self, val: &::js_sys::Function) -> &mut Self { - self.cancel_shim(val); + self.set_cancel_shim(val); self } #[doc = "Change the `pull` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] pub fn pull(&mut self, val: &::js_sys::Function) -> &mut Self { - self.pull_shim(val); + self.set_pull_shim(val); self } #[doc = "Change the `start` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UnderlyingSource`*"] pub fn start(&mut self, val: &::js_sys::Function) -> &mut Self { - self.start_shim(val); + self.set_start_shim(val); self } #[cfg(feature = "ReadableStreamType")] @@ -64,7 +119,7 @@ impl UnderlyingSource { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ReadableStreamType`, `UnderlyingSource`*"] pub fn type_(&mut self, val: ReadableStreamType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs b/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs index 5bcbff99c6d..f4cdef177ed 100644 --- a/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs +++ b/crates/web-sys/src/features/gen_UsbConnectionEventInit.rs @@ -14,15 +14,83 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbConnectionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &UsbConnectionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &UsbConnectionEventInit, val: bool); + fn set_bubbles_shim(this: &UsbConnectionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &UsbConnectionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &UsbConnectionEventInit, val: bool); + fn set_cancelable_shim(this: &UsbConnectionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &UsbConnectionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &UsbConnectionEventInit, val: bool); + fn set_composed_shim(this: &UsbConnectionEventInit, val: bool); + #[cfg(feature = "UsbDevice")] + #[wasm_bindgen(method, getter = "device")] + fn device_shim(this: &UsbConnectionEventInit) -> UsbDevice; #[cfg(feature = "UsbDevice")] #[wasm_bindgen(method, setter = "device")] - fn device_shim(this: &UsbConnectionEventInit, val: &UsbDevice); + fn set_device_shim(this: &UsbConnectionEventInit, val: &UsbDevice); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `UsbConnectionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] +pub trait UsbConnectionEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "UsbDevice")] + #[doc = "Get the `device` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbConnectionEventInit`, `UsbDevice`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn device(&self) -> UsbDevice; +} +#[cfg(web_sys_unstable_apis)] +impl UsbConnectionEventInitGetters for UsbConnectionEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "UsbDevice")] + fn device(&self) -> UsbDevice { + self.device_shim() + } } #[cfg(web_sys_unstable_apis)] impl UsbConnectionEventInit { @@ -36,7 +104,7 @@ impl UsbConnectionEventInit { pub fn new(device: &UsbDevice) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.device(device); + Self::device(&mut ret, device); ret } #[cfg(web_sys_unstable_apis)] @@ -47,7 +115,7 @@ impl UsbConnectionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +126,7 @@ impl UsbConnectionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +137,7 @@ impl UsbConnectionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +149,7 @@ impl UsbConnectionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn device(&mut self, val: &UsbDevice) -> &mut Self { - self.device_shim(val); + self.set_device_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs b/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs index 99a413d2354..823d588edd4 100644 --- a/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs +++ b/crates/web-sys/src/features/gen_UsbControlTransferParameters.rs @@ -14,18 +14,103 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbControlTransferParameters; + #[wasm_bindgen(method, getter = "index")] + fn index_shim(this: &UsbControlTransferParameters) -> u16; #[wasm_bindgen(method, setter = "index")] - fn index_shim(this: &UsbControlTransferParameters, val: u16); + fn set_index_shim(this: &UsbControlTransferParameters, val: u16); + #[cfg(feature = "UsbRecipient")] + #[wasm_bindgen(method, getter = "recipient")] + fn recipient_shim(this: &UsbControlTransferParameters) -> UsbRecipient; #[cfg(feature = "UsbRecipient")] #[wasm_bindgen(method, setter = "recipient")] - fn recipient_shim(this: &UsbControlTransferParameters, val: UsbRecipient); + fn set_recipient_shim(this: &UsbControlTransferParameters, val: UsbRecipient); + #[wasm_bindgen(method, getter = "request")] + fn request_shim(this: &UsbControlTransferParameters) -> u8; #[wasm_bindgen(method, setter = "request")] - fn request_shim(this: &UsbControlTransferParameters, val: u8); + fn set_request_shim(this: &UsbControlTransferParameters, val: u8); + #[cfg(feature = "UsbRequestType")] + #[wasm_bindgen(method, getter = "requestType")] + fn request_type_shim(this: &UsbControlTransferParameters) -> UsbRequestType; #[cfg(feature = "UsbRequestType")] #[wasm_bindgen(method, setter = "requestType")] - fn request_type_shim(this: &UsbControlTransferParameters, val: UsbRequestType); + fn set_request_type_shim(this: &UsbControlTransferParameters, val: UsbRequestType); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &UsbControlTransferParameters) -> u16; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &UsbControlTransferParameters, val: u16); + fn set_value_shim(this: &UsbControlTransferParameters, val: u16); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `UsbControlTransferParameters` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] +pub trait UsbControlTransferParametersGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `index` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn index(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "UsbRecipient")] + #[doc = "Get the `recipient` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRecipient`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn recipient(&self) -> UsbRecipient; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `request` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn request(&self) -> u8; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "UsbRequestType")] + #[doc = "Get the `requestType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`, `UsbRequestType`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn request_type(&self) -> UsbRequestType; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbControlTransferParameters`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn value(&self) -> u16; +} +#[cfg(web_sys_unstable_apis)] +impl UsbControlTransferParametersGetters for UsbControlTransferParameters { + #[cfg(web_sys_unstable_apis)] + fn index(&self) -> u16 { + self.index_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "UsbRecipient")] + fn recipient(&self) -> UsbRecipient { + self.recipient_shim() + } + #[cfg(web_sys_unstable_apis)] + fn request(&self) -> u8 { + self.request_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "UsbRequestType")] + fn request_type(&self) -> UsbRequestType { + self.request_type_shim() + } + #[cfg(web_sys_unstable_apis)] + fn value(&self) -> u16 { + self.value_shim() + } } #[cfg(web_sys_unstable_apis)] impl UsbControlTransferParameters { @@ -45,11 +130,11 @@ impl UsbControlTransferParameters { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.index(index); - ret.recipient(recipient); - ret.request(request); - ret.request_type(request_type); - ret.value(value); + Self::index(&mut ret, index); + Self::recipient(&mut ret, recipient); + Self::request(&mut ret, request); + Self::request_type(&mut ret, request_type); + Self::value(&mut ret, value); ret } #[cfg(web_sys_unstable_apis)] @@ -60,7 +145,7 @@ impl UsbControlTransferParameters { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn index(&mut self, val: u16) -> &mut Self { - self.index_shim(val); + self.set_index_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -72,7 +157,7 @@ impl UsbControlTransferParameters { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn recipient(&mut self, val: UsbRecipient) -> &mut Self { - self.recipient_shim(val); + self.set_recipient_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -83,7 +168,7 @@ impl UsbControlTransferParameters { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn request(&mut self, val: u8) -> &mut Self { - self.request_shim(val); + self.set_request_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -95,7 +180,7 @@ impl UsbControlTransferParameters { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn request_type(&mut self, val: UsbRequestType) -> &mut Self { - self.request_type_shim(val); + self.set_request_type_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -106,7 +191,7 @@ impl UsbControlTransferParameters { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn value(&mut self, val: u16) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbDeviceFilter.rs b/crates/web-sys/src/features/gen_UsbDeviceFilter.rs index 1dcc503db30..3e0fa49e04c 100644 --- a/crates/web-sys/src/features/gen_UsbDeviceFilter.rs +++ b/crates/web-sys/src/features/gen_UsbDeviceFilter.rs @@ -14,18 +14,111 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbDeviceFilter; + #[wasm_bindgen(method, getter = "classCode")] + fn class_code_shim(this: &UsbDeviceFilter) -> u8; #[wasm_bindgen(method, setter = "classCode")] - fn class_code_shim(this: &UsbDeviceFilter, val: u8); + fn set_class_code_shim(this: &UsbDeviceFilter, val: u8); + #[wasm_bindgen(method, getter = "productId")] + fn product_id_shim(this: &UsbDeviceFilter) -> u16; #[wasm_bindgen(method, setter = "productId")] - fn product_id_shim(this: &UsbDeviceFilter, val: u16); + fn set_product_id_shim(this: &UsbDeviceFilter, val: u16); + #[wasm_bindgen(method, getter = "protocolCode")] + fn protocol_code_shim(this: &UsbDeviceFilter) -> u8; #[wasm_bindgen(method, setter = "protocolCode")] - fn protocol_code_shim(this: &UsbDeviceFilter, val: u8); + fn set_protocol_code_shim(this: &UsbDeviceFilter, val: u8); + #[wasm_bindgen(method, getter = "serialNumber")] + fn serial_number_shim(this: &UsbDeviceFilter) -> String; #[wasm_bindgen(method, setter = "serialNumber")] - fn serial_number_shim(this: &UsbDeviceFilter, val: &str); + fn set_serial_number_shim(this: &UsbDeviceFilter, val: &str); + #[wasm_bindgen(method, getter = "subclassCode")] + fn subclass_code_shim(this: &UsbDeviceFilter) -> u8; #[wasm_bindgen(method, setter = "subclassCode")] - fn subclass_code_shim(this: &UsbDeviceFilter, val: u8); + fn set_subclass_code_shim(this: &UsbDeviceFilter, val: u8); + #[wasm_bindgen(method, getter = "vendorId")] + fn vendor_id_shim(this: &UsbDeviceFilter) -> u16; #[wasm_bindgen(method, setter = "vendorId")] - fn vendor_id_shim(this: &UsbDeviceFilter, val: u16); + fn set_vendor_id_shim(this: &UsbDeviceFilter, val: u16); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `UsbDeviceFilter` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] +pub trait UsbDeviceFilterGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `classCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn class_code(&self) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `productId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn product_id(&self) -> u16; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `protocolCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn protocol_code(&self) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `serialNumber` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn serial_number(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `subclassCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn subclass_code(&self) -> u8; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `vendorId` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceFilter`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn vendor_id(&self) -> u16; +} +#[cfg(web_sys_unstable_apis)] +impl UsbDeviceFilterGetters for UsbDeviceFilter { + #[cfg(web_sys_unstable_apis)] + fn class_code(&self) -> u8 { + self.class_code_shim() + } + #[cfg(web_sys_unstable_apis)] + fn product_id(&self) -> u16 { + self.product_id_shim() + } + #[cfg(web_sys_unstable_apis)] + fn protocol_code(&self) -> u8 { + self.protocol_code_shim() + } + #[cfg(web_sys_unstable_apis)] + fn serial_number(&self) -> String { + self.serial_number_shim() + } + #[cfg(web_sys_unstable_apis)] + fn subclass_code(&self) -> u8 { + self.subclass_code_shim() + } + #[cfg(web_sys_unstable_apis)] + fn vendor_id(&self) -> u16 { + self.vendor_id_shim() + } } #[cfg(web_sys_unstable_apis)] impl UsbDeviceFilter { @@ -48,7 +141,7 @@ impl UsbDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn class_code(&mut self, val: u8) -> &mut Self { - self.class_code_shim(val); + self.set_class_code_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -59,7 +152,7 @@ impl UsbDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn product_id(&mut self, val: u16) -> &mut Self { - self.product_id_shim(val); + self.set_product_id_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +163,7 @@ impl UsbDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn protocol_code(&mut self, val: u8) -> &mut Self { - self.protocol_code_shim(val); + self.set_protocol_code_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +174,7 @@ impl UsbDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn serial_number(&mut self, val: &str) -> &mut Self { - self.serial_number_shim(val); + self.set_serial_number_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -92,7 +185,7 @@ impl UsbDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn subclass_code(&mut self, val: u8) -> &mut Self { - self.subclass_code_shim(val); + self.set_subclass_code_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -103,7 +196,7 @@ impl UsbDeviceFilter { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn vendor_id(&mut self, val: u16) -> &mut Self { - self.vendor_id_shim(val); + self.set_vendor_id_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs b/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs index 7d05fe0b907..a800f84e686 100644 --- a/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs +++ b/crates/web-sys/src/features/gen_UsbDeviceRequestOptions.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbDeviceRequestOptions; + #[wasm_bindgen(method, getter = "filters")] + fn filters_shim(this: &UsbDeviceRequestOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &UsbDeviceRequestOptions, val: &::wasm_bindgen::JsValue); + fn set_filters_shim(this: &UsbDeviceRequestOptions, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `UsbDeviceRequestOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UsbDeviceRequestOptions`*"] +pub trait UsbDeviceRequestOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbDeviceRequestOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn filters(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl UsbDeviceRequestOptionsGetters for UsbDeviceRequestOptions { + #[cfg(web_sys_unstable_apis)] + fn filters(&self) -> ::js_sys::Array { + self.filters_shim() + } } #[cfg(web_sys_unstable_apis)] impl UsbDeviceRequestOptions { @@ -28,7 +51,7 @@ impl UsbDeviceRequestOptions { pub fn new(filters: &::wasm_bindgen::JsValue) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.filters(filters); + Self::filters(&mut ret, filters); ret } #[cfg(web_sys_unstable_apis)] @@ -39,7 +62,7 @@ impl UsbDeviceRequestOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs b/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs index 5688bc47d1f..ffb9cd2dde7 100644 --- a/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_UsbPermissionDescriptor.rs @@ -15,10 +15,50 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbPermissionDescriptor; #[cfg(feature = "PermissionName")] + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &UsbPermissionDescriptor) -> PermissionName; + #[cfg(feature = "PermissionName")] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &UsbPermissionDescriptor, val: PermissionName); + fn set_name_shim(this: &UsbPermissionDescriptor, val: PermissionName); + #[wasm_bindgen(method, getter = "filters")] + fn filters_shim(this: &UsbPermissionDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "filters")] - fn filters_shim(this: &UsbPermissionDescriptor, val: &::wasm_bindgen::JsValue); + fn set_filters_shim(this: &UsbPermissionDescriptor, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `UsbPermissionDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UsbPermissionDescriptor`*"] +pub trait UsbPermissionDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `UsbPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name(&self) -> PermissionName; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `filters` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn filters(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl UsbPermissionDescriptorGetters for UsbPermissionDescriptor { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + fn name(&self) -> PermissionName { + self.name_shim() + } + #[cfg(web_sys_unstable_apis)] + fn filters(&self) -> ::js_sys::Array { + self.filters_shim() + } } #[cfg(web_sys_unstable_apis)] impl UsbPermissionDescriptor { @@ -32,7 +72,7 @@ impl UsbPermissionDescriptor { pub fn new(name: PermissionName) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[cfg(web_sys_unstable_apis)] @@ -44,7 +84,7 @@ impl UsbPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +95,7 @@ impl UsbPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn filters(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.filters_shim(val); + self.set_filters_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UsbPermissionStorage.rs b/crates/web-sys/src/features/gen_UsbPermissionStorage.rs index 7fee5379ed9..b19a791e75a 100644 --- a/crates/web-sys/src/features/gen_UsbPermissionStorage.rs +++ b/crates/web-sys/src/features/gen_UsbPermissionStorage.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type UsbPermissionStorage; + #[wasm_bindgen(method, getter = "allowedDevices")] + fn allowed_devices_shim(this: &UsbPermissionStorage) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "allowedDevices")] - fn allowed_devices_shim(this: &UsbPermissionStorage, val: &::wasm_bindgen::JsValue); + fn set_allowed_devices_shim(this: &UsbPermissionStorage, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `UsbPermissionStorage` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UsbPermissionStorage`*"] +pub trait UsbPermissionStorageGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowedDevices` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UsbPermissionStorage`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn allowed_devices(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl UsbPermissionStorageGetters for UsbPermissionStorage { + #[cfg(web_sys_unstable_apis)] + fn allowed_devices(&self) -> ::js_sys::Array { + self.allowed_devices_shim() + } } #[cfg(web_sys_unstable_apis)] impl UsbPermissionStorage { @@ -38,7 +61,7 @@ impl UsbPermissionStorage { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn allowed_devices(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.allowed_devices_shim(val); + self.set_allowed_devices_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_UserProximityEventInit.rs b/crates/web-sys/src/features/gen_UserProximityEventInit.rs index 7ab52a377c8..76b9b3e034f 100644 --- a/crates/web-sys/src/features/gen_UserProximityEventInit.rs +++ b/crates/web-sys/src/features/gen_UserProximityEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] pub type UserProximityEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &UserProximityEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &UserProximityEventInit, val: bool); + fn set_bubbles_shim(this: &UserProximityEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &UserProximityEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &UserProximityEventInit, val: bool); + fn set_cancelable_shim(this: &UserProximityEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &UserProximityEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &UserProximityEventInit, val: bool); + fn set_composed_shim(this: &UserProximityEventInit, val: bool); + #[wasm_bindgen(method, getter = "near")] + fn near_shim(this: &UserProximityEventInit) -> bool; #[wasm_bindgen(method, setter = "near")] - fn near_shim(this: &UserProximityEventInit, val: bool); + fn set_near_shim(this: &UserProximityEventInit, val: bool); +} +#[doc = "The trait to access properties on the `UserProximityEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] +pub trait UserProximityEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `near` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] + fn near(&self) -> bool; +} +impl UserProximityEventInitGetters for UserProximityEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn near(&self) -> bool { + self.near_shim() + } } impl UserProximityEventInit { #[doc = "Construct a new `UserProximityEventInit`."] @@ -32,28 +75,28 @@ impl UserProximityEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `near` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `UserProximityEventInit`*"] pub fn near(&mut self, val: bool) -> &mut Self { - self.near_shim(val); + self.set_near_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_ValueEventInit.rs b/crates/web-sys/src/features/gen_ValueEventInit.rs index 0e095a187a1..8016a990713 100644 --- a/crates/web-sys/src/features/gen_ValueEventInit.rs +++ b/crates/web-sys/src/features/gen_ValueEventInit.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type ValueEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &ValueEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &ValueEventInit, val: bool); + fn set_bubbles_shim(this: &ValueEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &ValueEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &ValueEventInit, val: bool); + fn set_cancelable_shim(this: &ValueEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &ValueEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &ValueEventInit, val: bool); + fn set_composed_shim(this: &ValueEventInit, val: bool); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &ValueEventInit) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &ValueEventInit, val: &::wasm_bindgen::JsValue); + fn set_value_shim(this: &ValueEventInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `ValueEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] +pub trait ValueEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ValueEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn value(&self) -> ::wasm_bindgen::JsValue; +} +#[cfg(web_sys_unstable_apis)] +impl ValueEventInitGetters for ValueEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + fn value(&self) -> ::wasm_bindgen::JsValue { + self.value_shim() + } } #[cfg(web_sys_unstable_apis)] impl ValueEventInit { @@ -44,7 +109,7 @@ impl ValueEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +120,7 @@ impl ValueEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +131,7 @@ impl ValueEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +142,7 @@ impl ValueEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn value(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs b/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs index e2615680a89..bc3f600eb95 100644 --- a/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs +++ b/crates/web-sys/src/features/gen_VideoColorSpaceInit.rs @@ -14,17 +14,91 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoColorSpaceInit; + #[wasm_bindgen(method, getter = "fullRange")] + fn full_range_shim(this: &VideoColorSpaceInit) -> bool; #[wasm_bindgen(method, setter = "fullRange")] - fn full_range_shim(this: &VideoColorSpaceInit, val: bool); + fn set_full_range_shim(this: &VideoColorSpaceInit, val: bool); + #[cfg(feature = "VideoMatrixCoefficients")] + #[wasm_bindgen(method, getter = "matrix")] + fn matrix_shim(this: &VideoColorSpaceInit) -> VideoMatrixCoefficients; #[cfg(feature = "VideoMatrixCoefficients")] #[wasm_bindgen(method, setter = "matrix")] - fn matrix_shim(this: &VideoColorSpaceInit, val: VideoMatrixCoefficients); + fn set_matrix_shim(this: &VideoColorSpaceInit, val: VideoMatrixCoefficients); + #[cfg(feature = "VideoColorPrimaries")] + #[wasm_bindgen(method, getter = "primaries")] + fn primaries_shim(this: &VideoColorSpaceInit) -> VideoColorPrimaries; #[cfg(feature = "VideoColorPrimaries")] #[wasm_bindgen(method, setter = "primaries")] - fn primaries_shim(this: &VideoColorSpaceInit, val: VideoColorPrimaries); + fn set_primaries_shim(this: &VideoColorSpaceInit, val: VideoColorPrimaries); + #[cfg(feature = "VideoTransferCharacteristics")] + #[wasm_bindgen(method, getter = "transfer")] + fn transfer_shim(this: &VideoColorSpaceInit) -> VideoTransferCharacteristics; #[cfg(feature = "VideoTransferCharacteristics")] #[wasm_bindgen(method, setter = "transfer")] - fn transfer_shim(this: &VideoColorSpaceInit, val: VideoTransferCharacteristics); + fn set_transfer_shim(this: &VideoColorSpaceInit, val: VideoTransferCharacteristics); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoColorSpaceInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"] +pub trait VideoColorSpaceInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `fullRange` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn full_range(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoMatrixCoefficients")] + #[doc = "Get the `matrix` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoMatrixCoefficients`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn matrix(&self) -> VideoMatrixCoefficients; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorPrimaries")] + #[doc = "Get the `primaries` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorPrimaries`, `VideoColorSpaceInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn primaries(&self) -> VideoColorPrimaries; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoTransferCharacteristics")] + #[doc = "Get the `transfer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoTransferCharacteristics`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn transfer(&self) -> VideoTransferCharacteristics; +} +#[cfg(web_sys_unstable_apis)] +impl VideoColorSpaceInitGetters for VideoColorSpaceInit { + #[cfg(web_sys_unstable_apis)] + fn full_range(&self) -> bool { + self.full_range_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoMatrixCoefficients")] + fn matrix(&self) -> VideoMatrixCoefficients { + self.matrix_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorPrimaries")] + fn primaries(&self) -> VideoColorPrimaries { + self.primaries_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoTransferCharacteristics")] + fn transfer(&self) -> VideoTransferCharacteristics { + self.transfer_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoColorSpaceInit { @@ -47,7 +121,7 @@ impl VideoColorSpaceInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn full_range(&mut self, val: bool) -> &mut Self { - self.full_range_shim(val); + self.set_full_range_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -59,7 +133,7 @@ impl VideoColorSpaceInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn matrix(&mut self, val: VideoMatrixCoefficients) -> &mut Self { - self.matrix_shim(val); + self.set_matrix_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -71,7 +145,7 @@ impl VideoColorSpaceInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn primaries(&mut self, val: VideoColorPrimaries) -> &mut Self { - self.primaries_shim(val); + self.set_primaries_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -83,7 +157,7 @@ impl VideoColorSpaceInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn transfer(&mut self, val: VideoTransferCharacteristics) -> &mut Self { - self.transfer_shim(val); + self.set_transfer_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoConfiguration.rs b/crates/web-sys/src/features/gen_VideoConfiguration.rs index e3ec5697201..e498fd828a5 100644 --- a/crates/web-sys/src/features/gen_VideoConfiguration.rs +++ b/crates/web-sys/src/features/gen_VideoConfiguration.rs @@ -10,16 +10,68 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] pub type VideoConfiguration; + #[wasm_bindgen(method, getter = "bitrate")] + fn bitrate_shim(this: &VideoConfiguration) -> f64; #[wasm_bindgen(method, setter = "bitrate")] - fn bitrate_shim(this: &VideoConfiguration, val: f64); + fn set_bitrate_shim(this: &VideoConfiguration, val: f64); + #[wasm_bindgen(method, getter = "contentType")] + fn content_type_shim(this: &VideoConfiguration) -> String; #[wasm_bindgen(method, setter = "contentType")] - fn content_type_shim(this: &VideoConfiguration, val: &str); + fn set_content_type_shim(this: &VideoConfiguration, val: &str); + #[wasm_bindgen(method, getter = "framerate")] + fn framerate_shim(this: &VideoConfiguration) -> String; #[wasm_bindgen(method, setter = "framerate")] - fn framerate_shim(this: &VideoConfiguration, val: &str); + fn set_framerate_shim(this: &VideoConfiguration, val: &str); + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &VideoConfiguration) -> u32; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &VideoConfiguration, val: u32); + fn set_height_shim(this: &VideoConfiguration, val: u32); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &VideoConfiguration) -> u32; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &VideoConfiguration, val: u32); + fn set_width_shim(this: &VideoConfiguration, val: u32); +} +#[doc = "The trait to access properties on the `VideoConfiguration` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] +pub trait VideoConfigurationGetters { + #[doc = "Get the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + fn bitrate(&self) -> f64; + #[doc = "Get the `contentType` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + fn content_type(&self) -> String; + #[doc = "Get the `framerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + fn framerate(&self) -> String; + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + fn height(&self) -> u32; + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] + fn width(&self) -> u32; +} +impl VideoConfigurationGetters for VideoConfiguration { + fn bitrate(&self) -> f64 { + self.bitrate_shim() + } + fn content_type(&self) -> String { + self.content_type_shim() + } + fn framerate(&self) -> String { + self.framerate_shim() + } + fn height(&self) -> u32 { + self.height_shim() + } + fn width(&self) -> u32 { + self.width_shim() + } } impl VideoConfiguration { #[doc = "Construct a new `VideoConfiguration`."] @@ -34,35 +86,35 @@ impl VideoConfiguration { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] pub fn bitrate(&mut self, val: f64) -> &mut Self { - self.bitrate_shim(val); + self.set_bitrate_shim(val); self } #[doc = "Change the `contentType` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] pub fn content_type(&mut self, val: &str) -> &mut Self { - self.content_type_shim(val); + self.set_content_type_shim(val); self } #[doc = "Change the `framerate` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] pub fn framerate(&mut self, val: &str) -> &mut Self { - self.framerate_shim(val); + self.set_framerate_shim(val); self } #[doc = "Change the `height` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] pub fn height(&mut self, val: u32) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[doc = "Change the `width` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"] pub fn width(&mut self, val: u32) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoDecoderConfig.rs b/crates/web-sys/src/features/gen_VideoDecoderConfig.rs index 6dba5389dd5..2f9ea67f263 100644 --- a/crates/web-sys/src/features/gen_VideoDecoderConfig.rs +++ b/crates/web-sys/src/features/gen_VideoDecoderConfig.rs @@ -14,26 +14,167 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoDecoderConfig; + #[wasm_bindgen(method, getter = "codec")] + fn codec_shim(this: &VideoDecoderConfig) -> String; #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &VideoDecoderConfig, val: &str); + fn set_codec_shim(this: &VideoDecoderConfig, val: &str); + #[wasm_bindgen(method, getter = "codedHeight")] + fn coded_height_shim(this: &VideoDecoderConfig) -> u32; #[wasm_bindgen(method, setter = "codedHeight")] - fn coded_height_shim(this: &VideoDecoderConfig, val: u32); + fn set_coded_height_shim(this: &VideoDecoderConfig, val: u32); + #[wasm_bindgen(method, getter = "codedWidth")] + fn coded_width_shim(this: &VideoDecoderConfig) -> u32; #[wasm_bindgen(method, setter = "codedWidth")] - fn coded_width_shim(this: &VideoDecoderConfig, val: u32); + fn set_coded_width_shim(this: &VideoDecoderConfig, val: u32); + #[cfg(feature = "VideoColorSpaceInit")] + #[wasm_bindgen(method, getter = "colorSpace")] + fn color_space_shim(this: &VideoDecoderConfig) -> VideoColorSpaceInit; #[cfg(feature = "VideoColorSpaceInit")] #[wasm_bindgen(method, setter = "colorSpace")] - fn color_space_shim(this: &VideoDecoderConfig, val: &VideoColorSpaceInit); + fn set_color_space_shim(this: &VideoDecoderConfig, val: &VideoColorSpaceInit); + #[wasm_bindgen(method, getter = "description")] + fn description_shim(this: &VideoDecoderConfig) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &VideoDecoderConfig, val: &::js_sys::Object); + fn set_description_shim(this: &VideoDecoderConfig, val: &::js_sys::Object); + #[wasm_bindgen(method, getter = "displayAspectHeight")] + fn display_aspect_height_shim(this: &VideoDecoderConfig) -> u32; #[wasm_bindgen(method, setter = "displayAspectHeight")] - fn display_aspect_height_shim(this: &VideoDecoderConfig, val: u32); + fn set_display_aspect_height_shim(this: &VideoDecoderConfig, val: u32); + #[wasm_bindgen(method, getter = "displayAspectWidth")] + fn display_aspect_width_shim(this: &VideoDecoderConfig) -> u32; #[wasm_bindgen(method, setter = "displayAspectWidth")] - fn display_aspect_width_shim(this: &VideoDecoderConfig, val: u32); + fn set_display_aspect_width_shim(this: &VideoDecoderConfig, val: u32); + #[cfg(feature = "HardwareAcceleration")] + #[wasm_bindgen(method, getter = "hardwareAcceleration")] + fn hardware_acceleration_shim(this: &VideoDecoderConfig) -> HardwareAcceleration; #[cfg(feature = "HardwareAcceleration")] #[wasm_bindgen(method, setter = "hardwareAcceleration")] - fn hardware_acceleration_shim(this: &VideoDecoderConfig, val: HardwareAcceleration); + fn set_hardware_acceleration_shim(this: &VideoDecoderConfig, val: HardwareAcceleration); + #[wasm_bindgen(method, getter = "optimizeForLatency")] + fn optimize_for_latency_shim(this: &VideoDecoderConfig) -> bool; #[wasm_bindgen(method, setter = "optimizeForLatency")] - fn optimize_for_latency_shim(this: &VideoDecoderConfig, val: bool); + fn set_optimize_for_latency_shim(this: &VideoDecoderConfig, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoDecoderConfig` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] +pub trait VideoDecoderConfigGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn codec(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codedHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn coded_height(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codedWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn coded_width(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorSpaceInit")] + #[doc = "Get the `colorSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn color_space(&self) -> VideoColorSpaceInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn description(&self) -> ::js_sys::Object; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayAspectHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn display_aspect_height(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayAspectWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn display_aspect_width(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HardwareAcceleration")] + #[doc = "Get the `hardwareAcceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn hardware_acceleration(&self) -> HardwareAcceleration; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optimizeForLatency` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn optimize_for_latency(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl VideoDecoderConfigGetters for VideoDecoderConfig { + #[cfg(web_sys_unstable_apis)] + fn codec(&self) -> String { + self.codec_shim() + } + #[cfg(web_sys_unstable_apis)] + fn coded_height(&self) -> u32 { + self.coded_height_shim() + } + #[cfg(web_sys_unstable_apis)] + fn coded_width(&self) -> u32 { + self.coded_width_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorSpaceInit")] + fn color_space(&self) -> VideoColorSpaceInit { + self.color_space_shim() + } + #[cfg(web_sys_unstable_apis)] + fn description(&self) -> ::js_sys::Object { + self.description_shim() + } + #[cfg(web_sys_unstable_apis)] + fn display_aspect_height(&self) -> u32 { + self.display_aspect_height_shim() + } + #[cfg(web_sys_unstable_apis)] + fn display_aspect_width(&self) -> u32 { + self.display_aspect_width_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HardwareAcceleration")] + fn hardware_acceleration(&self) -> HardwareAcceleration { + self.hardware_acceleration_shim() + } + #[cfg(web_sys_unstable_apis)] + fn optimize_for_latency(&self) -> bool { + self.optimize_for_latency_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoDecoderConfig { @@ -46,7 +187,7 @@ impl VideoDecoderConfig { pub fn new(codec: &str) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.codec(codec); + Self::codec(&mut ret, codec); ret } #[cfg(web_sys_unstable_apis)] @@ -57,7 +198,7 @@ impl VideoDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); + self.set_codec_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +209,7 @@ impl VideoDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn coded_height(&mut self, val: u32) -> &mut Self { - self.coded_height_shim(val); + self.set_coded_height_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -79,7 +220,7 @@ impl VideoDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn coded_width(&mut self, val: u32) -> &mut Self { - self.coded_width_shim(val); + self.set_coded_width_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -91,7 +232,7 @@ impl VideoDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self { - self.color_space_shim(val); + self.set_color_space_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -102,7 +243,7 @@ impl VideoDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn description(&mut self, val: &::js_sys::Object) -> &mut Self { - self.description_shim(val); + self.set_description_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -113,7 +254,7 @@ impl VideoDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn display_aspect_height(&mut self, val: u32) -> &mut Self { - self.display_aspect_height_shim(val); + self.set_display_aspect_height_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -124,7 +265,7 @@ impl VideoDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn display_aspect_width(&mut self, val: u32) -> &mut Self { - self.display_aspect_width_shim(val); + self.set_display_aspect_width_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -136,7 +277,7 @@ impl VideoDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self { - self.hardware_acceleration_shim(val); + self.set_hardware_acceleration_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -147,7 +288,7 @@ impl VideoDecoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn optimize_for_latency(&mut self, val: bool) -> &mut Self { - self.optimize_for_latency_shim(val); + self.set_optimize_for_latency_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoDecoderInit.rs b/crates/web-sys/src/features/gen_VideoDecoderInit.rs index a4b15fb60ba..55216490356 100644 --- a/crates/web-sys/src/features/gen_VideoDecoderInit.rs +++ b/crates/web-sys/src/features/gen_VideoDecoderInit.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoDecoderInit; + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &VideoDecoderInit) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &VideoDecoderInit, val: &::js_sys::Function); + fn set_error_shim(this: &VideoDecoderInit, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "output")] + fn output_shim(this: &VideoDecoderInit) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "output")] - fn output_shim(this: &VideoDecoderInit, val: &::js_sys::Function); + fn set_output_shim(this: &VideoDecoderInit, val: &::js_sys::Function); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoDecoderInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] +pub trait VideoDecoderInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn error(&self) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn output(&self) -> ::js_sys::Function; +} +#[cfg(web_sys_unstable_apis)] +impl VideoDecoderInitGetters for VideoDecoderInit { + #[cfg(web_sys_unstable_apis)] + fn error(&self) -> ::js_sys::Function { + self.error_shim() + } + #[cfg(web_sys_unstable_apis)] + fn output(&self) -> ::js_sys::Function { + self.output_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoDecoderInit { @@ -30,8 +67,8 @@ impl VideoDecoderInit { pub fn new(error: &::js_sys::Function, output: &::js_sys::Function) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.error(error); - ret.output(output); + Self::error(&mut ret, error); + Self::output(&mut ret, output); ret } #[cfg(web_sys_unstable_apis)] @@ -42,7 +79,7 @@ impl VideoDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +90,7 @@ impl VideoDecoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { - self.output_shim(val); + self.set_output_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoDecoderSupport.rs b/crates/web-sys/src/features/gen_VideoDecoderSupport.rs index 25c91ef0900..a192142909a 100644 --- a/crates/web-sys/src/features/gen_VideoDecoderSupport.rs +++ b/crates/web-sys/src/features/gen_VideoDecoderSupport.rs @@ -15,10 +15,50 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoDecoderSupport; #[cfg(feature = "VideoDecoderConfig")] + #[wasm_bindgen(method, getter = "config")] + fn config_shim(this: &VideoDecoderSupport) -> VideoDecoderConfig; + #[cfg(feature = "VideoDecoderConfig")] #[wasm_bindgen(method, setter = "config")] - fn config_shim(this: &VideoDecoderSupport, val: &VideoDecoderConfig); + fn set_config_shim(this: &VideoDecoderSupport, val: &VideoDecoderConfig); + #[wasm_bindgen(method, getter = "supported")] + fn supported_shim(this: &VideoDecoderSupport) -> bool; #[wasm_bindgen(method, setter = "supported")] - fn supported_shim(this: &VideoDecoderSupport, val: bool); + fn set_supported_shim(this: &VideoDecoderSupport, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoDecoderSupport` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoDecoderSupport`*"] +pub trait VideoDecoderSupportGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoDecoderConfig")] + #[doc = "Get the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderConfig`, `VideoDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn config(&self) -> VideoDecoderConfig; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoDecoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn supported(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl VideoDecoderSupportGetters for VideoDecoderSupport { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoDecoderConfig")] + fn config(&self) -> VideoDecoderConfig { + self.config_shim() + } + #[cfg(web_sys_unstable_apis)] + fn supported(&self) -> bool { + self.supported_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoDecoderSupport { @@ -42,7 +82,7 @@ impl VideoDecoderSupport { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn config(&mut self, val: &VideoDecoderConfig) -> &mut Self { - self.config_shim(val); + self.set_config_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +93,7 @@ impl VideoDecoderSupport { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn supported(&mut self, val: bool) -> &mut Self { - self.supported_shim(val); + self.set_supported_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoEncoderConfig.rs b/crates/web-sys/src/features/gen_VideoEncoderConfig.rs index e546329b66e..d0082477ebf 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderConfig.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderConfig.rs @@ -15,30 +15,202 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoEncoderConfig; #[cfg(feature = "AlphaOption")] + #[wasm_bindgen(method, getter = "alpha")] + fn alpha_shim(this: &VideoEncoderConfig) -> AlphaOption; + #[cfg(feature = "AlphaOption")] #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &VideoEncoderConfig, val: AlphaOption); + fn set_alpha_shim(this: &VideoEncoderConfig, val: AlphaOption); + #[wasm_bindgen(method, getter = "bitrate")] + fn bitrate_shim(this: &VideoEncoderConfig) -> f64; #[wasm_bindgen(method, setter = "bitrate")] - fn bitrate_shim(this: &VideoEncoderConfig, val: f64); + fn set_bitrate_shim(this: &VideoEncoderConfig, val: f64); + #[wasm_bindgen(method, getter = "codec")] + fn codec_shim(this: &VideoEncoderConfig) -> String; #[wasm_bindgen(method, setter = "codec")] - fn codec_shim(this: &VideoEncoderConfig, val: &str); + fn set_codec_shim(this: &VideoEncoderConfig, val: &str); + #[wasm_bindgen(method, getter = "displayHeight")] + fn display_height_shim(this: &VideoEncoderConfig) -> u32; #[wasm_bindgen(method, setter = "displayHeight")] - fn display_height_shim(this: &VideoEncoderConfig, val: u32); + fn set_display_height_shim(this: &VideoEncoderConfig, val: u32); + #[wasm_bindgen(method, getter = "displayWidth")] + fn display_width_shim(this: &VideoEncoderConfig) -> u32; #[wasm_bindgen(method, setter = "displayWidth")] - fn display_width_shim(this: &VideoEncoderConfig, val: u32); + fn set_display_width_shim(this: &VideoEncoderConfig, val: u32); + #[wasm_bindgen(method, getter = "framerate")] + fn framerate_shim(this: &VideoEncoderConfig) -> f64; #[wasm_bindgen(method, setter = "framerate")] - fn framerate_shim(this: &VideoEncoderConfig, val: f64); + fn set_framerate_shim(this: &VideoEncoderConfig, val: f64); + #[cfg(feature = "HardwareAcceleration")] + #[wasm_bindgen(method, getter = "hardwareAcceleration")] + fn hardware_acceleration_shim(this: &VideoEncoderConfig) -> HardwareAcceleration; #[cfg(feature = "HardwareAcceleration")] #[wasm_bindgen(method, setter = "hardwareAcceleration")] - fn hardware_acceleration_shim(this: &VideoEncoderConfig, val: HardwareAcceleration); + fn set_hardware_acceleration_shim(this: &VideoEncoderConfig, val: HardwareAcceleration); + #[wasm_bindgen(method, getter = "height")] + fn height_shim(this: &VideoEncoderConfig) -> u32; #[wasm_bindgen(method, setter = "height")] - fn height_shim(this: &VideoEncoderConfig, val: u32); + fn set_height_shim(this: &VideoEncoderConfig, val: u32); + #[cfg(feature = "LatencyMode")] + #[wasm_bindgen(method, getter = "latencyMode")] + fn latency_mode_shim(this: &VideoEncoderConfig) -> LatencyMode; #[cfg(feature = "LatencyMode")] #[wasm_bindgen(method, setter = "latencyMode")] - fn latency_mode_shim(this: &VideoEncoderConfig, val: LatencyMode); + fn set_latency_mode_shim(this: &VideoEncoderConfig, val: LatencyMode); + #[wasm_bindgen(method, getter = "scalabilityMode")] + fn scalability_mode_shim(this: &VideoEncoderConfig) -> String; #[wasm_bindgen(method, setter = "scalabilityMode")] - fn scalability_mode_shim(this: &VideoEncoderConfig, val: &str); + fn set_scalability_mode_shim(this: &VideoEncoderConfig, val: &str); + #[wasm_bindgen(method, getter = "width")] + fn width_shim(this: &VideoEncoderConfig) -> u32; #[wasm_bindgen(method, setter = "width")] - fn width_shim(this: &VideoEncoderConfig, val: u32); + fn set_width_shim(this: &VideoEncoderConfig, val: u32); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoEncoderConfig` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] +pub trait VideoEncoderConfigGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AlphaOption")] + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn alpha(&self) -> AlphaOption; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bitrate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bitrate(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codec` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn codec(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn display_height(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn display_width(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `framerate` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn framerate(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HardwareAcceleration")] + #[doc = "Get the `hardwareAcceleration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn hardware_acceleration(&self) -> HardwareAcceleration; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `height` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn height(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LatencyMode")] + #[doc = "Get the `latencyMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `LatencyMode`, `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn latency_mode(&self) -> LatencyMode; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `scalabilityMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn scalability_mode(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `width` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn width(&self) -> u32; +} +#[cfg(web_sys_unstable_apis)] +impl VideoEncoderConfigGetters for VideoEncoderConfig { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AlphaOption")] + fn alpha(&self) -> AlphaOption { + self.alpha_shim() + } + #[cfg(web_sys_unstable_apis)] + fn bitrate(&self) -> f64 { + self.bitrate_shim() + } + #[cfg(web_sys_unstable_apis)] + fn codec(&self) -> String { + self.codec_shim() + } + #[cfg(web_sys_unstable_apis)] + fn display_height(&self) -> u32 { + self.display_height_shim() + } + #[cfg(web_sys_unstable_apis)] + fn display_width(&self) -> u32 { + self.display_width_shim() + } + #[cfg(web_sys_unstable_apis)] + fn framerate(&self) -> f64 { + self.framerate_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "HardwareAcceleration")] + fn hardware_acceleration(&self) -> HardwareAcceleration { + self.hardware_acceleration_shim() + } + #[cfg(web_sys_unstable_apis)] + fn height(&self) -> u32 { + self.height_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "LatencyMode")] + fn latency_mode(&self) -> LatencyMode { + self.latency_mode_shim() + } + #[cfg(web_sys_unstable_apis)] + fn scalability_mode(&self) -> String { + self.scalability_mode_shim() + } + #[cfg(web_sys_unstable_apis)] + fn width(&self) -> u32 { + self.width_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoEncoderConfig { @@ -51,9 +223,9 @@ impl VideoEncoderConfig { pub fn new(codec: &str, height: u32, width: u32) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.codec(codec); - ret.height(height); - ret.width(width); + Self::codec(&mut ret, codec); + Self::height(&mut ret, height); + Self::width(&mut ret, width); ret } #[cfg(web_sys_unstable_apis)] @@ -65,7 +237,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn alpha(&mut self, val: AlphaOption) -> &mut Self { - self.alpha_shim(val); + self.set_alpha_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -76,7 +248,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bitrate(&mut self, val: f64) -> &mut Self { - self.bitrate_shim(val); + self.set_bitrate_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -87,7 +259,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn codec(&mut self, val: &str) -> &mut Self { - self.codec_shim(val); + self.set_codec_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -98,7 +270,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn display_height(&mut self, val: u32) -> &mut Self { - self.display_height_shim(val); + self.set_display_height_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -109,7 +281,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn display_width(&mut self, val: u32) -> &mut Self { - self.display_width_shim(val); + self.set_display_width_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -120,7 +292,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn framerate(&mut self, val: f64) -> &mut Self { - self.framerate_shim(val); + self.set_framerate_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -132,7 +304,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self { - self.hardware_acceleration_shim(val); + self.set_hardware_acceleration_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -143,7 +315,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn height(&mut self, val: u32) -> &mut Self { - self.height_shim(val); + self.set_height_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -155,7 +327,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn latency_mode(&mut self, val: LatencyMode) -> &mut Self { - self.latency_mode_shim(val); + self.set_latency_mode_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -166,7 +338,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn scalability_mode(&mut self, val: &str) -> &mut Self { - self.scalability_mode_shim(val); + self.set_scalability_mode_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -177,7 +349,7 @@ impl VideoEncoderConfig { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn width(&mut self, val: u32) -> &mut Self { - self.width_shim(val); + self.set_width_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs b/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs index f95a89936ee..1b3e13c11d5 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderEncodeOptions.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoEncoderEncodeOptions; + #[wasm_bindgen(method, getter = "keyFrame")] + fn key_frame_shim(this: &VideoEncoderEncodeOptions) -> bool; #[wasm_bindgen(method, setter = "keyFrame")] - fn key_frame_shim(this: &VideoEncoderEncodeOptions, val: bool); + fn set_key_frame_shim(this: &VideoEncoderEncodeOptions, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoEncoderEncodeOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoEncoderEncodeOptions`*"] +pub trait VideoEncoderEncodeOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `keyFrame` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderEncodeOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn key_frame(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl VideoEncoderEncodeOptionsGetters for VideoEncoderEncodeOptions { + #[cfg(web_sys_unstable_apis)] + fn key_frame(&self) -> bool { + self.key_frame_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoEncoderEncodeOptions { @@ -38,7 +61,7 @@ impl VideoEncoderEncodeOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn key_frame(&mut self, val: bool) -> &mut Self { - self.key_frame_shim(val); + self.set_key_frame_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoEncoderInit.rs b/crates/web-sys/src/features/gen_VideoEncoderInit.rs index cbded7262e9..d3c7087d3c1 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderInit.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderInit.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoEncoderInit; + #[wasm_bindgen(method, getter = "error")] + fn error_shim(this: &VideoEncoderInit) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "error")] - fn error_shim(this: &VideoEncoderInit, val: &::js_sys::Function); + fn set_error_shim(this: &VideoEncoderInit, val: &::js_sys::Function); + #[wasm_bindgen(method, getter = "output")] + fn output_shim(this: &VideoEncoderInit) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "output")] - fn output_shim(this: &VideoEncoderInit, val: &::js_sys::Function); + fn set_output_shim(this: &VideoEncoderInit, val: &::js_sys::Function); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoEncoderInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] +pub trait VideoEncoderInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `error` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn error(&self) -> ::js_sys::Function; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `output` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn output(&self) -> ::js_sys::Function; +} +#[cfg(web_sys_unstable_apis)] +impl VideoEncoderInitGetters for VideoEncoderInit { + #[cfg(web_sys_unstable_apis)] + fn error(&self) -> ::js_sys::Function { + self.error_shim() + } + #[cfg(web_sys_unstable_apis)] + fn output(&self) -> ::js_sys::Function { + self.output_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoEncoderInit { @@ -30,8 +67,8 @@ impl VideoEncoderInit { pub fn new(error: &::js_sys::Function, output: &::js_sys::Function) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.error(error); - ret.output(output); + Self::error(&mut ret, error); + Self::output(&mut ret, output); ret } #[cfg(web_sys_unstable_apis)] @@ -42,7 +79,7 @@ impl VideoEncoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn error(&mut self, val: &::js_sys::Function) -> &mut Self { - self.error_shim(val); + self.set_error_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +90,7 @@ impl VideoEncoderInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn output(&mut self, val: &::js_sys::Function) -> &mut Self { - self.output_shim(val); + self.set_output_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoEncoderSupport.rs b/crates/web-sys/src/features/gen_VideoEncoderSupport.rs index eb438851292..8e2265069d4 100644 --- a/crates/web-sys/src/features/gen_VideoEncoderSupport.rs +++ b/crates/web-sys/src/features/gen_VideoEncoderSupport.rs @@ -15,10 +15,50 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoEncoderSupport; #[cfg(feature = "VideoEncoderConfig")] + #[wasm_bindgen(method, getter = "config")] + fn config_shim(this: &VideoEncoderSupport) -> VideoEncoderConfig; + #[cfg(feature = "VideoEncoderConfig")] #[wasm_bindgen(method, setter = "config")] - fn config_shim(this: &VideoEncoderSupport, val: &VideoEncoderConfig); + fn set_config_shim(this: &VideoEncoderSupport, val: &VideoEncoderConfig); + #[wasm_bindgen(method, getter = "supported")] + fn supported_shim(this: &VideoEncoderSupport) -> bool; #[wasm_bindgen(method, setter = "supported")] - fn supported_shim(this: &VideoEncoderSupport, val: bool); + fn set_supported_shim(this: &VideoEncoderSupport, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoEncoderSupport` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"] +pub trait VideoEncoderSupportGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoEncoderConfig")] + #[doc = "Get the `config` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`, `VideoEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn config(&self) -> VideoEncoderConfig; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `supported` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn supported(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl VideoEncoderSupportGetters for VideoEncoderSupport { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoEncoderConfig")] + fn config(&self) -> VideoEncoderConfig { + self.config_shim() + } + #[cfg(web_sys_unstable_apis)] + fn supported(&self) -> bool { + self.supported_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoEncoderSupport { @@ -42,7 +82,7 @@ impl VideoEncoderSupport { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn config(&mut self, val: &VideoEncoderConfig) -> &mut Self { - self.config_shim(val); + self.set_config_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +93,7 @@ impl VideoEncoderSupport { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn supported(&mut self, val: bool) -> &mut Self { - self.supported_shim(val); + self.set_supported_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs b/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs index f86531d6092..b517350b340 100644 --- a/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs +++ b/crates/web-sys/src/features/gen_VideoFrameBufferInit.rs @@ -14,29 +14,187 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoFrameBufferInit; + #[wasm_bindgen(method, getter = "codedHeight")] + fn coded_height_shim(this: &VideoFrameBufferInit) -> u32; #[wasm_bindgen(method, setter = "codedHeight")] - fn coded_height_shim(this: &VideoFrameBufferInit, val: u32); + fn set_coded_height_shim(this: &VideoFrameBufferInit, val: u32); + #[wasm_bindgen(method, getter = "codedWidth")] + fn coded_width_shim(this: &VideoFrameBufferInit) -> u32; #[wasm_bindgen(method, setter = "codedWidth")] - fn coded_width_shim(this: &VideoFrameBufferInit, val: u32); + fn set_coded_width_shim(this: &VideoFrameBufferInit, val: u32); + #[cfg(feature = "VideoColorSpaceInit")] + #[wasm_bindgen(method, getter = "colorSpace")] + fn color_space_shim(this: &VideoFrameBufferInit) -> VideoColorSpaceInit; #[cfg(feature = "VideoColorSpaceInit")] #[wasm_bindgen(method, setter = "colorSpace")] - fn color_space_shim(this: &VideoFrameBufferInit, val: &VideoColorSpaceInit); + fn set_color_space_shim(this: &VideoFrameBufferInit, val: &VideoColorSpaceInit); + #[wasm_bindgen(method, getter = "displayHeight")] + fn display_height_shim(this: &VideoFrameBufferInit) -> u32; #[wasm_bindgen(method, setter = "displayHeight")] - fn display_height_shim(this: &VideoFrameBufferInit, val: u32); + fn set_display_height_shim(this: &VideoFrameBufferInit, val: u32); + #[wasm_bindgen(method, getter = "displayWidth")] + fn display_width_shim(this: &VideoFrameBufferInit) -> u32; #[wasm_bindgen(method, setter = "displayWidth")] - fn display_width_shim(this: &VideoFrameBufferInit, val: u32); + fn set_display_width_shim(this: &VideoFrameBufferInit, val: u32); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &VideoFrameBufferInit) -> f64; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &VideoFrameBufferInit, val: f64); + fn set_duration_shim(this: &VideoFrameBufferInit, val: f64); + #[cfg(feature = "VideoPixelFormat")] + #[wasm_bindgen(method, getter = "format")] + fn format_shim(this: &VideoFrameBufferInit) -> VideoPixelFormat; #[cfg(feature = "VideoPixelFormat")] #[wasm_bindgen(method, setter = "format")] - fn format_shim(this: &VideoFrameBufferInit, val: VideoPixelFormat); + fn set_format_shim(this: &VideoFrameBufferInit, val: VideoPixelFormat); + #[wasm_bindgen(method, getter = "layout")] + fn layout_shim(this: &VideoFrameBufferInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &VideoFrameBufferInit, val: &::wasm_bindgen::JsValue); + fn set_layout_shim(this: &VideoFrameBufferInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &VideoFrameBufferInit) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &VideoFrameBufferInit, val: f64); + fn set_timestamp_shim(this: &VideoFrameBufferInit, val: f64); + #[cfg(feature = "DomRectInit")] + #[wasm_bindgen(method, getter = "visibleRect")] + fn visible_rect_shim(this: &VideoFrameBufferInit) -> DomRectInit; #[cfg(feature = "DomRectInit")] #[wasm_bindgen(method, setter = "visibleRect")] - fn visible_rect_shim(this: &VideoFrameBufferInit, val: &DomRectInit); + fn set_visible_rect_shim(this: &VideoFrameBufferInit, val: &DomRectInit); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoFrameBufferInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] +pub trait VideoFrameBufferInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codedHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn coded_height(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `codedWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn coded_width(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorSpaceInit")] + #[doc = "Get the `colorSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoColorSpaceInit`, `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn color_space(&self) -> VideoColorSpaceInit; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn display_height(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn display_width(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn duration(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoPixelFormat")] + #[doc = "Get the `format` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`, `VideoPixelFormat`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn format(&self) -> VideoPixelFormat; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn layout(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + #[doc = "Get the `visibleRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameBufferInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn visible_rect(&self) -> DomRectInit; +} +#[cfg(web_sys_unstable_apis)] +impl VideoFrameBufferInitGetters for VideoFrameBufferInit { + #[cfg(web_sys_unstable_apis)] + fn coded_height(&self) -> u32 { + self.coded_height_shim() + } + #[cfg(web_sys_unstable_apis)] + fn coded_width(&self) -> u32 { + self.coded_width_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoColorSpaceInit")] + fn color_space(&self) -> VideoColorSpaceInit { + self.color_space_shim() + } + #[cfg(web_sys_unstable_apis)] + fn display_height(&self) -> u32 { + self.display_height_shim() + } + #[cfg(web_sys_unstable_apis)] + fn display_width(&self) -> u32 { + self.display_width_shim() + } + #[cfg(web_sys_unstable_apis)] + fn duration(&self) -> f64 { + self.duration_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "VideoPixelFormat")] + fn format(&self) -> VideoPixelFormat { + self.format_shim() + } + #[cfg(web_sys_unstable_apis)] + fn layout(&self) -> ::js_sys::Array { + self.layout_shim() + } + #[cfg(web_sys_unstable_apis)] + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + fn visible_rect(&self) -> DomRectInit { + self.visible_rect_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoFrameBufferInit { @@ -55,10 +213,10 @@ impl VideoFrameBufferInit { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.coded_height(coded_height); - ret.coded_width(coded_width); - ret.format(format); - ret.timestamp(timestamp); + Self::coded_height(&mut ret, coded_height); + Self::coded_width(&mut ret, coded_width); + Self::format(&mut ret, format); + Self::timestamp(&mut ret, timestamp); ret } #[cfg(web_sys_unstable_apis)] @@ -69,7 +227,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn coded_height(&mut self, val: u32) -> &mut Self { - self.coded_height_shim(val); + self.set_coded_height_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -80,7 +238,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn coded_width(&mut self, val: u32) -> &mut Self { - self.coded_width_shim(val); + self.set_coded_width_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -92,7 +250,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn color_space(&mut self, val: &VideoColorSpaceInit) -> &mut Self { - self.color_space_shim(val); + self.set_color_space_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -103,7 +261,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn display_height(&mut self, val: u32) -> &mut Self { - self.display_height_shim(val); + self.set_display_height_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -114,7 +272,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn display_width(&mut self, val: u32) -> &mut Self { - self.display_width_shim(val); + self.set_display_width_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -125,7 +283,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -137,7 +295,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn format(&mut self, val: VideoPixelFormat) -> &mut Self { - self.format_shim(val); + self.set_format_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -148,7 +306,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -159,7 +317,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -171,7 +329,7 @@ impl VideoFrameBufferInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn visible_rect(&mut self, val: &DomRectInit) -> &mut Self { - self.visible_rect_shim(val); + self.set_visible_rect_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs b/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs index b4daba7283d..f15b75a1cc7 100644 --- a/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs +++ b/crates/web-sys/src/features/gen_VideoFrameCopyToOptions.rs @@ -14,11 +14,51 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoFrameCopyToOptions; + #[wasm_bindgen(method, getter = "layout")] + fn layout_shim(this: &VideoFrameCopyToOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "layout")] - fn layout_shim(this: &VideoFrameCopyToOptions, val: &::wasm_bindgen::JsValue); + fn set_layout_shim(this: &VideoFrameCopyToOptions, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "DomRectInit")] + #[wasm_bindgen(method, getter = "rect")] + fn rect_shim(this: &VideoFrameCopyToOptions) -> DomRectInit; #[cfg(feature = "DomRectInit")] #[wasm_bindgen(method, setter = "rect")] - fn rect_shim(this: &VideoFrameCopyToOptions, val: &DomRectInit); + fn set_rect_shim(this: &VideoFrameCopyToOptions, val: &DomRectInit); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoFrameCopyToOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"] +pub trait VideoFrameCopyToOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layout` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn layout(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + #[doc = "Get the `rect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameCopyToOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn rect(&self) -> DomRectInit; +} +#[cfg(web_sys_unstable_apis)] +impl VideoFrameCopyToOptionsGetters for VideoFrameCopyToOptions { + #[cfg(web_sys_unstable_apis)] + fn layout(&self) -> ::js_sys::Array { + self.layout_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + fn rect(&self) -> DomRectInit { + self.rect_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoFrameCopyToOptions { @@ -41,7 +81,7 @@ impl VideoFrameCopyToOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn layout(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.layout_shim(val); + self.set_layout_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +93,7 @@ impl VideoFrameCopyToOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn rect(&mut self, val: &DomRectInit) -> &mut Self { - self.rect_shim(val); + self.set_rect_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VideoFrameInit.rs b/crates/web-sys/src/features/gen_VideoFrameInit.rs index 41ece8b8c55..4a063f8dd5f 100644 --- a/crates/web-sys/src/features/gen_VideoFrameInit.rs +++ b/crates/web-sys/src/features/gen_VideoFrameInit.rs @@ -15,19 +15,118 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type VideoFrameInit; #[cfg(feature = "AlphaOption")] + #[wasm_bindgen(method, getter = "alpha")] + fn alpha_shim(this: &VideoFrameInit) -> AlphaOption; + #[cfg(feature = "AlphaOption")] #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &VideoFrameInit, val: AlphaOption); + fn set_alpha_shim(this: &VideoFrameInit, val: AlphaOption); + #[wasm_bindgen(method, getter = "displayHeight")] + fn display_height_shim(this: &VideoFrameInit) -> u32; #[wasm_bindgen(method, setter = "displayHeight")] - fn display_height_shim(this: &VideoFrameInit, val: u32); + fn set_display_height_shim(this: &VideoFrameInit, val: u32); + #[wasm_bindgen(method, getter = "displayWidth")] + fn display_width_shim(this: &VideoFrameInit) -> u32; #[wasm_bindgen(method, setter = "displayWidth")] - fn display_width_shim(this: &VideoFrameInit, val: u32); + fn set_display_width_shim(this: &VideoFrameInit, val: u32); + #[wasm_bindgen(method, getter = "duration")] + fn duration_shim(this: &VideoFrameInit) -> f64; #[wasm_bindgen(method, setter = "duration")] - fn duration_shim(this: &VideoFrameInit, val: f64); + fn set_duration_shim(this: &VideoFrameInit, val: f64); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &VideoFrameInit) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &VideoFrameInit, val: f64); + fn set_timestamp_shim(this: &VideoFrameInit, val: f64); + #[cfg(feature = "DomRectInit")] + #[wasm_bindgen(method, getter = "visibleRect")] + fn visible_rect_shim(this: &VideoFrameInit) -> DomRectInit; #[cfg(feature = "DomRectInit")] #[wasm_bindgen(method, setter = "visibleRect")] - fn visible_rect_shim(this: &VideoFrameInit, val: &DomRectInit); + fn set_visible_rect_shim(this: &VideoFrameInit, val: &DomRectInit); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `VideoFrameInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] +pub trait VideoFrameInitGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AlphaOption")] + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn alpha(&self) -> AlphaOption; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayHeight` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn display_height(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `displayWidth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn display_width(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `duration` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn duration(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + #[doc = "Get the `visibleRect` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomRectInit`, `VideoFrameInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn visible_rect(&self) -> DomRectInit; +} +#[cfg(web_sys_unstable_apis)] +impl VideoFrameInitGetters for VideoFrameInit { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AlphaOption")] + fn alpha(&self) -> AlphaOption { + self.alpha_shim() + } + #[cfg(web_sys_unstable_apis)] + fn display_height(&self) -> u32 { + self.display_height_shim() + } + #[cfg(web_sys_unstable_apis)] + fn display_width(&self) -> u32 { + self.display_width_shim() + } + #[cfg(web_sys_unstable_apis)] + fn duration(&self) -> f64 { + self.duration_shim() + } + #[cfg(web_sys_unstable_apis)] + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "DomRectInit")] + fn visible_rect(&self) -> DomRectInit { + self.visible_rect_shim() + } } #[cfg(web_sys_unstable_apis)] impl VideoFrameInit { @@ -51,7 +150,7 @@ impl VideoFrameInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn alpha(&mut self, val: AlphaOption) -> &mut Self { - self.alpha_shim(val); + self.set_alpha_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -62,7 +161,7 @@ impl VideoFrameInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn display_height(&mut self, val: u32) -> &mut Self { - self.display_height_shim(val); + self.set_display_height_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -73,7 +172,7 @@ impl VideoFrameInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn display_width(&mut self, val: u32) -> &mut Self { - self.display_width_shim(val); + self.set_display_width_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -84,7 +183,7 @@ impl VideoFrameInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn duration(&mut self, val: f64) -> &mut Self { - self.duration_shim(val); + self.set_duration_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -95,7 +194,7 @@ impl VideoFrameInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -107,7 +206,7 @@ impl VideoFrameInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn visible_rect(&mut self, val: &DomRectInit) -> &mut Self { - self.visible_rect_shim(val); + self.set_visible_rect_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VoidCallback.rs b/crates/web-sys/src/features/gen_VoidCallback.rs index 08d9643e49c..35002df5179 100644 --- a/crates/web-sys/src/features/gen_VoidCallback.rs +++ b/crates/web-sys/src/features/gen_VoidCallback.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] pub type VoidCallback; + #[wasm_bindgen(method, getter = "handleEvent")] + fn handle_event_shim(this: &VoidCallback) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "handleEvent")] - fn handle_event_shim(this: &VoidCallback, val: &::js_sys::Function); + fn set_handle_event_shim(this: &VoidCallback, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `VoidCallback` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] +pub trait VoidCallbackGetters { + #[doc = "Get the `handleEvent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] + fn handle_event(&self) -> ::js_sys::Function; +} +impl VoidCallbackGetters for VoidCallback { + fn handle_event(&self) -> ::js_sys::Function { + self.handle_event_shim() + } } impl VoidCallback { #[doc = "Construct a new `VoidCallback`."] @@ -26,7 +42,7 @@ impl VoidCallback { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VoidCallback`*"] pub fn handle_event(&mut self, val: &::js_sys::Function) -> &mut Self { - self.handle_event_shim(val); + self.set_handle_event_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_VrLayer.rs b/crates/web-sys/src/features/gen_VrLayer.rs index fef6d7169ab..cb8150d9eab 100644 --- a/crates/web-sys/src/features/gen_VrLayer.rs +++ b/crates/web-sys/src/features/gen_VrLayer.rs @@ -10,13 +10,50 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] pub type VrLayer; + #[wasm_bindgen(method, getter = "leftBounds")] + fn left_bounds_shim(this: &VrLayer) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "leftBounds")] - fn left_bounds_shim(this: &VrLayer, val: &::wasm_bindgen::JsValue); + fn set_left_bounds_shim(this: &VrLayer, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "rightBounds")] + fn right_bounds_shim(this: &VrLayer) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "rightBounds")] - fn right_bounds_shim(this: &VrLayer, val: &::wasm_bindgen::JsValue); + fn set_right_bounds_shim(this: &VrLayer, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "HtmlCanvasElement")] + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &VrLayer) -> Option; #[cfg(feature = "HtmlCanvasElement")] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &VrLayer, val: Option<&HtmlCanvasElement>); + fn set_source_shim(this: &VrLayer, val: Option<&HtmlCanvasElement>); +} +#[doc = "The trait to access properties on the `VrLayer` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] +pub trait VrLayerGetters { + #[doc = "Get the `leftBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] + fn left_bounds(&self) -> ::js_sys::Array; + #[doc = "Get the `rightBounds` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] + fn right_bounds(&self) -> ::js_sys::Array; + #[cfg(feature = "HtmlCanvasElement")] + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VrLayer`*"] + fn source(&self) -> Option; +} +impl VrLayerGetters for VrLayer { + fn left_bounds(&self) -> ::js_sys::Array { + self.left_bounds_shim() + } + fn right_bounds(&self) -> ::js_sys::Array { + self.right_bounds_shim() + } + #[cfg(feature = "HtmlCanvasElement")] + fn source(&self) -> Option { + self.source_shim() + } } impl VrLayer { #[doc = "Construct a new `VrLayer`."] @@ -31,14 +68,14 @@ impl VrLayer { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] pub fn left_bounds(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.left_bounds_shim(val); + self.set_left_bounds_shim(val); self } #[doc = "Change the `rightBounds` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `VrLayer`*"] pub fn right_bounds(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.right_bounds_shim(val); + self.set_right_bounds_shim(val); self } #[cfg(feature = "HtmlCanvasElement")] @@ -46,7 +83,7 @@ impl VrLayer { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `VrLayer`*"] pub fn source(&mut self, val: Option<&HtmlCanvasElement>) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs b/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs index 910cb67592b..00db5f4b5ee 100644 --- a/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs +++ b/crates/web-sys/src/features/gen_WatchAdvertisementsOptions.rs @@ -15,8 +15,34 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WatchAdvertisementsOptions; #[cfg(feature = "AbortSignal")] + #[wasm_bindgen(method, getter = "signal")] + fn signal_shim(this: &WatchAdvertisementsOptions) -> AbortSignal; + #[cfg(feature = "AbortSignal")] #[wasm_bindgen(method, setter = "signal")] - fn signal_shim(this: &WatchAdvertisementsOptions, val: &AbortSignal); + fn set_signal_shim(this: &WatchAdvertisementsOptions, val: &AbortSignal); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WatchAdvertisementsOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WatchAdvertisementsOptions`*"] +pub trait WatchAdvertisementsOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + #[doc = "Get the `signal` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `WatchAdvertisementsOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn signal(&self) -> AbortSignal; +} +#[cfg(web_sys_unstable_apis)] +impl WatchAdvertisementsOptionsGetters for WatchAdvertisementsOptions { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "AbortSignal")] + fn signal(&self) -> AbortSignal { + self.signal_shim() + } } #[cfg(web_sys_unstable_apis)] impl WatchAdvertisementsOptions { @@ -40,7 +66,7 @@ impl WatchAdvertisementsOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn signal(&mut self, val: &AbortSignal) -> &mut Self { - self.signal_shim(val); + self.set_signal_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WaveShaperOptions.rs b/crates/web-sys/src/features/gen_WaveShaperOptions.rs index 73eae9c0dc8..f997ab462b5 100644 --- a/crates/web-sys/src/features/gen_WaveShaperOptions.rs +++ b/crates/web-sys/src/features/gen_WaveShaperOptions.rs @@ -10,19 +10,80 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] pub type WaveShaperOptions; + #[wasm_bindgen(method, getter = "channelCount")] + fn channel_count_shim(this: &WaveShaperOptions) -> u32; #[wasm_bindgen(method, setter = "channelCount")] - fn channel_count_shim(this: &WaveShaperOptions, val: u32); + fn set_channel_count_shim(this: &WaveShaperOptions, val: u32); + #[cfg(feature = "ChannelCountMode")] + #[wasm_bindgen(method, getter = "channelCountMode")] + fn channel_count_mode_shim(this: &WaveShaperOptions) -> ChannelCountMode; #[cfg(feature = "ChannelCountMode")] #[wasm_bindgen(method, setter = "channelCountMode")] - fn channel_count_mode_shim(this: &WaveShaperOptions, val: ChannelCountMode); + fn set_channel_count_mode_shim(this: &WaveShaperOptions, val: ChannelCountMode); + #[cfg(feature = "ChannelInterpretation")] + #[wasm_bindgen(method, getter = "channelInterpretation")] + fn channel_interpretation_shim(this: &WaveShaperOptions) -> ChannelInterpretation; #[cfg(feature = "ChannelInterpretation")] #[wasm_bindgen(method, setter = "channelInterpretation")] - fn channel_interpretation_shim(this: &WaveShaperOptions, val: ChannelInterpretation); + fn set_channel_interpretation_shim(this: &WaveShaperOptions, val: ChannelInterpretation); + #[wasm_bindgen(method, getter = "curve")] + fn curve_shim(this: &WaveShaperOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "curve")] - fn curve_shim(this: &WaveShaperOptions, val: &::wasm_bindgen::JsValue); + fn set_curve_shim(this: &WaveShaperOptions, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "OverSampleType")] + #[wasm_bindgen(method, getter = "oversample")] + fn oversample_shim(this: &WaveShaperOptions) -> OverSampleType; #[cfg(feature = "OverSampleType")] #[wasm_bindgen(method, setter = "oversample")] - fn oversample_shim(this: &WaveShaperOptions, val: OverSampleType); + fn set_oversample_shim(this: &WaveShaperOptions, val: OverSampleType); +} +#[doc = "The trait to access properties on the `WaveShaperOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] +pub trait WaveShaperOptionsGetters { + #[doc = "Get the `channelCount` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] + fn channel_count(&self) -> u32; + #[cfg(feature = "ChannelCountMode")] + #[doc = "Get the `channelCountMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `WaveShaperOptions`*"] + fn channel_count_mode(&self) -> ChannelCountMode; + #[cfg(feature = "ChannelInterpretation")] + #[doc = "Get the `channelInterpretation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `WaveShaperOptions`*"] + fn channel_interpretation(&self) -> ChannelInterpretation; + #[doc = "Get the `curve` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] + fn curve(&self) -> ::js_sys::Array; + #[cfg(feature = "OverSampleType")] + #[doc = "Get the `oversample` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperOptions`*"] + fn oversample(&self) -> OverSampleType; +} +impl WaveShaperOptionsGetters for WaveShaperOptions { + fn channel_count(&self) -> u32 { + self.channel_count_shim() + } + #[cfg(feature = "ChannelCountMode")] + fn channel_count_mode(&self) -> ChannelCountMode { + self.channel_count_mode_shim() + } + #[cfg(feature = "ChannelInterpretation")] + fn channel_interpretation(&self) -> ChannelInterpretation { + self.channel_interpretation_shim() + } + fn curve(&self) -> ::js_sys::Array { + self.curve_shim() + } + #[cfg(feature = "OverSampleType")] + fn oversample(&self) -> OverSampleType { + self.oversample_shim() + } } impl WaveShaperOptions { #[doc = "Construct a new `WaveShaperOptions`."] @@ -37,7 +98,7 @@ impl WaveShaperOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] pub fn channel_count(&mut self, val: u32) -> &mut Self { - self.channel_count_shim(val); + self.set_channel_count_shim(val); self } #[cfg(feature = "ChannelCountMode")] @@ -45,7 +106,7 @@ impl WaveShaperOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelCountMode`, `WaveShaperOptions`*"] pub fn channel_count_mode(&mut self, val: ChannelCountMode) -> &mut Self { - self.channel_count_mode_shim(val); + self.set_channel_count_mode_shim(val); self } #[cfg(feature = "ChannelInterpretation")] @@ -53,14 +114,14 @@ impl WaveShaperOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ChannelInterpretation`, `WaveShaperOptions`*"] pub fn channel_interpretation(&mut self, val: ChannelInterpretation) -> &mut Self { - self.channel_interpretation_shim(val); + self.set_channel_interpretation_shim(val); self } #[doc = "Change the `curve` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WaveShaperOptions`*"] pub fn curve(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.curve_shim(val); + self.set_curve_shim(val); self } #[cfg(feature = "OverSampleType")] @@ -68,7 +129,7 @@ impl WaveShaperOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `OverSampleType`, `WaveShaperOptions`*"] pub fn oversample(&mut self, val: OverSampleType) -> &mut Self { - self.oversample_shim(val); + self.set_oversample_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebGlContextAttributes.rs b/crates/web-sys/src/features/gen_WebGlContextAttributes.rs index d939df42117..3ca3002a10a 100644 --- a/crates/web-sys/src/features/gen_WebGlContextAttributes.rs +++ b/crates/web-sys/src/features/gen_WebGlContextAttributes.rs @@ -10,25 +10,121 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] pub type WebGlContextAttributes; + #[wasm_bindgen(method, getter = "alpha")] + fn alpha_shim(this: &WebGlContextAttributes) -> bool; #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &WebGlContextAttributes, val: bool); + fn set_alpha_shim(this: &WebGlContextAttributes, val: bool); + #[wasm_bindgen(method, getter = "antialias")] + fn antialias_shim(this: &WebGlContextAttributes) -> bool; #[wasm_bindgen(method, setter = "antialias")] - fn antialias_shim(this: &WebGlContextAttributes, val: bool); + fn set_antialias_shim(this: &WebGlContextAttributes, val: bool); + #[wasm_bindgen(method, getter = "depth")] + fn depth_shim(this: &WebGlContextAttributes) -> bool; #[wasm_bindgen(method, setter = "depth")] - fn depth_shim(this: &WebGlContextAttributes, val: bool); + fn set_depth_shim(this: &WebGlContextAttributes, val: bool); + #[wasm_bindgen(method, getter = "failIfMajorPerformanceCaveat")] + fn fail_if_major_performance_caveat_shim(this: &WebGlContextAttributes) -> bool; #[wasm_bindgen(method, setter = "failIfMajorPerformanceCaveat")] - fn fail_if_major_performance_caveat_shim(this: &WebGlContextAttributes, val: bool); + fn set_fail_if_major_performance_caveat_shim(this: &WebGlContextAttributes, val: bool); + #[cfg(feature = "WebGlPowerPreference")] + #[wasm_bindgen(method, getter = "powerPreference")] + fn power_preference_shim(this: &WebGlContextAttributes) -> WebGlPowerPreference; #[cfg(feature = "WebGlPowerPreference")] #[wasm_bindgen(method, setter = "powerPreference")] - fn power_preference_shim(this: &WebGlContextAttributes, val: WebGlPowerPreference); + fn set_power_preference_shim(this: &WebGlContextAttributes, val: WebGlPowerPreference); + #[wasm_bindgen(method, getter = "premultipliedAlpha")] + fn premultiplied_alpha_shim(this: &WebGlContextAttributes) -> bool; #[wasm_bindgen(method, setter = "premultipliedAlpha")] - fn premultiplied_alpha_shim(this: &WebGlContextAttributes, val: bool); + fn set_premultiplied_alpha_shim(this: &WebGlContextAttributes, val: bool); + #[wasm_bindgen(method, getter = "preserveDrawingBuffer")] + fn preserve_drawing_buffer_shim(this: &WebGlContextAttributes) -> bool; #[wasm_bindgen(method, setter = "preserveDrawingBuffer")] - fn preserve_drawing_buffer_shim(this: &WebGlContextAttributes, val: bool); + fn set_preserve_drawing_buffer_shim(this: &WebGlContextAttributes, val: bool); + #[wasm_bindgen(method, getter = "stencil")] + fn stencil_shim(this: &WebGlContextAttributes) -> bool; #[wasm_bindgen(method, setter = "stencil")] - fn stencil_shim(this: &WebGlContextAttributes, val: bool); + fn set_stencil_shim(this: &WebGlContextAttributes, val: bool); + #[wasm_bindgen(method, getter = "xrCompatible")] + fn xr_compatible_shim(this: &WebGlContextAttributes) -> bool; #[wasm_bindgen(method, setter = "xrCompatible")] - fn xr_compatible_shim(this: &WebGlContextAttributes, val: bool); + fn set_xr_compatible_shim(this: &WebGlContextAttributes, val: bool); +} +#[doc = "The trait to access properties on the `WebGlContextAttributes` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] +pub trait WebGlContextAttributesGetters { + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + fn alpha(&self) -> bool; + #[doc = "Get the `antialias` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + fn antialias(&self) -> bool; + #[doc = "Get the `depth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + fn depth(&self) -> bool; + #[doc = "Get the `failIfMajorPerformanceCaveat` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + fn fail_if_major_performance_caveat(&self) -> bool; + #[cfg(feature = "WebGlPowerPreference")] + #[doc = "Get the `powerPreference` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`, `WebGlPowerPreference`*"] + fn power_preference(&self) -> WebGlPowerPreference; + #[doc = "Get the `premultipliedAlpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + fn premultiplied_alpha(&self) -> bool; + #[doc = "Get the `preserveDrawingBuffer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + fn preserve_drawing_buffer(&self) -> bool; + #[doc = "Get the `stencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + fn stencil(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `xrCompatible` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn xr_compatible(&self) -> bool; +} +impl WebGlContextAttributesGetters for WebGlContextAttributes { + fn alpha(&self) -> bool { + self.alpha_shim() + } + fn antialias(&self) -> bool { + self.antialias_shim() + } + fn depth(&self) -> bool { + self.depth_shim() + } + fn fail_if_major_performance_caveat(&self) -> bool { + self.fail_if_major_performance_caveat_shim() + } + #[cfg(feature = "WebGlPowerPreference")] + fn power_preference(&self) -> WebGlPowerPreference { + self.power_preference_shim() + } + fn premultiplied_alpha(&self) -> bool { + self.premultiplied_alpha_shim() + } + fn preserve_drawing_buffer(&self) -> bool { + self.preserve_drawing_buffer_shim() + } + fn stencil(&self) -> bool { + self.stencil_shim() + } + #[cfg(web_sys_unstable_apis)] + fn xr_compatible(&self) -> bool { + self.xr_compatible_shim() + } } impl WebGlContextAttributes { #[doc = "Construct a new `WebGlContextAttributes`."] @@ -43,28 +139,28 @@ impl WebGlContextAttributes { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] pub fn alpha(&mut self, val: bool) -> &mut Self { - self.alpha_shim(val); + self.set_alpha_shim(val); self } #[doc = "Change the `antialias` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] pub fn antialias(&mut self, val: bool) -> &mut Self { - self.antialias_shim(val); + self.set_antialias_shim(val); self } #[doc = "Change the `depth` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] pub fn depth(&mut self, val: bool) -> &mut Self { - self.depth_shim(val); + self.set_depth_shim(val); self } #[doc = "Change the `failIfMajorPerformanceCaveat` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] pub fn fail_if_major_performance_caveat(&mut self, val: bool) -> &mut Self { - self.fail_if_major_performance_caveat_shim(val); + self.set_fail_if_major_performance_caveat_shim(val); self } #[cfg(feature = "WebGlPowerPreference")] @@ -72,28 +168,28 @@ impl WebGlContextAttributes { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`, `WebGlPowerPreference`*"] pub fn power_preference(&mut self, val: WebGlPowerPreference) -> &mut Self { - self.power_preference_shim(val); + self.set_power_preference_shim(val); self } #[doc = "Change the `premultipliedAlpha` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] pub fn premultiplied_alpha(&mut self, val: bool) -> &mut Self { - self.premultiplied_alpha_shim(val); + self.set_premultiplied_alpha_shim(val); self } #[doc = "Change the `preserveDrawingBuffer` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] pub fn preserve_drawing_buffer(&mut self, val: bool) -> &mut Self { - self.preserve_drawing_buffer_shim(val); + self.set_preserve_drawing_buffer_shim(val); self } #[doc = "Change the `stencil` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextAttributes`*"] pub fn stencil(&mut self, val: bool) -> &mut Self { - self.stencil_shim(val); + self.set_stencil_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -104,7 +200,7 @@ impl WebGlContextAttributes { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn xr_compatible(&mut self, val: bool) -> &mut Self { - self.xr_compatible_shim(val); + self.set_xr_compatible_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebGlContextEventInit.rs b/crates/web-sys/src/features/gen_WebGlContextEventInit.rs index 870603872a7..dc4beb898da 100644 --- a/crates/web-sys/src/features/gen_WebGlContextEventInit.rs +++ b/crates/web-sys/src/features/gen_WebGlContextEventInit.rs @@ -10,14 +10,57 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] pub type WebGlContextEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &WebGlContextEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &WebGlContextEventInit, val: bool); + fn set_bubbles_shim(this: &WebGlContextEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &WebGlContextEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &WebGlContextEventInit, val: bool); + fn set_cancelable_shim(this: &WebGlContextEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &WebGlContextEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &WebGlContextEventInit, val: bool); + fn set_composed_shim(this: &WebGlContextEventInit, val: bool); + #[wasm_bindgen(method, getter = "statusMessage")] + fn status_message_shim(this: &WebGlContextEventInit) -> String; #[wasm_bindgen(method, setter = "statusMessage")] - fn status_message_shim(this: &WebGlContextEventInit, val: &str); + fn set_status_message_shim(this: &WebGlContextEventInit, val: &str); +} +#[doc = "The trait to access properties on the `WebGlContextEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] +pub trait WebGlContextEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `statusMessage` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] + fn status_message(&self) -> String; +} +impl WebGlContextEventInitGetters for WebGlContextEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn status_message(&self) -> String { + self.status_message_shim() + } } impl WebGlContextEventInit { #[doc = "Construct a new `WebGlContextEventInit`."] @@ -32,28 +75,28 @@ impl WebGlContextEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `statusMessage` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebGlContextEventInit`*"] pub fn status_message(&mut self, val: &str) -> &mut Self { - self.status_message_shim(val); + self.set_status_message_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebSocketDict.rs b/crates/web-sys/src/features/gen_WebSocketDict.rs index 1586581b065..e0fec31bdec 100644 --- a/crates/web-sys/src/features/gen_WebSocketDict.rs +++ b/crates/web-sys/src/features/gen_WebSocketDict.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] pub type WebSocketDict; + #[wasm_bindgen(method, getter = "websockets")] + fn websockets_shim(this: &WebSocketDict) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "websockets")] - fn websockets_shim(this: &WebSocketDict, val: &::wasm_bindgen::JsValue); + fn set_websockets_shim(this: &WebSocketDict, val: &::wasm_bindgen::JsValue); +} +#[doc = "The trait to access properties on the `WebSocketDict` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] +pub trait WebSocketDictGetters { + #[doc = "Get the `websockets` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] + fn websockets(&self) -> ::js_sys::Array; +} +impl WebSocketDictGetters for WebSocketDict { + fn websockets(&self) -> ::js_sys::Array { + self.websockets_shim() + } } impl WebSocketDict { #[doc = "Construct a new `WebSocketDict`."] @@ -26,7 +42,7 @@ impl WebSocketDict { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketDict`*"] pub fn websockets(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.websockets_shim(val); + self.set_websockets_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebSocketElement.rs b/crates/web-sys/src/features/gen_WebSocketElement.rs index ebe600ee7b1..ffe31476539 100644 --- a/crates/web-sys/src/features/gen_WebSocketElement.rs +++ b/crates/web-sys/src/features/gen_WebSocketElement.rs @@ -10,18 +10,79 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] pub type WebSocketElement; + #[wasm_bindgen(method, getter = "encrypted")] + fn encrypted_shim(this: &WebSocketElement) -> bool; #[wasm_bindgen(method, setter = "encrypted")] - fn encrypted_shim(this: &WebSocketElement, val: bool); + fn set_encrypted_shim(this: &WebSocketElement, val: bool); + #[wasm_bindgen(method, getter = "hostport")] + fn hostport_shim(this: &WebSocketElement) -> String; #[wasm_bindgen(method, setter = "hostport")] - fn hostport_shim(this: &WebSocketElement, val: &str); + fn set_hostport_shim(this: &WebSocketElement, val: &str); + #[wasm_bindgen(method, getter = "msgreceived")] + fn msgreceived_shim(this: &WebSocketElement) -> u32; #[wasm_bindgen(method, setter = "msgreceived")] - fn msgreceived_shim(this: &WebSocketElement, val: u32); + fn set_msgreceived_shim(this: &WebSocketElement, val: u32); + #[wasm_bindgen(method, getter = "msgsent")] + fn msgsent_shim(this: &WebSocketElement) -> u32; #[wasm_bindgen(method, setter = "msgsent")] - fn msgsent_shim(this: &WebSocketElement, val: u32); + fn set_msgsent_shim(this: &WebSocketElement, val: u32); + #[wasm_bindgen(method, getter = "receivedsize")] + fn receivedsize_shim(this: &WebSocketElement) -> f64; #[wasm_bindgen(method, setter = "receivedsize")] - fn receivedsize_shim(this: &WebSocketElement, val: f64); + fn set_receivedsize_shim(this: &WebSocketElement, val: f64); + #[wasm_bindgen(method, getter = "sentsize")] + fn sentsize_shim(this: &WebSocketElement) -> f64; #[wasm_bindgen(method, setter = "sentsize")] - fn sentsize_shim(this: &WebSocketElement, val: f64); + fn set_sentsize_shim(this: &WebSocketElement, val: f64); +} +#[doc = "The trait to access properties on the `WebSocketElement` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] +pub trait WebSocketElementGetters { + #[doc = "Get the `encrypted` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + fn encrypted(&self) -> bool; + #[doc = "Get the `hostport` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + fn hostport(&self) -> String; + #[doc = "Get the `msgreceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + fn msgreceived(&self) -> u32; + #[doc = "Get the `msgsent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + fn msgsent(&self) -> u32; + #[doc = "Get the `receivedsize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + fn receivedsize(&self) -> f64; + #[doc = "Get the `sentsize` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] + fn sentsize(&self) -> f64; +} +impl WebSocketElementGetters for WebSocketElement { + fn encrypted(&self) -> bool { + self.encrypted_shim() + } + fn hostport(&self) -> String { + self.hostport_shim() + } + fn msgreceived(&self) -> u32 { + self.msgreceived_shim() + } + fn msgsent(&self) -> u32 { + self.msgsent_shim() + } + fn receivedsize(&self) -> f64 { + self.receivedsize_shim() + } + fn sentsize(&self) -> f64 { + self.sentsize_shim() + } } impl WebSocketElement { #[doc = "Construct a new `WebSocketElement`."] @@ -36,42 +97,42 @@ impl WebSocketElement { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] pub fn encrypted(&mut self, val: bool) -> &mut Self { - self.encrypted_shim(val); + self.set_encrypted_shim(val); self } #[doc = "Change the `hostport` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] pub fn hostport(&mut self, val: &str) -> &mut Self { - self.hostport_shim(val); + self.set_hostport_shim(val); self } #[doc = "Change the `msgreceived` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] pub fn msgreceived(&mut self, val: u32) -> &mut Self { - self.msgreceived_shim(val); + self.set_msgreceived_shim(val); self } #[doc = "Change the `msgsent` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] pub fn msgsent(&mut self, val: u32) -> &mut Self { - self.msgsent_shim(val); + self.set_msgsent_shim(val); self } #[doc = "Change the `receivedsize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] pub fn receivedsize(&mut self, val: f64) -> &mut Self { - self.receivedsize_shim(val); + self.set_receivedsize_shim(val); self } #[doc = "Change the `sentsize` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WebSocketElement`*"] pub fn sentsize(&mut self, val: f64) -> &mut Self { - self.sentsize_shim(val); + self.set_sentsize_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs b/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs index 28ef40240d5..b34276feeae 100644 --- a/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs +++ b/crates/web-sys/src/features/gen_WebTransportCloseInfo.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportCloseInfo; + #[wasm_bindgen(method, getter = "closeCode")] + fn close_code_shim(this: &WebTransportCloseInfo) -> u32; #[wasm_bindgen(method, setter = "closeCode")] - fn close_code_shim(this: &WebTransportCloseInfo, val: u32); + fn set_close_code_shim(this: &WebTransportCloseInfo, val: u32); + #[wasm_bindgen(method, getter = "reason")] + fn reason_shim(this: &WebTransportCloseInfo) -> String; #[wasm_bindgen(method, setter = "reason")] - fn reason_shim(this: &WebTransportCloseInfo, val: &str); + fn set_reason_shim(this: &WebTransportCloseInfo, val: &str); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WebTransportCloseInfo` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] +pub trait WebTransportCloseInfoGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `closeCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn close_code(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `reason` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCloseInfo`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn reason(&self) -> String; +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportCloseInfoGetters for WebTransportCloseInfo { + #[cfg(web_sys_unstable_apis)] + fn close_code(&self) -> u32 { + self.close_code_shim() + } + #[cfg(web_sys_unstable_apis)] + fn reason(&self) -> String { + self.reason_shim() + } } #[cfg(web_sys_unstable_apis)] impl WebTransportCloseInfo { @@ -40,7 +77,7 @@ impl WebTransportCloseInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn close_code(&mut self, val: u32) -> &mut Self { - self.close_code_shim(val); + self.set_close_code_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl WebTransportCloseInfo { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn reason(&mut self, val: &str) -> &mut Self { - self.reason_shim(val); + self.set_reason_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs b/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs index 70def34726b..1912a8cb702 100644 --- a/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportDatagramStats.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportDatagramStats; + #[wasm_bindgen(method, getter = "droppedIncoming")] + fn dropped_incoming_shim(this: &WebTransportDatagramStats) -> f64; #[wasm_bindgen(method, setter = "droppedIncoming")] - fn dropped_incoming_shim(this: &WebTransportDatagramStats, val: f64); + fn set_dropped_incoming_shim(this: &WebTransportDatagramStats, val: f64); + #[wasm_bindgen(method, getter = "expiredOutgoing")] + fn expired_outgoing_shim(this: &WebTransportDatagramStats) -> f64; #[wasm_bindgen(method, setter = "expiredOutgoing")] - fn expired_outgoing_shim(this: &WebTransportDatagramStats, val: f64); + fn set_expired_outgoing_shim(this: &WebTransportDatagramStats, val: f64); + #[wasm_bindgen(method, getter = "lostOutgoing")] + fn lost_outgoing_shim(this: &WebTransportDatagramStats) -> f64; #[wasm_bindgen(method, setter = "lostOutgoing")] - fn lost_outgoing_shim(this: &WebTransportDatagramStats, val: f64); + fn set_lost_outgoing_shim(this: &WebTransportDatagramStats, val: f64); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &WebTransportDatagramStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &WebTransportDatagramStats, val: f64); + fn set_timestamp_shim(this: &WebTransportDatagramStats, val: f64); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WebTransportDatagramStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] +pub trait WebTransportDatagramStatsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `droppedIncoming` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn dropped_incoming(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `expiredOutgoing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn expired_outgoing(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `lostOutgoing` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn lost_outgoing(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp(&self) -> f64; +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportDatagramStatsGetters for WebTransportDatagramStats { + #[cfg(web_sys_unstable_apis)] + fn dropped_incoming(&self) -> f64 { + self.dropped_incoming_shim() + } + #[cfg(web_sys_unstable_apis)] + fn expired_outgoing(&self) -> f64 { + self.expired_outgoing_shim() + } + #[cfg(web_sys_unstable_apis)] + fn lost_outgoing(&self) -> f64 { + self.lost_outgoing_shim() + } + #[cfg(web_sys_unstable_apis)] + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } } #[cfg(web_sys_unstable_apis)] impl WebTransportDatagramStats { @@ -44,7 +109,7 @@ impl WebTransportDatagramStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn dropped_incoming(&mut self, val: f64) -> &mut Self { - self.dropped_incoming_shim(val); + self.set_dropped_incoming_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +120,7 @@ impl WebTransportDatagramStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn expired_outgoing(&mut self, val: f64) -> &mut Self { - self.expired_outgoing_shim(val); + self.set_expired_outgoing_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +131,7 @@ impl WebTransportDatagramStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn lost_outgoing(&mut self, val: f64) -> &mut Self { - self.lost_outgoing_shim(val); + self.set_lost_outgoing_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +142,7 @@ impl WebTransportDatagramStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs b/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs index 05069e0a71c..d140492b430 100644 --- a/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs +++ b/crates/web-sys/src/features/gen_WebTransportErrorOptions.rs @@ -15,10 +15,50 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportErrorOptions; #[cfg(feature = "WebTransportErrorSource")] + #[wasm_bindgen(method, getter = "source")] + fn source_shim(this: &WebTransportErrorOptions) -> WebTransportErrorSource; + #[cfg(feature = "WebTransportErrorSource")] #[wasm_bindgen(method, setter = "source")] - fn source_shim(this: &WebTransportErrorOptions, val: WebTransportErrorSource); + fn set_source_shim(this: &WebTransportErrorOptions, val: WebTransportErrorSource); + #[wasm_bindgen(method, getter = "streamErrorCode")] + fn stream_error_code_shim(this: &WebTransportErrorOptions) -> Option; #[wasm_bindgen(method, setter = "streamErrorCode")] - fn stream_error_code_shim(this: &WebTransportErrorOptions, val: Option); + fn set_stream_error_code_shim(this: &WebTransportErrorOptions, val: Option); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WebTransportErrorOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`*"] +pub trait WebTransportErrorOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportErrorSource")] + #[doc = "Get the `source` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`, `WebTransportErrorSource`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn source(&self) -> WebTransportErrorSource; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `streamErrorCode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportErrorOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stream_error_code(&self) -> Option; +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportErrorOptionsGetters for WebTransportErrorOptions { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportErrorSource")] + fn source(&self) -> WebTransportErrorSource { + self.source_shim() + } + #[cfg(web_sys_unstable_apis)] + fn stream_error_code(&self) -> Option { + self.stream_error_code_shim() + } } #[cfg(web_sys_unstable_apis)] impl WebTransportErrorOptions { @@ -42,7 +82,7 @@ impl WebTransportErrorOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn source(&mut self, val: WebTransportErrorSource) -> &mut Self { - self.source_shim(val); + self.set_source_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +93,7 @@ impl WebTransportErrorOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stream_error_code(&mut self, val: Option) -> &mut Self { - self.stream_error_code_shim(val); + self.set_stream_error_code_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportHash.rs b/crates/web-sys/src/features/gen_WebTransportHash.rs index 46c4052620a..cf98c853547 100644 --- a/crates/web-sys/src/features/gen_WebTransportHash.rs +++ b/crates/web-sys/src/features/gen_WebTransportHash.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportHash; + #[wasm_bindgen(method, getter = "algorithm")] + fn algorithm_shim(this: &WebTransportHash) -> String; #[wasm_bindgen(method, setter = "algorithm")] - fn algorithm_shim(this: &WebTransportHash, val: &str); + fn set_algorithm_shim(this: &WebTransportHash, val: &str); + #[wasm_bindgen(method, getter = "value")] + fn value_shim(this: &WebTransportHash) -> ::js_sys::Object; #[wasm_bindgen(method, setter = "value")] - fn value_shim(this: &WebTransportHash, val: &::js_sys::Object); + fn set_value_shim(this: &WebTransportHash, val: &::js_sys::Object); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WebTransportHash` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] +pub trait WebTransportHashGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `algorithm` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn algorithm(&self) -> String; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `value` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportHash`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn value(&self) -> ::js_sys::Object; +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportHashGetters for WebTransportHash { + #[cfg(web_sys_unstable_apis)] + fn algorithm(&self) -> String { + self.algorithm_shim() + } + #[cfg(web_sys_unstable_apis)] + fn value(&self) -> ::js_sys::Object { + self.value_shim() + } } #[cfg(web_sys_unstable_apis)] impl WebTransportHash { @@ -40,7 +77,7 @@ impl WebTransportHash { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn algorithm(&mut self, val: &str) -> &mut Self { - self.algorithm_shim(val); + self.set_algorithm_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl WebTransportHash { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn value(&mut self, val: &::js_sys::Object) -> &mut Self { - self.value_shim(val); + self.set_value_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportOptions.rs b/crates/web-sys/src/features/gen_WebTransportOptions.rs index bd20cadbb79..9956f549f52 100644 --- a/crates/web-sys/src/features/gen_WebTransportOptions.rs +++ b/crates/web-sys/src/features/gen_WebTransportOptions.rs @@ -14,15 +14,86 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportOptions; + #[wasm_bindgen(method, getter = "allowPooling")] + fn allow_pooling_shim(this: &WebTransportOptions) -> bool; #[wasm_bindgen(method, setter = "allowPooling")] - fn allow_pooling_shim(this: &WebTransportOptions, val: bool); + fn set_allow_pooling_shim(this: &WebTransportOptions, val: bool); + #[cfg(feature = "WebTransportCongestionControl")] + #[wasm_bindgen(method, getter = "congestionControl")] + fn congestion_control_shim(this: &WebTransportOptions) -> WebTransportCongestionControl; #[cfg(feature = "WebTransportCongestionControl")] #[wasm_bindgen(method, setter = "congestionControl")] - fn congestion_control_shim(this: &WebTransportOptions, val: WebTransportCongestionControl); + fn set_congestion_control_shim(this: &WebTransportOptions, val: WebTransportCongestionControl); + #[wasm_bindgen(method, getter = "requireUnreliable")] + fn require_unreliable_shim(this: &WebTransportOptions) -> bool; #[wasm_bindgen(method, setter = "requireUnreliable")] - fn require_unreliable_shim(this: &WebTransportOptions, val: bool); + fn set_require_unreliable_shim(this: &WebTransportOptions, val: bool); + #[wasm_bindgen(method, getter = "serverCertificateHashes")] + fn server_certificate_hashes_shim(this: &WebTransportOptions) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "serverCertificateHashes")] - fn server_certificate_hashes_shim(this: &WebTransportOptions, val: &::wasm_bindgen::JsValue); + fn set_server_certificate_hashes_shim( + this: &WebTransportOptions, + val: &::wasm_bindgen::JsValue, + ); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WebTransportOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] +pub trait WebTransportOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `allowPooling` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn allow_pooling(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportCongestionControl")] + #[doc = "Get the `congestionControl` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportCongestionControl`, `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn congestion_control(&self) -> WebTransportCongestionControl; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requireUnreliable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn require_unreliable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `serverCertificateHashes` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn server_certificate_hashes(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportOptionsGetters for WebTransportOptions { + #[cfg(web_sys_unstable_apis)] + fn allow_pooling(&self) -> bool { + self.allow_pooling_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportCongestionControl")] + fn congestion_control(&self) -> WebTransportCongestionControl { + self.congestion_control_shim() + } + #[cfg(web_sys_unstable_apis)] + fn require_unreliable(&self) -> bool { + self.require_unreliable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn server_certificate_hashes(&self) -> ::js_sys::Array { + self.server_certificate_hashes_shim() + } } #[cfg(web_sys_unstable_apis)] impl WebTransportOptions { @@ -45,7 +116,7 @@ impl WebTransportOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn allow_pooling(&mut self, val: bool) -> &mut Self { - self.allow_pooling_shim(val); + self.set_allow_pooling_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +128,7 @@ impl WebTransportOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn congestion_control(&mut self, val: WebTransportCongestionControl) -> &mut Self { - self.congestion_control_shim(val); + self.set_congestion_control_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +139,7 @@ impl WebTransportOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn require_unreliable(&mut self, val: bool) -> &mut Self { - self.require_unreliable_shim(val); + self.set_require_unreliable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -79,7 +150,7 @@ impl WebTransportOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn server_certificate_hashes(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.server_certificate_hashes_shim(val); + self.set_server_certificate_hashes_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs b/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs index 61a4c3d60c6..90f90c6e2a7 100644 --- a/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportReceiveStreamStats.rs @@ -14,12 +14,63 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportReceiveStreamStats; + #[wasm_bindgen(method, getter = "bytesRead")] + fn bytes_read_shim(this: &WebTransportReceiveStreamStats) -> f64; #[wasm_bindgen(method, setter = "bytesRead")] - fn bytes_read_shim(this: &WebTransportReceiveStreamStats, val: f64); + fn set_bytes_read_shim(this: &WebTransportReceiveStreamStats, val: f64); + #[wasm_bindgen(method, getter = "bytesReceived")] + fn bytes_received_shim(this: &WebTransportReceiveStreamStats) -> f64; #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &WebTransportReceiveStreamStats, val: f64); + fn set_bytes_received_shim(this: &WebTransportReceiveStreamStats, val: f64); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &WebTransportReceiveStreamStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &WebTransportReceiveStreamStats, val: f64); + fn set_timestamp_shim(this: &WebTransportReceiveStreamStats, val: f64); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WebTransportReceiveStreamStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] +pub trait WebTransportReceiveStreamStatsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesRead` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes_read(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes_received(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportReceiveStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp(&self) -> f64; +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportReceiveStreamStatsGetters for WebTransportReceiveStreamStats { + #[cfg(web_sys_unstable_apis)] + fn bytes_read(&self) -> f64 { + self.bytes_read_shim() + } + #[cfg(web_sys_unstable_apis)] + fn bytes_received(&self) -> f64 { + self.bytes_received_shim() + } + #[cfg(web_sys_unstable_apis)] + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } } #[cfg(web_sys_unstable_apis)] impl WebTransportReceiveStreamStats { @@ -42,7 +93,7 @@ impl WebTransportReceiveStreamStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes_read(&mut self, val: f64) -> &mut Self { - self.bytes_read_shim(val); + self.set_bytes_read_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -53,7 +104,7 @@ impl WebTransportReceiveStreamStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes_received(&mut self, val: f64) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -64,7 +115,7 @@ impl WebTransportReceiveStreamStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs b/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs index d4b1ee2cd93..0162ed6ff31 100644 --- a/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs +++ b/crates/web-sys/src/features/gen_WebTransportSendStreamOptions.rs @@ -14,8 +14,31 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportSendStreamOptions; + #[wasm_bindgen(method, getter = "sendOrder")] + fn send_order_shim(this: &WebTransportSendStreamOptions) -> Option; #[wasm_bindgen(method, setter = "sendOrder")] - fn send_order_shim(this: &WebTransportSendStreamOptions, val: Option); + fn set_send_order_shim(this: &WebTransportSendStreamOptions, val: Option); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WebTransportSendStreamOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"] +pub trait WebTransportSendStreamOptionsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `sendOrder` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamOptions`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn send_order(&self) -> Option; +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportSendStreamOptionsGetters for WebTransportSendStreamOptions { + #[cfg(web_sys_unstable_apis)] + fn send_order(&self) -> Option { + self.send_order_shim() + } } #[cfg(web_sys_unstable_apis)] impl WebTransportSendStreamOptions { @@ -38,7 +61,7 @@ impl WebTransportSendStreamOptions { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn send_order(&mut self, val: Option) -> &mut Self { - self.send_order_shim(val); + self.set_send_order_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs b/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs index 373f9a7bc13..44c119973ba 100644 --- a/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportSendStreamStats.rs @@ -14,14 +14,79 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportSendStreamStats; + #[wasm_bindgen(method, getter = "bytesAcknowledged")] + fn bytes_acknowledged_shim(this: &WebTransportSendStreamStats) -> f64; #[wasm_bindgen(method, setter = "bytesAcknowledged")] - fn bytes_acknowledged_shim(this: &WebTransportSendStreamStats, val: f64); + fn set_bytes_acknowledged_shim(this: &WebTransportSendStreamStats, val: f64); + #[wasm_bindgen(method, getter = "bytesSent")] + fn bytes_sent_shim(this: &WebTransportSendStreamStats) -> f64; #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &WebTransportSendStreamStats, val: f64); + fn set_bytes_sent_shim(this: &WebTransportSendStreamStats, val: f64); + #[wasm_bindgen(method, getter = "bytesWritten")] + fn bytes_written_shim(this: &WebTransportSendStreamStats) -> f64; #[wasm_bindgen(method, setter = "bytesWritten")] - fn bytes_written_shim(this: &WebTransportSendStreamStats, val: f64); + fn set_bytes_written_shim(this: &WebTransportSendStreamStats, val: f64); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &WebTransportSendStreamStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &WebTransportSendStreamStats, val: f64); + fn set_timestamp_shim(this: &WebTransportSendStreamStats, val: f64); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WebTransportSendStreamStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] +pub trait WebTransportSendStreamStatsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesAcknowledged` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes_acknowledged(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes_sent(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesWritten` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes_written(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportSendStreamStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp(&self) -> f64; +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportSendStreamStatsGetters for WebTransportSendStreamStats { + #[cfg(web_sys_unstable_apis)] + fn bytes_acknowledged(&self) -> f64 { + self.bytes_acknowledged_shim() + } + #[cfg(web_sys_unstable_apis)] + fn bytes_sent(&self) -> f64 { + self.bytes_sent_shim() + } + #[cfg(web_sys_unstable_apis)] + fn bytes_written(&self) -> f64 { + self.bytes_written_shim() + } + #[cfg(web_sys_unstable_apis)] + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } } #[cfg(web_sys_unstable_apis)] impl WebTransportSendStreamStats { @@ -44,7 +109,7 @@ impl WebTransportSendStreamStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes_acknowledged(&mut self, val: f64) -> &mut Self { - self.bytes_acknowledged_shim(val); + self.set_bytes_acknowledged_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -55,7 +120,7 @@ impl WebTransportSendStreamStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -66,7 +131,7 @@ impl WebTransportSendStreamStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes_written(&mut self, val: f64) -> &mut Self { - self.bytes_written_shim(val); + self.set_bytes_written_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -77,7 +142,7 @@ impl WebTransportSendStreamStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WebTransportStats.rs b/crates/web-sys/src/features/gen_WebTransportStats.rs index bc2b8fd4347..5394c1d7779 100644 --- a/crates/web-sys/src/features/gen_WebTransportStats.rs +++ b/crates/web-sys/src/features/gen_WebTransportStats.rs @@ -14,31 +14,211 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type WebTransportStats; + #[wasm_bindgen(method, getter = "bytesReceived")] + fn bytes_received_shim(this: &WebTransportStats) -> f64; #[wasm_bindgen(method, setter = "bytesReceived")] - fn bytes_received_shim(this: &WebTransportStats, val: f64); + fn set_bytes_received_shim(this: &WebTransportStats, val: f64); + #[wasm_bindgen(method, getter = "bytesSent")] + fn bytes_sent_shim(this: &WebTransportStats) -> f64; #[wasm_bindgen(method, setter = "bytesSent")] - fn bytes_sent_shim(this: &WebTransportStats, val: f64); + fn set_bytes_sent_shim(this: &WebTransportStats, val: f64); + #[cfg(feature = "WebTransportDatagramStats")] + #[wasm_bindgen(method, getter = "datagrams")] + fn datagrams_shim(this: &WebTransportStats) -> WebTransportDatagramStats; #[cfg(feature = "WebTransportDatagramStats")] #[wasm_bindgen(method, setter = "datagrams")] - fn datagrams_shim(this: &WebTransportStats, val: &WebTransportDatagramStats); + fn set_datagrams_shim(this: &WebTransportStats, val: &WebTransportDatagramStats); + #[wasm_bindgen(method, getter = "minRtt")] + fn min_rtt_shim(this: &WebTransportStats) -> f64; #[wasm_bindgen(method, setter = "minRtt")] - fn min_rtt_shim(this: &WebTransportStats, val: f64); + fn set_min_rtt_shim(this: &WebTransportStats, val: f64); + #[wasm_bindgen(method, getter = "numIncomingStreamsCreated")] + fn num_incoming_streams_created_shim(this: &WebTransportStats) -> u32; #[wasm_bindgen(method, setter = "numIncomingStreamsCreated")] - fn num_incoming_streams_created_shim(this: &WebTransportStats, val: u32); + fn set_num_incoming_streams_created_shim(this: &WebTransportStats, val: u32); + #[wasm_bindgen(method, getter = "numOutgoingStreamsCreated")] + fn num_outgoing_streams_created_shim(this: &WebTransportStats) -> u32; #[wasm_bindgen(method, setter = "numOutgoingStreamsCreated")] - fn num_outgoing_streams_created_shim(this: &WebTransportStats, val: u32); + fn set_num_outgoing_streams_created_shim(this: &WebTransportStats, val: u32); + #[wasm_bindgen(method, getter = "packetsLost")] + fn packets_lost_shim(this: &WebTransportStats) -> f64; #[wasm_bindgen(method, setter = "packetsLost")] - fn packets_lost_shim(this: &WebTransportStats, val: f64); + fn set_packets_lost_shim(this: &WebTransportStats, val: f64); + #[wasm_bindgen(method, getter = "packetsReceived")] + fn packets_received_shim(this: &WebTransportStats) -> f64; #[wasm_bindgen(method, setter = "packetsReceived")] - fn packets_received_shim(this: &WebTransportStats, val: f64); + fn set_packets_received_shim(this: &WebTransportStats, val: f64); + #[wasm_bindgen(method, getter = "packetsSent")] + fn packets_sent_shim(this: &WebTransportStats) -> f64; #[wasm_bindgen(method, setter = "packetsSent")] - fn packets_sent_shim(this: &WebTransportStats, val: f64); + fn set_packets_sent_shim(this: &WebTransportStats, val: f64); + #[wasm_bindgen(method, getter = "rttVariation")] + fn rtt_variation_shim(this: &WebTransportStats) -> f64; #[wasm_bindgen(method, setter = "rttVariation")] - fn rtt_variation_shim(this: &WebTransportStats, val: f64); + fn set_rtt_variation_shim(this: &WebTransportStats, val: f64); + #[wasm_bindgen(method, getter = "smoothedRtt")] + fn smoothed_rtt_shim(this: &WebTransportStats) -> f64; #[wasm_bindgen(method, setter = "smoothedRtt")] - fn smoothed_rtt_shim(this: &WebTransportStats, val: f64); + fn set_smoothed_rtt_shim(this: &WebTransportStats, val: f64); + #[wasm_bindgen(method, getter = "timestamp")] + fn timestamp_shim(this: &WebTransportStats) -> f64; #[wasm_bindgen(method, setter = "timestamp")] - fn timestamp_shim(this: &WebTransportStats, val: f64); + fn set_timestamp_shim(this: &WebTransportStats, val: f64); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `WebTransportStats` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] +pub trait WebTransportStatsGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes_received(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bytesSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bytes_sent(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportDatagramStats")] + #[doc = "Get the `datagrams` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportDatagramStats`, `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn datagrams(&self) -> WebTransportDatagramStats; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `minRtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn min_rtt(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numIncomingStreamsCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn num_incoming_streams_created(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `numOutgoingStreamsCreated` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn num_outgoing_streams_created(&self) -> u32; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `packetsLost` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn packets_lost(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `packetsReceived` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn packets_received(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `packetsSent` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn packets_sent(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `rttVariation` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn rtt_variation(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `smoothedRtt` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn smoothed_rtt(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `timestamp` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WebTransportStats`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn timestamp(&self) -> f64; +} +#[cfg(web_sys_unstable_apis)] +impl WebTransportStatsGetters for WebTransportStats { + #[cfg(web_sys_unstable_apis)] + fn bytes_received(&self) -> f64 { + self.bytes_received_shim() + } + #[cfg(web_sys_unstable_apis)] + fn bytes_sent(&self) -> f64 { + self.bytes_sent_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "WebTransportDatagramStats")] + fn datagrams(&self) -> WebTransportDatagramStats { + self.datagrams_shim() + } + #[cfg(web_sys_unstable_apis)] + fn min_rtt(&self) -> f64 { + self.min_rtt_shim() + } + #[cfg(web_sys_unstable_apis)] + fn num_incoming_streams_created(&self) -> u32 { + self.num_incoming_streams_created_shim() + } + #[cfg(web_sys_unstable_apis)] + fn num_outgoing_streams_created(&self) -> u32 { + self.num_outgoing_streams_created_shim() + } + #[cfg(web_sys_unstable_apis)] + fn packets_lost(&self) -> f64 { + self.packets_lost_shim() + } + #[cfg(web_sys_unstable_apis)] + fn packets_received(&self) -> f64 { + self.packets_received_shim() + } + #[cfg(web_sys_unstable_apis)] + fn packets_sent(&self) -> f64 { + self.packets_sent_shim() + } + #[cfg(web_sys_unstable_apis)] + fn rtt_variation(&self) -> f64 { + self.rtt_variation_shim() + } + #[cfg(web_sys_unstable_apis)] + fn smoothed_rtt(&self) -> f64 { + self.smoothed_rtt_shim() + } + #[cfg(web_sys_unstable_apis)] + fn timestamp(&self) -> f64 { + self.timestamp_shim() + } } #[cfg(web_sys_unstable_apis)] impl WebTransportStats { @@ -61,7 +241,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes_received(&mut self, val: f64) -> &mut Self { - self.bytes_received_shim(val); + self.set_bytes_received_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -72,7 +252,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bytes_sent(&mut self, val: f64) -> &mut Self { - self.bytes_sent_shim(val); + self.set_bytes_sent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -84,7 +264,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn datagrams(&mut self, val: &WebTransportDatagramStats) -> &mut Self { - self.datagrams_shim(val); + self.set_datagrams_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -95,7 +275,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn min_rtt(&mut self, val: f64) -> &mut Self { - self.min_rtt_shim(val); + self.set_min_rtt_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -106,7 +286,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn num_incoming_streams_created(&mut self, val: u32) -> &mut Self { - self.num_incoming_streams_created_shim(val); + self.set_num_incoming_streams_created_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -117,7 +297,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn num_outgoing_streams_created(&mut self, val: u32) -> &mut Self { - self.num_outgoing_streams_created_shim(val); + self.set_num_outgoing_streams_created_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -128,7 +308,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn packets_lost(&mut self, val: f64) -> &mut Self { - self.packets_lost_shim(val); + self.set_packets_lost_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -139,7 +319,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn packets_received(&mut self, val: f64) -> &mut Self { - self.packets_received_shim(val); + self.set_packets_received_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -150,7 +330,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn packets_sent(&mut self, val: f64) -> &mut Self { - self.packets_sent_shim(val); + self.set_packets_sent_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -161,7 +341,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn rtt_variation(&mut self, val: f64) -> &mut Self { - self.rtt_variation_shim(val); + self.set_rtt_variation_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -172,7 +352,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn smoothed_rtt(&mut self, val: f64) -> &mut Self { - self.smoothed_rtt_shim(val); + self.set_smoothed_rtt_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -183,7 +363,7 @@ impl WebTransportStats { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn timestamp(&mut self, val: f64) -> &mut Self { - self.timestamp_shim(val); + self.set_timestamp_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WheelEventInit.rs b/crates/web-sys/src/features/gen_WheelEventInit.rs index 26a815349b6..24ff487c24c 100644 --- a/crates/web-sys/src/features/gen_WheelEventInit.rs +++ b/crates/web-sys/src/features/gen_WheelEventInit.rs @@ -10,70 +10,362 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub type WheelEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &WheelEventInit, val: bool); + fn set_bubbles_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &WheelEventInit, val: bool); + fn set_cancelable_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &WheelEventInit, val: bool); + fn set_composed_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "detail")] + fn detail_shim(this: &WheelEventInit) -> i32; #[wasm_bindgen(method, setter = "detail")] - fn detail_shim(this: &WheelEventInit, val: i32); + fn set_detail_shim(this: &WheelEventInit, val: i32); + #[cfg(feature = "Window")] + #[wasm_bindgen(method, getter = "view")] + fn view_shim(this: &WheelEventInit) -> Option; #[cfg(feature = "Window")] #[wasm_bindgen(method, setter = "view")] - fn view_shim(this: &WheelEventInit, val: Option<&Window>); + fn set_view_shim(this: &WheelEventInit, val: Option<&Window>); + #[wasm_bindgen(method, getter = "altKey")] + fn alt_key_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "altKey")] - fn alt_key_shim(this: &WheelEventInit, val: bool); + fn set_alt_key_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "ctrlKey")] + fn ctrl_key_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "ctrlKey")] - fn ctrl_key_shim(this: &WheelEventInit, val: bool); + fn set_ctrl_key_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "metaKey")] + fn meta_key_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "metaKey")] - fn meta_key_shim(this: &WheelEventInit, val: bool); + fn set_meta_key_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierAltGraph")] + fn modifier_alt_graph_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierAltGraph")] - fn modifier_alt_graph_shim(this: &WheelEventInit, val: bool); + fn set_modifier_alt_graph_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierCapsLock")] + fn modifier_caps_lock_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierCapsLock")] - fn modifier_caps_lock_shim(this: &WheelEventInit, val: bool); + fn set_modifier_caps_lock_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFn")] + fn modifier_fn_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFn")] - fn modifier_fn_shim(this: &WheelEventInit, val: bool); + fn set_modifier_fn_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierFnLock")] + fn modifier_fn_lock_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierFnLock")] - fn modifier_fn_lock_shim(this: &WheelEventInit, val: bool); + fn set_modifier_fn_lock_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierNumLock")] + fn modifier_num_lock_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierNumLock")] - fn modifier_num_lock_shim(this: &WheelEventInit, val: bool); + fn set_modifier_num_lock_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierOS")] + fn modifier_os_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierOS")] - fn modifier_os_shim(this: &WheelEventInit, val: bool); + fn set_modifier_os_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierScrollLock")] + fn modifier_scroll_lock_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierScrollLock")] - fn modifier_scroll_lock_shim(this: &WheelEventInit, val: bool); + fn set_modifier_scroll_lock_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbol")] + fn modifier_symbol_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbol")] - fn modifier_symbol_shim(this: &WheelEventInit, val: bool); + fn set_modifier_symbol_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "modifierSymbolLock")] + fn modifier_symbol_lock_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "modifierSymbolLock")] - fn modifier_symbol_lock_shim(this: &WheelEventInit, val: bool); + fn set_modifier_symbol_lock_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "shiftKey")] + fn shift_key_shim(this: &WheelEventInit) -> bool; #[wasm_bindgen(method, setter = "shiftKey")] - fn shift_key_shim(this: &WheelEventInit, val: bool); + fn set_shift_key_shim(this: &WheelEventInit, val: bool); + #[wasm_bindgen(method, getter = "button")] + fn button_shim(this: &WheelEventInit) -> i16; #[wasm_bindgen(method, setter = "button")] - fn button_shim(this: &WheelEventInit, val: i16); + fn set_button_shim(this: &WheelEventInit, val: i16); + #[wasm_bindgen(method, getter = "buttons")] + fn buttons_shim(this: &WheelEventInit) -> u16; #[wasm_bindgen(method, setter = "buttons")] - fn buttons_shim(this: &WheelEventInit, val: u16); + fn set_buttons_shim(this: &WheelEventInit, val: u16); + #[wasm_bindgen(method, getter = "clientX")] + fn client_x_shim(this: &WheelEventInit) -> i32; #[wasm_bindgen(method, setter = "clientX")] - fn client_x_shim(this: &WheelEventInit, val: i32); + fn set_client_x_shim(this: &WheelEventInit, val: i32); + #[wasm_bindgen(method, getter = "clientY")] + fn client_y_shim(this: &WheelEventInit) -> i32; #[wasm_bindgen(method, setter = "clientY")] - fn client_y_shim(this: &WheelEventInit, val: i32); + fn set_client_y_shim(this: &WheelEventInit, val: i32); + #[wasm_bindgen(method, getter = "movementX")] + fn movement_x_shim(this: &WheelEventInit) -> i32; #[wasm_bindgen(method, setter = "movementX")] - fn movement_x_shim(this: &WheelEventInit, val: i32); + fn set_movement_x_shim(this: &WheelEventInit, val: i32); + #[wasm_bindgen(method, getter = "movementY")] + fn movement_y_shim(this: &WheelEventInit) -> i32; #[wasm_bindgen(method, setter = "movementY")] - fn movement_y_shim(this: &WheelEventInit, val: i32); + fn set_movement_y_shim(this: &WheelEventInit, val: i32); + #[cfg(feature = "EventTarget")] + #[wasm_bindgen(method, getter = "relatedTarget")] + fn related_target_shim(this: &WheelEventInit) -> Option; #[cfg(feature = "EventTarget")] #[wasm_bindgen(method, setter = "relatedTarget")] - fn related_target_shim(this: &WheelEventInit, val: Option<&EventTarget>); + fn set_related_target_shim(this: &WheelEventInit, val: Option<&EventTarget>); + #[wasm_bindgen(method, getter = "screenX")] + fn screen_x_shim(this: &WheelEventInit) -> i32; #[wasm_bindgen(method, setter = "screenX")] - fn screen_x_shim(this: &WheelEventInit, val: i32); + fn set_screen_x_shim(this: &WheelEventInit, val: i32); + #[wasm_bindgen(method, getter = "screenY")] + fn screen_y_shim(this: &WheelEventInit) -> i32; #[wasm_bindgen(method, setter = "screenY")] - fn screen_y_shim(this: &WheelEventInit, val: i32); + fn set_screen_y_shim(this: &WheelEventInit, val: i32); + #[wasm_bindgen(method, getter = "deltaMode")] + fn delta_mode_shim(this: &WheelEventInit) -> u32; #[wasm_bindgen(method, setter = "deltaMode")] - fn delta_mode_shim(this: &WheelEventInit, val: u32); + fn set_delta_mode_shim(this: &WheelEventInit, val: u32); + #[wasm_bindgen(method, getter = "deltaX")] + fn delta_x_shim(this: &WheelEventInit) -> f64; #[wasm_bindgen(method, setter = "deltaX")] - fn delta_x_shim(this: &WheelEventInit, val: f64); + fn set_delta_x_shim(this: &WheelEventInit, val: f64); + #[wasm_bindgen(method, getter = "deltaY")] + fn delta_y_shim(this: &WheelEventInit) -> f64; #[wasm_bindgen(method, setter = "deltaY")] - fn delta_y_shim(this: &WheelEventInit, val: f64); + fn set_delta_y_shim(this: &WheelEventInit, val: f64); + #[wasm_bindgen(method, getter = "deltaZ")] + fn delta_z_shim(this: &WheelEventInit) -> f64; #[wasm_bindgen(method, setter = "deltaZ")] - fn delta_z_shim(this: &WheelEventInit, val: f64); + fn set_delta_z_shim(this: &WheelEventInit, val: f64); +} +#[doc = "The trait to access properties on the `WheelEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] +pub trait WheelEventInitGetters { + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn bubbles(&self) -> bool; + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn cancelable(&self) -> bool; + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn composed(&self) -> bool; + #[doc = "Get the `detail` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn detail(&self) -> i32; + #[cfg(feature = "Window")] + #[doc = "Get the `view` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`, `Window`*"] + fn view(&self) -> Option; + #[doc = "Get the `altKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn alt_key(&self) -> bool; + #[doc = "Get the `ctrlKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn ctrl_key(&self) -> bool; + #[doc = "Get the `metaKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn meta_key(&self) -> bool; + #[doc = "Get the `modifierAltGraph` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn modifier_alt_graph(&self) -> bool; + #[doc = "Get the `modifierCapsLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn modifier_caps_lock(&self) -> bool; + #[doc = "Get the `modifierFn` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn modifier_fn(&self) -> bool; + #[doc = "Get the `modifierFnLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn modifier_fn_lock(&self) -> bool; + #[doc = "Get the `modifierNumLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn modifier_num_lock(&self) -> bool; + #[doc = "Get the `modifierOS` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn modifier_os(&self) -> bool; + #[doc = "Get the `modifierScrollLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn modifier_scroll_lock(&self) -> bool; + #[doc = "Get the `modifierSymbol` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn modifier_symbol(&self) -> bool; + #[doc = "Get the `modifierSymbolLock` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn modifier_symbol_lock(&self) -> bool; + #[doc = "Get the `shiftKey` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn shift_key(&self) -> bool; + #[doc = "Get the `button` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn button(&self) -> i16; + #[doc = "Get the `buttons` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn buttons(&self) -> u16; + #[doc = "Get the `clientX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn client_x(&self) -> i32; + #[doc = "Get the `clientY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn client_y(&self) -> i32; + #[doc = "Get the `movementX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn movement_x(&self) -> i32; + #[doc = "Get the `movementY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn movement_y(&self) -> i32; + #[cfg(feature = "EventTarget")] + #[doc = "Get the `relatedTarget` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `WheelEventInit`*"] + fn related_target(&self) -> Option; + #[doc = "Get the `screenX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn screen_x(&self) -> i32; + #[doc = "Get the `screenY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn screen_y(&self) -> i32; + #[doc = "Get the `deltaMode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn delta_mode(&self) -> u32; + #[doc = "Get the `deltaX` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn delta_x(&self) -> f64; + #[doc = "Get the `deltaY` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn delta_y(&self) -> f64; + #[doc = "Get the `deltaZ` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] + fn delta_z(&self) -> f64; +} +impl WheelEventInitGetters for WheelEventInit { + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + fn composed(&self) -> bool { + self.composed_shim() + } + fn detail(&self) -> i32 { + self.detail_shim() + } + #[cfg(feature = "Window")] + fn view(&self) -> Option { + self.view_shim() + } + fn alt_key(&self) -> bool { + self.alt_key_shim() + } + fn ctrl_key(&self) -> bool { + self.ctrl_key_shim() + } + fn meta_key(&self) -> bool { + self.meta_key_shim() + } + fn modifier_alt_graph(&self) -> bool { + self.modifier_alt_graph_shim() + } + fn modifier_caps_lock(&self) -> bool { + self.modifier_caps_lock_shim() + } + fn modifier_fn(&self) -> bool { + self.modifier_fn_shim() + } + fn modifier_fn_lock(&self) -> bool { + self.modifier_fn_lock_shim() + } + fn modifier_num_lock(&self) -> bool { + self.modifier_num_lock_shim() + } + fn modifier_os(&self) -> bool { + self.modifier_os_shim() + } + fn modifier_scroll_lock(&self) -> bool { + self.modifier_scroll_lock_shim() + } + fn modifier_symbol(&self) -> bool { + self.modifier_symbol_shim() + } + fn modifier_symbol_lock(&self) -> bool { + self.modifier_symbol_lock_shim() + } + fn shift_key(&self) -> bool { + self.shift_key_shim() + } + fn button(&self) -> i16 { + self.button_shim() + } + fn buttons(&self) -> u16 { + self.buttons_shim() + } + fn client_x(&self) -> i32 { + self.client_x_shim() + } + fn client_y(&self) -> i32 { + self.client_y_shim() + } + fn movement_x(&self) -> i32 { + self.movement_x_shim() + } + fn movement_y(&self) -> i32 { + self.movement_y_shim() + } + #[cfg(feature = "EventTarget")] + fn related_target(&self) -> Option { + self.related_target_shim() + } + fn screen_x(&self) -> i32 { + self.screen_x_shim() + } + fn screen_y(&self) -> i32 { + self.screen_y_shim() + } + fn delta_mode(&self) -> u32 { + self.delta_mode_shim() + } + fn delta_x(&self) -> f64 { + self.delta_x_shim() + } + fn delta_y(&self) -> f64 { + self.delta_y_shim() + } + fn delta_z(&self) -> f64 { + self.delta_z_shim() + } } impl WheelEventInit { #[doc = "Construct a new `WheelEventInit`."] @@ -88,28 +380,28 @@ impl WheelEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[doc = "Change the `cancelable` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[doc = "Change the `composed` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[doc = "Change the `detail` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn detail(&mut self, val: i32) -> &mut Self { - self.detail_shim(val); + self.set_detail_shim(val); self } #[cfg(feature = "Window")] @@ -117,140 +409,140 @@ impl WheelEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`, `Window`*"] pub fn view(&mut self, val: Option<&Window>) -> &mut Self { - self.view_shim(val); + self.set_view_shim(val); self } #[doc = "Change the `altKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn alt_key(&mut self, val: bool) -> &mut Self { - self.alt_key_shim(val); + self.set_alt_key_shim(val); self } #[doc = "Change the `ctrlKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn ctrl_key(&mut self, val: bool) -> &mut Self { - self.ctrl_key_shim(val); + self.set_ctrl_key_shim(val); self } #[doc = "Change the `metaKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn meta_key(&mut self, val: bool) -> &mut Self { - self.meta_key_shim(val); + self.set_meta_key_shim(val); self } #[doc = "Change the `modifierAltGraph` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self { - self.modifier_alt_graph_shim(val); + self.set_modifier_alt_graph_shim(val); self } #[doc = "Change the `modifierCapsLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self { - self.modifier_caps_lock_shim(val); + self.set_modifier_caps_lock_shim(val); self } #[doc = "Change the `modifierFn` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn modifier_fn(&mut self, val: bool) -> &mut Self { - self.modifier_fn_shim(val); + self.set_modifier_fn_shim(val); self } #[doc = "Change the `modifierFnLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self { - self.modifier_fn_lock_shim(val); + self.set_modifier_fn_lock_shim(val); self } #[doc = "Change the `modifierNumLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self { - self.modifier_num_lock_shim(val); + self.set_modifier_num_lock_shim(val); self } #[doc = "Change the `modifierOS` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn modifier_os(&mut self, val: bool) -> &mut Self { - self.modifier_os_shim(val); + self.set_modifier_os_shim(val); self } #[doc = "Change the `modifierScrollLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self { - self.modifier_scroll_lock_shim(val); + self.set_modifier_scroll_lock_shim(val); self } #[doc = "Change the `modifierSymbol` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn modifier_symbol(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_shim(val); + self.set_modifier_symbol_shim(val); self } #[doc = "Change the `modifierSymbolLock` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self { - self.modifier_symbol_lock_shim(val); + self.set_modifier_symbol_lock_shim(val); self } #[doc = "Change the `shiftKey` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn shift_key(&mut self, val: bool) -> &mut Self { - self.shift_key_shim(val); + self.set_shift_key_shim(val); self } #[doc = "Change the `button` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn button(&mut self, val: i16) -> &mut Self { - self.button_shim(val); + self.set_button_shim(val); self } #[doc = "Change the `buttons` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn buttons(&mut self, val: u16) -> &mut Self { - self.buttons_shim(val); + self.set_buttons_shim(val); self } #[doc = "Change the `clientX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn client_x(&mut self, val: i32) -> &mut Self { - self.client_x_shim(val); + self.set_client_x_shim(val); self } #[doc = "Change the `clientY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn client_y(&mut self, val: i32) -> &mut Self { - self.client_y_shim(val); + self.set_client_y_shim(val); self } #[doc = "Change the `movementX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn movement_x(&mut self, val: i32) -> &mut Self { - self.movement_x_shim(val); + self.set_movement_x_shim(val); self } #[doc = "Change the `movementY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn movement_y(&mut self, val: i32) -> &mut Self { - self.movement_y_shim(val); + self.set_movement_y_shim(val); self } #[cfg(feature = "EventTarget")] @@ -258,49 +550,49 @@ impl WheelEventInit { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `WheelEventInit`*"] pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self { - self.related_target_shim(val); + self.set_related_target_shim(val); self } #[doc = "Change the `screenX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn screen_x(&mut self, val: i32) -> &mut Self { - self.screen_x_shim(val); + self.set_screen_x_shim(val); self } #[doc = "Change the `screenY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn screen_y(&mut self, val: i32) -> &mut Self { - self.screen_y_shim(val); + self.set_screen_y_shim(val); self } #[doc = "Change the `deltaMode` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn delta_mode(&mut self, val: u32) -> &mut Self { - self.delta_mode_shim(val); + self.set_delta_mode_shim(val); self } #[doc = "Change the `deltaX` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn delta_x(&mut self, val: f64) -> &mut Self { - self.delta_x_shim(val); + self.set_delta_x_shim(val); self } #[doc = "Change the `deltaY` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn delta_y(&mut self, val: f64) -> &mut Self { - self.delta_y_shim(val); + self.set_delta_y_shim(val); self } #[doc = "Change the `deltaZ` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WheelEventInit`*"] pub fn delta_z(&mut self, val: f64) -> &mut Self { - self.delta_z_shim(val); + self.set_delta_z_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WidevineCdmManifest.rs b/crates/web-sys/src/features/gen_WidevineCdmManifest.rs index 18a7300b0a1..e4a2ab44ebb 100644 --- a/crates/web-sys/src/features/gen_WidevineCdmManifest.rs +++ b/crates/web-sys/src/features/gen_WidevineCdmManifest.rs @@ -10,20 +10,90 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] pub type WidevineCdmManifest; + #[wasm_bindgen(method, getter = "description")] + fn description_shim(this: &WidevineCdmManifest) -> String; #[wasm_bindgen(method, setter = "description")] - fn description_shim(this: &WidevineCdmManifest, val: &str); + fn set_description_shim(this: &WidevineCdmManifest, val: &str); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &WidevineCdmManifest) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &WidevineCdmManifest, val: &str); + fn set_name_shim(this: &WidevineCdmManifest, val: &str); + #[wasm_bindgen(method, getter = "version")] + fn version_shim(this: &WidevineCdmManifest) -> String; #[wasm_bindgen(method, setter = "version")] - fn version_shim(this: &WidevineCdmManifest, val: &str); + fn set_version_shim(this: &WidevineCdmManifest, val: &str); + #[wasm_bindgen(method, getter = "x-cdm-codecs")] + fn x_cdm_codecs_shim(this: &WidevineCdmManifest) -> String; #[wasm_bindgen(method, setter = "x-cdm-codecs")] - fn x_cdm_codecs_shim(this: &WidevineCdmManifest, val: &str); + fn set_x_cdm_codecs_shim(this: &WidevineCdmManifest, val: &str); + #[wasm_bindgen(method, getter = "x-cdm-host-versions")] + fn x_cdm_host_versions_shim(this: &WidevineCdmManifest) -> String; #[wasm_bindgen(method, setter = "x-cdm-host-versions")] - fn x_cdm_host_versions_shim(this: &WidevineCdmManifest, val: &str); + fn set_x_cdm_host_versions_shim(this: &WidevineCdmManifest, val: &str); + #[wasm_bindgen(method, getter = "x-cdm-interface-versions")] + fn x_cdm_interface_versions_shim(this: &WidevineCdmManifest) -> String; #[wasm_bindgen(method, setter = "x-cdm-interface-versions")] - fn x_cdm_interface_versions_shim(this: &WidevineCdmManifest, val: &str); + fn set_x_cdm_interface_versions_shim(this: &WidevineCdmManifest, val: &str); + #[wasm_bindgen(method, getter = "x-cdm-module-versions")] + fn x_cdm_module_versions_shim(this: &WidevineCdmManifest) -> String; #[wasm_bindgen(method, setter = "x-cdm-module-versions")] - fn x_cdm_module_versions_shim(this: &WidevineCdmManifest, val: &str); + fn set_x_cdm_module_versions_shim(this: &WidevineCdmManifest, val: &str); +} +#[doc = "The trait to access properties on the `WidevineCdmManifest` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] +pub trait WidevineCdmManifestGetters { + #[doc = "Get the `description` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + fn description(&self) -> String; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + fn name(&self) -> String; + #[doc = "Get the `version` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + fn version(&self) -> String; + #[doc = "Get the `x-cdm-codecs` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + fn x_cdm_codecs(&self) -> String; + #[doc = "Get the `x-cdm-host-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + fn x_cdm_host_versions(&self) -> String; + #[doc = "Get the `x-cdm-interface-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + fn x_cdm_interface_versions(&self) -> String; + #[doc = "Get the `x-cdm-module-versions` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] + fn x_cdm_module_versions(&self) -> String; +} +impl WidevineCdmManifestGetters for WidevineCdmManifest { + fn description(&self) -> String { + self.description_shim() + } + fn name(&self) -> String { + self.name_shim() + } + fn version(&self) -> String { + self.version_shim() + } + fn x_cdm_codecs(&self) -> String { + self.x_cdm_codecs_shim() + } + fn x_cdm_host_versions(&self) -> String { + self.x_cdm_host_versions_shim() + } + fn x_cdm_interface_versions(&self) -> String { + self.x_cdm_interface_versions_shim() + } + fn x_cdm_module_versions(&self) -> String { + self.x_cdm_module_versions_shim() + } } impl WidevineCdmManifest { #[doc = "Construct a new `WidevineCdmManifest`."] @@ -40,62 +110,62 @@ impl WidevineCdmManifest { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.description(description); - ret.name(name); - ret.version(version); - ret.x_cdm_codecs(x_cdm_codecs); - ret.x_cdm_host_versions(x_cdm_host_versions); - ret.x_cdm_interface_versions(x_cdm_interface_versions); - ret.x_cdm_module_versions(x_cdm_module_versions); + Self::description(&mut ret, description); + Self::name(&mut ret, name); + Self::version(&mut ret, version); + Self::x_cdm_codecs(&mut ret, x_cdm_codecs); + Self::x_cdm_host_versions(&mut ret, x_cdm_host_versions); + Self::x_cdm_interface_versions(&mut ret, x_cdm_interface_versions); + Self::x_cdm_module_versions(&mut ret, x_cdm_module_versions); ret } #[doc = "Change the `description` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] pub fn description(&mut self, val: &str) -> &mut Self { - self.description_shim(val); + self.set_description_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[doc = "Change the `version` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] pub fn version(&mut self, val: &str) -> &mut Self { - self.version_shim(val); + self.set_version_shim(val); self } #[doc = "Change the `x-cdm-codecs` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] pub fn x_cdm_codecs(&mut self, val: &str) -> &mut Self { - self.x_cdm_codecs_shim(val); + self.set_x_cdm_codecs_shim(val); self } #[doc = "Change the `x-cdm-host-versions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] pub fn x_cdm_host_versions(&mut self, val: &str) -> &mut Self { - self.x_cdm_host_versions_shim(val); + self.set_x_cdm_host_versions_shim(val); self } #[doc = "Change the `x-cdm-interface-versions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] pub fn x_cdm_interface_versions(&mut self, val: &str) -> &mut Self { - self.x_cdm_interface_versions_shim(val); + self.set_x_cdm_interface_versions_shim(val); self } #[doc = "Change the `x-cdm-module-versions` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WidevineCdmManifest`*"] pub fn x_cdm_module_versions(&mut self, val: &str) -> &mut Self { - self.x_cdm_module_versions_shim(val); + self.set_x_cdm_module_versions_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WorkerOptions.rs b/crates/web-sys/src/features/gen_WorkerOptions.rs index e3f9b1edee3..746cc14cb8b 100644 --- a/crates/web-sys/src/features/gen_WorkerOptions.rs +++ b/crates/web-sys/src/features/gen_WorkerOptions.rs @@ -11,13 +11,53 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] pub type WorkerOptions; #[cfg(feature = "RequestCredentials")] + #[wasm_bindgen(method, getter = "credentials")] + fn credentials_shim(this: &WorkerOptions) -> RequestCredentials; + #[cfg(feature = "RequestCredentials")] #[wasm_bindgen(method, setter = "credentials")] - fn credentials_shim(this: &WorkerOptions, val: RequestCredentials); + fn set_credentials_shim(this: &WorkerOptions, val: RequestCredentials); + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &WorkerOptions) -> String; #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &WorkerOptions, val: &str); + fn set_name_shim(this: &WorkerOptions, val: &str); + #[cfg(feature = "WorkerType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &WorkerOptions) -> WorkerType; #[cfg(feature = "WorkerType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &WorkerOptions, val: WorkerType); + fn set_type__shim(this: &WorkerOptions, val: WorkerType); +} +#[doc = "The trait to access properties on the `WorkerOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] +pub trait WorkerOptionsGetters { + #[cfg(feature = "RequestCredentials")] + #[doc = "Get the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkerOptions`*"] + fn credentials(&self) -> RequestCredentials; + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] + fn name(&self) -> String; + #[cfg(feature = "WorkerType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`, `WorkerType`*"] + fn type_(&self) -> WorkerType; +} +impl WorkerOptionsGetters for WorkerOptions { + #[cfg(feature = "RequestCredentials")] + fn credentials(&self) -> RequestCredentials { + self.credentials_shim() + } + fn name(&self) -> String { + self.name_shim() + } + #[cfg(feature = "WorkerType")] + fn type_(&self) -> WorkerType { + self.type__shim() + } } impl WorkerOptions { #[doc = "Construct a new `WorkerOptions`."] @@ -33,14 +73,14 @@ impl WorkerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkerOptions`*"] pub fn credentials(&mut self, val: RequestCredentials) -> &mut Self { - self.credentials_shim(val); + self.set_credentials_shim(val); self } #[doc = "Change the `name` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`*"] pub fn name(&mut self, val: &str) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(feature = "WorkerType")] @@ -48,7 +88,7 @@ impl WorkerOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WorkerOptions`, `WorkerType`*"] pub fn type_(&mut self, val: WorkerType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WorkletOptions.rs b/crates/web-sys/src/features/gen_WorkletOptions.rs index 94b0e62f7ab..2b1e23b4a6f 100644 --- a/crates/web-sys/src/features/gen_WorkletOptions.rs +++ b/crates/web-sys/src/features/gen_WorkletOptions.rs @@ -11,8 +11,27 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `WorkletOptions`*"] pub type WorkletOptions; #[cfg(feature = "RequestCredentials")] + #[wasm_bindgen(method, getter = "credentials")] + fn credentials_shim(this: &WorkletOptions) -> RequestCredentials; + #[cfg(feature = "RequestCredentials")] #[wasm_bindgen(method, setter = "credentials")] - fn credentials_shim(this: &WorkletOptions, val: RequestCredentials); + fn set_credentials_shim(this: &WorkletOptions, val: RequestCredentials); +} +#[doc = "The trait to access properties on the `WorkletOptions` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WorkletOptions`*"] +pub trait WorkletOptionsGetters { + #[cfg(feature = "RequestCredentials")] + #[doc = "Get the `credentials` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkletOptions`*"] + fn credentials(&self) -> RequestCredentials; +} +impl WorkletOptionsGetters for WorkletOptions { + #[cfg(feature = "RequestCredentials")] + fn credentials(&self) -> RequestCredentials { + self.credentials_shim() + } } impl WorkletOptions { #[doc = "Construct a new `WorkletOptions`."] @@ -28,7 +47,7 @@ impl WorkletOptions { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `RequestCredentials`, `WorkletOptions`*"] pub fn credentials(&mut self, val: RequestCredentials) -> &mut Self { - self.credentials_shim(val); + self.set_credentials_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_WriteParams.rs b/crates/web-sys/src/features/gen_WriteParams.rs index 13223458c74..3a3af7165cd 100644 --- a/crates/web-sys/src/features/gen_WriteParams.rs +++ b/crates/web-sys/src/features/gen_WriteParams.rs @@ -10,15 +10,61 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] pub type WriteParams; + #[wasm_bindgen(method, getter = "data")] + fn data_shim(this: &WriteParams) -> ::wasm_bindgen::JsValue; #[wasm_bindgen(method, setter = "data")] - fn data_shim(this: &WriteParams, val: &::wasm_bindgen::JsValue); + fn set_data_shim(this: &WriteParams, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "position")] + fn position_shim(this: &WriteParams) -> Option; #[wasm_bindgen(method, setter = "position")] - fn position_shim(this: &WriteParams, val: Option); + fn set_position_shim(this: &WriteParams, val: Option); + #[wasm_bindgen(method, getter = "size")] + fn size_shim(this: &WriteParams) -> Option; #[wasm_bindgen(method, setter = "size")] - fn size_shim(this: &WriteParams, val: Option); + fn set_size_shim(this: &WriteParams, val: Option); + #[cfg(feature = "WriteCommandType")] + #[wasm_bindgen(method, getter = "type")] + fn type__shim(this: &WriteParams) -> WriteCommandType; #[cfg(feature = "WriteCommandType")] #[wasm_bindgen(method, setter = "type")] - fn type__shim(this: &WriteParams, val: WriteCommandType); + fn set_type__shim(this: &WriteParams, val: WriteCommandType); +} +#[doc = "The trait to access properties on the `WriteParams` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] +pub trait WriteParamsGetters { + #[doc = "Get the `data` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + fn data(&self) -> ::wasm_bindgen::JsValue; + #[doc = "Get the `position` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + fn position(&self) -> Option; + #[doc = "Get the `size` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] + fn size(&self) -> Option; + #[cfg(feature = "WriteCommandType")] + #[doc = "Get the `type` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"] + fn type_(&self) -> WriteCommandType; +} +impl WriteParamsGetters for WriteParams { + fn data(&self) -> ::wasm_bindgen::JsValue { + self.data_shim() + } + fn position(&self) -> Option { + self.position_shim() + } + fn size(&self) -> Option { + self.size_shim() + } + #[cfg(feature = "WriteCommandType")] + fn type_(&self) -> WriteCommandType { + self.type__shim() + } } impl WriteParams { #[cfg(feature = "WriteCommandType")] @@ -28,28 +74,28 @@ impl WriteParams { pub fn new(type_: WriteCommandType) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.type_(type_); + Self::type_(&mut ret, type_); ret } #[doc = "Change the `data` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] pub fn data(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.data_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_data_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } #[doc = "Change the `position` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] pub fn position(&mut self, val: Option) -> &mut Self { - self.position_shim(val); + self.set_position_shim(val); self } #[doc = "Change the `size` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteParams`*"] pub fn size(&mut self, val: Option) -> &mut Self { - self.size_shim(val); + self.set_size_shim(val); self } #[cfg(feature = "WriteCommandType")] @@ -57,7 +103,7 @@ impl WriteParams { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `WriteCommandType`, `WriteParams`*"] pub fn type_(&mut self, val: WriteCommandType) -> &mut Self { - self.type__shim(val); + self.set_type__shim(val); self } } diff --git a/crates/web-sys/src/features/gen_XPathNsResolver.rs b/crates/web-sys/src/features/gen_XPathNsResolver.rs index 4601c9df1fc..b168cee4db2 100644 --- a/crates/web-sys/src/features/gen_XPathNsResolver.rs +++ b/crates/web-sys/src/features/gen_XPathNsResolver.rs @@ -10,8 +10,24 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] pub type XPathNsResolver; + #[wasm_bindgen(method, getter = "lookupNamespaceURI")] + fn lookup_namespace_uri_shim(this: &XPathNsResolver) -> ::js_sys::Function; #[wasm_bindgen(method, setter = "lookupNamespaceURI")] - fn lookup_namespace_uri_shim(this: &XPathNsResolver, val: &::js_sys::Function); + fn set_lookup_namespace_uri_shim(this: &XPathNsResolver, val: &::js_sys::Function); +} +#[doc = "The trait to access properties on the `XPathNsResolver` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] +pub trait XPathNsResolverGetters { + #[doc = "Get the `lookupNamespaceURI` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] + fn lookup_namespace_uri(&self) -> ::js_sys::Function; +} +impl XPathNsResolverGetters for XPathNsResolver { + fn lookup_namespace_uri(&self) -> ::js_sys::Function { + self.lookup_namespace_uri_shim() + } } impl XPathNsResolver { #[doc = "Construct a new `XPathNsResolver`."] @@ -26,7 +42,7 @@ impl XPathNsResolver { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `XPathNsResolver`*"] pub fn lookup_namespace_uri(&mut self, val: &::js_sys::Function) -> &mut Self { - self.lookup_namespace_uri_shim(val); + self.set_lookup_namespace_uri_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs b/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs index 6f6712be78c..ff349ea6eba 100644 --- a/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs +++ b/crates/web-sys/src/features/gen_XrInputSourceEventInit.rs @@ -14,18 +14,103 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrInputSourceEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &XrInputSourceEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &XrInputSourceEventInit, val: bool); + fn set_bubbles_shim(this: &XrInputSourceEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &XrInputSourceEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &XrInputSourceEventInit, val: bool); + fn set_cancelable_shim(this: &XrInputSourceEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &XrInputSourceEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &XrInputSourceEventInit, val: bool); + fn set_composed_shim(this: &XrInputSourceEventInit, val: bool); + #[cfg(feature = "XrFrame")] + #[wasm_bindgen(method, getter = "frame")] + fn frame_shim(this: &XrInputSourceEventInit) -> XrFrame; #[cfg(feature = "XrFrame")] #[wasm_bindgen(method, setter = "frame")] - fn frame_shim(this: &XrInputSourceEventInit, val: &XrFrame); + fn set_frame_shim(this: &XrInputSourceEventInit, val: &XrFrame); + #[cfg(feature = "XrInputSource")] + #[wasm_bindgen(method, getter = "inputSource")] + fn input_source_shim(this: &XrInputSourceEventInit) -> XrInputSource; #[cfg(feature = "XrInputSource")] #[wasm_bindgen(method, setter = "inputSource")] - fn input_source_shim(this: &XrInputSourceEventInit, val: &XrInputSource); + fn set_input_source_shim(this: &XrInputSourceEventInit, val: &XrInputSource); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `XrInputSourceEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] +pub trait XrInputSourceEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrFrame")] + #[doc = "Get the `frame` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrFrame`, `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn frame(&self) -> XrFrame; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrInputSource")] + #[doc = "Get the `inputSource` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSource`, `XrInputSourceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn input_source(&self) -> XrInputSource; +} +#[cfg(web_sys_unstable_apis)] +impl XrInputSourceEventInitGetters for XrInputSourceEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrFrame")] + fn frame(&self) -> XrFrame { + self.frame_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrInputSource")] + fn input_source(&self) -> XrInputSource { + self.input_source_shim() + } } #[cfg(web_sys_unstable_apis)] impl XrInputSourceEventInit { @@ -39,8 +124,8 @@ impl XrInputSourceEventInit { pub fn new(frame: &XrFrame, input_source: &XrInputSource) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.frame(frame); - ret.input_source(input_source); + Self::frame(&mut ret, frame); + Self::input_source(&mut ret, input_source); ret } #[cfg(web_sys_unstable_apis)] @@ -51,7 +136,7 @@ impl XrInputSourceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -62,7 +147,7 @@ impl XrInputSourceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -73,7 +158,7 @@ impl XrInputSourceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -85,7 +170,7 @@ impl XrInputSourceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn frame(&mut self, val: &XrFrame) -> &mut Self { - self.frame_shim(val); + self.set_frame_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -97,7 +182,7 @@ impl XrInputSourceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn input_source(&mut self, val: &XrInputSource) -> &mut Self { - self.input_source_shim(val); + self.set_input_source_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs b/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs index 849c940a1ad..f7d0ed1b4de 100644 --- a/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs +++ b/crates/web-sys/src/features/gen_XrInputSourcesChangeEventInit.rs @@ -14,19 +14,115 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrInputSourcesChangeEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &XrInputSourcesChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &XrInputSourcesChangeEventInit, val: bool); + fn set_bubbles_shim(this: &XrInputSourcesChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &XrInputSourcesChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &XrInputSourcesChangeEventInit, val: bool); + fn set_cancelable_shim(this: &XrInputSourcesChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &XrInputSourcesChangeEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &XrInputSourcesChangeEventInit, val: bool); + fn set_composed_shim(this: &XrInputSourcesChangeEventInit, val: bool); + #[wasm_bindgen(method, getter = "added")] + fn added_shim(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "added")] - fn added_shim(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + fn set_added_shim(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "removed")] + fn removed_shim(this: &XrInputSourcesChangeEventInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "removed")] - fn removed_shim(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + fn set_removed_shim(this: &XrInputSourcesChangeEventInit, val: &::wasm_bindgen::JsValue); + #[cfg(feature = "XrSession")] + #[wasm_bindgen(method, getter = "session")] + fn session_shim(this: &XrInputSourcesChangeEventInit) -> XrSession; #[cfg(feature = "XrSession")] #[wasm_bindgen(method, setter = "session")] - fn session_shim(this: &XrInputSourcesChangeEventInit, val: &XrSession); + fn set_session_shim(this: &XrInputSourcesChangeEventInit, val: &XrSession); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `XrInputSourcesChangeEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] +pub trait XrInputSourcesChangeEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `added` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn added(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `removed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn removed(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSession")] + #[doc = "Get the `session` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrInputSourcesChangeEventInit`, `XrSession`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn session(&self) -> XrSession; +} +#[cfg(web_sys_unstable_apis)] +impl XrInputSourcesChangeEventInitGetters for XrInputSourcesChangeEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + fn added(&self) -> ::js_sys::Array { + self.added_shim() + } + #[cfg(web_sys_unstable_apis)] + fn removed(&self) -> ::js_sys::Array { + self.removed_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSession")] + fn session(&self) -> XrSession { + self.session_shim() + } } #[cfg(web_sys_unstable_apis)] impl XrInputSourcesChangeEventInit { @@ -44,9 +140,9 @@ impl XrInputSourcesChangeEventInit { ) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.added(added); - ret.removed(removed); - ret.session(session); + Self::added(&mut ret, added); + Self::removed(&mut ret, removed); + Self::session(&mut ret, session); ret } #[cfg(web_sys_unstable_apis)] @@ -57,7 +153,7 @@ impl XrInputSourcesChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -68,7 +164,7 @@ impl XrInputSourcesChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -79,7 +175,7 @@ impl XrInputSourcesChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -90,7 +186,7 @@ impl XrInputSourcesChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn added(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.added_shim(val); + self.set_added_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -101,7 +197,7 @@ impl XrInputSourcesChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn removed(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.removed_shim(val); + self.set_removed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -113,7 +209,7 @@ impl XrInputSourcesChangeEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn session(&mut self, val: &XrSession) -> &mut Self { - self.session_shim(val); + self.set_session_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs b/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs index 51d4adbfe9e..abe7eb760d4 100644 --- a/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_XrPermissionDescriptor.rs @@ -15,15 +15,86 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrPermissionDescriptor; #[cfg(feature = "PermissionName")] + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &XrPermissionDescriptor) -> PermissionName; + #[cfg(feature = "PermissionName")] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &XrPermissionDescriptor, val: PermissionName); + fn set_name_shim(this: &XrPermissionDescriptor, val: PermissionName); + #[cfg(feature = "XrSessionMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &XrPermissionDescriptor) -> XrSessionMode; #[cfg(feature = "XrSessionMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &XrPermissionDescriptor, val: XrSessionMode); + fn set_mode_shim(this: &XrPermissionDescriptor, val: XrSessionMode); + #[wasm_bindgen(method, getter = "optionalFeatures")] + fn optional_features_shim(this: &XrPermissionDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "optionalFeatures")] - fn optional_features_shim(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); + fn set_optional_features_shim(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "requiredFeatures")] + fn required_features_shim(this: &XrPermissionDescriptor) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "requiredFeatures")] - fn required_features_shim(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); + fn set_required_features_shim(this: &XrPermissionDescriptor, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `XrPermissionDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] +pub trait XrPermissionDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name(&self) -> PermissionName; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSessionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`, `XrSessionMode`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mode(&self) -> XrSessionMode; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optionalFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn optional_features(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn required_features(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl XrPermissionDescriptorGetters for XrPermissionDescriptor { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + fn name(&self) -> PermissionName { + self.name_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSessionMode")] + fn mode(&self) -> XrSessionMode { + self.mode_shim() + } + #[cfg(web_sys_unstable_apis)] + fn optional_features(&self) -> ::js_sys::Array { + self.optional_features_shim() + } + #[cfg(web_sys_unstable_apis)] + fn required_features(&self) -> ::js_sys::Array { + self.required_features_shim() + } } #[cfg(web_sys_unstable_apis)] impl XrPermissionDescriptor { @@ -37,7 +108,7 @@ impl XrPermissionDescriptor { pub fn new(name: PermissionName) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[cfg(web_sys_unstable_apis)] @@ -49,7 +120,7 @@ impl XrPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -61,7 +132,7 @@ impl XrPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mode(&mut self, val: XrSessionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -72,7 +143,7 @@ impl XrPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn optional_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.optional_features_shim(val); + self.set_optional_features_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -83,7 +154,7 @@ impl XrPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.required_features_shim(val); + self.set_required_features_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs b/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs index 4dbfb69ea22..e3cde802338 100644 --- a/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs +++ b/crates/web-sys/src/features/gen_XrReferenceSpaceEventInit.rs @@ -14,18 +14,103 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrReferenceSpaceEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &XrReferenceSpaceEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &XrReferenceSpaceEventInit, val: bool); + fn set_bubbles_shim(this: &XrReferenceSpaceEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &XrReferenceSpaceEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &XrReferenceSpaceEventInit, val: bool); + fn set_cancelable_shim(this: &XrReferenceSpaceEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &XrReferenceSpaceEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &XrReferenceSpaceEventInit, val: bool); + fn set_composed_shim(this: &XrReferenceSpaceEventInit, val: bool); + #[cfg(feature = "XrReferenceSpace")] + #[wasm_bindgen(method, getter = "referenceSpace")] + fn reference_space_shim(this: &XrReferenceSpaceEventInit) -> XrReferenceSpace; #[cfg(feature = "XrReferenceSpace")] #[wasm_bindgen(method, setter = "referenceSpace")] - fn reference_space_shim(this: &XrReferenceSpaceEventInit, val: &XrReferenceSpace); + fn set_reference_space_shim(this: &XrReferenceSpaceEventInit, val: &XrReferenceSpace); + #[cfg(feature = "XrRigidTransform")] + #[wasm_bindgen(method, getter = "transform")] + fn transform_shim(this: &XrReferenceSpaceEventInit) -> Option; #[cfg(feature = "XrRigidTransform")] #[wasm_bindgen(method, setter = "transform")] - fn transform_shim(this: &XrReferenceSpaceEventInit, val: Option<&XrRigidTransform>); + fn set_transform_shim(this: &XrReferenceSpaceEventInit, val: Option<&XrRigidTransform>); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `XrReferenceSpaceEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] +pub trait XrReferenceSpaceEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrReferenceSpace")] + #[doc = "Get the `referenceSpace` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpace`, `XrReferenceSpaceEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn reference_space(&self) -> XrReferenceSpace; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrRigidTransform")] + #[doc = "Get the `transform` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrReferenceSpaceEventInit`, `XrRigidTransform`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn transform(&self) -> Option; +} +#[cfg(web_sys_unstable_apis)] +impl XrReferenceSpaceEventInitGetters for XrReferenceSpaceEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrReferenceSpace")] + fn reference_space(&self) -> XrReferenceSpace { + self.reference_space_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrRigidTransform")] + fn transform(&self) -> Option { + self.transform_shim() + } } #[cfg(web_sys_unstable_apis)] impl XrReferenceSpaceEventInit { @@ -39,7 +124,7 @@ impl XrReferenceSpaceEventInit { pub fn new(reference_space: &XrReferenceSpace) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.reference_space(reference_space); + Self::reference_space(&mut ret, reference_space); ret } #[cfg(web_sys_unstable_apis)] @@ -50,7 +135,7 @@ impl XrReferenceSpaceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -61,7 +146,7 @@ impl XrReferenceSpaceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -72,7 +157,7 @@ impl XrReferenceSpaceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -84,7 +169,7 @@ impl XrReferenceSpaceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn reference_space(&mut self, val: &XrReferenceSpace) -> &mut Self { - self.reference_space_shim(val); + self.set_reference_space_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -96,7 +181,7 @@ impl XrReferenceSpaceEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn transform(&mut self, val: Option<&XrRigidTransform>) -> &mut Self { - self.transform_shim(val); + self.set_transform_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_XrRenderStateInit.rs b/crates/web-sys/src/features/gen_XrRenderStateInit.rs index 7b982dfa1dc..4cc656486a0 100644 --- a/crates/web-sys/src/features/gen_XrRenderStateInit.rs +++ b/crates/web-sys/src/features/gen_XrRenderStateInit.rs @@ -15,16 +15,98 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrRenderStateInit; #[cfg(feature = "XrWebGlLayer")] + #[wasm_bindgen(method, getter = "baseLayer")] + fn base_layer_shim(this: &XrRenderStateInit) -> Option; + #[cfg(feature = "XrWebGlLayer")] #[wasm_bindgen(method, setter = "baseLayer")] - fn base_layer_shim(this: &XrRenderStateInit, val: Option<&XrWebGlLayer>); + fn set_base_layer_shim(this: &XrRenderStateInit, val: Option<&XrWebGlLayer>); + #[wasm_bindgen(method, getter = "depthFar")] + fn depth_far_shim(this: &XrRenderStateInit) -> f64; #[wasm_bindgen(method, setter = "depthFar")] - fn depth_far_shim(this: &XrRenderStateInit, val: f64); + fn set_depth_far_shim(this: &XrRenderStateInit, val: f64); + #[wasm_bindgen(method, getter = "depthNear")] + fn depth_near_shim(this: &XrRenderStateInit) -> f64; #[wasm_bindgen(method, setter = "depthNear")] - fn depth_near_shim(this: &XrRenderStateInit, val: f64); + fn set_depth_near_shim(this: &XrRenderStateInit, val: f64); + #[wasm_bindgen(method, getter = "inlineVerticalFieldOfView")] + fn inline_vertical_field_of_view_shim(this: &XrRenderStateInit) -> f64; #[wasm_bindgen(method, setter = "inlineVerticalFieldOfView")] - fn inline_vertical_field_of_view_shim(this: &XrRenderStateInit, val: f64); + fn set_inline_vertical_field_of_view_shim(this: &XrRenderStateInit, val: f64); + #[wasm_bindgen(method, getter = "layers")] + fn layers_shim(this: &XrRenderStateInit) -> Option<::js_sys::Array>; #[wasm_bindgen(method, setter = "layers")] - fn layers_shim(this: &XrRenderStateInit, val: &::wasm_bindgen::JsValue); + fn set_layers_shim(this: &XrRenderStateInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `XrRenderStateInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] +pub trait XrRenderStateInitGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrWebGlLayer")] + #[doc = "Get the `baseLayer` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`, `XrWebGlLayer`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn base_layer(&self) -> Option; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthFar` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_far(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depthNear` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth_near(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `inlineVerticalFieldOfView` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn inline_vertical_field_of_view(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `layers` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrRenderStateInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn layers(&self) -> Option<::js_sys::Array>; +} +#[cfg(web_sys_unstable_apis)] +impl XrRenderStateInitGetters for XrRenderStateInit { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrWebGlLayer")] + fn base_layer(&self) -> Option { + self.base_layer_shim() + } + #[cfg(web_sys_unstable_apis)] + fn depth_far(&self) -> f64 { + self.depth_far_shim() + } + #[cfg(web_sys_unstable_apis)] + fn depth_near(&self) -> f64 { + self.depth_near_shim() + } + #[cfg(web_sys_unstable_apis)] + fn inline_vertical_field_of_view(&self) -> f64 { + self.inline_vertical_field_of_view_shim() + } + #[cfg(web_sys_unstable_apis)] + fn layers(&self) -> Option<::js_sys::Array> { + self.layers_shim() + } } #[cfg(web_sys_unstable_apis)] impl XrRenderStateInit { @@ -48,7 +130,7 @@ impl XrRenderStateInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn base_layer(&mut self, val: Option<&XrWebGlLayer>) -> &mut Self { - self.base_layer_shim(val); + self.set_base_layer_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -59,7 +141,7 @@ impl XrRenderStateInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_far(&mut self, val: f64) -> &mut Self { - self.depth_far_shim(val); + self.set_depth_far_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +152,7 @@ impl XrRenderStateInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth_near(&mut self, val: f64) -> &mut Self { - self.depth_near_shim(val); + self.set_depth_near_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +163,7 @@ impl XrRenderStateInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn inline_vertical_field_of_view(&mut self, val: f64) -> &mut Self { - self.inline_vertical_field_of_view_shim(val); + self.set_inline_vertical_field_of_view_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -92,7 +174,7 @@ impl XrRenderStateInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn layers(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self { - self.layers_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); + self.set_layers_shim(val.unwrap_or(&::wasm_bindgen::JsValue::NULL)); self } } diff --git a/crates/web-sys/src/features/gen_XrSessionEventInit.rs b/crates/web-sys/src/features/gen_XrSessionEventInit.rs index 56caaf616cf..4fa96a026f2 100644 --- a/crates/web-sys/src/features/gen_XrSessionEventInit.rs +++ b/crates/web-sys/src/features/gen_XrSessionEventInit.rs @@ -14,15 +14,83 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrSessionEventInit; + #[wasm_bindgen(method, getter = "bubbles")] + fn bubbles_shim(this: &XrSessionEventInit) -> bool; #[wasm_bindgen(method, setter = "bubbles")] - fn bubbles_shim(this: &XrSessionEventInit, val: bool); + fn set_bubbles_shim(this: &XrSessionEventInit, val: bool); + #[wasm_bindgen(method, getter = "cancelable")] + fn cancelable_shim(this: &XrSessionEventInit) -> bool; #[wasm_bindgen(method, setter = "cancelable")] - fn cancelable_shim(this: &XrSessionEventInit, val: bool); + fn set_cancelable_shim(this: &XrSessionEventInit, val: bool); + #[wasm_bindgen(method, getter = "composed")] + fn composed_shim(this: &XrSessionEventInit) -> bool; #[wasm_bindgen(method, setter = "composed")] - fn composed_shim(this: &XrSessionEventInit, val: bool); + fn set_composed_shim(this: &XrSessionEventInit, val: bool); + #[cfg(feature = "XrSession")] + #[wasm_bindgen(method, getter = "session")] + fn session_shim(this: &XrSessionEventInit) -> XrSession; #[cfg(feature = "XrSession")] #[wasm_bindgen(method, setter = "session")] - fn session_shim(this: &XrSessionEventInit, val: &XrSession); + fn set_session_shim(this: &XrSessionEventInit, val: &XrSession); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `XrSessionEventInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] +pub trait XrSessionEventInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `bubbles` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn bubbles(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `cancelable` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn cancelable(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `composed` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn composed(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSession")] + #[doc = "Get the `session` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSession`, `XrSessionEventInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn session(&self) -> XrSession; +} +#[cfg(web_sys_unstable_apis)] +impl XrSessionEventInitGetters for XrSessionEventInit { + #[cfg(web_sys_unstable_apis)] + fn bubbles(&self) -> bool { + self.bubbles_shim() + } + #[cfg(web_sys_unstable_apis)] + fn cancelable(&self) -> bool { + self.cancelable_shim() + } + #[cfg(web_sys_unstable_apis)] + fn composed(&self) -> bool { + self.composed_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSession")] + fn session(&self) -> XrSession { + self.session_shim() + } } #[cfg(web_sys_unstable_apis)] impl XrSessionEventInit { @@ -36,7 +104,7 @@ impl XrSessionEventInit { pub fn new(session: &XrSession) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.session(session); + Self::session(&mut ret, session); ret } #[cfg(web_sys_unstable_apis)] @@ -47,7 +115,7 @@ impl XrSessionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn bubbles(&mut self, val: bool) -> &mut Self { - self.bubbles_shim(val); + self.set_bubbles_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -58,7 +126,7 @@ impl XrSessionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn cancelable(&mut self, val: bool) -> &mut Self { - self.cancelable_shim(val); + self.set_cancelable_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -69,7 +137,7 @@ impl XrSessionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn composed(&mut self, val: bool) -> &mut Self { - self.composed_shim(val); + self.set_composed_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +149,7 @@ impl XrSessionEventInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn session(&mut self, val: &XrSession) -> &mut Self { - self.session_shim(val); + self.set_session_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_XrSessionInit.rs b/crates/web-sys/src/features/gen_XrSessionInit.rs index 8bc078da63c..cfaa4d61efe 100644 --- a/crates/web-sys/src/features/gen_XrSessionInit.rs +++ b/crates/web-sys/src/features/gen_XrSessionInit.rs @@ -14,10 +14,47 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrSessionInit; + #[wasm_bindgen(method, getter = "optionalFeatures")] + fn optional_features_shim(this: &XrSessionInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "optionalFeatures")] - fn optional_features_shim(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); + fn set_optional_features_shim(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); + #[wasm_bindgen(method, getter = "requiredFeatures")] + fn required_features_shim(this: &XrSessionInit) -> ::js_sys::Array; #[wasm_bindgen(method, setter = "requiredFeatures")] - fn required_features_shim(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); + fn set_required_features_shim(this: &XrSessionInit, val: &::wasm_bindgen::JsValue); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `XrSessionInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] +pub trait XrSessionInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `optionalFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn optional_features(&self) -> ::js_sys::Array; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `requiredFeatures` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn required_features(&self) -> ::js_sys::Array; +} +#[cfg(web_sys_unstable_apis)] +impl XrSessionInitGetters for XrSessionInit { + #[cfg(web_sys_unstable_apis)] + fn optional_features(&self) -> ::js_sys::Array { + self.optional_features_shim() + } + #[cfg(web_sys_unstable_apis)] + fn required_features(&self) -> ::js_sys::Array { + self.required_features_shim() + } } #[cfg(web_sys_unstable_apis)] impl XrSessionInit { @@ -40,7 +77,7 @@ impl XrSessionInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn optional_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.optional_features_shim(val); + self.set_optional_features_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -51,7 +88,7 @@ impl XrSessionInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn required_features(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { - self.required_features_shim(val); + self.set_required_features_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs b/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs index dc221e82d24..af76e37a20b 100644 --- a/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs +++ b/crates/web-sys/src/features/gen_XrSessionSupportedPermissionDescriptor.rs @@ -15,11 +15,54 @@ extern "C" { #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrSessionSupportedPermissionDescriptor; #[cfg(feature = "PermissionName")] + #[wasm_bindgen(method, getter = "name")] + fn name_shim(this: &XrSessionSupportedPermissionDescriptor) -> PermissionName; + #[cfg(feature = "PermissionName")] #[wasm_bindgen(method, setter = "name")] - fn name_shim(this: &XrSessionSupportedPermissionDescriptor, val: PermissionName); + fn set_name_shim(this: &XrSessionSupportedPermissionDescriptor, val: PermissionName); + #[cfg(feature = "XrSessionMode")] + #[wasm_bindgen(method, getter = "mode")] + fn mode_shim(this: &XrSessionSupportedPermissionDescriptor) -> XrSessionMode; #[cfg(feature = "XrSessionMode")] #[wasm_bindgen(method, setter = "mode")] - fn mode_shim(this: &XrSessionSupportedPermissionDescriptor, val: XrSessionMode); + fn set_mode_shim(this: &XrSessionSupportedPermissionDescriptor, val: XrSessionMode); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `XrSessionSupportedPermissionDescriptor` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XrSessionSupportedPermissionDescriptor`*"] +pub trait XrSessionSupportedPermissionDescriptorGetters { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + #[doc = "Get the `name` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `PermissionName`, `XrSessionSupportedPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn name(&self) -> PermissionName; + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSessionMode")] + #[doc = "Get the `mode` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrSessionMode`, `XrSessionSupportedPermissionDescriptor`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn mode(&self) -> XrSessionMode; +} +#[cfg(web_sys_unstable_apis)] +impl XrSessionSupportedPermissionDescriptorGetters for XrSessionSupportedPermissionDescriptor { + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "PermissionName")] + fn name(&self) -> PermissionName { + self.name_shim() + } + #[cfg(web_sys_unstable_apis)] + #[cfg(feature = "XrSessionMode")] + fn mode(&self) -> XrSessionMode { + self.mode_shim() + } } #[cfg(web_sys_unstable_apis)] impl XrSessionSupportedPermissionDescriptor { @@ -33,7 +76,7 @@ impl XrSessionSupportedPermissionDescriptor { pub fn new(name: PermissionName) -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); - ret.name(name); + Self::name(&mut ret, name); ret } #[cfg(web_sys_unstable_apis)] @@ -45,7 +88,7 @@ impl XrSessionSupportedPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn name(&mut self, val: PermissionName) -> &mut Self { - self.name_shim(val); + self.set_name_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -57,7 +100,7 @@ impl XrSessionSupportedPermissionDescriptor { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn mode(&mut self, val: XrSessionMode) -> &mut Self { - self.mode_shim(val); + self.set_mode_shim(val); self } } diff --git a/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs b/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs index 9fe4ef7a073..510de1a0473 100644 --- a/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs +++ b/crates/web-sys/src/features/gen_XrWebGlLayerInit.rs @@ -14,18 +14,111 @@ extern "C" { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub type XrWebGlLayerInit; + #[wasm_bindgen(method, getter = "alpha")] + fn alpha_shim(this: &XrWebGlLayerInit) -> bool; #[wasm_bindgen(method, setter = "alpha")] - fn alpha_shim(this: &XrWebGlLayerInit, val: bool); + fn set_alpha_shim(this: &XrWebGlLayerInit, val: bool); + #[wasm_bindgen(method, getter = "antialias")] + fn antialias_shim(this: &XrWebGlLayerInit) -> bool; #[wasm_bindgen(method, setter = "antialias")] - fn antialias_shim(this: &XrWebGlLayerInit, val: bool); + fn set_antialias_shim(this: &XrWebGlLayerInit, val: bool); + #[wasm_bindgen(method, getter = "depth")] + fn depth_shim(this: &XrWebGlLayerInit) -> bool; #[wasm_bindgen(method, setter = "depth")] - fn depth_shim(this: &XrWebGlLayerInit, val: bool); + fn set_depth_shim(this: &XrWebGlLayerInit, val: bool); + #[wasm_bindgen(method, getter = "framebufferScaleFactor")] + fn framebuffer_scale_factor_shim(this: &XrWebGlLayerInit) -> f64; #[wasm_bindgen(method, setter = "framebufferScaleFactor")] - fn framebuffer_scale_factor_shim(this: &XrWebGlLayerInit, val: f64); + fn set_framebuffer_scale_factor_shim(this: &XrWebGlLayerInit, val: f64); + #[wasm_bindgen(method, getter = "ignoreDepthValues")] + fn ignore_depth_values_shim(this: &XrWebGlLayerInit) -> bool; #[wasm_bindgen(method, setter = "ignoreDepthValues")] - fn ignore_depth_values_shim(this: &XrWebGlLayerInit, val: bool); + fn set_ignore_depth_values_shim(this: &XrWebGlLayerInit, val: bool); + #[wasm_bindgen(method, getter = "stencil")] + fn stencil_shim(this: &XrWebGlLayerInit) -> bool; #[wasm_bindgen(method, setter = "stencil")] - fn stencil_shim(this: &XrWebGlLayerInit, val: bool); + fn set_stencil_shim(this: &XrWebGlLayerInit, val: bool); +} +#[cfg(web_sys_unstable_apis)] +#[doc = "The trait to access properties on the `XrWebGlLayerInit` dictionary."] +#[doc = ""] +#[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] +pub trait XrWebGlLayerInitGetters { + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `alpha` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn alpha(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `antialias` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn antialias(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `depth` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn depth(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `framebufferScaleFactor` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn framebuffer_scale_factor(&self) -> f64; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `ignoreDepthValues` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn ignore_depth_values(&self) -> bool; + #[cfg(web_sys_unstable_apis)] + #[doc = "Get the `stencil` field of this object."] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `XrWebGlLayerInit`*"] + #[doc = ""] + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] + fn stencil(&self) -> bool; +} +#[cfg(web_sys_unstable_apis)] +impl XrWebGlLayerInitGetters for XrWebGlLayerInit { + #[cfg(web_sys_unstable_apis)] + fn alpha(&self) -> bool { + self.alpha_shim() + } + #[cfg(web_sys_unstable_apis)] + fn antialias(&self) -> bool { + self.antialias_shim() + } + #[cfg(web_sys_unstable_apis)] + fn depth(&self) -> bool { + self.depth_shim() + } + #[cfg(web_sys_unstable_apis)] + fn framebuffer_scale_factor(&self) -> f64 { + self.framebuffer_scale_factor_shim() + } + #[cfg(web_sys_unstable_apis)] + fn ignore_depth_values(&self) -> bool { + self.ignore_depth_values_shim() + } + #[cfg(web_sys_unstable_apis)] + fn stencil(&self) -> bool { + self.stencil_shim() + } } #[cfg(web_sys_unstable_apis)] impl XrWebGlLayerInit { @@ -48,7 +141,7 @@ impl XrWebGlLayerInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn alpha(&mut self, val: bool) -> &mut Self { - self.alpha_shim(val); + self.set_alpha_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -59,7 +152,7 @@ impl XrWebGlLayerInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn antialias(&mut self, val: bool) -> &mut Self { - self.antialias_shim(val); + self.set_antialias_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -70,7 +163,7 @@ impl XrWebGlLayerInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn depth(&mut self, val: bool) -> &mut Self { - self.depth_shim(val); + self.set_depth_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -81,7 +174,7 @@ impl XrWebGlLayerInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn framebuffer_scale_factor(&mut self, val: f64) -> &mut Self { - self.framebuffer_scale_factor_shim(val); + self.set_framebuffer_scale_factor_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -92,7 +185,7 @@ impl XrWebGlLayerInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn ignore_depth_values(&mut self, val: bool) -> &mut Self { - self.ignore_depth_values_shim(val); + self.set_ignore_depth_values_shim(val); self } #[cfg(web_sys_unstable_apis)] @@ -103,7 +196,7 @@ impl XrWebGlLayerInit { #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] pub fn stencil(&mut self, val: bool) -> &mut Self { - self.stencil_shim(val); + self.set_stencil_shim(val); self } } diff --git a/crates/webidl-tests/callbacks.rs b/crates/webidl-tests/callbacks.rs index 650e7b01244..eb7666fa5bb 100644 --- a/crates/webidl-tests/callbacks.rs +++ b/crates/webidl-tests/callbacks.rs @@ -1,4 +1,4 @@ -use crate::generated::*; +use crate::generated::{CallbackInterface1, CallbackInterface2, TakeCallbackInterface}; use js_sys::Function; use wasm_bindgen_test::*; diff --git a/crates/webidl-tests/dictionary.rs b/crates/webidl-tests/dictionary.rs index da9000d37da..c05c130a8e0 100644 --- a/crates/webidl-tests/dictionary.rs +++ b/crates/webidl-tests/dictionary.rs @@ -1,4 +1,4 @@ -use crate::generated::*; +use crate::generated::{CamelCaseMe, ManyTypes, OtherDict, PreserveNames, Required, A, B, C}; use wasm_bindgen::prelude::*; use wasm_bindgen_test::*; @@ -56,3 +56,38 @@ fn required() { fn correct_casing_in_js() { assert_camel_case(PreserveNames::new().weird_field_name(1)); } + +#[wasm_bindgen_test] +fn roundtrip_set_get() { + let mut many_types = ManyTypes::new(); + many_types.a("a"); + many_types.n1(1); + many_types.n2(2); + many_types.n3(3); + many_types.n4(4); + many_types.n5(5); + many_types.n6(6); + let mut other_dict = OtherDict::new(); + other_dict.a(42); + many_types.c(&other_dict); + + { + use crate::generated::{ManyTypesGetters, OtherDictGetters}; + assert_eq!(many_types.a(), "a"); + assert_eq!(many_types.n1(), 1); + assert_eq!(many_types.n2(), 2); + assert_eq!(many_types.n3(), 3); + assert_eq!(many_types.n4(), 4); + assert_eq!(many_types.n5(), 5); + assert_eq!(many_types.n6(), 6); + assert_eq!(many_types.c(), other_dict); + assert_eq!(many_types.c().a(), 42); + } + + crate::generated::ManyTypesGetters::c(&many_types).a(1337); + + { + use crate::generated::{ManyTypesGetters, OtherDictGetters}; + assert_eq!(many_types.c().a(), 1337); + } +} diff --git a/crates/webidl-tests/unstable.rs b/crates/webidl-tests/unstable.rs index 1a9eb739e0a..94aefcc414e 100644 --- a/crates/webidl-tests/unstable.rs +++ b/crates/webidl-tests/unstable.rs @@ -1,5 +1,5 @@ #[cfg(web_sys_unstable_apis)] -use crate::generated::*; +use crate::generated::{GetUnstableInterface, UnstableDictionary, UnstableEnum}; #[cfg(web_sys_unstable_apis)] use wasm_bindgen_test::*; diff --git a/crates/webidl-tests/webidls/enabled/dictionary.webidl b/crates/webidl-tests/webidls/enabled/dictionary.webidl index 45dd609aac3..026de4c3890 100644 --- a/crates/webidl-tests/webidls/enabled/dictionary.webidl +++ b/crates/webidl-tests/webidls/enabled/dictionary.webidl @@ -32,8 +32,7 @@ dictionary ManyTypes { short n4; unsigned long n5; long n6; - // TODO: needs fixing - // OtherDict c; + OtherDict c; }; dictionary OtherDict { diff --git a/crates/webidl/src/generator.rs b/crates/webidl/src/generator.rs index db8cff532ac..37ef66cfd3e 100644 --- a/crates/webidl/src/generator.rs +++ b/crates/webidl/src/generator.rs @@ -628,6 +628,7 @@ pub struct DictionaryField { pub name: Ident, pub js_name: String, pub ty: Type, + pub return_ty: Option, pub is_js_value_ref_option_type: bool, pub required: bool, pub unstable: bool, @@ -641,6 +642,7 @@ impl DictionaryField { ) -> TokenStream { let ty = &self.ty; let shim_name = self.shim_name(); + let set_shim_name = self.set_shim_name(); let js_name = &self.js_name; let js_value_ref_type = shared_ref( @@ -654,14 +656,93 @@ impl DictionaryField { ty.clone() }; - quote! { + let getter = self.return_ty.as_ref().map(|return_ty| { + quote! { + #cfg_features + #[wasm_bindgen(method, getter = #js_name)] + fn #shim_name(this: &#parent_ident) -> #return_ty; + } + }); + + let setter = quote! { #cfg_features #[wasm_bindgen(method, setter = #js_name)] - fn #shim_name(this: &#parent_ident, val: #ty); + fn #set_shim_name(this: &#parent_ident, val: #ty); + }; + + quote! { + #getter + + #setter + } + } + + fn generate_rust_getter( + &self, + options: &Options, + features: &BTreeSet, + cfg_features: &Option, + ) -> Option { + let DictionaryField { + name, + js_name, + ty: _, + return_ty, + is_js_value_ref_option_type: _, + required: _, + unstable, + } = self; + + let unstable_attr = maybe_unstable_attr(*unstable); + let unstable_docs = maybe_unstable_docs(*unstable); + + let doc_comment = comment( + format!("Get the `{}` field of this object.", js_name), + &required_doc_string(options, features), + ); + + let return_ty = return_ty.as_ref()?; + + quote! { + #unstable_attr + #cfg_features + #doc_comment + #unstable_docs + fn #name(&self) -> #return_ty; + } + .into() + } + + fn generate_rust_getter_impl( + &self, + cfg_features: &Option, + ) -> Option { + let DictionaryField { + name, + js_name: _, + ty: _, + return_ty, + is_js_value_ref_option_type: _, + required: _, + unstable, + } = self; + + let unstable_attr = maybe_unstable_attr(*unstable); + + let return_ty = return_ty.as_ref()?; + let shim_name = self.shim_name(); + + quote! { + #unstable_attr + #cfg_features + fn #name(&self) -> #return_ty { + self.#shim_name() + } } + .into() } - fn generate_rust_setter( + fn generate_rust_setter_impl( &self, options: &Options, features: &BTreeSet, @@ -671,6 +752,7 @@ impl DictionaryField { name, js_name, ty, + return_ty: _, is_js_value_ref_option_type: _, required: _, unstable, @@ -684,7 +766,7 @@ impl DictionaryField { &required_doc_string(options, features), ); - let shim_name = self.shim_name(); + let set_shim_name = self.set_shim_name(); let shim_args = if self.is_js_value_ref_option_type { quote! { val.unwrap_or(&::wasm_bindgen::JsValue::NULL) } @@ -698,7 +780,7 @@ impl DictionaryField { #doc_comment #unstable_docs pub fn #name(&mut self, val: #ty) -> &mut Self { - self.#shim_name(#shim_args); + self.#set_shim_name(#shim_args); self } } @@ -725,6 +807,10 @@ impl DictionaryField { fn shim_name(&self) -> Ident { format_ident!("{}_shim", self.name) } + + fn set_shim_name(&self) -> Ident { + format_ident!("set_{}_shim", self.name) + } } pub struct Dictionary { @@ -757,7 +843,7 @@ impl Dictionary { let name = &field.name; let ty = &field.ty; required_args.push(quote!( #name: #ty )); - required_calls.push(quote!( ret.#name(#name); )); + required_calls.push(quote!( Self::#name(&mut ret, #name); )); add_features(&mut required_features, &field.ty); } } @@ -772,28 +858,53 @@ impl Dictionary { format!("The `{}` dictionary.", name), &get_features_doc(options, name.to_string()), ); - let ctor_doc_comment = comment( - format!("Construct a new `{}`.", name), - &required_doc_string(options, &required_features), - ); let (field_features, field_cfg_features): (Vec<_>, Vec<_>) = fields .iter() .map(|field| field.features(options, name.to_string())) .unzip(); + let getter_trait_doc_comment = comment( + format!( + "The trait to access properties on the `{}` dictionary.", + name + ), + &get_features_doc(options, name.to_string()), + ); + let getter_trait_name = format_ident!("{}Getters", name); + let field_shims = fields .iter() .zip(field_cfg_features.iter()) .map(|(field, cfg_features)| field.generate_rust_shim(name, cfg_features)) .collect::>(); - let fields = fields + let getter_trait_fields = fields .iter() .zip(field_features.iter()) .zip(field_cfg_features.iter()) .map(|((field, features), cfg_features)| { - field.generate_rust_setter(options, features, cfg_features) + field.generate_rust_getter(options, features, cfg_features) + }) + .collect::>(); + + let getter_trait_impl_fields = fields + .iter() + .zip(field_cfg_features.iter()) + .map(|(field, cfg_features)| field.generate_rust_getter_impl(cfg_features)) + .collect::>(); + + let ctor_doc_comment = comment( + format!("Construct a new `{}`.", name), + &required_doc_string(options, &required_features), + ); + + let setter_impl_fields = fields + .iter() + .zip(field_features.iter()) + .zip(field_cfg_features.iter()) + .map(|((field, features), cfg_features)| { + field.generate_rust_setter_impl(options, features, cfg_features) }) .collect::>(); @@ -815,6 +926,17 @@ impl Dictionary { #(#field_shims)* } + #unstable_attr + #getter_trait_doc_comment + pub trait #getter_trait_name { + #(#getter_trait_fields)* + } + + #unstable_attr + impl #getter_trait_name for #name { + #(#getter_trait_impl_fields)* + } + #unstable_attr impl #name { #cfg_features @@ -827,7 +949,7 @@ impl Dictionary { ret } - #(#fields)* + #(#setter_impl_fields)* } }; diff --git a/crates/webidl/src/lib.rs b/crates/webidl/src/lib.rs index 6bd02dfcdee..17e76e895a7 100644 --- a/crates/webidl/src/lib.rs +++ b/crates/webidl/src/lib.rs @@ -396,6 +396,8 @@ impl<'src> FirstPassRecord<'src> { .to_syn_type(TypePosition::Argument) .unwrap_or(None)?; + let return_ty = idl_type.to_syn_type(TypePosition::Return).unwrap_or(None); + // Slice types aren't supported because they don't implement // `Into` match ty { @@ -437,6 +439,7 @@ impl<'src> FirstPassRecord<'src> { name: rust_ident(&snake_case_ident(field.identifier.0)), js_name: field.identifier.0.to_string(), ty, + return_ty, is_js_value_ref_option_type, unstable: unstable_override, }) @@ -781,6 +784,9 @@ impl<'src> FirstPassRecord<'src> { .to_syn_type(pos) .unwrap() .unwrap(), + return_ty: idl_type::IdlType::Callback + .to_syn_type(TypePosition::Return) + .unwrap_or(None), is_js_value_ref_option_type: false, unstable: false, })