#![allow(unused_imports)] #![allow(clippy::all)] use super::*; use wasm_bindgen::prelude::*; #[wasm_bindgen] extern "C" { # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ConsoleInstanceOptions)] #[derive(Debug, Clone, PartialEq, Eq)] #[doc = "The `ConsoleInstanceOptions` dictionary."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub type ConsoleInstanceOptions; } impl ConsoleInstanceOptions { #[doc = "Construct a new `ConsoleInstanceOptions`."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub fn new() -> Self { #[allow(unused_mut)] let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); ret } #[doc = "Change the `consoleID` field of this object."] #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `ConsoleInstanceOptions`*"] pub fn console_id(&mut self, val: &str) -> &mut Self { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set( self.as_ref(), &JsValue::from("consoleID"), &JsValue::from(val), ); debug_assert!( r.is_ok(), "setting properties should never fail on our dictionary objects" ); let _ = r; 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 { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("dump"), &JsValue::from(val)); debug_assert!( r.is_ok(), "setting properties should never fail on our dictionary objects" ); let _ = r; 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 { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set( self.as_ref(), &JsValue::from("innerID"), &JsValue::from(val), ); debug_assert!( r.is_ok(), "setting properties should never fail on our dictionary objects" ); let _ = r; self } #[cfg(feature = "ConsoleLogLevel")] #[doc = "Change the `maxLogLevel` field of this object."] #[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 { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set( self.as_ref(), &JsValue::from("maxLogLevel"), &JsValue::from(val), ); debug_assert!( r.is_ok(), "setting properties should never fail on our dictionary objects" ); let _ = r; 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 { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set( self.as_ref(), &JsValue::from("maxLogLevelPref"), &JsValue::from(val), ); debug_assert!( r.is_ok(), "setting properties should never fail on our dictionary objects" ); let _ = r; 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 { use wasm_bindgen::JsValue; let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("prefix"), &JsValue::from(val)); debug_assert!( r.is_ok(), "setting properties should never fail on our dictionary objects" ); let _ = r; self } } impl Default for ConsoleInstanceOptions { fn default() -> Self { Self::new() } }