1use serde::{Serialize, Deserialize};
5use serde_json::Value as JsonValue;
6use std::borrow::Cow;
7
8#[derive(Debug, Clone, Serialize, Deserialize, Default)]
11#[serde(rename_all = "camelCase")]
12pub struct SourceOrderConfig {
13 parentOutlineColor: crate::dom::RGBA,
15 childOutlineColor: crate::dom::RGBA,
17}
18
19impl SourceOrderConfig {
20 pub fn builder(parentOutlineColor: crate::dom::RGBA, childOutlineColor: crate::dom::RGBA) -> SourceOrderConfigBuilder {
21 SourceOrderConfigBuilder {
22 parentOutlineColor: parentOutlineColor,
23 childOutlineColor: childOutlineColor,
24 }
25 }
26 pub fn parentOutlineColor(&self) -> &crate::dom::RGBA { &self.parentOutlineColor }
27 pub fn childOutlineColor(&self) -> &crate::dom::RGBA { &self.childOutlineColor }
28}
29
30
31pub struct SourceOrderConfigBuilder {
32 parentOutlineColor: crate::dom::RGBA,
33 childOutlineColor: crate::dom::RGBA,
34}
35
36impl SourceOrderConfigBuilder {
37 pub fn build(self) -> SourceOrderConfig {
38 SourceOrderConfig {
39 parentOutlineColor: self.parentOutlineColor,
40 childOutlineColor: self.childOutlineColor,
41 }
42 }
43}
44
45#[derive(Debug, Clone, Serialize, Deserialize, Default)]
48#[serde(rename_all = "camelCase")]
49pub struct GridHighlightConfig {
50 #[serde(skip_serializing_if = "Option::is_none")]
52 showGridExtensionLines: Option<bool>,
53 #[serde(skip_serializing_if = "Option::is_none")]
55 showPositiveLineNumbers: Option<bool>,
56 #[serde(skip_serializing_if = "Option::is_none")]
58 showNegativeLineNumbers: Option<bool>,
59 #[serde(skip_serializing_if = "Option::is_none")]
61 showAreaNames: Option<bool>,
62 #[serde(skip_serializing_if = "Option::is_none")]
64 showLineNames: Option<bool>,
65 #[serde(skip_serializing_if = "Option::is_none")]
67 showTrackSizes: Option<bool>,
68 #[serde(skip_serializing_if = "Option::is_none")]
70 gridBorderColor: Option<crate::dom::RGBA>,
71 #[serde(skip_serializing_if = "Option::is_none")]
73 cellBorderColor: Option<crate::dom::RGBA>,
74 #[serde(skip_serializing_if = "Option::is_none")]
76 rowLineColor: Option<crate::dom::RGBA>,
77 #[serde(skip_serializing_if = "Option::is_none")]
79 columnLineColor: Option<crate::dom::RGBA>,
80 #[serde(skip_serializing_if = "Option::is_none")]
82 gridBorderDash: Option<bool>,
83 #[serde(skip_serializing_if = "Option::is_none")]
85 cellBorderDash: Option<bool>,
86 #[serde(skip_serializing_if = "Option::is_none")]
88 rowLineDash: Option<bool>,
89 #[serde(skip_serializing_if = "Option::is_none")]
91 columnLineDash: Option<bool>,
92 #[serde(skip_serializing_if = "Option::is_none")]
94 rowGapColor: Option<crate::dom::RGBA>,
95 #[serde(skip_serializing_if = "Option::is_none")]
97 rowHatchColor: Option<crate::dom::RGBA>,
98 #[serde(skip_serializing_if = "Option::is_none")]
100 columnGapColor: Option<crate::dom::RGBA>,
101 #[serde(skip_serializing_if = "Option::is_none")]
103 columnHatchColor: Option<crate::dom::RGBA>,
104 #[serde(skip_serializing_if = "Option::is_none")]
106 areaBorderColor: Option<crate::dom::RGBA>,
107 #[serde(skip_serializing_if = "Option::is_none")]
109 gridBackgroundColor: Option<crate::dom::RGBA>,
110}
111
112impl GridHighlightConfig {
113 pub fn builder() -> GridHighlightConfigBuilder {
114 GridHighlightConfigBuilder {
115 showGridExtensionLines: None,
116 showPositiveLineNumbers: None,
117 showNegativeLineNumbers: None,
118 showAreaNames: None,
119 showLineNames: None,
120 showTrackSizes: None,
121 gridBorderColor: None,
122 cellBorderColor: None,
123 rowLineColor: None,
124 columnLineColor: None,
125 gridBorderDash: None,
126 cellBorderDash: None,
127 rowLineDash: None,
128 columnLineDash: None,
129 rowGapColor: None,
130 rowHatchColor: None,
131 columnGapColor: None,
132 columnHatchColor: None,
133 areaBorderColor: None,
134 gridBackgroundColor: None,
135 }
136 }
137 pub fn showGridExtensionLines(&self) -> Option<bool> { self.showGridExtensionLines }
138 pub fn showPositiveLineNumbers(&self) -> Option<bool> { self.showPositiveLineNumbers }
139 pub fn showNegativeLineNumbers(&self) -> Option<bool> { self.showNegativeLineNumbers }
140 pub fn showAreaNames(&self) -> Option<bool> { self.showAreaNames }
141 pub fn showLineNames(&self) -> Option<bool> { self.showLineNames }
142 pub fn showTrackSizes(&self) -> Option<bool> { self.showTrackSizes }
143 pub fn gridBorderColor(&self) -> Option<&crate::dom::RGBA> { self.gridBorderColor.as_ref() }
144 pub fn cellBorderColor(&self) -> Option<&crate::dom::RGBA> { self.cellBorderColor.as_ref() }
145 pub fn rowLineColor(&self) -> Option<&crate::dom::RGBA> { self.rowLineColor.as_ref() }
146 pub fn columnLineColor(&self) -> Option<&crate::dom::RGBA> { self.columnLineColor.as_ref() }
147 pub fn gridBorderDash(&self) -> Option<bool> { self.gridBorderDash }
148 pub fn cellBorderDash(&self) -> Option<bool> { self.cellBorderDash }
149 pub fn rowLineDash(&self) -> Option<bool> { self.rowLineDash }
150 pub fn columnLineDash(&self) -> Option<bool> { self.columnLineDash }
151 pub fn rowGapColor(&self) -> Option<&crate::dom::RGBA> { self.rowGapColor.as_ref() }
152 pub fn rowHatchColor(&self) -> Option<&crate::dom::RGBA> { self.rowHatchColor.as_ref() }
153 pub fn columnGapColor(&self) -> Option<&crate::dom::RGBA> { self.columnGapColor.as_ref() }
154 pub fn columnHatchColor(&self) -> Option<&crate::dom::RGBA> { self.columnHatchColor.as_ref() }
155 pub fn areaBorderColor(&self) -> Option<&crate::dom::RGBA> { self.areaBorderColor.as_ref() }
156 pub fn gridBackgroundColor(&self) -> Option<&crate::dom::RGBA> { self.gridBackgroundColor.as_ref() }
157}
158
159#[derive(Default)]
160pub struct GridHighlightConfigBuilder {
161 showGridExtensionLines: Option<bool>,
162 showPositiveLineNumbers: Option<bool>,
163 showNegativeLineNumbers: Option<bool>,
164 showAreaNames: Option<bool>,
165 showLineNames: Option<bool>,
166 showTrackSizes: Option<bool>,
167 gridBorderColor: Option<crate::dom::RGBA>,
168 cellBorderColor: Option<crate::dom::RGBA>,
169 rowLineColor: Option<crate::dom::RGBA>,
170 columnLineColor: Option<crate::dom::RGBA>,
171 gridBorderDash: Option<bool>,
172 cellBorderDash: Option<bool>,
173 rowLineDash: Option<bool>,
174 columnLineDash: Option<bool>,
175 rowGapColor: Option<crate::dom::RGBA>,
176 rowHatchColor: Option<crate::dom::RGBA>,
177 columnGapColor: Option<crate::dom::RGBA>,
178 columnHatchColor: Option<crate::dom::RGBA>,
179 areaBorderColor: Option<crate::dom::RGBA>,
180 gridBackgroundColor: Option<crate::dom::RGBA>,
181}
182
183impl GridHighlightConfigBuilder {
184 pub fn showGridExtensionLines(mut self, showGridExtensionLines: bool) -> Self { self.showGridExtensionLines = Some(showGridExtensionLines); self }
186 pub fn showPositiveLineNumbers(mut self, showPositiveLineNumbers: bool) -> Self { self.showPositiveLineNumbers = Some(showPositiveLineNumbers); self }
188 pub fn showNegativeLineNumbers(mut self, showNegativeLineNumbers: bool) -> Self { self.showNegativeLineNumbers = Some(showNegativeLineNumbers); self }
190 pub fn showAreaNames(mut self, showAreaNames: bool) -> Self { self.showAreaNames = Some(showAreaNames); self }
192 pub fn showLineNames(mut self, showLineNames: bool) -> Self { self.showLineNames = Some(showLineNames); self }
194 pub fn showTrackSizes(mut self, showTrackSizes: bool) -> Self { self.showTrackSizes = Some(showTrackSizes); self }
196 pub fn gridBorderColor(mut self, gridBorderColor: crate::dom::RGBA) -> Self { self.gridBorderColor = Some(gridBorderColor); self }
198 pub fn cellBorderColor(mut self, cellBorderColor: crate::dom::RGBA) -> Self { self.cellBorderColor = Some(cellBorderColor); self }
200 pub fn rowLineColor(mut self, rowLineColor: crate::dom::RGBA) -> Self { self.rowLineColor = Some(rowLineColor); self }
202 pub fn columnLineColor(mut self, columnLineColor: crate::dom::RGBA) -> Self { self.columnLineColor = Some(columnLineColor); self }
204 pub fn gridBorderDash(mut self, gridBorderDash: bool) -> Self { self.gridBorderDash = Some(gridBorderDash); self }
206 pub fn cellBorderDash(mut self, cellBorderDash: bool) -> Self { self.cellBorderDash = Some(cellBorderDash); self }
208 pub fn rowLineDash(mut self, rowLineDash: bool) -> Self { self.rowLineDash = Some(rowLineDash); self }
210 pub fn columnLineDash(mut self, columnLineDash: bool) -> Self { self.columnLineDash = Some(columnLineDash); self }
212 pub fn rowGapColor(mut self, rowGapColor: crate::dom::RGBA) -> Self { self.rowGapColor = Some(rowGapColor); self }
214 pub fn rowHatchColor(mut self, rowHatchColor: crate::dom::RGBA) -> Self { self.rowHatchColor = Some(rowHatchColor); self }
216 pub fn columnGapColor(mut self, columnGapColor: crate::dom::RGBA) -> Self { self.columnGapColor = Some(columnGapColor); self }
218 pub fn columnHatchColor(mut self, columnHatchColor: crate::dom::RGBA) -> Self { self.columnHatchColor = Some(columnHatchColor); self }
220 pub fn areaBorderColor(mut self, areaBorderColor: crate::dom::RGBA) -> Self { self.areaBorderColor = Some(areaBorderColor); self }
222 pub fn gridBackgroundColor(mut self, gridBackgroundColor: crate::dom::RGBA) -> Self { self.gridBackgroundColor = Some(gridBackgroundColor); self }
224 pub fn build(self) -> GridHighlightConfig {
225 GridHighlightConfig {
226 showGridExtensionLines: self.showGridExtensionLines,
227 showPositiveLineNumbers: self.showPositiveLineNumbers,
228 showNegativeLineNumbers: self.showNegativeLineNumbers,
229 showAreaNames: self.showAreaNames,
230 showLineNames: self.showLineNames,
231 showTrackSizes: self.showTrackSizes,
232 gridBorderColor: self.gridBorderColor,
233 cellBorderColor: self.cellBorderColor,
234 rowLineColor: self.rowLineColor,
235 columnLineColor: self.columnLineColor,
236 gridBorderDash: self.gridBorderDash,
237 cellBorderDash: self.cellBorderDash,
238 rowLineDash: self.rowLineDash,
239 columnLineDash: self.columnLineDash,
240 rowGapColor: self.rowGapColor,
241 rowHatchColor: self.rowHatchColor,
242 columnGapColor: self.columnGapColor,
243 columnHatchColor: self.columnHatchColor,
244 areaBorderColor: self.areaBorderColor,
245 gridBackgroundColor: self.gridBackgroundColor,
246 }
247 }
248}
249
250#[derive(Debug, Clone, Serialize, Deserialize, Default)]
253#[serde(rename_all = "camelCase")]
254pub struct FlexContainerHighlightConfig<'a> {
255 #[serde(skip_serializing_if = "Option::is_none")]
257 containerBorder: Option<LineStyle<'a>>,
258 #[serde(skip_serializing_if = "Option::is_none")]
260 lineSeparator: Option<LineStyle<'a>>,
261 #[serde(skip_serializing_if = "Option::is_none")]
263 itemSeparator: Option<LineStyle<'a>>,
264 #[serde(skip_serializing_if = "Option::is_none")]
266 mainDistributedSpace: Option<BoxStyle>,
267 #[serde(skip_serializing_if = "Option::is_none")]
269 crossDistributedSpace: Option<BoxStyle>,
270 #[serde(skip_serializing_if = "Option::is_none")]
272 rowGapSpace: Option<BoxStyle>,
273 #[serde(skip_serializing_if = "Option::is_none")]
275 columnGapSpace: Option<BoxStyle>,
276 #[serde(skip_serializing_if = "Option::is_none")]
278 crossAlignment: Option<LineStyle<'a>>,
279}
280
281impl<'a> FlexContainerHighlightConfig<'a> {
282 pub fn builder() -> FlexContainerHighlightConfigBuilder<'a> {
283 FlexContainerHighlightConfigBuilder {
284 containerBorder: None,
285 lineSeparator: None,
286 itemSeparator: None,
287 mainDistributedSpace: None,
288 crossDistributedSpace: None,
289 rowGapSpace: None,
290 columnGapSpace: None,
291 crossAlignment: None,
292 }
293 }
294 pub fn containerBorder(&self) -> Option<&LineStyle<'a>> { self.containerBorder.as_ref() }
295 pub fn lineSeparator(&self) -> Option<&LineStyle<'a>> { self.lineSeparator.as_ref() }
296 pub fn itemSeparator(&self) -> Option<&LineStyle<'a>> { self.itemSeparator.as_ref() }
297 pub fn mainDistributedSpace(&self) -> Option<&BoxStyle> { self.mainDistributedSpace.as_ref() }
298 pub fn crossDistributedSpace(&self) -> Option<&BoxStyle> { self.crossDistributedSpace.as_ref() }
299 pub fn rowGapSpace(&self) -> Option<&BoxStyle> { self.rowGapSpace.as_ref() }
300 pub fn columnGapSpace(&self) -> Option<&BoxStyle> { self.columnGapSpace.as_ref() }
301 pub fn crossAlignment(&self) -> Option<&LineStyle<'a>> { self.crossAlignment.as_ref() }
302}
303
304#[derive(Default)]
305pub struct FlexContainerHighlightConfigBuilder<'a> {
306 containerBorder: Option<LineStyle<'a>>,
307 lineSeparator: Option<LineStyle<'a>>,
308 itemSeparator: Option<LineStyle<'a>>,
309 mainDistributedSpace: Option<BoxStyle>,
310 crossDistributedSpace: Option<BoxStyle>,
311 rowGapSpace: Option<BoxStyle>,
312 columnGapSpace: Option<BoxStyle>,
313 crossAlignment: Option<LineStyle<'a>>,
314}
315
316impl<'a> FlexContainerHighlightConfigBuilder<'a> {
317 pub fn containerBorder(mut self, containerBorder: LineStyle<'a>) -> Self { self.containerBorder = Some(containerBorder); self }
319 pub fn lineSeparator(mut self, lineSeparator: LineStyle<'a>) -> Self { self.lineSeparator = Some(lineSeparator); self }
321 pub fn itemSeparator(mut self, itemSeparator: LineStyle<'a>) -> Self { self.itemSeparator = Some(itemSeparator); self }
323 pub fn mainDistributedSpace(mut self, mainDistributedSpace: BoxStyle) -> Self { self.mainDistributedSpace = Some(mainDistributedSpace); self }
325 pub fn crossDistributedSpace(mut self, crossDistributedSpace: BoxStyle) -> Self { self.crossDistributedSpace = Some(crossDistributedSpace); self }
327 pub fn rowGapSpace(mut self, rowGapSpace: BoxStyle) -> Self { self.rowGapSpace = Some(rowGapSpace); self }
329 pub fn columnGapSpace(mut self, columnGapSpace: BoxStyle) -> Self { self.columnGapSpace = Some(columnGapSpace); self }
331 pub fn crossAlignment(mut self, crossAlignment: LineStyle<'a>) -> Self { self.crossAlignment = Some(crossAlignment); self }
333 pub fn build(self) -> FlexContainerHighlightConfig<'a> {
334 FlexContainerHighlightConfig {
335 containerBorder: self.containerBorder,
336 lineSeparator: self.lineSeparator,
337 itemSeparator: self.itemSeparator,
338 mainDistributedSpace: self.mainDistributedSpace,
339 crossDistributedSpace: self.crossDistributedSpace,
340 rowGapSpace: self.rowGapSpace,
341 columnGapSpace: self.columnGapSpace,
342 crossAlignment: self.crossAlignment,
343 }
344 }
345}
346
347#[derive(Debug, Clone, Serialize, Deserialize, Default)]
350#[serde(rename_all = "camelCase")]
351pub struct FlexItemHighlightConfig<'a> {
352 #[serde(skip_serializing_if = "Option::is_none")]
354 baseSizeBox: Option<BoxStyle>,
355 #[serde(skip_serializing_if = "Option::is_none")]
357 baseSizeBorder: Option<LineStyle<'a>>,
358 #[serde(skip_serializing_if = "Option::is_none")]
360 flexibilityArrow: Option<LineStyle<'a>>,
361}
362
363impl<'a> FlexItemHighlightConfig<'a> {
364 pub fn builder() -> FlexItemHighlightConfigBuilder<'a> {
365 FlexItemHighlightConfigBuilder {
366 baseSizeBox: None,
367 baseSizeBorder: None,
368 flexibilityArrow: None,
369 }
370 }
371 pub fn baseSizeBox(&self) -> Option<&BoxStyle> { self.baseSizeBox.as_ref() }
372 pub fn baseSizeBorder(&self) -> Option<&LineStyle<'a>> { self.baseSizeBorder.as_ref() }
373 pub fn flexibilityArrow(&self) -> Option<&LineStyle<'a>> { self.flexibilityArrow.as_ref() }
374}
375
376#[derive(Default)]
377pub struct FlexItemHighlightConfigBuilder<'a> {
378 baseSizeBox: Option<BoxStyle>,
379 baseSizeBorder: Option<LineStyle<'a>>,
380 flexibilityArrow: Option<LineStyle<'a>>,
381}
382
383impl<'a> FlexItemHighlightConfigBuilder<'a> {
384 pub fn baseSizeBox(mut self, baseSizeBox: BoxStyle) -> Self { self.baseSizeBox = Some(baseSizeBox); self }
386 pub fn baseSizeBorder(mut self, baseSizeBorder: LineStyle<'a>) -> Self { self.baseSizeBorder = Some(baseSizeBorder); self }
388 pub fn flexibilityArrow(mut self, flexibilityArrow: LineStyle<'a>) -> Self { self.flexibilityArrow = Some(flexibilityArrow); self }
390 pub fn build(self) -> FlexItemHighlightConfig<'a> {
391 FlexItemHighlightConfig {
392 baseSizeBox: self.baseSizeBox,
393 baseSizeBorder: self.baseSizeBorder,
394 flexibilityArrow: self.flexibilityArrow,
395 }
396 }
397}
398
399#[derive(Debug, Clone, Serialize, Deserialize, Default)]
402#[serde(rename_all = "camelCase")]
403pub struct LineStyle<'a> {
404 #[serde(skip_serializing_if = "Option::is_none")]
406 color: Option<crate::dom::RGBA>,
407 #[serde(skip_serializing_if = "Option::is_none")]
409 pattern: Option<Cow<'a, str>>,
410}
411
412impl<'a> LineStyle<'a> {
413 pub fn builder() -> LineStyleBuilder<'a> {
414 LineStyleBuilder {
415 color: None,
416 pattern: None,
417 }
418 }
419 pub fn color(&self) -> Option<&crate::dom::RGBA> { self.color.as_ref() }
420 pub fn pattern(&self) -> Option<&str> { self.pattern.as_deref() }
421}
422
423#[derive(Default)]
424pub struct LineStyleBuilder<'a> {
425 color: Option<crate::dom::RGBA>,
426 pattern: Option<Cow<'a, str>>,
427}
428
429impl<'a> LineStyleBuilder<'a> {
430 pub fn color(mut self, color: crate::dom::RGBA) -> Self { self.color = Some(color); self }
432 pub fn pattern(mut self, pattern: impl Into<Cow<'a, str>>) -> Self { self.pattern = Some(pattern.into()); self }
434 pub fn build(self) -> LineStyle<'a> {
435 LineStyle {
436 color: self.color,
437 pattern: self.pattern,
438 }
439 }
440}
441
442#[derive(Debug, Clone, Serialize, Deserialize, Default)]
445#[serde(rename_all = "camelCase")]
446pub struct BoxStyle {
447 #[serde(skip_serializing_if = "Option::is_none")]
449 fillColor: Option<crate::dom::RGBA>,
450 #[serde(skip_serializing_if = "Option::is_none")]
452 hatchColor: Option<crate::dom::RGBA>,
453}
454
455impl BoxStyle {
456 pub fn builder() -> BoxStyleBuilder {
457 BoxStyleBuilder {
458 fillColor: None,
459 hatchColor: None,
460 }
461 }
462 pub fn fillColor(&self) -> Option<&crate::dom::RGBA> { self.fillColor.as_ref() }
463 pub fn hatchColor(&self) -> Option<&crate::dom::RGBA> { self.hatchColor.as_ref() }
464}
465
466#[derive(Default)]
467pub struct BoxStyleBuilder {
468 fillColor: Option<crate::dom::RGBA>,
469 hatchColor: Option<crate::dom::RGBA>,
470}
471
472impl BoxStyleBuilder {
473 pub fn fillColor(mut self, fillColor: crate::dom::RGBA) -> Self { self.fillColor = Some(fillColor); self }
475 pub fn hatchColor(mut self, hatchColor: crate::dom::RGBA) -> Self { self.hatchColor = Some(hatchColor); self }
477 pub fn build(self) -> BoxStyle {
478 BoxStyle {
479 fillColor: self.fillColor,
480 hatchColor: self.hatchColor,
481 }
482 }
483}
484
485
486#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
487pub enum ContrastAlgorithm {
488 #[default]
489 #[serde(rename = "aa")]
490 Aa,
491 #[serde(rename = "aaa")]
492 Aaa,
493 #[serde(rename = "apca")]
494 Apca,
495}
496
497#[derive(Debug, Clone, Serialize, Deserialize, Default)]
500#[serde(rename_all = "camelCase")]
501pub struct HighlightConfig<'a> {
502 #[serde(skip_serializing_if = "Option::is_none")]
504 showInfo: Option<bool>,
505 #[serde(skip_serializing_if = "Option::is_none")]
507 showStyles: Option<bool>,
508 #[serde(skip_serializing_if = "Option::is_none")]
510 showRulers: Option<bool>,
511 #[serde(skip_serializing_if = "Option::is_none")]
513 showAccessibilityInfo: Option<bool>,
514 #[serde(skip_serializing_if = "Option::is_none")]
516 showExtensionLines: Option<bool>,
517 #[serde(skip_serializing_if = "Option::is_none")]
519 contentColor: Option<crate::dom::RGBA>,
520 #[serde(skip_serializing_if = "Option::is_none")]
522 paddingColor: Option<crate::dom::RGBA>,
523 #[serde(skip_serializing_if = "Option::is_none")]
525 borderColor: Option<crate::dom::RGBA>,
526 #[serde(skip_serializing_if = "Option::is_none")]
528 marginColor: Option<crate::dom::RGBA>,
529 #[serde(skip_serializing_if = "Option::is_none")]
531 eventTargetColor: Option<crate::dom::RGBA>,
532 #[serde(skip_serializing_if = "Option::is_none")]
534 shapeColor: Option<crate::dom::RGBA>,
535 #[serde(skip_serializing_if = "Option::is_none")]
537 shapeMarginColor: Option<crate::dom::RGBA>,
538 #[serde(skip_serializing_if = "Option::is_none")]
540 cssGridColor: Option<crate::dom::RGBA>,
541 #[serde(skip_serializing_if = "Option::is_none")]
543 colorFormat: Option<ColorFormat>,
544 #[serde(skip_serializing_if = "Option::is_none")]
546 gridHighlightConfig: Option<GridHighlightConfig>,
547 #[serde(skip_serializing_if = "Option::is_none")]
549 flexContainerHighlightConfig: Option<FlexContainerHighlightConfig<'a>>,
550 #[serde(skip_serializing_if = "Option::is_none")]
552 flexItemHighlightConfig: Option<FlexItemHighlightConfig<'a>>,
553 #[serde(skip_serializing_if = "Option::is_none")]
555 contrastAlgorithm: Option<ContrastAlgorithm>,
556 #[serde(skip_serializing_if = "Option::is_none")]
558 containerQueryContainerHighlightConfig: Option<ContainerQueryContainerHighlightConfig<'a>>,
559}
560
561impl<'a> HighlightConfig<'a> {
562 pub fn builder() -> HighlightConfigBuilder<'a> {
563 HighlightConfigBuilder {
564 showInfo: None,
565 showStyles: None,
566 showRulers: None,
567 showAccessibilityInfo: None,
568 showExtensionLines: None,
569 contentColor: None,
570 paddingColor: None,
571 borderColor: None,
572 marginColor: None,
573 eventTargetColor: None,
574 shapeColor: None,
575 shapeMarginColor: None,
576 cssGridColor: None,
577 colorFormat: None,
578 gridHighlightConfig: None,
579 flexContainerHighlightConfig: None,
580 flexItemHighlightConfig: None,
581 contrastAlgorithm: None,
582 containerQueryContainerHighlightConfig: None,
583 }
584 }
585 pub fn showInfo(&self) -> Option<bool> { self.showInfo }
586 pub fn showStyles(&self) -> Option<bool> { self.showStyles }
587 pub fn showRulers(&self) -> Option<bool> { self.showRulers }
588 pub fn showAccessibilityInfo(&self) -> Option<bool> { self.showAccessibilityInfo }
589 pub fn showExtensionLines(&self) -> Option<bool> { self.showExtensionLines }
590 pub fn contentColor(&self) -> Option<&crate::dom::RGBA> { self.contentColor.as_ref() }
591 pub fn paddingColor(&self) -> Option<&crate::dom::RGBA> { self.paddingColor.as_ref() }
592 pub fn borderColor(&self) -> Option<&crate::dom::RGBA> { self.borderColor.as_ref() }
593 pub fn marginColor(&self) -> Option<&crate::dom::RGBA> { self.marginColor.as_ref() }
594 pub fn eventTargetColor(&self) -> Option<&crate::dom::RGBA> { self.eventTargetColor.as_ref() }
595 pub fn shapeColor(&self) -> Option<&crate::dom::RGBA> { self.shapeColor.as_ref() }
596 pub fn shapeMarginColor(&self) -> Option<&crate::dom::RGBA> { self.shapeMarginColor.as_ref() }
597 pub fn cssGridColor(&self) -> Option<&crate::dom::RGBA> { self.cssGridColor.as_ref() }
598 pub fn colorFormat(&self) -> Option<&ColorFormat> { self.colorFormat.as_ref() }
599 pub fn gridHighlightConfig(&self) -> Option<&GridHighlightConfig> { self.gridHighlightConfig.as_ref() }
600 pub fn flexContainerHighlightConfig(&self) -> Option<&FlexContainerHighlightConfig<'a>> { self.flexContainerHighlightConfig.as_ref() }
601 pub fn flexItemHighlightConfig(&self) -> Option<&FlexItemHighlightConfig<'a>> { self.flexItemHighlightConfig.as_ref() }
602 pub fn contrastAlgorithm(&self) -> Option<&ContrastAlgorithm> { self.contrastAlgorithm.as_ref() }
603 pub fn containerQueryContainerHighlightConfig(&self) -> Option<&ContainerQueryContainerHighlightConfig<'a>> { self.containerQueryContainerHighlightConfig.as_ref() }
604}
605
606#[derive(Default)]
607pub struct HighlightConfigBuilder<'a> {
608 showInfo: Option<bool>,
609 showStyles: Option<bool>,
610 showRulers: Option<bool>,
611 showAccessibilityInfo: Option<bool>,
612 showExtensionLines: Option<bool>,
613 contentColor: Option<crate::dom::RGBA>,
614 paddingColor: Option<crate::dom::RGBA>,
615 borderColor: Option<crate::dom::RGBA>,
616 marginColor: Option<crate::dom::RGBA>,
617 eventTargetColor: Option<crate::dom::RGBA>,
618 shapeColor: Option<crate::dom::RGBA>,
619 shapeMarginColor: Option<crate::dom::RGBA>,
620 cssGridColor: Option<crate::dom::RGBA>,
621 colorFormat: Option<ColorFormat>,
622 gridHighlightConfig: Option<GridHighlightConfig>,
623 flexContainerHighlightConfig: Option<FlexContainerHighlightConfig<'a>>,
624 flexItemHighlightConfig: Option<FlexItemHighlightConfig<'a>>,
625 contrastAlgorithm: Option<ContrastAlgorithm>,
626 containerQueryContainerHighlightConfig: Option<ContainerQueryContainerHighlightConfig<'a>>,
627}
628
629impl<'a> HighlightConfigBuilder<'a> {
630 pub fn showInfo(mut self, showInfo: bool) -> Self { self.showInfo = Some(showInfo); self }
632 pub fn showStyles(mut self, showStyles: bool) -> Self { self.showStyles = Some(showStyles); self }
634 pub fn showRulers(mut self, showRulers: bool) -> Self { self.showRulers = Some(showRulers); self }
636 pub fn showAccessibilityInfo(mut self, showAccessibilityInfo: bool) -> Self { self.showAccessibilityInfo = Some(showAccessibilityInfo); self }
638 pub fn showExtensionLines(mut self, showExtensionLines: bool) -> Self { self.showExtensionLines = Some(showExtensionLines); self }
640 pub fn contentColor(mut self, contentColor: crate::dom::RGBA) -> Self { self.contentColor = Some(contentColor); self }
642 pub fn paddingColor(mut self, paddingColor: crate::dom::RGBA) -> Self { self.paddingColor = Some(paddingColor); self }
644 pub fn borderColor(mut self, borderColor: crate::dom::RGBA) -> Self { self.borderColor = Some(borderColor); self }
646 pub fn marginColor(mut self, marginColor: crate::dom::RGBA) -> Self { self.marginColor = Some(marginColor); self }
648 pub fn eventTargetColor(mut self, eventTargetColor: crate::dom::RGBA) -> Self { self.eventTargetColor = Some(eventTargetColor); self }
650 pub fn shapeColor(mut self, shapeColor: crate::dom::RGBA) -> Self { self.shapeColor = Some(shapeColor); self }
652 pub fn shapeMarginColor(mut self, shapeMarginColor: crate::dom::RGBA) -> Self { self.shapeMarginColor = Some(shapeMarginColor); self }
654 pub fn cssGridColor(mut self, cssGridColor: crate::dom::RGBA) -> Self { self.cssGridColor = Some(cssGridColor); self }
656 pub fn colorFormat(mut self, colorFormat: ColorFormat) -> Self { self.colorFormat = Some(colorFormat); self }
658 pub fn gridHighlightConfig(mut self, gridHighlightConfig: GridHighlightConfig) -> Self { self.gridHighlightConfig = Some(gridHighlightConfig); self }
660 pub fn flexContainerHighlightConfig(mut self, flexContainerHighlightConfig: FlexContainerHighlightConfig<'a>) -> Self { self.flexContainerHighlightConfig = Some(flexContainerHighlightConfig); self }
662 pub fn flexItemHighlightConfig(mut self, flexItemHighlightConfig: FlexItemHighlightConfig<'a>) -> Self { self.flexItemHighlightConfig = Some(flexItemHighlightConfig); self }
664 pub fn contrastAlgorithm(mut self, contrastAlgorithm: ContrastAlgorithm) -> Self { self.contrastAlgorithm = Some(contrastAlgorithm); self }
666 pub fn containerQueryContainerHighlightConfig(mut self, containerQueryContainerHighlightConfig: ContainerQueryContainerHighlightConfig<'a>) -> Self { self.containerQueryContainerHighlightConfig = Some(containerQueryContainerHighlightConfig); self }
668 pub fn build(self) -> HighlightConfig<'a> {
669 HighlightConfig {
670 showInfo: self.showInfo,
671 showStyles: self.showStyles,
672 showRulers: self.showRulers,
673 showAccessibilityInfo: self.showAccessibilityInfo,
674 showExtensionLines: self.showExtensionLines,
675 contentColor: self.contentColor,
676 paddingColor: self.paddingColor,
677 borderColor: self.borderColor,
678 marginColor: self.marginColor,
679 eventTargetColor: self.eventTargetColor,
680 shapeColor: self.shapeColor,
681 shapeMarginColor: self.shapeMarginColor,
682 cssGridColor: self.cssGridColor,
683 colorFormat: self.colorFormat,
684 gridHighlightConfig: self.gridHighlightConfig,
685 flexContainerHighlightConfig: self.flexContainerHighlightConfig,
686 flexItemHighlightConfig: self.flexItemHighlightConfig,
687 contrastAlgorithm: self.contrastAlgorithm,
688 containerQueryContainerHighlightConfig: self.containerQueryContainerHighlightConfig,
689 }
690 }
691}
692
693
694#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
695pub enum ColorFormat {
696 #[default]
697 #[serde(rename = "rgb")]
698 Rgb,
699 #[serde(rename = "hsl")]
700 Hsl,
701 #[serde(rename = "hwb")]
702 Hwb,
703 #[serde(rename = "hex")]
704 Hex,
705}
706
707#[derive(Debug, Clone, Serialize, Deserialize, Default)]
710#[serde(rename_all = "camelCase")]
711pub struct GridNodeHighlightConfig {
712 gridHighlightConfig: GridHighlightConfig,
714 nodeId: crate::dom::NodeId,
716}
717
718impl GridNodeHighlightConfig {
719 pub fn builder(gridHighlightConfig: GridHighlightConfig, nodeId: crate::dom::NodeId) -> GridNodeHighlightConfigBuilder {
720 GridNodeHighlightConfigBuilder {
721 gridHighlightConfig: gridHighlightConfig,
722 nodeId: nodeId,
723 }
724 }
725 pub fn gridHighlightConfig(&self) -> &GridHighlightConfig { &self.gridHighlightConfig }
726 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
727}
728
729
730pub struct GridNodeHighlightConfigBuilder {
731 gridHighlightConfig: GridHighlightConfig,
732 nodeId: crate::dom::NodeId,
733}
734
735impl GridNodeHighlightConfigBuilder {
736 pub fn build(self) -> GridNodeHighlightConfig {
737 GridNodeHighlightConfig {
738 gridHighlightConfig: self.gridHighlightConfig,
739 nodeId: self.nodeId,
740 }
741 }
742}
743
744
745#[derive(Debug, Clone, Serialize, Deserialize, Default)]
746#[serde(rename_all = "camelCase")]
747pub struct FlexNodeHighlightConfig<'a> {
748 flexContainerHighlightConfig: FlexContainerHighlightConfig<'a>,
750 nodeId: crate::dom::NodeId,
752}
753
754impl<'a> FlexNodeHighlightConfig<'a> {
755 pub fn builder(flexContainerHighlightConfig: FlexContainerHighlightConfig<'a>, nodeId: crate::dom::NodeId) -> FlexNodeHighlightConfigBuilder<'a> {
756 FlexNodeHighlightConfigBuilder {
757 flexContainerHighlightConfig: flexContainerHighlightConfig,
758 nodeId: nodeId,
759 }
760 }
761 pub fn flexContainerHighlightConfig(&self) -> &FlexContainerHighlightConfig<'a> { &self.flexContainerHighlightConfig }
762 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
763}
764
765
766pub struct FlexNodeHighlightConfigBuilder<'a> {
767 flexContainerHighlightConfig: FlexContainerHighlightConfig<'a>,
768 nodeId: crate::dom::NodeId,
769}
770
771impl<'a> FlexNodeHighlightConfigBuilder<'a> {
772 pub fn build(self) -> FlexNodeHighlightConfig<'a> {
773 FlexNodeHighlightConfig {
774 flexContainerHighlightConfig: self.flexContainerHighlightConfig,
775 nodeId: self.nodeId,
776 }
777 }
778}
779
780
781#[derive(Debug, Clone, Serialize, Deserialize, Default)]
782#[serde(rename_all = "camelCase")]
783pub struct ScrollSnapContainerHighlightConfig<'a> {
784 #[serde(skip_serializing_if = "Option::is_none")]
786 snapportBorder: Option<LineStyle<'a>>,
787 #[serde(skip_serializing_if = "Option::is_none")]
789 snapAreaBorder: Option<LineStyle<'a>>,
790 #[serde(skip_serializing_if = "Option::is_none")]
792 scrollMarginColor: Option<crate::dom::RGBA>,
793 #[serde(skip_serializing_if = "Option::is_none")]
795 scrollPaddingColor: Option<crate::dom::RGBA>,
796}
797
798impl<'a> ScrollSnapContainerHighlightConfig<'a> {
799 pub fn builder() -> ScrollSnapContainerHighlightConfigBuilder<'a> {
800 ScrollSnapContainerHighlightConfigBuilder {
801 snapportBorder: None,
802 snapAreaBorder: None,
803 scrollMarginColor: None,
804 scrollPaddingColor: None,
805 }
806 }
807 pub fn snapportBorder(&self) -> Option<&LineStyle<'a>> { self.snapportBorder.as_ref() }
808 pub fn snapAreaBorder(&self) -> Option<&LineStyle<'a>> { self.snapAreaBorder.as_ref() }
809 pub fn scrollMarginColor(&self) -> Option<&crate::dom::RGBA> { self.scrollMarginColor.as_ref() }
810 pub fn scrollPaddingColor(&self) -> Option<&crate::dom::RGBA> { self.scrollPaddingColor.as_ref() }
811}
812
813#[derive(Default)]
814pub struct ScrollSnapContainerHighlightConfigBuilder<'a> {
815 snapportBorder: Option<LineStyle<'a>>,
816 snapAreaBorder: Option<LineStyle<'a>>,
817 scrollMarginColor: Option<crate::dom::RGBA>,
818 scrollPaddingColor: Option<crate::dom::RGBA>,
819}
820
821impl<'a> ScrollSnapContainerHighlightConfigBuilder<'a> {
822 pub fn snapportBorder(mut self, snapportBorder: LineStyle<'a>) -> Self { self.snapportBorder = Some(snapportBorder); self }
824 pub fn snapAreaBorder(mut self, snapAreaBorder: LineStyle<'a>) -> Self { self.snapAreaBorder = Some(snapAreaBorder); self }
826 pub fn scrollMarginColor(mut self, scrollMarginColor: crate::dom::RGBA) -> Self { self.scrollMarginColor = Some(scrollMarginColor); self }
828 pub fn scrollPaddingColor(mut self, scrollPaddingColor: crate::dom::RGBA) -> Self { self.scrollPaddingColor = Some(scrollPaddingColor); self }
830 pub fn build(self) -> ScrollSnapContainerHighlightConfig<'a> {
831 ScrollSnapContainerHighlightConfig {
832 snapportBorder: self.snapportBorder,
833 snapAreaBorder: self.snapAreaBorder,
834 scrollMarginColor: self.scrollMarginColor,
835 scrollPaddingColor: self.scrollPaddingColor,
836 }
837 }
838}
839
840
841#[derive(Debug, Clone, Serialize, Deserialize, Default)]
842#[serde(rename_all = "camelCase")]
843pub struct ScrollSnapHighlightConfig<'a> {
844 scrollSnapContainerHighlightConfig: ScrollSnapContainerHighlightConfig<'a>,
846 nodeId: crate::dom::NodeId,
848}
849
850impl<'a> ScrollSnapHighlightConfig<'a> {
851 pub fn builder(scrollSnapContainerHighlightConfig: ScrollSnapContainerHighlightConfig<'a>, nodeId: crate::dom::NodeId) -> ScrollSnapHighlightConfigBuilder<'a> {
852 ScrollSnapHighlightConfigBuilder {
853 scrollSnapContainerHighlightConfig: scrollSnapContainerHighlightConfig,
854 nodeId: nodeId,
855 }
856 }
857 pub fn scrollSnapContainerHighlightConfig(&self) -> &ScrollSnapContainerHighlightConfig<'a> { &self.scrollSnapContainerHighlightConfig }
858 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
859}
860
861
862pub struct ScrollSnapHighlightConfigBuilder<'a> {
863 scrollSnapContainerHighlightConfig: ScrollSnapContainerHighlightConfig<'a>,
864 nodeId: crate::dom::NodeId,
865}
866
867impl<'a> ScrollSnapHighlightConfigBuilder<'a> {
868 pub fn build(self) -> ScrollSnapHighlightConfig<'a> {
869 ScrollSnapHighlightConfig {
870 scrollSnapContainerHighlightConfig: self.scrollSnapContainerHighlightConfig,
871 nodeId: self.nodeId,
872 }
873 }
874}
875
876#[derive(Debug, Clone, Serialize, Deserialize, Default)]
879#[serde(rename_all = "camelCase")]
880pub struct HingeConfig {
881 rect: crate::dom::Rect,
883 #[serde(skip_serializing_if = "Option::is_none")]
885 contentColor: Option<crate::dom::RGBA>,
886 #[serde(skip_serializing_if = "Option::is_none")]
888 outlineColor: Option<crate::dom::RGBA>,
889}
890
891impl HingeConfig {
892 pub fn builder(rect: crate::dom::Rect) -> HingeConfigBuilder {
893 HingeConfigBuilder {
894 rect: rect,
895 contentColor: None,
896 outlineColor: None,
897 }
898 }
899 pub fn rect(&self) -> &crate::dom::Rect { &self.rect }
900 pub fn contentColor(&self) -> Option<&crate::dom::RGBA> { self.contentColor.as_ref() }
901 pub fn outlineColor(&self) -> Option<&crate::dom::RGBA> { self.outlineColor.as_ref() }
902}
903
904
905pub struct HingeConfigBuilder {
906 rect: crate::dom::Rect,
907 contentColor: Option<crate::dom::RGBA>,
908 outlineColor: Option<crate::dom::RGBA>,
909}
910
911impl HingeConfigBuilder {
912 pub fn contentColor(mut self, contentColor: crate::dom::RGBA) -> Self { self.contentColor = Some(contentColor); self }
914 pub fn outlineColor(mut self, outlineColor: crate::dom::RGBA) -> Self { self.outlineColor = Some(outlineColor); self }
916 pub fn build(self) -> HingeConfig {
917 HingeConfig {
918 rect: self.rect,
919 contentColor: self.contentColor,
920 outlineColor: self.outlineColor,
921 }
922 }
923}
924
925#[derive(Debug, Clone, Serialize, Deserialize, Default)]
928#[serde(rename_all = "camelCase")]
929pub struct WindowControlsOverlayConfig<'a> {
930 showCSS: bool,
932 selectedPlatform: Cow<'a, str>,
934 themeColor: Cow<'a, str>,
936}
937
938impl<'a> WindowControlsOverlayConfig<'a> {
939 pub fn builder(showCSS: bool, selectedPlatform: impl Into<Cow<'a, str>>, themeColor: impl Into<Cow<'a, str>>) -> WindowControlsOverlayConfigBuilder<'a> {
940 WindowControlsOverlayConfigBuilder {
941 showCSS: showCSS,
942 selectedPlatform: selectedPlatform.into(),
943 themeColor: themeColor.into(),
944 }
945 }
946 pub fn showCSS(&self) -> bool { self.showCSS }
947 pub fn selectedPlatform(&self) -> &str { self.selectedPlatform.as_ref() }
948 pub fn themeColor(&self) -> &str { self.themeColor.as_ref() }
949}
950
951
952pub struct WindowControlsOverlayConfigBuilder<'a> {
953 showCSS: bool,
954 selectedPlatform: Cow<'a, str>,
955 themeColor: Cow<'a, str>,
956}
957
958impl<'a> WindowControlsOverlayConfigBuilder<'a> {
959 pub fn build(self) -> WindowControlsOverlayConfig<'a> {
960 WindowControlsOverlayConfig {
961 showCSS: self.showCSS,
962 selectedPlatform: self.selectedPlatform,
963 themeColor: self.themeColor,
964 }
965 }
966}
967
968
969#[derive(Debug, Clone, Serialize, Deserialize, Default)]
970#[serde(rename_all = "camelCase")]
971pub struct ContainerQueryHighlightConfig<'a> {
972 containerQueryContainerHighlightConfig: ContainerQueryContainerHighlightConfig<'a>,
974 nodeId: crate::dom::NodeId,
976}
977
978impl<'a> ContainerQueryHighlightConfig<'a> {
979 pub fn builder(containerQueryContainerHighlightConfig: ContainerQueryContainerHighlightConfig<'a>, nodeId: crate::dom::NodeId) -> ContainerQueryHighlightConfigBuilder<'a> {
980 ContainerQueryHighlightConfigBuilder {
981 containerQueryContainerHighlightConfig: containerQueryContainerHighlightConfig,
982 nodeId: nodeId,
983 }
984 }
985 pub fn containerQueryContainerHighlightConfig(&self) -> &ContainerQueryContainerHighlightConfig<'a> { &self.containerQueryContainerHighlightConfig }
986 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
987}
988
989
990pub struct ContainerQueryHighlightConfigBuilder<'a> {
991 containerQueryContainerHighlightConfig: ContainerQueryContainerHighlightConfig<'a>,
992 nodeId: crate::dom::NodeId,
993}
994
995impl<'a> ContainerQueryHighlightConfigBuilder<'a> {
996 pub fn build(self) -> ContainerQueryHighlightConfig<'a> {
997 ContainerQueryHighlightConfig {
998 containerQueryContainerHighlightConfig: self.containerQueryContainerHighlightConfig,
999 nodeId: self.nodeId,
1000 }
1001 }
1002}
1003
1004
1005#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1006#[serde(rename_all = "camelCase")]
1007pub struct ContainerQueryContainerHighlightConfig<'a> {
1008 #[serde(skip_serializing_if = "Option::is_none")]
1010 containerBorder: Option<LineStyle<'a>>,
1011 #[serde(skip_serializing_if = "Option::is_none")]
1013 descendantBorder: Option<LineStyle<'a>>,
1014}
1015
1016impl<'a> ContainerQueryContainerHighlightConfig<'a> {
1017 pub fn builder() -> ContainerQueryContainerHighlightConfigBuilder<'a> {
1018 ContainerQueryContainerHighlightConfigBuilder {
1019 containerBorder: None,
1020 descendantBorder: None,
1021 }
1022 }
1023 pub fn containerBorder(&self) -> Option<&LineStyle<'a>> { self.containerBorder.as_ref() }
1024 pub fn descendantBorder(&self) -> Option<&LineStyle<'a>> { self.descendantBorder.as_ref() }
1025}
1026
1027#[derive(Default)]
1028pub struct ContainerQueryContainerHighlightConfigBuilder<'a> {
1029 containerBorder: Option<LineStyle<'a>>,
1030 descendantBorder: Option<LineStyle<'a>>,
1031}
1032
1033impl<'a> ContainerQueryContainerHighlightConfigBuilder<'a> {
1034 pub fn containerBorder(mut self, containerBorder: LineStyle<'a>) -> Self { self.containerBorder = Some(containerBorder); self }
1036 pub fn descendantBorder(mut self, descendantBorder: LineStyle<'a>) -> Self { self.descendantBorder = Some(descendantBorder); self }
1038 pub fn build(self) -> ContainerQueryContainerHighlightConfig<'a> {
1039 ContainerQueryContainerHighlightConfig {
1040 containerBorder: self.containerBorder,
1041 descendantBorder: self.descendantBorder,
1042 }
1043 }
1044}
1045
1046
1047#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1048#[serde(rename_all = "camelCase")]
1049pub struct IsolatedElementHighlightConfig {
1050 isolationModeHighlightConfig: IsolationModeHighlightConfig,
1052 nodeId: crate::dom::NodeId,
1054}
1055
1056impl IsolatedElementHighlightConfig {
1057 pub fn builder(isolationModeHighlightConfig: IsolationModeHighlightConfig, nodeId: crate::dom::NodeId) -> IsolatedElementHighlightConfigBuilder {
1058 IsolatedElementHighlightConfigBuilder {
1059 isolationModeHighlightConfig: isolationModeHighlightConfig,
1060 nodeId: nodeId,
1061 }
1062 }
1063 pub fn isolationModeHighlightConfig(&self) -> &IsolationModeHighlightConfig { &self.isolationModeHighlightConfig }
1064 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
1065}
1066
1067
1068pub struct IsolatedElementHighlightConfigBuilder {
1069 isolationModeHighlightConfig: IsolationModeHighlightConfig,
1070 nodeId: crate::dom::NodeId,
1071}
1072
1073impl IsolatedElementHighlightConfigBuilder {
1074 pub fn build(self) -> IsolatedElementHighlightConfig {
1075 IsolatedElementHighlightConfig {
1076 isolationModeHighlightConfig: self.isolationModeHighlightConfig,
1077 nodeId: self.nodeId,
1078 }
1079 }
1080}
1081
1082
1083#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1084#[serde(rename_all = "camelCase")]
1085pub struct IsolationModeHighlightConfig {
1086 #[serde(skip_serializing_if = "Option::is_none")]
1088 resizerColor: Option<crate::dom::RGBA>,
1089 #[serde(skip_serializing_if = "Option::is_none")]
1091 resizerHandleColor: Option<crate::dom::RGBA>,
1092 #[serde(skip_serializing_if = "Option::is_none")]
1094 maskColor: Option<crate::dom::RGBA>,
1095}
1096
1097impl IsolationModeHighlightConfig {
1098 pub fn builder() -> IsolationModeHighlightConfigBuilder {
1099 IsolationModeHighlightConfigBuilder {
1100 resizerColor: None,
1101 resizerHandleColor: None,
1102 maskColor: None,
1103 }
1104 }
1105 pub fn resizerColor(&self) -> Option<&crate::dom::RGBA> { self.resizerColor.as_ref() }
1106 pub fn resizerHandleColor(&self) -> Option<&crate::dom::RGBA> { self.resizerHandleColor.as_ref() }
1107 pub fn maskColor(&self) -> Option<&crate::dom::RGBA> { self.maskColor.as_ref() }
1108}
1109
1110#[derive(Default)]
1111pub struct IsolationModeHighlightConfigBuilder {
1112 resizerColor: Option<crate::dom::RGBA>,
1113 resizerHandleColor: Option<crate::dom::RGBA>,
1114 maskColor: Option<crate::dom::RGBA>,
1115}
1116
1117impl IsolationModeHighlightConfigBuilder {
1118 pub fn resizerColor(mut self, resizerColor: crate::dom::RGBA) -> Self { self.resizerColor = Some(resizerColor); self }
1120 pub fn resizerHandleColor(mut self, resizerHandleColor: crate::dom::RGBA) -> Self { self.resizerHandleColor = Some(resizerHandleColor); self }
1122 pub fn maskColor(mut self, maskColor: crate::dom::RGBA) -> Self { self.maskColor = Some(maskColor); self }
1124 pub fn build(self) -> IsolationModeHighlightConfig {
1125 IsolationModeHighlightConfig {
1126 resizerColor: self.resizerColor,
1127 resizerHandleColor: self.resizerHandleColor,
1128 maskColor: self.maskColor,
1129 }
1130 }
1131}
1132
1133
1134#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1135pub enum InspectMode {
1136 #[default]
1137 #[serde(rename = "searchForNode")]
1138 SearchForNode,
1139 #[serde(rename = "searchForUAShadowDOM")]
1140 SearchForUAShadowDOM,
1141 #[serde(rename = "captureAreaScreenshot")]
1142 CaptureAreaScreenshot,
1143 #[serde(rename = "none")]
1144 None,
1145}
1146
1147
1148#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1149#[serde(rename_all = "camelCase")]
1150pub struct InspectedElementAnchorConfig {
1151 #[serde(skip_serializing_if = "Option::is_none")]
1153 nodeId: Option<crate::dom::NodeId>,
1154 #[serde(skip_serializing_if = "Option::is_none")]
1156 backendNodeId: Option<crate::dom::BackendNodeId>,
1157}
1158
1159impl InspectedElementAnchorConfig {
1160 pub fn builder() -> InspectedElementAnchorConfigBuilder {
1161 InspectedElementAnchorConfigBuilder {
1162 nodeId: None,
1163 backendNodeId: None,
1164 }
1165 }
1166 pub fn nodeId(&self) -> Option<&crate::dom::NodeId> { self.nodeId.as_ref() }
1167 pub fn backendNodeId(&self) -> Option<&crate::dom::BackendNodeId> { self.backendNodeId.as_ref() }
1168}
1169
1170#[derive(Default)]
1171pub struct InspectedElementAnchorConfigBuilder {
1172 nodeId: Option<crate::dom::NodeId>,
1173 backendNodeId: Option<crate::dom::BackendNodeId>,
1174}
1175
1176impl InspectedElementAnchorConfigBuilder {
1177 pub fn nodeId(mut self, nodeId: crate::dom::NodeId) -> Self { self.nodeId = Some(nodeId); self }
1179 pub fn backendNodeId(mut self, backendNodeId: crate::dom::BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
1181 pub fn build(self) -> InspectedElementAnchorConfig {
1182 InspectedElementAnchorConfig {
1183 nodeId: self.nodeId,
1184 backendNodeId: self.backendNodeId,
1185 }
1186 }
1187}
1188
1189#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1190pub struct DisableParams {}
1191
1192impl DisableParams { pub const METHOD: &'static str = "Overlay.disable"; }
1193
1194impl<'a> crate::CdpCommand<'a> for DisableParams {
1195 const METHOD: &'static str = "Overlay.disable";
1196 type Response = crate::EmptyReturns;
1197}
1198
1199#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1200pub struct EnableParams {}
1201
1202impl EnableParams { pub const METHOD: &'static str = "Overlay.enable"; }
1203
1204impl<'a> crate::CdpCommand<'a> for EnableParams {
1205 const METHOD: &'static str = "Overlay.enable";
1206 type Response = crate::EmptyReturns;
1207}
1208
1209#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1212#[serde(rename_all = "camelCase")]
1213pub struct GetHighlightObjectForTestParams {
1214 nodeId: crate::dom::NodeId,
1216 #[serde(skip_serializing_if = "Option::is_none")]
1218 includeDistance: Option<bool>,
1219 #[serde(skip_serializing_if = "Option::is_none")]
1221 includeStyle: Option<bool>,
1222 #[serde(skip_serializing_if = "Option::is_none")]
1224 colorFormat: Option<ColorFormat>,
1225 #[serde(skip_serializing_if = "Option::is_none")]
1227 showAccessibilityInfo: Option<bool>,
1228}
1229
1230impl GetHighlightObjectForTestParams {
1231 pub fn builder(nodeId: crate::dom::NodeId) -> GetHighlightObjectForTestParamsBuilder {
1232 GetHighlightObjectForTestParamsBuilder {
1233 nodeId: nodeId,
1234 includeDistance: None,
1235 includeStyle: None,
1236 colorFormat: None,
1237 showAccessibilityInfo: None,
1238 }
1239 }
1240 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
1241 pub fn includeDistance(&self) -> Option<bool> { self.includeDistance }
1242 pub fn includeStyle(&self) -> Option<bool> { self.includeStyle }
1243 pub fn colorFormat(&self) -> Option<&ColorFormat> { self.colorFormat.as_ref() }
1244 pub fn showAccessibilityInfo(&self) -> Option<bool> { self.showAccessibilityInfo }
1245}
1246
1247
1248pub struct GetHighlightObjectForTestParamsBuilder {
1249 nodeId: crate::dom::NodeId,
1250 includeDistance: Option<bool>,
1251 includeStyle: Option<bool>,
1252 colorFormat: Option<ColorFormat>,
1253 showAccessibilityInfo: Option<bool>,
1254}
1255
1256impl GetHighlightObjectForTestParamsBuilder {
1257 pub fn includeDistance(mut self, includeDistance: bool) -> Self { self.includeDistance = Some(includeDistance); self }
1259 pub fn includeStyle(mut self, includeStyle: bool) -> Self { self.includeStyle = Some(includeStyle); self }
1261 pub fn colorFormat(mut self, colorFormat: ColorFormat) -> Self { self.colorFormat = Some(colorFormat); self }
1263 pub fn showAccessibilityInfo(mut self, showAccessibilityInfo: bool) -> Self { self.showAccessibilityInfo = Some(showAccessibilityInfo); self }
1265 pub fn build(self) -> GetHighlightObjectForTestParams {
1266 GetHighlightObjectForTestParams {
1267 nodeId: self.nodeId,
1268 includeDistance: self.includeDistance,
1269 includeStyle: self.includeStyle,
1270 colorFormat: self.colorFormat,
1271 showAccessibilityInfo: self.showAccessibilityInfo,
1272 }
1273 }
1274}
1275
1276#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1279#[serde(rename_all = "camelCase")]
1280pub struct GetHighlightObjectForTestReturns {
1281 highlight: serde_json::Map<String, JsonValue>,
1283}
1284
1285impl GetHighlightObjectForTestReturns {
1286 pub fn builder(highlight: serde_json::Map<String, JsonValue>) -> GetHighlightObjectForTestReturnsBuilder {
1287 GetHighlightObjectForTestReturnsBuilder {
1288 highlight: highlight,
1289 }
1290 }
1291 pub fn highlight(&self) -> &serde_json::Map<String, JsonValue> { &self.highlight }
1292}
1293
1294
1295pub struct GetHighlightObjectForTestReturnsBuilder {
1296 highlight: serde_json::Map<String, JsonValue>,
1297}
1298
1299impl GetHighlightObjectForTestReturnsBuilder {
1300 pub fn build(self) -> GetHighlightObjectForTestReturns {
1301 GetHighlightObjectForTestReturns {
1302 highlight: self.highlight,
1303 }
1304 }
1305}
1306
1307impl GetHighlightObjectForTestParams { pub const METHOD: &'static str = "Overlay.getHighlightObjectForTest"; }
1308
1309impl<'a> crate::CdpCommand<'a> for GetHighlightObjectForTestParams {
1310 const METHOD: &'static str = "Overlay.getHighlightObjectForTest";
1311 type Response = GetHighlightObjectForTestReturns;
1312}
1313
1314#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1317#[serde(rename_all = "camelCase")]
1318pub struct GetGridHighlightObjectsForTestParams {
1319 nodeIds: Vec<crate::dom::NodeId>,
1321}
1322
1323impl GetGridHighlightObjectsForTestParams {
1324 pub fn builder(nodeIds: Vec<crate::dom::NodeId>) -> GetGridHighlightObjectsForTestParamsBuilder {
1325 GetGridHighlightObjectsForTestParamsBuilder {
1326 nodeIds: nodeIds,
1327 }
1328 }
1329 pub fn nodeIds(&self) -> &[crate::dom::NodeId] { &self.nodeIds }
1330}
1331
1332
1333pub struct GetGridHighlightObjectsForTestParamsBuilder {
1334 nodeIds: Vec<crate::dom::NodeId>,
1335}
1336
1337impl GetGridHighlightObjectsForTestParamsBuilder {
1338 pub fn build(self) -> GetGridHighlightObjectsForTestParams {
1339 GetGridHighlightObjectsForTestParams {
1340 nodeIds: self.nodeIds,
1341 }
1342 }
1343}
1344
1345#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1348#[serde(rename_all = "camelCase")]
1349pub struct GetGridHighlightObjectsForTestReturns {
1350 highlights: serde_json::Map<String, JsonValue>,
1352}
1353
1354impl GetGridHighlightObjectsForTestReturns {
1355 pub fn builder(highlights: serde_json::Map<String, JsonValue>) -> GetGridHighlightObjectsForTestReturnsBuilder {
1356 GetGridHighlightObjectsForTestReturnsBuilder {
1357 highlights: highlights,
1358 }
1359 }
1360 pub fn highlights(&self) -> &serde_json::Map<String, JsonValue> { &self.highlights }
1361}
1362
1363
1364pub struct GetGridHighlightObjectsForTestReturnsBuilder {
1365 highlights: serde_json::Map<String, JsonValue>,
1366}
1367
1368impl GetGridHighlightObjectsForTestReturnsBuilder {
1369 pub fn build(self) -> GetGridHighlightObjectsForTestReturns {
1370 GetGridHighlightObjectsForTestReturns {
1371 highlights: self.highlights,
1372 }
1373 }
1374}
1375
1376impl GetGridHighlightObjectsForTestParams { pub const METHOD: &'static str = "Overlay.getGridHighlightObjectsForTest"; }
1377
1378impl<'a> crate::CdpCommand<'a> for GetGridHighlightObjectsForTestParams {
1379 const METHOD: &'static str = "Overlay.getGridHighlightObjectsForTest";
1380 type Response = GetGridHighlightObjectsForTestReturns;
1381}
1382
1383#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1386#[serde(rename_all = "camelCase")]
1387pub struct GetSourceOrderHighlightObjectForTestParams {
1388 nodeId: crate::dom::NodeId,
1390}
1391
1392impl GetSourceOrderHighlightObjectForTestParams {
1393 pub fn builder(nodeId: crate::dom::NodeId) -> GetSourceOrderHighlightObjectForTestParamsBuilder {
1394 GetSourceOrderHighlightObjectForTestParamsBuilder {
1395 nodeId: nodeId,
1396 }
1397 }
1398 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
1399}
1400
1401
1402pub struct GetSourceOrderHighlightObjectForTestParamsBuilder {
1403 nodeId: crate::dom::NodeId,
1404}
1405
1406impl GetSourceOrderHighlightObjectForTestParamsBuilder {
1407 pub fn build(self) -> GetSourceOrderHighlightObjectForTestParams {
1408 GetSourceOrderHighlightObjectForTestParams {
1409 nodeId: self.nodeId,
1410 }
1411 }
1412}
1413
1414#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1417#[serde(rename_all = "camelCase")]
1418pub struct GetSourceOrderHighlightObjectForTestReturns {
1419 highlight: serde_json::Map<String, JsonValue>,
1421}
1422
1423impl GetSourceOrderHighlightObjectForTestReturns {
1424 pub fn builder(highlight: serde_json::Map<String, JsonValue>) -> GetSourceOrderHighlightObjectForTestReturnsBuilder {
1425 GetSourceOrderHighlightObjectForTestReturnsBuilder {
1426 highlight: highlight,
1427 }
1428 }
1429 pub fn highlight(&self) -> &serde_json::Map<String, JsonValue> { &self.highlight }
1430}
1431
1432
1433pub struct GetSourceOrderHighlightObjectForTestReturnsBuilder {
1434 highlight: serde_json::Map<String, JsonValue>,
1435}
1436
1437impl GetSourceOrderHighlightObjectForTestReturnsBuilder {
1438 pub fn build(self) -> GetSourceOrderHighlightObjectForTestReturns {
1439 GetSourceOrderHighlightObjectForTestReturns {
1440 highlight: self.highlight,
1441 }
1442 }
1443}
1444
1445impl GetSourceOrderHighlightObjectForTestParams { pub const METHOD: &'static str = "Overlay.getSourceOrderHighlightObjectForTest"; }
1446
1447impl<'a> crate::CdpCommand<'a> for GetSourceOrderHighlightObjectForTestParams {
1448 const METHOD: &'static str = "Overlay.getSourceOrderHighlightObjectForTest";
1449 type Response = GetSourceOrderHighlightObjectForTestReturns;
1450}
1451
1452#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1453pub struct HideHighlightParams {}
1454
1455impl HideHighlightParams { pub const METHOD: &'static str = "Overlay.hideHighlight"; }
1456
1457impl<'a> crate::CdpCommand<'a> for HideHighlightParams {
1458 const METHOD: &'static str = "Overlay.hideHighlight";
1459 type Response = crate::EmptyReturns;
1460}
1461
1462#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1468#[serde(rename_all = "camelCase")]
1469pub struct HighlightFrameParams<'a> {
1470 frameId: crate::page::FrameId<'a>,
1472 #[serde(skip_serializing_if = "Option::is_none")]
1474 contentColor: Option<crate::dom::RGBA>,
1475 #[serde(skip_serializing_if = "Option::is_none")]
1477 contentOutlineColor: Option<crate::dom::RGBA>,
1478}
1479
1480impl<'a> HighlightFrameParams<'a> {
1481 pub fn builder(frameId: crate::page::FrameId<'a>) -> HighlightFrameParamsBuilder<'a> {
1482 HighlightFrameParamsBuilder {
1483 frameId: frameId,
1484 contentColor: None,
1485 contentOutlineColor: None,
1486 }
1487 }
1488 pub fn frameId(&self) -> &crate::page::FrameId<'a> { &self.frameId }
1489 pub fn contentColor(&self) -> Option<&crate::dom::RGBA> { self.contentColor.as_ref() }
1490 pub fn contentOutlineColor(&self) -> Option<&crate::dom::RGBA> { self.contentOutlineColor.as_ref() }
1491}
1492
1493
1494pub struct HighlightFrameParamsBuilder<'a> {
1495 frameId: crate::page::FrameId<'a>,
1496 contentColor: Option<crate::dom::RGBA>,
1497 contentOutlineColor: Option<crate::dom::RGBA>,
1498}
1499
1500impl<'a> HighlightFrameParamsBuilder<'a> {
1501 pub fn contentColor(mut self, contentColor: crate::dom::RGBA) -> Self { self.contentColor = Some(contentColor); self }
1503 pub fn contentOutlineColor(mut self, contentOutlineColor: crate::dom::RGBA) -> Self { self.contentOutlineColor = Some(contentOutlineColor); self }
1505 pub fn build(self) -> HighlightFrameParams<'a> {
1506 HighlightFrameParams {
1507 frameId: self.frameId,
1508 contentColor: self.contentColor,
1509 contentOutlineColor: self.contentOutlineColor,
1510 }
1511 }
1512}
1513
1514impl<'a> HighlightFrameParams<'a> { pub const METHOD: &'static str = "Overlay.highlightFrame"; }
1515
1516impl<'a> crate::CdpCommand<'a> for HighlightFrameParams<'a> {
1517 const METHOD: &'static str = "Overlay.highlightFrame";
1518 type Response = crate::EmptyReturns;
1519}
1520
1521#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1525#[serde(rename_all = "camelCase")]
1526pub struct HighlightNodeParams<'a> {
1527 highlightConfig: HighlightConfig<'a>,
1529 #[serde(skip_serializing_if = "Option::is_none")]
1531 nodeId: Option<crate::dom::NodeId>,
1532 #[serde(skip_serializing_if = "Option::is_none")]
1534 backendNodeId: Option<crate::dom::BackendNodeId>,
1535 #[serde(skip_serializing_if = "Option::is_none")]
1537 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1538 #[serde(skip_serializing_if = "Option::is_none")]
1540 selector: Option<Cow<'a, str>>,
1541}
1542
1543impl<'a> HighlightNodeParams<'a> {
1544 pub fn builder(highlightConfig: HighlightConfig<'a>) -> HighlightNodeParamsBuilder<'a> {
1545 HighlightNodeParamsBuilder {
1546 highlightConfig: highlightConfig,
1547 nodeId: None,
1548 backendNodeId: None,
1549 objectId: None,
1550 selector: None,
1551 }
1552 }
1553 pub fn highlightConfig(&self) -> &HighlightConfig<'a> { &self.highlightConfig }
1554 pub fn nodeId(&self) -> Option<&crate::dom::NodeId> { self.nodeId.as_ref() }
1555 pub fn backendNodeId(&self) -> Option<&crate::dom::BackendNodeId> { self.backendNodeId.as_ref() }
1556 pub fn objectId(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.objectId.as_ref() }
1557 pub fn selector(&self) -> Option<&str> { self.selector.as_deref() }
1558}
1559
1560
1561pub struct HighlightNodeParamsBuilder<'a> {
1562 highlightConfig: HighlightConfig<'a>,
1563 nodeId: Option<crate::dom::NodeId>,
1564 backendNodeId: Option<crate::dom::BackendNodeId>,
1565 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1566 selector: Option<Cow<'a, str>>,
1567}
1568
1569impl<'a> HighlightNodeParamsBuilder<'a> {
1570 pub fn nodeId(mut self, nodeId: crate::dom::NodeId) -> Self { self.nodeId = Some(nodeId); self }
1572 pub fn backendNodeId(mut self, backendNodeId: crate::dom::BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
1574 pub fn objectId(mut self, objectId: crate::runtime::RemoteObjectId<'a>) -> Self { self.objectId = Some(objectId); self }
1576 pub fn selector(mut self, selector: impl Into<Cow<'a, str>>) -> Self { self.selector = Some(selector.into()); self }
1578 pub fn build(self) -> HighlightNodeParams<'a> {
1579 HighlightNodeParams {
1580 highlightConfig: self.highlightConfig,
1581 nodeId: self.nodeId,
1582 backendNodeId: self.backendNodeId,
1583 objectId: self.objectId,
1584 selector: self.selector,
1585 }
1586 }
1587}
1588
1589impl<'a> HighlightNodeParams<'a> { pub const METHOD: &'static str = "Overlay.highlightNode"; }
1590
1591impl<'a> crate::CdpCommand<'a> for HighlightNodeParams<'a> {
1592 const METHOD: &'static str = "Overlay.highlightNode";
1593 type Response = crate::EmptyReturns;
1594}
1595
1596#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1599#[serde(rename_all = "camelCase")]
1600pub struct HighlightQuadParams {
1601 quad: crate::dom::Quad,
1603 #[serde(skip_serializing_if = "Option::is_none")]
1605 color: Option<crate::dom::RGBA>,
1606 #[serde(skip_serializing_if = "Option::is_none")]
1608 outlineColor: Option<crate::dom::RGBA>,
1609}
1610
1611impl HighlightQuadParams {
1612 pub fn builder(quad: crate::dom::Quad) -> HighlightQuadParamsBuilder {
1613 HighlightQuadParamsBuilder {
1614 quad: quad,
1615 color: None,
1616 outlineColor: None,
1617 }
1618 }
1619 pub fn quad(&self) -> &crate::dom::Quad { &self.quad }
1620 pub fn color(&self) -> Option<&crate::dom::RGBA> { self.color.as_ref() }
1621 pub fn outlineColor(&self) -> Option<&crate::dom::RGBA> { self.outlineColor.as_ref() }
1622}
1623
1624
1625pub struct HighlightQuadParamsBuilder {
1626 quad: crate::dom::Quad,
1627 color: Option<crate::dom::RGBA>,
1628 outlineColor: Option<crate::dom::RGBA>,
1629}
1630
1631impl HighlightQuadParamsBuilder {
1632 pub fn color(mut self, color: crate::dom::RGBA) -> Self { self.color = Some(color); self }
1634 pub fn outlineColor(mut self, outlineColor: crate::dom::RGBA) -> Self { self.outlineColor = Some(outlineColor); self }
1636 pub fn build(self) -> HighlightQuadParams {
1637 HighlightQuadParams {
1638 quad: self.quad,
1639 color: self.color,
1640 outlineColor: self.outlineColor,
1641 }
1642 }
1643}
1644
1645impl HighlightQuadParams { pub const METHOD: &'static str = "Overlay.highlightQuad"; }
1646
1647impl<'a> crate::CdpCommand<'a> for HighlightQuadParams {
1648 const METHOD: &'static str = "Overlay.highlightQuad";
1649 type Response = crate::EmptyReturns;
1650}
1651
1652#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1658#[serde(rename_all = "camelCase")]
1659pub struct HighlightRectParams {
1660 x: i32,
1662 y: i32,
1664 width: u64,
1666 height: i64,
1668 #[serde(skip_serializing_if = "Option::is_none")]
1670 color: Option<crate::dom::RGBA>,
1671 #[serde(skip_serializing_if = "Option::is_none")]
1673 outlineColor: Option<crate::dom::RGBA>,
1674}
1675
1676impl HighlightRectParams {
1677 pub fn builder(x: i32, y: i32, width: u64, height: i64) -> HighlightRectParamsBuilder {
1678 HighlightRectParamsBuilder {
1679 x: x,
1680 y: y,
1681 width: width,
1682 height: height,
1683 color: None,
1684 outlineColor: None,
1685 }
1686 }
1687 pub fn x(&self) -> i32 { self.x }
1688 pub fn y(&self) -> i32 { self.y }
1689 pub fn width(&self) -> u64 { self.width }
1690 pub fn height(&self) -> i64 { self.height }
1691 pub fn color(&self) -> Option<&crate::dom::RGBA> { self.color.as_ref() }
1692 pub fn outlineColor(&self) -> Option<&crate::dom::RGBA> { self.outlineColor.as_ref() }
1693}
1694
1695
1696pub struct HighlightRectParamsBuilder {
1697 x: i32,
1698 y: i32,
1699 width: u64,
1700 height: i64,
1701 color: Option<crate::dom::RGBA>,
1702 outlineColor: Option<crate::dom::RGBA>,
1703}
1704
1705impl HighlightRectParamsBuilder {
1706 pub fn color(mut self, color: crate::dom::RGBA) -> Self { self.color = Some(color); self }
1708 pub fn outlineColor(mut self, outlineColor: crate::dom::RGBA) -> Self { self.outlineColor = Some(outlineColor); self }
1710 pub fn build(self) -> HighlightRectParams {
1711 HighlightRectParams {
1712 x: self.x,
1713 y: self.y,
1714 width: self.width,
1715 height: self.height,
1716 color: self.color,
1717 outlineColor: self.outlineColor,
1718 }
1719 }
1720}
1721
1722impl HighlightRectParams { pub const METHOD: &'static str = "Overlay.highlightRect"; }
1723
1724impl<'a> crate::CdpCommand<'a> for HighlightRectParams {
1725 const METHOD: &'static str = "Overlay.highlightRect";
1726 type Response = crate::EmptyReturns;
1727}
1728
1729#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1733#[serde(rename_all = "camelCase")]
1734pub struct HighlightSourceOrderParams<'a> {
1735 sourceOrderConfig: SourceOrderConfig,
1737 #[serde(skip_serializing_if = "Option::is_none")]
1739 nodeId: Option<crate::dom::NodeId>,
1740 #[serde(skip_serializing_if = "Option::is_none")]
1742 backendNodeId: Option<crate::dom::BackendNodeId>,
1743 #[serde(skip_serializing_if = "Option::is_none")]
1745 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1746}
1747
1748impl<'a> HighlightSourceOrderParams<'a> {
1749 pub fn builder(sourceOrderConfig: SourceOrderConfig) -> HighlightSourceOrderParamsBuilder<'a> {
1750 HighlightSourceOrderParamsBuilder {
1751 sourceOrderConfig: sourceOrderConfig,
1752 nodeId: None,
1753 backendNodeId: None,
1754 objectId: None,
1755 }
1756 }
1757 pub fn sourceOrderConfig(&self) -> &SourceOrderConfig { &self.sourceOrderConfig }
1758 pub fn nodeId(&self) -> Option<&crate::dom::NodeId> { self.nodeId.as_ref() }
1759 pub fn backendNodeId(&self) -> Option<&crate::dom::BackendNodeId> { self.backendNodeId.as_ref() }
1760 pub fn objectId(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.objectId.as_ref() }
1761}
1762
1763
1764pub struct HighlightSourceOrderParamsBuilder<'a> {
1765 sourceOrderConfig: SourceOrderConfig,
1766 nodeId: Option<crate::dom::NodeId>,
1767 backendNodeId: Option<crate::dom::BackendNodeId>,
1768 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1769}
1770
1771impl<'a> HighlightSourceOrderParamsBuilder<'a> {
1772 pub fn nodeId(mut self, nodeId: crate::dom::NodeId) -> Self { self.nodeId = Some(nodeId); self }
1774 pub fn backendNodeId(mut self, backendNodeId: crate::dom::BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
1776 pub fn objectId(mut self, objectId: crate::runtime::RemoteObjectId<'a>) -> Self { self.objectId = Some(objectId); self }
1778 pub fn build(self) -> HighlightSourceOrderParams<'a> {
1779 HighlightSourceOrderParams {
1780 sourceOrderConfig: self.sourceOrderConfig,
1781 nodeId: self.nodeId,
1782 backendNodeId: self.backendNodeId,
1783 objectId: self.objectId,
1784 }
1785 }
1786}
1787
1788impl<'a> HighlightSourceOrderParams<'a> { pub const METHOD: &'static str = "Overlay.highlightSourceOrder"; }
1789
1790impl<'a> crate::CdpCommand<'a> for HighlightSourceOrderParams<'a> {
1791 const METHOD: &'static str = "Overlay.highlightSourceOrder";
1792 type Response = crate::EmptyReturns;
1793}
1794
1795#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1799#[serde(rename_all = "camelCase")]
1800pub struct SetInspectModeParams<'a> {
1801 mode: InspectMode,
1803 #[serde(skip_serializing_if = "Option::is_none")]
1806 highlightConfig: Option<HighlightConfig<'a>>,
1807}
1808
1809impl<'a> SetInspectModeParams<'a> {
1810 pub fn builder(mode: InspectMode) -> SetInspectModeParamsBuilder<'a> {
1811 SetInspectModeParamsBuilder {
1812 mode: mode,
1813 highlightConfig: None,
1814 }
1815 }
1816 pub fn mode(&self) -> &InspectMode { &self.mode }
1817 pub fn highlightConfig(&self) -> Option<&HighlightConfig<'a>> { self.highlightConfig.as_ref() }
1818}
1819
1820
1821pub struct SetInspectModeParamsBuilder<'a> {
1822 mode: InspectMode,
1823 highlightConfig: Option<HighlightConfig<'a>>,
1824}
1825
1826impl<'a> SetInspectModeParamsBuilder<'a> {
1827 pub fn highlightConfig(mut self, highlightConfig: HighlightConfig<'a>) -> Self { self.highlightConfig = Some(highlightConfig); self }
1830 pub fn build(self) -> SetInspectModeParams<'a> {
1831 SetInspectModeParams {
1832 mode: self.mode,
1833 highlightConfig: self.highlightConfig,
1834 }
1835 }
1836}
1837
1838impl<'a> SetInspectModeParams<'a> { pub const METHOD: &'static str = "Overlay.setInspectMode"; }
1839
1840impl<'a> crate::CdpCommand<'a> for SetInspectModeParams<'a> {
1841 const METHOD: &'static str = "Overlay.setInspectMode";
1842 type Response = crate::EmptyReturns;
1843}
1844
1845#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1848#[serde(rename_all = "camelCase")]
1849pub struct SetShowAdHighlightsParams {
1850 show: bool,
1852}
1853
1854impl SetShowAdHighlightsParams {
1855 pub fn builder(show: bool) -> SetShowAdHighlightsParamsBuilder {
1856 SetShowAdHighlightsParamsBuilder {
1857 show: show,
1858 }
1859 }
1860 pub fn show(&self) -> bool { self.show }
1861}
1862
1863
1864pub struct SetShowAdHighlightsParamsBuilder {
1865 show: bool,
1866}
1867
1868impl SetShowAdHighlightsParamsBuilder {
1869 pub fn build(self) -> SetShowAdHighlightsParams {
1870 SetShowAdHighlightsParams {
1871 show: self.show,
1872 }
1873 }
1874}
1875
1876impl SetShowAdHighlightsParams { pub const METHOD: &'static str = "Overlay.setShowAdHighlights"; }
1877
1878impl<'a> crate::CdpCommand<'a> for SetShowAdHighlightsParams {
1879 const METHOD: &'static str = "Overlay.setShowAdHighlights";
1880 type Response = crate::EmptyReturns;
1881}
1882
1883
1884#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1885#[serde(rename_all = "camelCase")]
1886pub struct SetPausedInDebuggerMessageParams<'a> {
1887 #[serde(skip_serializing_if = "Option::is_none")]
1889 message: Option<Cow<'a, str>>,
1890}
1891
1892impl<'a> SetPausedInDebuggerMessageParams<'a> {
1893 pub fn builder() -> SetPausedInDebuggerMessageParamsBuilder<'a> {
1894 SetPausedInDebuggerMessageParamsBuilder {
1895 message: None,
1896 }
1897 }
1898 pub fn message(&self) -> Option<&str> { self.message.as_deref() }
1899}
1900
1901#[derive(Default)]
1902pub struct SetPausedInDebuggerMessageParamsBuilder<'a> {
1903 message: Option<Cow<'a, str>>,
1904}
1905
1906impl<'a> SetPausedInDebuggerMessageParamsBuilder<'a> {
1907 pub fn message(mut self, message: impl Into<Cow<'a, str>>) -> Self { self.message = Some(message.into()); self }
1909 pub fn build(self) -> SetPausedInDebuggerMessageParams<'a> {
1910 SetPausedInDebuggerMessageParams {
1911 message: self.message,
1912 }
1913 }
1914}
1915
1916impl<'a> SetPausedInDebuggerMessageParams<'a> { pub const METHOD: &'static str = "Overlay.setPausedInDebuggerMessage"; }
1917
1918impl<'a> crate::CdpCommand<'a> for SetPausedInDebuggerMessageParams<'a> {
1919 const METHOD: &'static str = "Overlay.setPausedInDebuggerMessage";
1920 type Response = crate::EmptyReturns;
1921}
1922
1923#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1926#[serde(rename_all = "camelCase")]
1927pub struct SetShowDebugBordersParams {
1928 show: bool,
1930}
1931
1932impl SetShowDebugBordersParams {
1933 pub fn builder(show: bool) -> SetShowDebugBordersParamsBuilder {
1934 SetShowDebugBordersParamsBuilder {
1935 show: show,
1936 }
1937 }
1938 pub fn show(&self) -> bool { self.show }
1939}
1940
1941
1942pub struct SetShowDebugBordersParamsBuilder {
1943 show: bool,
1944}
1945
1946impl SetShowDebugBordersParamsBuilder {
1947 pub fn build(self) -> SetShowDebugBordersParams {
1948 SetShowDebugBordersParams {
1949 show: self.show,
1950 }
1951 }
1952}
1953
1954impl SetShowDebugBordersParams { pub const METHOD: &'static str = "Overlay.setShowDebugBorders"; }
1955
1956impl<'a> crate::CdpCommand<'a> for SetShowDebugBordersParams {
1957 const METHOD: &'static str = "Overlay.setShowDebugBorders";
1958 type Response = crate::EmptyReturns;
1959}
1960
1961#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1964#[serde(rename_all = "camelCase")]
1965pub struct SetShowFPSCounterParams {
1966 show: bool,
1968}
1969
1970impl SetShowFPSCounterParams {
1971 pub fn builder(show: bool) -> SetShowFPSCounterParamsBuilder {
1972 SetShowFPSCounterParamsBuilder {
1973 show: show,
1974 }
1975 }
1976 pub fn show(&self) -> bool { self.show }
1977}
1978
1979
1980pub struct SetShowFPSCounterParamsBuilder {
1981 show: bool,
1982}
1983
1984impl SetShowFPSCounterParamsBuilder {
1985 pub fn build(self) -> SetShowFPSCounterParams {
1986 SetShowFPSCounterParams {
1987 show: self.show,
1988 }
1989 }
1990}
1991
1992impl SetShowFPSCounterParams { pub const METHOD: &'static str = "Overlay.setShowFPSCounter"; }
1993
1994impl<'a> crate::CdpCommand<'a> for SetShowFPSCounterParams {
1995 const METHOD: &'static str = "Overlay.setShowFPSCounter";
1996 type Response = crate::EmptyReturns;
1997}
1998
1999#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2002#[serde(rename_all = "camelCase")]
2003pub struct SetShowGridOverlaysParams {
2004 gridNodeHighlightConfigs: Vec<GridNodeHighlightConfig>,
2006}
2007
2008impl SetShowGridOverlaysParams {
2009 pub fn builder(gridNodeHighlightConfigs: Vec<GridNodeHighlightConfig>) -> SetShowGridOverlaysParamsBuilder {
2010 SetShowGridOverlaysParamsBuilder {
2011 gridNodeHighlightConfigs: gridNodeHighlightConfigs,
2012 }
2013 }
2014 pub fn gridNodeHighlightConfigs(&self) -> &[GridNodeHighlightConfig] { &self.gridNodeHighlightConfigs }
2015}
2016
2017
2018pub struct SetShowGridOverlaysParamsBuilder {
2019 gridNodeHighlightConfigs: Vec<GridNodeHighlightConfig>,
2020}
2021
2022impl SetShowGridOverlaysParamsBuilder {
2023 pub fn build(self) -> SetShowGridOverlaysParams {
2024 SetShowGridOverlaysParams {
2025 gridNodeHighlightConfigs: self.gridNodeHighlightConfigs,
2026 }
2027 }
2028}
2029
2030impl SetShowGridOverlaysParams { pub const METHOD: &'static str = "Overlay.setShowGridOverlays"; }
2031
2032impl<'a> crate::CdpCommand<'a> for SetShowGridOverlaysParams {
2033 const METHOD: &'static str = "Overlay.setShowGridOverlays";
2034 type Response = crate::EmptyReturns;
2035}
2036
2037
2038#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2039#[serde(rename_all = "camelCase")]
2040pub struct SetShowFlexOverlaysParams<'a> {
2041 flexNodeHighlightConfigs: Vec<FlexNodeHighlightConfig<'a>>,
2043}
2044
2045impl<'a> SetShowFlexOverlaysParams<'a> {
2046 pub fn builder(flexNodeHighlightConfigs: Vec<FlexNodeHighlightConfig<'a>>) -> SetShowFlexOverlaysParamsBuilder<'a> {
2047 SetShowFlexOverlaysParamsBuilder {
2048 flexNodeHighlightConfigs: flexNodeHighlightConfigs,
2049 }
2050 }
2051 pub fn flexNodeHighlightConfigs(&self) -> &[FlexNodeHighlightConfig<'a>] { &self.flexNodeHighlightConfigs }
2052}
2053
2054
2055pub struct SetShowFlexOverlaysParamsBuilder<'a> {
2056 flexNodeHighlightConfigs: Vec<FlexNodeHighlightConfig<'a>>,
2057}
2058
2059impl<'a> SetShowFlexOverlaysParamsBuilder<'a> {
2060 pub fn build(self) -> SetShowFlexOverlaysParams<'a> {
2061 SetShowFlexOverlaysParams {
2062 flexNodeHighlightConfigs: self.flexNodeHighlightConfigs,
2063 }
2064 }
2065}
2066
2067impl<'a> SetShowFlexOverlaysParams<'a> { pub const METHOD: &'static str = "Overlay.setShowFlexOverlays"; }
2068
2069impl<'a> crate::CdpCommand<'a> for SetShowFlexOverlaysParams<'a> {
2070 const METHOD: &'static str = "Overlay.setShowFlexOverlays";
2071 type Response = crate::EmptyReturns;
2072}
2073
2074
2075#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2076#[serde(rename_all = "camelCase")]
2077pub struct SetShowScrollSnapOverlaysParams<'a> {
2078 scrollSnapHighlightConfigs: Vec<ScrollSnapHighlightConfig<'a>>,
2080}
2081
2082impl<'a> SetShowScrollSnapOverlaysParams<'a> {
2083 pub fn builder(scrollSnapHighlightConfigs: Vec<ScrollSnapHighlightConfig<'a>>) -> SetShowScrollSnapOverlaysParamsBuilder<'a> {
2084 SetShowScrollSnapOverlaysParamsBuilder {
2085 scrollSnapHighlightConfigs: scrollSnapHighlightConfigs,
2086 }
2087 }
2088 pub fn scrollSnapHighlightConfigs(&self) -> &[ScrollSnapHighlightConfig<'a>] { &self.scrollSnapHighlightConfigs }
2089}
2090
2091
2092pub struct SetShowScrollSnapOverlaysParamsBuilder<'a> {
2093 scrollSnapHighlightConfigs: Vec<ScrollSnapHighlightConfig<'a>>,
2094}
2095
2096impl<'a> SetShowScrollSnapOverlaysParamsBuilder<'a> {
2097 pub fn build(self) -> SetShowScrollSnapOverlaysParams<'a> {
2098 SetShowScrollSnapOverlaysParams {
2099 scrollSnapHighlightConfigs: self.scrollSnapHighlightConfigs,
2100 }
2101 }
2102}
2103
2104impl<'a> SetShowScrollSnapOverlaysParams<'a> { pub const METHOD: &'static str = "Overlay.setShowScrollSnapOverlays"; }
2105
2106impl<'a> crate::CdpCommand<'a> for SetShowScrollSnapOverlaysParams<'a> {
2107 const METHOD: &'static str = "Overlay.setShowScrollSnapOverlays";
2108 type Response = crate::EmptyReturns;
2109}
2110
2111
2112#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2113#[serde(rename_all = "camelCase")]
2114pub struct SetShowContainerQueryOverlaysParams<'a> {
2115 containerQueryHighlightConfigs: Vec<ContainerQueryHighlightConfig<'a>>,
2117}
2118
2119impl<'a> SetShowContainerQueryOverlaysParams<'a> {
2120 pub fn builder(containerQueryHighlightConfigs: Vec<ContainerQueryHighlightConfig<'a>>) -> SetShowContainerQueryOverlaysParamsBuilder<'a> {
2121 SetShowContainerQueryOverlaysParamsBuilder {
2122 containerQueryHighlightConfigs: containerQueryHighlightConfigs,
2123 }
2124 }
2125 pub fn containerQueryHighlightConfigs(&self) -> &[ContainerQueryHighlightConfig<'a>] { &self.containerQueryHighlightConfigs }
2126}
2127
2128
2129pub struct SetShowContainerQueryOverlaysParamsBuilder<'a> {
2130 containerQueryHighlightConfigs: Vec<ContainerQueryHighlightConfig<'a>>,
2131}
2132
2133impl<'a> SetShowContainerQueryOverlaysParamsBuilder<'a> {
2134 pub fn build(self) -> SetShowContainerQueryOverlaysParams<'a> {
2135 SetShowContainerQueryOverlaysParams {
2136 containerQueryHighlightConfigs: self.containerQueryHighlightConfigs,
2137 }
2138 }
2139}
2140
2141impl<'a> SetShowContainerQueryOverlaysParams<'a> { pub const METHOD: &'static str = "Overlay.setShowContainerQueryOverlays"; }
2142
2143impl<'a> crate::CdpCommand<'a> for SetShowContainerQueryOverlaysParams<'a> {
2144 const METHOD: &'static str = "Overlay.setShowContainerQueryOverlays";
2145 type Response = crate::EmptyReturns;
2146}
2147
2148
2149#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2150#[serde(rename_all = "camelCase")]
2151pub struct SetShowInspectedElementAnchorParams {
2152 inspectedElementAnchorConfig: InspectedElementAnchorConfig,
2154}
2155
2156impl SetShowInspectedElementAnchorParams {
2157 pub fn builder(inspectedElementAnchorConfig: InspectedElementAnchorConfig) -> SetShowInspectedElementAnchorParamsBuilder {
2158 SetShowInspectedElementAnchorParamsBuilder {
2159 inspectedElementAnchorConfig: inspectedElementAnchorConfig,
2160 }
2161 }
2162 pub fn inspectedElementAnchorConfig(&self) -> &InspectedElementAnchorConfig { &self.inspectedElementAnchorConfig }
2163}
2164
2165
2166pub struct SetShowInspectedElementAnchorParamsBuilder {
2167 inspectedElementAnchorConfig: InspectedElementAnchorConfig,
2168}
2169
2170impl SetShowInspectedElementAnchorParamsBuilder {
2171 pub fn build(self) -> SetShowInspectedElementAnchorParams {
2172 SetShowInspectedElementAnchorParams {
2173 inspectedElementAnchorConfig: self.inspectedElementAnchorConfig,
2174 }
2175 }
2176}
2177
2178impl SetShowInspectedElementAnchorParams { pub const METHOD: &'static str = "Overlay.setShowInspectedElementAnchor"; }
2179
2180impl<'a> crate::CdpCommand<'a> for SetShowInspectedElementAnchorParams {
2181 const METHOD: &'static str = "Overlay.setShowInspectedElementAnchor";
2182 type Response = crate::EmptyReturns;
2183}
2184
2185#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2188#[serde(rename_all = "camelCase")]
2189pub struct SetShowPaintRectsParams {
2190 result: bool,
2192}
2193
2194impl SetShowPaintRectsParams {
2195 pub fn builder(result: bool) -> SetShowPaintRectsParamsBuilder {
2196 SetShowPaintRectsParamsBuilder {
2197 result: result,
2198 }
2199 }
2200 pub fn result(&self) -> bool { self.result }
2201}
2202
2203
2204pub struct SetShowPaintRectsParamsBuilder {
2205 result: bool,
2206}
2207
2208impl SetShowPaintRectsParamsBuilder {
2209 pub fn build(self) -> SetShowPaintRectsParams {
2210 SetShowPaintRectsParams {
2211 result: self.result,
2212 }
2213 }
2214}
2215
2216impl SetShowPaintRectsParams { pub const METHOD: &'static str = "Overlay.setShowPaintRects"; }
2217
2218impl<'a> crate::CdpCommand<'a> for SetShowPaintRectsParams {
2219 const METHOD: &'static str = "Overlay.setShowPaintRects";
2220 type Response = crate::EmptyReturns;
2221}
2222
2223#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2226#[serde(rename_all = "camelCase")]
2227pub struct SetShowLayoutShiftRegionsParams {
2228 result: bool,
2230}
2231
2232impl SetShowLayoutShiftRegionsParams {
2233 pub fn builder(result: bool) -> SetShowLayoutShiftRegionsParamsBuilder {
2234 SetShowLayoutShiftRegionsParamsBuilder {
2235 result: result,
2236 }
2237 }
2238 pub fn result(&self) -> bool { self.result }
2239}
2240
2241
2242pub struct SetShowLayoutShiftRegionsParamsBuilder {
2243 result: bool,
2244}
2245
2246impl SetShowLayoutShiftRegionsParamsBuilder {
2247 pub fn build(self) -> SetShowLayoutShiftRegionsParams {
2248 SetShowLayoutShiftRegionsParams {
2249 result: self.result,
2250 }
2251 }
2252}
2253
2254impl SetShowLayoutShiftRegionsParams { pub const METHOD: &'static str = "Overlay.setShowLayoutShiftRegions"; }
2255
2256impl<'a> crate::CdpCommand<'a> for SetShowLayoutShiftRegionsParams {
2257 const METHOD: &'static str = "Overlay.setShowLayoutShiftRegions";
2258 type Response = crate::EmptyReturns;
2259}
2260
2261#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2264#[serde(rename_all = "camelCase")]
2265pub struct SetShowScrollBottleneckRectsParams {
2266 show: bool,
2268}
2269
2270impl SetShowScrollBottleneckRectsParams {
2271 pub fn builder(show: bool) -> SetShowScrollBottleneckRectsParamsBuilder {
2272 SetShowScrollBottleneckRectsParamsBuilder {
2273 show: show,
2274 }
2275 }
2276 pub fn show(&self) -> bool { self.show }
2277}
2278
2279
2280pub struct SetShowScrollBottleneckRectsParamsBuilder {
2281 show: bool,
2282}
2283
2284impl SetShowScrollBottleneckRectsParamsBuilder {
2285 pub fn build(self) -> SetShowScrollBottleneckRectsParams {
2286 SetShowScrollBottleneckRectsParams {
2287 show: self.show,
2288 }
2289 }
2290}
2291
2292impl SetShowScrollBottleneckRectsParams { pub const METHOD: &'static str = "Overlay.setShowScrollBottleneckRects"; }
2293
2294impl<'a> crate::CdpCommand<'a> for SetShowScrollBottleneckRectsParams {
2295 const METHOD: &'static str = "Overlay.setShowScrollBottleneckRects";
2296 type Response = crate::EmptyReturns;
2297}
2298
2299#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2302#[serde(rename_all = "camelCase")]
2303pub struct SetShowHitTestBordersParams {
2304 show: bool,
2306}
2307
2308impl SetShowHitTestBordersParams {
2309 pub fn builder(show: bool) -> SetShowHitTestBordersParamsBuilder {
2310 SetShowHitTestBordersParamsBuilder {
2311 show: show,
2312 }
2313 }
2314 pub fn show(&self) -> bool { self.show }
2315}
2316
2317
2318pub struct SetShowHitTestBordersParamsBuilder {
2319 show: bool,
2320}
2321
2322impl SetShowHitTestBordersParamsBuilder {
2323 pub fn build(self) -> SetShowHitTestBordersParams {
2324 SetShowHitTestBordersParams {
2325 show: self.show,
2326 }
2327 }
2328}
2329
2330impl SetShowHitTestBordersParams { pub const METHOD: &'static str = "Overlay.setShowHitTestBorders"; }
2331
2332impl<'a> crate::CdpCommand<'a> for SetShowHitTestBordersParams {
2333 const METHOD: &'static str = "Overlay.setShowHitTestBorders";
2334 type Response = crate::EmptyReturns;
2335}
2336
2337#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2340#[serde(rename_all = "camelCase")]
2341pub struct SetShowWebVitalsParams {
2342 show: bool,
2343}
2344
2345impl SetShowWebVitalsParams {
2346 pub fn builder(show: bool) -> SetShowWebVitalsParamsBuilder {
2347 SetShowWebVitalsParamsBuilder {
2348 show: show,
2349 }
2350 }
2351 pub fn show(&self) -> bool { self.show }
2352}
2353
2354
2355pub struct SetShowWebVitalsParamsBuilder {
2356 show: bool,
2357}
2358
2359impl SetShowWebVitalsParamsBuilder {
2360 pub fn build(self) -> SetShowWebVitalsParams {
2361 SetShowWebVitalsParams {
2362 show: self.show,
2363 }
2364 }
2365}
2366
2367impl SetShowWebVitalsParams { pub const METHOD: &'static str = "Overlay.setShowWebVitals"; }
2368
2369impl<'a> crate::CdpCommand<'a> for SetShowWebVitalsParams {
2370 const METHOD: &'static str = "Overlay.setShowWebVitals";
2371 type Response = crate::EmptyReturns;
2372}
2373
2374#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2377#[serde(rename_all = "camelCase")]
2378pub struct SetShowViewportSizeOnResizeParams {
2379 show: bool,
2381}
2382
2383impl SetShowViewportSizeOnResizeParams {
2384 pub fn builder(show: bool) -> SetShowViewportSizeOnResizeParamsBuilder {
2385 SetShowViewportSizeOnResizeParamsBuilder {
2386 show: show,
2387 }
2388 }
2389 pub fn show(&self) -> bool { self.show }
2390}
2391
2392
2393pub struct SetShowViewportSizeOnResizeParamsBuilder {
2394 show: bool,
2395}
2396
2397impl SetShowViewportSizeOnResizeParamsBuilder {
2398 pub fn build(self) -> SetShowViewportSizeOnResizeParams {
2399 SetShowViewportSizeOnResizeParams {
2400 show: self.show,
2401 }
2402 }
2403}
2404
2405impl SetShowViewportSizeOnResizeParams { pub const METHOD: &'static str = "Overlay.setShowViewportSizeOnResize"; }
2406
2407impl<'a> crate::CdpCommand<'a> for SetShowViewportSizeOnResizeParams {
2408 const METHOD: &'static str = "Overlay.setShowViewportSizeOnResize";
2409 type Response = crate::EmptyReturns;
2410}
2411
2412#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2415#[serde(rename_all = "camelCase")]
2416pub struct SetShowHingeParams {
2417 #[serde(skip_serializing_if = "Option::is_none")]
2419 hingeConfig: Option<HingeConfig>,
2420}
2421
2422impl SetShowHingeParams {
2423 pub fn builder() -> SetShowHingeParamsBuilder {
2424 SetShowHingeParamsBuilder {
2425 hingeConfig: None,
2426 }
2427 }
2428 pub fn hingeConfig(&self) -> Option<&HingeConfig> { self.hingeConfig.as_ref() }
2429}
2430
2431#[derive(Default)]
2432pub struct SetShowHingeParamsBuilder {
2433 hingeConfig: Option<HingeConfig>,
2434}
2435
2436impl SetShowHingeParamsBuilder {
2437 pub fn hingeConfig(mut self, hingeConfig: HingeConfig) -> Self { self.hingeConfig = Some(hingeConfig); self }
2439 pub fn build(self) -> SetShowHingeParams {
2440 SetShowHingeParams {
2441 hingeConfig: self.hingeConfig,
2442 }
2443 }
2444}
2445
2446impl SetShowHingeParams { pub const METHOD: &'static str = "Overlay.setShowHinge"; }
2447
2448impl<'a> crate::CdpCommand<'a> for SetShowHingeParams {
2449 const METHOD: &'static str = "Overlay.setShowHinge";
2450 type Response = crate::EmptyReturns;
2451}
2452
2453#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2456#[serde(rename_all = "camelCase")]
2457pub struct SetShowIsolatedElementsParams {
2458 isolatedElementHighlightConfigs: Vec<IsolatedElementHighlightConfig>,
2460}
2461
2462impl SetShowIsolatedElementsParams {
2463 pub fn builder(isolatedElementHighlightConfigs: Vec<IsolatedElementHighlightConfig>) -> SetShowIsolatedElementsParamsBuilder {
2464 SetShowIsolatedElementsParamsBuilder {
2465 isolatedElementHighlightConfigs: isolatedElementHighlightConfigs,
2466 }
2467 }
2468 pub fn isolatedElementHighlightConfigs(&self) -> &[IsolatedElementHighlightConfig] { &self.isolatedElementHighlightConfigs }
2469}
2470
2471
2472pub struct SetShowIsolatedElementsParamsBuilder {
2473 isolatedElementHighlightConfigs: Vec<IsolatedElementHighlightConfig>,
2474}
2475
2476impl SetShowIsolatedElementsParamsBuilder {
2477 pub fn build(self) -> SetShowIsolatedElementsParams {
2478 SetShowIsolatedElementsParams {
2479 isolatedElementHighlightConfigs: self.isolatedElementHighlightConfigs,
2480 }
2481 }
2482}
2483
2484impl SetShowIsolatedElementsParams { pub const METHOD: &'static str = "Overlay.setShowIsolatedElements"; }
2485
2486impl<'a> crate::CdpCommand<'a> for SetShowIsolatedElementsParams {
2487 const METHOD: &'static str = "Overlay.setShowIsolatedElements";
2488 type Response = crate::EmptyReturns;
2489}
2490
2491#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2494#[serde(rename_all = "camelCase")]
2495pub struct SetShowWindowControlsOverlayParams<'a> {
2496 #[serde(skip_serializing_if = "Option::is_none")]
2498 windowControlsOverlayConfig: Option<WindowControlsOverlayConfig<'a>>,
2499}
2500
2501impl<'a> SetShowWindowControlsOverlayParams<'a> {
2502 pub fn builder() -> SetShowWindowControlsOverlayParamsBuilder<'a> {
2503 SetShowWindowControlsOverlayParamsBuilder {
2504 windowControlsOverlayConfig: None,
2505 }
2506 }
2507 pub fn windowControlsOverlayConfig(&self) -> Option<&WindowControlsOverlayConfig<'a>> { self.windowControlsOverlayConfig.as_ref() }
2508}
2509
2510#[derive(Default)]
2511pub struct SetShowWindowControlsOverlayParamsBuilder<'a> {
2512 windowControlsOverlayConfig: Option<WindowControlsOverlayConfig<'a>>,
2513}
2514
2515impl<'a> SetShowWindowControlsOverlayParamsBuilder<'a> {
2516 pub fn windowControlsOverlayConfig(mut self, windowControlsOverlayConfig: WindowControlsOverlayConfig<'a>) -> Self { self.windowControlsOverlayConfig = Some(windowControlsOverlayConfig); self }
2518 pub fn build(self) -> SetShowWindowControlsOverlayParams<'a> {
2519 SetShowWindowControlsOverlayParams {
2520 windowControlsOverlayConfig: self.windowControlsOverlayConfig,
2521 }
2522 }
2523}
2524
2525impl<'a> SetShowWindowControlsOverlayParams<'a> { pub const METHOD: &'static str = "Overlay.setShowWindowControlsOverlay"; }
2526
2527impl<'a> crate::CdpCommand<'a> for SetShowWindowControlsOverlayParams<'a> {
2528 const METHOD: &'static str = "Overlay.setShowWindowControlsOverlay";
2529 type Response = crate::EmptyReturns;
2530}