1 #![allow(unused_imports)] 2 use super::*; 3 use wasm_bindgen::prelude::*; 4 #[wasm_bindgen] 5 extern "C" { 6 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = ProfileTimelineMarker)] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `ProfileTimelineMarker` dictionary."] 9 #[doc = ""] 10 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] 11 pub type ProfileTimelineMarker; 12 } 13 impl ProfileTimelineMarker { 14 #[doc = "Construct a new `ProfileTimelineMarker`."] 15 #[doc = ""] 16 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] new() -> Self17 pub fn new() -> Self { 18 #[allow(unused_mut)] 19 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); 20 ret 21 } 22 #[doc = "Change the `causeName` field of this object."] 23 #[doc = ""] 24 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] cause_name(&mut self, val: &str) -> &mut Self25 pub fn cause_name(&mut self, val: &str) -> &mut Self { 26 use wasm_bindgen::JsValue; 27 let r = ::js_sys::Reflect::set( 28 self.as_ref(), 29 &JsValue::from("causeName"), 30 &JsValue::from(val), 31 ); 32 debug_assert!( 33 r.is_ok(), 34 "setting properties should never fail on our dictionary objects" 35 ); 36 let _ = r; 37 self 38 } 39 #[doc = "Change the `end` field of this object."] 40 #[doc = ""] 41 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] end(&mut self, val: f64) -> &mut Self42 pub fn end(&mut self, val: f64) -> &mut Self { 43 use wasm_bindgen::JsValue; 44 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("end"), &JsValue::from(val)); 45 debug_assert!( 46 r.is_ok(), 47 "setting properties should never fail on our dictionary objects" 48 ); 49 let _ = r; 50 self 51 } 52 #[doc = "Change the `endStack` field of this object."] 53 #[doc = ""] 54 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] end_stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self55 pub fn end_stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { 56 use wasm_bindgen::JsValue; 57 let r = ::js_sys::Reflect::set( 58 self.as_ref(), 59 &JsValue::from("endStack"), 60 &JsValue::from(val), 61 ); 62 debug_assert!( 63 r.is_ok(), 64 "setting properties should never fail on our dictionary objects" 65 ); 66 let _ = r; 67 self 68 } 69 #[doc = "Change the `eventPhase` field of this object."] 70 #[doc = ""] 71 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] event_phase(&mut self, val: u16) -> &mut Self72 pub fn event_phase(&mut self, val: u16) -> &mut Self { 73 use wasm_bindgen::JsValue; 74 let r = ::js_sys::Reflect::set( 75 self.as_ref(), 76 &JsValue::from("eventPhase"), 77 &JsValue::from(val), 78 ); 79 debug_assert!( 80 r.is_ok(), 81 "setting properties should never fail on our dictionary objects" 82 ); 83 let _ = r; 84 self 85 } 86 #[doc = "Change the `isAnimationOnly` field of this object."] 87 #[doc = ""] 88 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] is_animation_only(&mut self, val: bool) -> &mut Self89 pub fn is_animation_only(&mut self, val: bool) -> &mut Self { 90 use wasm_bindgen::JsValue; 91 let r = ::js_sys::Reflect::set( 92 self.as_ref(), 93 &JsValue::from("isAnimationOnly"), 94 &JsValue::from(val), 95 ); 96 debug_assert!( 97 r.is_ok(), 98 "setting properties should never fail on our dictionary objects" 99 ); 100 let _ = r; 101 self 102 } 103 #[doc = "Change the `isOffMainThread` field of this object."] 104 #[doc = ""] 105 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] is_off_main_thread(&mut self, val: bool) -> &mut Self106 pub fn is_off_main_thread(&mut self, val: bool) -> &mut Self { 107 use wasm_bindgen::JsValue; 108 let r = ::js_sys::Reflect::set( 109 self.as_ref(), 110 &JsValue::from("isOffMainThread"), 111 &JsValue::from(val), 112 ); 113 debug_assert!( 114 r.is_ok(), 115 "setting properties should never fail on our dictionary objects" 116 ); 117 let _ = r; 118 self 119 } 120 #[cfg(feature = "ProfileTimelineMessagePortOperationType")] 121 #[doc = "Change the `messagePortOperation` field of this object."] 122 #[doc = ""] 123 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineMessagePortOperationType`*"] message_port_operation( &mut self, val: ProfileTimelineMessagePortOperationType, ) -> &mut Self124 pub fn message_port_operation( 125 &mut self, 126 val: ProfileTimelineMessagePortOperationType, 127 ) -> &mut Self { 128 use wasm_bindgen::JsValue; 129 let r = ::js_sys::Reflect::set( 130 self.as_ref(), 131 &JsValue::from("messagePortOperation"), 132 &JsValue::from(val), 133 ); 134 debug_assert!( 135 r.is_ok(), 136 "setting properties should never fail on our dictionary objects" 137 ); 138 let _ = r; 139 self 140 } 141 #[doc = "Change the `name` field of this object."] 142 #[doc = ""] 143 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] name(&mut self, val: &str) -> &mut Self144 pub fn name(&mut self, val: &str) -> &mut Self { 145 use wasm_bindgen::JsValue; 146 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("name"), &JsValue::from(val)); 147 debug_assert!( 148 r.is_ok(), 149 "setting properties should never fail on our dictionary objects" 150 ); 151 let _ = r; 152 self 153 } 154 #[doc = "Change the `processType` field of this object."] 155 #[doc = ""] 156 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] process_type(&mut self, val: u16) -> &mut Self157 pub fn process_type(&mut self, val: u16) -> &mut Self { 158 use wasm_bindgen::JsValue; 159 let r = ::js_sys::Reflect::set( 160 self.as_ref(), 161 &JsValue::from("processType"), 162 &JsValue::from(val), 163 ); 164 debug_assert!( 165 r.is_ok(), 166 "setting properties should never fail on our dictionary objects" 167 ); 168 let _ = r; 169 self 170 } 171 #[doc = "Change the `rectangles` field of this object."] 172 #[doc = ""] 173 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] rectangles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self174 pub fn rectangles(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { 175 use wasm_bindgen::JsValue; 176 let r = ::js_sys::Reflect::set( 177 self.as_ref(), 178 &JsValue::from("rectangles"), 179 &JsValue::from(val), 180 ); 181 debug_assert!( 182 r.is_ok(), 183 "setting properties should never fail on our dictionary objects" 184 ); 185 let _ = r; 186 self 187 } 188 #[doc = "Change the `stack` field of this object."] 189 #[doc = ""] 190 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self191 pub fn stack(&mut self, val: Option<&::js_sys::Object>) -> &mut Self { 192 use wasm_bindgen::JsValue; 193 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("stack"), &JsValue::from(val)); 194 debug_assert!( 195 r.is_ok(), 196 "setting properties should never fail on our dictionary objects" 197 ); 198 let _ = r; 199 self 200 } 201 #[doc = "Change the `start` field of this object."] 202 #[doc = ""] 203 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] start(&mut self, val: f64) -> &mut Self204 pub fn start(&mut self, val: f64) -> &mut Self { 205 use wasm_bindgen::JsValue; 206 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("start"), &JsValue::from(val)); 207 debug_assert!( 208 r.is_ok(), 209 "setting properties should never fail on our dictionary objects" 210 ); 211 let _ = r; 212 self 213 } 214 #[doc = "Change the `type` field of this object."] 215 #[doc = ""] 216 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] type_(&mut self, val: &str) -> &mut Self217 pub fn type_(&mut self, val: &str) -> &mut Self { 218 use wasm_bindgen::JsValue; 219 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val)); 220 debug_assert!( 221 r.is_ok(), 222 "setting properties should never fail on our dictionary objects" 223 ); 224 let _ = r; 225 self 226 } 227 #[doc = "Change the `unixTime` field of this object."] 228 #[doc = ""] 229 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`*"] unix_time(&mut self, val: f64) -> &mut Self230 pub fn unix_time(&mut self, val: f64) -> &mut Self { 231 use wasm_bindgen::JsValue; 232 let r = ::js_sys::Reflect::set( 233 self.as_ref(), 234 &JsValue::from("unixTime"), 235 &JsValue::from(val), 236 ); 237 debug_assert!( 238 r.is_ok(), 239 "setting properties should never fail on our dictionary objects" 240 ); 241 let _ = r; 242 self 243 } 244 #[cfg(feature = "ProfileTimelineWorkerOperationType")] 245 #[doc = "Change the `workerOperation` field of this object."] 246 #[doc = ""] 247 #[doc = "*This API requires the following crate features to be activated: `ProfileTimelineMarker`, `ProfileTimelineWorkerOperationType`*"] worker_operation(&mut self, val: ProfileTimelineWorkerOperationType) -> &mut Self248 pub fn worker_operation(&mut self, val: ProfileTimelineWorkerOperationType) -> &mut Self { 249 use wasm_bindgen::JsValue; 250 let r = ::js_sys::Reflect::set( 251 self.as_ref(), 252 &JsValue::from("workerOperation"), 253 &JsValue::from(val), 254 ); 255 debug_assert!( 256 r.is_ok(), 257 "setting properties should never fail on our dictionary objects" 258 ); 259 let _ = r; 260 self 261 } 262 } 263 impl Default for ProfileTimelineMarker { default() -> Self264 fn default() -> Self { 265 Self::new() 266 } 267 } 268