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 #[serde(rename = "parentOutlineColor")]
15 parent_outline_color: crate::dom::RGBA,
16 #[serde(rename = "childOutlineColor")]
18 child_outline_color: crate::dom::RGBA,
19}
20
21impl SourceOrderConfig {
22 pub fn builder(parent_outline_color: crate::dom::RGBA, child_outline_color: crate::dom::RGBA) -> SourceOrderConfigBuilder {
26 SourceOrderConfigBuilder {
27 parent_outline_color: parent_outline_color,
28 child_outline_color: child_outline_color,
29 }
30 }
31 pub fn parent_outline_color(&self) -> &crate::dom::RGBA { &self.parent_outline_color }
33 pub fn child_outline_color(&self) -> &crate::dom::RGBA { &self.child_outline_color }
35}
36
37
38pub struct SourceOrderConfigBuilder {
39 parent_outline_color: crate::dom::RGBA,
40 child_outline_color: crate::dom::RGBA,
41}
42
43impl SourceOrderConfigBuilder {
44 pub fn build(self) -> SourceOrderConfig {
45 SourceOrderConfig {
46 parent_outline_color: self.parent_outline_color,
47 child_outline_color: self.child_outline_color,
48 }
49 }
50}
51
52#[derive(Debug, Clone, Serialize, Deserialize, Default)]
55#[serde(rename_all = "camelCase")]
56pub struct GridHighlightConfig {
57 #[serde(skip_serializing_if = "Option::is_none", rename = "showGridExtensionLines")]
59 show_grid_extension_lines: Option<bool>,
60 #[serde(skip_serializing_if = "Option::is_none", rename = "showPositiveLineNumbers")]
62 show_positive_line_numbers: Option<bool>,
63 #[serde(skip_serializing_if = "Option::is_none", rename = "showNegativeLineNumbers")]
65 show_negative_line_numbers: Option<bool>,
66 #[serde(skip_serializing_if = "Option::is_none", rename = "showAreaNames")]
68 show_area_names: Option<bool>,
69 #[serde(skip_serializing_if = "Option::is_none", rename = "showLineNames")]
71 show_line_names: Option<bool>,
72 #[serde(skip_serializing_if = "Option::is_none", rename = "showTrackSizes")]
74 show_track_sizes: Option<bool>,
75 #[serde(skip_serializing_if = "Option::is_none", rename = "gridBorderColor")]
77 grid_border_color: Option<crate::dom::RGBA>,
78 #[serde(skip_serializing_if = "Option::is_none", rename = "cellBorderColor")]
80 cell_border_color: Option<crate::dom::RGBA>,
81 #[serde(skip_serializing_if = "Option::is_none", rename = "rowLineColor")]
83 row_line_color: Option<crate::dom::RGBA>,
84 #[serde(skip_serializing_if = "Option::is_none", rename = "columnLineColor")]
86 column_line_color: Option<crate::dom::RGBA>,
87 #[serde(skip_serializing_if = "Option::is_none", rename = "gridBorderDash")]
89 grid_border_dash: Option<bool>,
90 #[serde(skip_serializing_if = "Option::is_none", rename = "cellBorderDash")]
92 cell_border_dash: Option<bool>,
93 #[serde(skip_serializing_if = "Option::is_none", rename = "rowLineDash")]
95 row_line_dash: Option<bool>,
96 #[serde(skip_serializing_if = "Option::is_none", rename = "columnLineDash")]
98 column_line_dash: Option<bool>,
99 #[serde(skip_serializing_if = "Option::is_none", rename = "rowGapColor")]
101 row_gap_color: Option<crate::dom::RGBA>,
102 #[serde(skip_serializing_if = "Option::is_none", rename = "rowHatchColor")]
104 row_hatch_color: Option<crate::dom::RGBA>,
105 #[serde(skip_serializing_if = "Option::is_none", rename = "columnGapColor")]
107 column_gap_color: Option<crate::dom::RGBA>,
108 #[serde(skip_serializing_if = "Option::is_none", rename = "columnHatchColor")]
110 column_hatch_color: Option<crate::dom::RGBA>,
111 #[serde(skip_serializing_if = "Option::is_none", rename = "areaBorderColor")]
113 area_border_color: Option<crate::dom::RGBA>,
114 #[serde(skip_serializing_if = "Option::is_none", rename = "gridBackgroundColor")]
116 grid_background_color: Option<crate::dom::RGBA>,
117}
118
119impl GridHighlightConfig {
120 pub fn builder() -> GridHighlightConfigBuilder {
122 GridHighlightConfigBuilder {
123 show_grid_extension_lines: None,
124 show_positive_line_numbers: None,
125 show_negative_line_numbers: None,
126 show_area_names: None,
127 show_line_names: None,
128 show_track_sizes: None,
129 grid_border_color: None,
130 cell_border_color: None,
131 row_line_color: None,
132 column_line_color: None,
133 grid_border_dash: None,
134 cell_border_dash: None,
135 row_line_dash: None,
136 column_line_dash: None,
137 row_gap_color: None,
138 row_hatch_color: None,
139 column_gap_color: None,
140 column_hatch_color: None,
141 area_border_color: None,
142 grid_background_color: None,
143 }
144 }
145 pub fn show_grid_extension_lines(&self) -> Option<bool> { self.show_grid_extension_lines }
147 pub fn show_positive_line_numbers(&self) -> Option<bool> { self.show_positive_line_numbers }
149 pub fn show_negative_line_numbers(&self) -> Option<bool> { self.show_negative_line_numbers }
151 pub fn show_area_names(&self) -> Option<bool> { self.show_area_names }
153 pub fn show_line_names(&self) -> Option<bool> { self.show_line_names }
155 pub fn show_track_sizes(&self) -> Option<bool> { self.show_track_sizes }
157 pub fn grid_border_color(&self) -> Option<&crate::dom::RGBA> { self.grid_border_color.as_ref() }
159 pub fn cell_border_color(&self) -> Option<&crate::dom::RGBA> { self.cell_border_color.as_ref() }
161 pub fn row_line_color(&self) -> Option<&crate::dom::RGBA> { self.row_line_color.as_ref() }
163 pub fn column_line_color(&self) -> Option<&crate::dom::RGBA> { self.column_line_color.as_ref() }
165 pub fn grid_border_dash(&self) -> Option<bool> { self.grid_border_dash }
167 pub fn cell_border_dash(&self) -> Option<bool> { self.cell_border_dash }
169 pub fn row_line_dash(&self) -> Option<bool> { self.row_line_dash }
171 pub fn column_line_dash(&self) -> Option<bool> { self.column_line_dash }
173 pub fn row_gap_color(&self) -> Option<&crate::dom::RGBA> { self.row_gap_color.as_ref() }
175 pub fn row_hatch_color(&self) -> Option<&crate::dom::RGBA> { self.row_hatch_color.as_ref() }
177 pub fn column_gap_color(&self) -> Option<&crate::dom::RGBA> { self.column_gap_color.as_ref() }
179 pub fn column_hatch_color(&self) -> Option<&crate::dom::RGBA> { self.column_hatch_color.as_ref() }
181 pub fn area_border_color(&self) -> Option<&crate::dom::RGBA> { self.area_border_color.as_ref() }
183 pub fn grid_background_color(&self) -> Option<&crate::dom::RGBA> { self.grid_background_color.as_ref() }
185}
186
187#[derive(Default)]
188pub struct GridHighlightConfigBuilder {
189 show_grid_extension_lines: Option<bool>,
190 show_positive_line_numbers: Option<bool>,
191 show_negative_line_numbers: Option<bool>,
192 show_area_names: Option<bool>,
193 show_line_names: Option<bool>,
194 show_track_sizes: Option<bool>,
195 grid_border_color: Option<crate::dom::RGBA>,
196 cell_border_color: Option<crate::dom::RGBA>,
197 row_line_color: Option<crate::dom::RGBA>,
198 column_line_color: Option<crate::dom::RGBA>,
199 grid_border_dash: Option<bool>,
200 cell_border_dash: Option<bool>,
201 row_line_dash: Option<bool>,
202 column_line_dash: Option<bool>,
203 row_gap_color: Option<crate::dom::RGBA>,
204 row_hatch_color: Option<crate::dom::RGBA>,
205 column_gap_color: Option<crate::dom::RGBA>,
206 column_hatch_color: Option<crate::dom::RGBA>,
207 area_border_color: Option<crate::dom::RGBA>,
208 grid_background_color: Option<crate::dom::RGBA>,
209}
210
211impl GridHighlightConfigBuilder {
212 pub fn show_grid_extension_lines(mut self, show_grid_extension_lines: bool) -> Self { self.show_grid_extension_lines = Some(show_grid_extension_lines); self }
214 pub fn show_positive_line_numbers(mut self, show_positive_line_numbers: bool) -> Self { self.show_positive_line_numbers = Some(show_positive_line_numbers); self }
216 pub fn show_negative_line_numbers(mut self, show_negative_line_numbers: bool) -> Self { self.show_negative_line_numbers = Some(show_negative_line_numbers); self }
218 pub fn show_area_names(mut self, show_area_names: bool) -> Self { self.show_area_names = Some(show_area_names); self }
220 pub fn show_line_names(mut self, show_line_names: bool) -> Self { self.show_line_names = Some(show_line_names); self }
222 pub fn show_track_sizes(mut self, show_track_sizes: bool) -> Self { self.show_track_sizes = Some(show_track_sizes); self }
224 pub fn grid_border_color(mut self, grid_border_color: crate::dom::RGBA) -> Self { self.grid_border_color = Some(grid_border_color); self }
226 pub fn cell_border_color(mut self, cell_border_color: crate::dom::RGBA) -> Self { self.cell_border_color = Some(cell_border_color); self }
228 pub fn row_line_color(mut self, row_line_color: crate::dom::RGBA) -> Self { self.row_line_color = Some(row_line_color); self }
230 pub fn column_line_color(mut self, column_line_color: crate::dom::RGBA) -> Self { self.column_line_color = Some(column_line_color); self }
232 pub fn grid_border_dash(mut self, grid_border_dash: bool) -> Self { self.grid_border_dash = Some(grid_border_dash); self }
234 pub fn cell_border_dash(mut self, cell_border_dash: bool) -> Self { self.cell_border_dash = Some(cell_border_dash); self }
236 pub fn row_line_dash(mut self, row_line_dash: bool) -> Self { self.row_line_dash = Some(row_line_dash); self }
238 pub fn column_line_dash(mut self, column_line_dash: bool) -> Self { self.column_line_dash = Some(column_line_dash); self }
240 pub fn row_gap_color(mut self, row_gap_color: crate::dom::RGBA) -> Self { self.row_gap_color = Some(row_gap_color); self }
242 pub fn row_hatch_color(mut self, row_hatch_color: crate::dom::RGBA) -> Self { self.row_hatch_color = Some(row_hatch_color); self }
244 pub fn column_gap_color(mut self, column_gap_color: crate::dom::RGBA) -> Self { self.column_gap_color = Some(column_gap_color); self }
246 pub fn column_hatch_color(mut self, column_hatch_color: crate::dom::RGBA) -> Self { self.column_hatch_color = Some(column_hatch_color); self }
248 pub fn area_border_color(mut self, area_border_color: crate::dom::RGBA) -> Self { self.area_border_color = Some(area_border_color); self }
250 pub fn grid_background_color(mut self, grid_background_color: crate::dom::RGBA) -> Self { self.grid_background_color = Some(grid_background_color); self }
252 pub fn build(self) -> GridHighlightConfig {
253 GridHighlightConfig {
254 show_grid_extension_lines: self.show_grid_extension_lines,
255 show_positive_line_numbers: self.show_positive_line_numbers,
256 show_negative_line_numbers: self.show_negative_line_numbers,
257 show_area_names: self.show_area_names,
258 show_line_names: self.show_line_names,
259 show_track_sizes: self.show_track_sizes,
260 grid_border_color: self.grid_border_color,
261 cell_border_color: self.cell_border_color,
262 row_line_color: self.row_line_color,
263 column_line_color: self.column_line_color,
264 grid_border_dash: self.grid_border_dash,
265 cell_border_dash: self.cell_border_dash,
266 row_line_dash: self.row_line_dash,
267 column_line_dash: self.column_line_dash,
268 row_gap_color: self.row_gap_color,
269 row_hatch_color: self.row_hatch_color,
270 column_gap_color: self.column_gap_color,
271 column_hatch_color: self.column_hatch_color,
272 area_border_color: self.area_border_color,
273 grid_background_color: self.grid_background_color,
274 }
275 }
276}
277
278#[derive(Debug, Clone, Serialize, Deserialize, Default)]
281#[serde(rename_all = "camelCase")]
282pub struct FlexContainerHighlightConfig<'a> {
283 #[serde(skip_serializing_if = "Option::is_none", rename = "containerBorder")]
285 container_border: Option<LineStyle<'a>>,
286 #[serde(skip_serializing_if = "Option::is_none", rename = "lineSeparator")]
288 line_separator: Option<LineStyle<'a>>,
289 #[serde(skip_serializing_if = "Option::is_none", rename = "itemSeparator")]
291 item_separator: Option<LineStyle<'a>>,
292 #[serde(skip_serializing_if = "Option::is_none", rename = "mainDistributedSpace")]
294 main_distributed_space: Option<BoxStyle>,
295 #[serde(skip_serializing_if = "Option::is_none", rename = "crossDistributedSpace")]
297 cross_distributed_space: Option<BoxStyle>,
298 #[serde(skip_serializing_if = "Option::is_none", rename = "rowGapSpace")]
300 row_gap_space: Option<BoxStyle>,
301 #[serde(skip_serializing_if = "Option::is_none", rename = "columnGapSpace")]
303 column_gap_space: Option<BoxStyle>,
304 #[serde(skip_serializing_if = "Option::is_none", rename = "crossAlignment")]
306 cross_alignment: Option<LineStyle<'a>>,
307}
308
309impl<'a> FlexContainerHighlightConfig<'a> {
310 pub fn builder() -> FlexContainerHighlightConfigBuilder<'a> {
312 FlexContainerHighlightConfigBuilder {
313 container_border: None,
314 line_separator: None,
315 item_separator: None,
316 main_distributed_space: None,
317 cross_distributed_space: None,
318 row_gap_space: None,
319 column_gap_space: None,
320 cross_alignment: None,
321 }
322 }
323 pub fn container_border(&self) -> Option<&LineStyle<'a>> { self.container_border.as_ref() }
325 pub fn line_separator(&self) -> Option<&LineStyle<'a>> { self.line_separator.as_ref() }
327 pub fn item_separator(&self) -> Option<&LineStyle<'a>> { self.item_separator.as_ref() }
329 pub fn main_distributed_space(&self) -> Option<&BoxStyle> { self.main_distributed_space.as_ref() }
331 pub fn cross_distributed_space(&self) -> Option<&BoxStyle> { self.cross_distributed_space.as_ref() }
333 pub fn row_gap_space(&self) -> Option<&BoxStyle> { self.row_gap_space.as_ref() }
335 pub fn column_gap_space(&self) -> Option<&BoxStyle> { self.column_gap_space.as_ref() }
337 pub fn cross_alignment(&self) -> Option<&LineStyle<'a>> { self.cross_alignment.as_ref() }
339}
340
341#[derive(Default)]
342pub struct FlexContainerHighlightConfigBuilder<'a> {
343 container_border: Option<LineStyle<'a>>,
344 line_separator: Option<LineStyle<'a>>,
345 item_separator: Option<LineStyle<'a>>,
346 main_distributed_space: Option<BoxStyle>,
347 cross_distributed_space: Option<BoxStyle>,
348 row_gap_space: Option<BoxStyle>,
349 column_gap_space: Option<BoxStyle>,
350 cross_alignment: Option<LineStyle<'a>>,
351}
352
353impl<'a> FlexContainerHighlightConfigBuilder<'a> {
354 pub fn container_border(mut self, container_border: LineStyle<'a>) -> Self { self.container_border = Some(container_border); self }
356 pub fn line_separator(mut self, line_separator: LineStyle<'a>) -> Self { self.line_separator = Some(line_separator); self }
358 pub fn item_separator(mut self, item_separator: LineStyle<'a>) -> Self { self.item_separator = Some(item_separator); self }
360 pub fn main_distributed_space(mut self, main_distributed_space: BoxStyle) -> Self { self.main_distributed_space = Some(main_distributed_space); self }
362 pub fn cross_distributed_space(mut self, cross_distributed_space: BoxStyle) -> Self { self.cross_distributed_space = Some(cross_distributed_space); self }
364 pub fn row_gap_space(mut self, row_gap_space: BoxStyle) -> Self { self.row_gap_space = Some(row_gap_space); self }
366 pub fn column_gap_space(mut self, column_gap_space: BoxStyle) -> Self { self.column_gap_space = Some(column_gap_space); self }
368 pub fn cross_alignment(mut self, cross_alignment: LineStyle<'a>) -> Self { self.cross_alignment = Some(cross_alignment); self }
370 pub fn build(self) -> FlexContainerHighlightConfig<'a> {
371 FlexContainerHighlightConfig {
372 container_border: self.container_border,
373 line_separator: self.line_separator,
374 item_separator: self.item_separator,
375 main_distributed_space: self.main_distributed_space,
376 cross_distributed_space: self.cross_distributed_space,
377 row_gap_space: self.row_gap_space,
378 column_gap_space: self.column_gap_space,
379 cross_alignment: self.cross_alignment,
380 }
381 }
382}
383
384#[derive(Debug, Clone, Serialize, Deserialize, Default)]
387#[serde(rename_all = "camelCase")]
388pub struct FlexItemHighlightConfig<'a> {
389 #[serde(skip_serializing_if = "Option::is_none", rename = "baseSizeBox")]
391 base_size_box: Option<BoxStyle>,
392 #[serde(skip_serializing_if = "Option::is_none", rename = "baseSizeBorder")]
394 base_size_border: Option<LineStyle<'a>>,
395 #[serde(skip_serializing_if = "Option::is_none", rename = "flexibilityArrow")]
397 flexibility_arrow: Option<LineStyle<'a>>,
398}
399
400impl<'a> FlexItemHighlightConfig<'a> {
401 pub fn builder() -> FlexItemHighlightConfigBuilder<'a> {
403 FlexItemHighlightConfigBuilder {
404 base_size_box: None,
405 base_size_border: None,
406 flexibility_arrow: None,
407 }
408 }
409 pub fn base_size_box(&self) -> Option<&BoxStyle> { self.base_size_box.as_ref() }
411 pub fn base_size_border(&self) -> Option<&LineStyle<'a>> { self.base_size_border.as_ref() }
413 pub fn flexibility_arrow(&self) -> Option<&LineStyle<'a>> { self.flexibility_arrow.as_ref() }
415}
416
417#[derive(Default)]
418pub struct FlexItemHighlightConfigBuilder<'a> {
419 base_size_box: Option<BoxStyle>,
420 base_size_border: Option<LineStyle<'a>>,
421 flexibility_arrow: Option<LineStyle<'a>>,
422}
423
424impl<'a> FlexItemHighlightConfigBuilder<'a> {
425 pub fn base_size_box(mut self, base_size_box: BoxStyle) -> Self { self.base_size_box = Some(base_size_box); self }
427 pub fn base_size_border(mut self, base_size_border: LineStyle<'a>) -> Self { self.base_size_border = Some(base_size_border); self }
429 pub fn flexibility_arrow(mut self, flexibility_arrow: LineStyle<'a>) -> Self { self.flexibility_arrow = Some(flexibility_arrow); self }
431 pub fn build(self) -> FlexItemHighlightConfig<'a> {
432 FlexItemHighlightConfig {
433 base_size_box: self.base_size_box,
434 base_size_border: self.base_size_border,
435 flexibility_arrow: self.flexibility_arrow,
436 }
437 }
438}
439
440#[derive(Debug, Clone, Serialize, Deserialize, Default)]
443#[serde(rename_all = "camelCase")]
444pub struct LineStyle<'a> {
445 #[serde(skip_serializing_if = "Option::is_none")]
447 color: Option<crate::dom::RGBA>,
448 #[serde(skip_serializing_if = "Option::is_none")]
450 pattern: Option<Cow<'a, str>>,
451}
452
453impl<'a> LineStyle<'a> {
454 pub fn builder() -> LineStyleBuilder<'a> {
456 LineStyleBuilder {
457 color: None,
458 pattern: None,
459 }
460 }
461 pub fn color(&self) -> Option<&crate::dom::RGBA> { self.color.as_ref() }
463 pub fn pattern(&self) -> Option<&str> { self.pattern.as_deref() }
465}
466
467#[derive(Default)]
468pub struct LineStyleBuilder<'a> {
469 color: Option<crate::dom::RGBA>,
470 pattern: Option<Cow<'a, str>>,
471}
472
473impl<'a> LineStyleBuilder<'a> {
474 pub fn color(mut self, color: crate::dom::RGBA) -> Self { self.color = Some(color); self }
476 pub fn pattern(mut self, pattern: impl Into<Cow<'a, str>>) -> Self { self.pattern = Some(pattern.into()); self }
478 pub fn build(self) -> LineStyle<'a> {
479 LineStyle {
480 color: self.color,
481 pattern: self.pattern,
482 }
483 }
484}
485
486#[derive(Debug, Clone, Serialize, Deserialize, Default)]
489#[serde(rename_all = "camelCase")]
490pub struct BoxStyle {
491 #[serde(skip_serializing_if = "Option::is_none", rename = "fillColor")]
493 fill_color: Option<crate::dom::RGBA>,
494 #[serde(skip_serializing_if = "Option::is_none", rename = "hatchColor")]
496 hatch_color: Option<crate::dom::RGBA>,
497}
498
499impl BoxStyle {
500 pub fn builder() -> BoxStyleBuilder {
502 BoxStyleBuilder {
503 fill_color: None,
504 hatch_color: None,
505 }
506 }
507 pub fn fill_color(&self) -> Option<&crate::dom::RGBA> { self.fill_color.as_ref() }
509 pub fn hatch_color(&self) -> Option<&crate::dom::RGBA> { self.hatch_color.as_ref() }
511}
512
513#[derive(Default)]
514pub struct BoxStyleBuilder {
515 fill_color: Option<crate::dom::RGBA>,
516 hatch_color: Option<crate::dom::RGBA>,
517}
518
519impl BoxStyleBuilder {
520 pub fn fill_color(mut self, fill_color: crate::dom::RGBA) -> Self { self.fill_color = Some(fill_color); self }
522 pub fn hatch_color(mut self, hatch_color: crate::dom::RGBA) -> Self { self.hatch_color = Some(hatch_color); self }
524 pub fn build(self) -> BoxStyle {
525 BoxStyle {
526 fill_color: self.fill_color,
527 hatch_color: self.hatch_color,
528 }
529 }
530}
531
532
533#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
534pub enum ContrastAlgorithm {
535 #[default]
536 #[serde(rename = "aa")]
537 Aa,
538 #[serde(rename = "aaa")]
539 Aaa,
540 #[serde(rename = "apca")]
541 Apca,
542}
543
544#[derive(Debug, Clone, Serialize, Deserialize, Default)]
547#[serde(rename_all = "camelCase")]
548pub struct HighlightConfig<'a> {
549 #[serde(skip_serializing_if = "Option::is_none", rename = "showInfo")]
551 show_info: Option<bool>,
552 #[serde(skip_serializing_if = "Option::is_none", rename = "showStyles")]
554 show_styles: Option<bool>,
555 #[serde(skip_serializing_if = "Option::is_none", rename = "showRulers")]
557 show_rulers: Option<bool>,
558 #[serde(skip_serializing_if = "Option::is_none", rename = "showAccessibilityInfo")]
560 show_accessibility_info: Option<bool>,
561 #[serde(skip_serializing_if = "Option::is_none", rename = "showExtensionLines")]
563 show_extension_lines: Option<bool>,
564 #[serde(skip_serializing_if = "Option::is_none", rename = "contentColor")]
566 content_color: Option<crate::dom::RGBA>,
567 #[serde(skip_serializing_if = "Option::is_none", rename = "paddingColor")]
569 padding_color: Option<crate::dom::RGBA>,
570 #[serde(skip_serializing_if = "Option::is_none", rename = "borderColor")]
572 border_color: Option<crate::dom::RGBA>,
573 #[serde(skip_serializing_if = "Option::is_none", rename = "marginColor")]
575 margin_color: Option<crate::dom::RGBA>,
576 #[serde(skip_serializing_if = "Option::is_none", rename = "eventTargetColor")]
578 event_target_color: Option<crate::dom::RGBA>,
579 #[serde(skip_serializing_if = "Option::is_none", rename = "shapeColor")]
581 shape_color: Option<crate::dom::RGBA>,
582 #[serde(skip_serializing_if = "Option::is_none", rename = "shapeMarginColor")]
584 shape_margin_color: Option<crate::dom::RGBA>,
585 #[serde(skip_serializing_if = "Option::is_none", rename = "cssGridColor")]
587 css_grid_color: Option<crate::dom::RGBA>,
588 #[serde(skip_serializing_if = "Option::is_none", rename = "colorFormat")]
590 color_format: Option<ColorFormat>,
591 #[serde(skip_serializing_if = "Option::is_none", rename = "gridHighlightConfig")]
593 grid_highlight_config: Option<GridHighlightConfig>,
594 #[serde(skip_serializing_if = "Option::is_none", rename = "flexContainerHighlightConfig")]
596 flex_container_highlight_config: Option<FlexContainerHighlightConfig<'a>>,
597 #[serde(skip_serializing_if = "Option::is_none", rename = "flexItemHighlightConfig")]
599 flex_item_highlight_config: Option<FlexItemHighlightConfig<'a>>,
600 #[serde(skip_serializing_if = "Option::is_none", rename = "contrastAlgorithm")]
602 contrast_algorithm: Option<ContrastAlgorithm>,
603 #[serde(skip_serializing_if = "Option::is_none", rename = "containerQueryContainerHighlightConfig")]
605 container_query_container_highlight_config: Option<ContainerQueryContainerHighlightConfig<'a>>,
606}
607
608impl<'a> HighlightConfig<'a> {
609 pub fn builder() -> HighlightConfigBuilder<'a> {
611 HighlightConfigBuilder {
612 show_info: None,
613 show_styles: None,
614 show_rulers: None,
615 show_accessibility_info: None,
616 show_extension_lines: None,
617 content_color: None,
618 padding_color: None,
619 border_color: None,
620 margin_color: None,
621 event_target_color: None,
622 shape_color: None,
623 shape_margin_color: None,
624 css_grid_color: None,
625 color_format: None,
626 grid_highlight_config: None,
627 flex_container_highlight_config: None,
628 flex_item_highlight_config: None,
629 contrast_algorithm: None,
630 container_query_container_highlight_config: None,
631 }
632 }
633 pub fn show_info(&self) -> Option<bool> { self.show_info }
635 pub fn show_styles(&self) -> Option<bool> { self.show_styles }
637 pub fn show_rulers(&self) -> Option<bool> { self.show_rulers }
639 pub fn show_accessibility_info(&self) -> Option<bool> { self.show_accessibility_info }
641 pub fn show_extension_lines(&self) -> Option<bool> { self.show_extension_lines }
643 pub fn content_color(&self) -> Option<&crate::dom::RGBA> { self.content_color.as_ref() }
645 pub fn padding_color(&self) -> Option<&crate::dom::RGBA> { self.padding_color.as_ref() }
647 pub fn border_color(&self) -> Option<&crate::dom::RGBA> { self.border_color.as_ref() }
649 pub fn margin_color(&self) -> Option<&crate::dom::RGBA> { self.margin_color.as_ref() }
651 pub fn event_target_color(&self) -> Option<&crate::dom::RGBA> { self.event_target_color.as_ref() }
653 pub fn shape_color(&self) -> Option<&crate::dom::RGBA> { self.shape_color.as_ref() }
655 pub fn shape_margin_color(&self) -> Option<&crate::dom::RGBA> { self.shape_margin_color.as_ref() }
657 pub fn css_grid_color(&self) -> Option<&crate::dom::RGBA> { self.css_grid_color.as_ref() }
659 pub fn color_format(&self) -> Option<&ColorFormat> { self.color_format.as_ref() }
661 pub fn grid_highlight_config(&self) -> Option<&GridHighlightConfig> { self.grid_highlight_config.as_ref() }
663 pub fn flex_container_highlight_config(&self) -> Option<&FlexContainerHighlightConfig<'a>> { self.flex_container_highlight_config.as_ref() }
665 pub fn flex_item_highlight_config(&self) -> Option<&FlexItemHighlightConfig<'a>> { self.flex_item_highlight_config.as_ref() }
667 pub fn contrast_algorithm(&self) -> Option<&ContrastAlgorithm> { self.contrast_algorithm.as_ref() }
669 pub fn container_query_container_highlight_config(&self) -> Option<&ContainerQueryContainerHighlightConfig<'a>> { self.container_query_container_highlight_config.as_ref() }
671}
672
673#[derive(Default)]
674pub struct HighlightConfigBuilder<'a> {
675 show_info: Option<bool>,
676 show_styles: Option<bool>,
677 show_rulers: Option<bool>,
678 show_accessibility_info: Option<bool>,
679 show_extension_lines: Option<bool>,
680 content_color: Option<crate::dom::RGBA>,
681 padding_color: Option<crate::dom::RGBA>,
682 border_color: Option<crate::dom::RGBA>,
683 margin_color: Option<crate::dom::RGBA>,
684 event_target_color: Option<crate::dom::RGBA>,
685 shape_color: Option<crate::dom::RGBA>,
686 shape_margin_color: Option<crate::dom::RGBA>,
687 css_grid_color: Option<crate::dom::RGBA>,
688 color_format: Option<ColorFormat>,
689 grid_highlight_config: Option<GridHighlightConfig>,
690 flex_container_highlight_config: Option<FlexContainerHighlightConfig<'a>>,
691 flex_item_highlight_config: Option<FlexItemHighlightConfig<'a>>,
692 contrast_algorithm: Option<ContrastAlgorithm>,
693 container_query_container_highlight_config: Option<ContainerQueryContainerHighlightConfig<'a>>,
694}
695
696impl<'a> HighlightConfigBuilder<'a> {
697 pub fn show_info(mut self, show_info: bool) -> Self { self.show_info = Some(show_info); self }
699 pub fn show_styles(mut self, show_styles: bool) -> Self { self.show_styles = Some(show_styles); self }
701 pub fn show_rulers(mut self, show_rulers: bool) -> Self { self.show_rulers = Some(show_rulers); self }
703 pub fn show_accessibility_info(mut self, show_accessibility_info: bool) -> Self { self.show_accessibility_info = Some(show_accessibility_info); self }
705 pub fn show_extension_lines(mut self, show_extension_lines: bool) -> Self { self.show_extension_lines = Some(show_extension_lines); self }
707 pub fn content_color(mut self, content_color: crate::dom::RGBA) -> Self { self.content_color = Some(content_color); self }
709 pub fn padding_color(mut self, padding_color: crate::dom::RGBA) -> Self { self.padding_color = Some(padding_color); self }
711 pub fn border_color(mut self, border_color: crate::dom::RGBA) -> Self { self.border_color = Some(border_color); self }
713 pub fn margin_color(mut self, margin_color: crate::dom::RGBA) -> Self { self.margin_color = Some(margin_color); self }
715 pub fn event_target_color(mut self, event_target_color: crate::dom::RGBA) -> Self { self.event_target_color = Some(event_target_color); self }
717 pub fn shape_color(mut self, shape_color: crate::dom::RGBA) -> Self { self.shape_color = Some(shape_color); self }
719 pub fn shape_margin_color(mut self, shape_margin_color: crate::dom::RGBA) -> Self { self.shape_margin_color = Some(shape_margin_color); self }
721 pub fn css_grid_color(mut self, css_grid_color: crate::dom::RGBA) -> Self { self.css_grid_color = Some(css_grid_color); self }
723 pub fn color_format(mut self, color_format: impl Into<ColorFormat>) -> Self { self.color_format = Some(color_format.into()); self }
725 pub fn grid_highlight_config(mut self, grid_highlight_config: GridHighlightConfig) -> Self { self.grid_highlight_config = Some(grid_highlight_config); self }
727 pub fn flex_container_highlight_config(mut self, flex_container_highlight_config: FlexContainerHighlightConfig<'a>) -> Self { self.flex_container_highlight_config = Some(flex_container_highlight_config); self }
729 pub fn flex_item_highlight_config(mut self, flex_item_highlight_config: FlexItemHighlightConfig<'a>) -> Self { self.flex_item_highlight_config = Some(flex_item_highlight_config); self }
731 pub fn contrast_algorithm(mut self, contrast_algorithm: impl Into<ContrastAlgorithm>) -> Self { self.contrast_algorithm = Some(contrast_algorithm.into()); self }
733 pub fn container_query_container_highlight_config(mut self, container_query_container_highlight_config: ContainerQueryContainerHighlightConfig<'a>) -> Self { self.container_query_container_highlight_config = Some(container_query_container_highlight_config); self }
735 pub fn build(self) -> HighlightConfig<'a> {
736 HighlightConfig {
737 show_info: self.show_info,
738 show_styles: self.show_styles,
739 show_rulers: self.show_rulers,
740 show_accessibility_info: self.show_accessibility_info,
741 show_extension_lines: self.show_extension_lines,
742 content_color: self.content_color,
743 padding_color: self.padding_color,
744 border_color: self.border_color,
745 margin_color: self.margin_color,
746 event_target_color: self.event_target_color,
747 shape_color: self.shape_color,
748 shape_margin_color: self.shape_margin_color,
749 css_grid_color: self.css_grid_color,
750 color_format: self.color_format,
751 grid_highlight_config: self.grid_highlight_config,
752 flex_container_highlight_config: self.flex_container_highlight_config,
753 flex_item_highlight_config: self.flex_item_highlight_config,
754 contrast_algorithm: self.contrast_algorithm,
755 container_query_container_highlight_config: self.container_query_container_highlight_config,
756 }
757 }
758}
759
760
761#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
762pub enum ColorFormat {
763 #[default]
764 #[serde(rename = "rgb")]
765 Rgb,
766 #[serde(rename = "hsl")]
767 Hsl,
768 #[serde(rename = "hwb")]
769 Hwb,
770 #[serde(rename = "hex")]
771 Hex,
772}
773
774#[derive(Debug, Clone, Serialize, Deserialize, Default)]
777#[serde(rename_all = "camelCase")]
778pub struct GridNodeHighlightConfig {
779 #[serde(rename = "gridHighlightConfig")]
781 grid_highlight_config: GridHighlightConfig,
782 #[serde(rename = "nodeId")]
784 node_id: crate::dom::NodeId,
785}
786
787impl GridNodeHighlightConfig {
788 pub fn builder(grid_highlight_config: GridHighlightConfig, node_id: crate::dom::NodeId) -> GridNodeHighlightConfigBuilder {
792 GridNodeHighlightConfigBuilder {
793 grid_highlight_config: grid_highlight_config,
794 node_id: node_id,
795 }
796 }
797 pub fn grid_highlight_config(&self) -> &GridHighlightConfig { &self.grid_highlight_config }
799 pub fn node_id(&self) -> &crate::dom::NodeId { &self.node_id }
801}
802
803
804pub struct GridNodeHighlightConfigBuilder {
805 grid_highlight_config: GridHighlightConfig,
806 node_id: crate::dom::NodeId,
807}
808
809impl GridNodeHighlightConfigBuilder {
810 pub fn build(self) -> GridNodeHighlightConfig {
811 GridNodeHighlightConfig {
812 grid_highlight_config: self.grid_highlight_config,
813 node_id: self.node_id,
814 }
815 }
816}
817
818
819#[derive(Debug, Clone, Serialize, Deserialize, Default)]
820#[serde(rename_all = "camelCase")]
821pub struct FlexNodeHighlightConfig<'a> {
822 #[serde(rename = "flexContainerHighlightConfig")]
824 flex_container_highlight_config: FlexContainerHighlightConfig<'a>,
825 #[serde(rename = "nodeId")]
827 node_id: crate::dom::NodeId,
828}
829
830impl<'a> FlexNodeHighlightConfig<'a> {
831 pub fn builder(flex_container_highlight_config: FlexContainerHighlightConfig<'a>, node_id: crate::dom::NodeId) -> FlexNodeHighlightConfigBuilder<'a> {
835 FlexNodeHighlightConfigBuilder {
836 flex_container_highlight_config: flex_container_highlight_config,
837 node_id: node_id,
838 }
839 }
840 pub fn flex_container_highlight_config(&self) -> &FlexContainerHighlightConfig<'a> { &self.flex_container_highlight_config }
842 pub fn node_id(&self) -> &crate::dom::NodeId { &self.node_id }
844}
845
846
847pub struct FlexNodeHighlightConfigBuilder<'a> {
848 flex_container_highlight_config: FlexContainerHighlightConfig<'a>,
849 node_id: crate::dom::NodeId,
850}
851
852impl<'a> FlexNodeHighlightConfigBuilder<'a> {
853 pub fn build(self) -> FlexNodeHighlightConfig<'a> {
854 FlexNodeHighlightConfig {
855 flex_container_highlight_config: self.flex_container_highlight_config,
856 node_id: self.node_id,
857 }
858 }
859}
860
861
862#[derive(Debug, Clone, Serialize, Deserialize, Default)]
863#[serde(rename_all = "camelCase")]
864pub struct ScrollSnapContainerHighlightConfig<'a> {
865 #[serde(skip_serializing_if = "Option::is_none", rename = "snapportBorder")]
867 snapport_border: Option<LineStyle<'a>>,
868 #[serde(skip_serializing_if = "Option::is_none", rename = "snapAreaBorder")]
870 snap_area_border: Option<LineStyle<'a>>,
871 #[serde(skip_serializing_if = "Option::is_none", rename = "scrollMarginColor")]
873 scroll_margin_color: Option<crate::dom::RGBA>,
874 #[serde(skip_serializing_if = "Option::is_none", rename = "scrollPaddingColor")]
876 scroll_padding_color: Option<crate::dom::RGBA>,
877}
878
879impl<'a> ScrollSnapContainerHighlightConfig<'a> {
880 pub fn builder() -> ScrollSnapContainerHighlightConfigBuilder<'a> {
882 ScrollSnapContainerHighlightConfigBuilder {
883 snapport_border: None,
884 snap_area_border: None,
885 scroll_margin_color: None,
886 scroll_padding_color: None,
887 }
888 }
889 pub fn snapport_border(&self) -> Option<&LineStyle<'a>> { self.snapport_border.as_ref() }
891 pub fn snap_area_border(&self) -> Option<&LineStyle<'a>> { self.snap_area_border.as_ref() }
893 pub fn scroll_margin_color(&self) -> Option<&crate::dom::RGBA> { self.scroll_margin_color.as_ref() }
895 pub fn scroll_padding_color(&self) -> Option<&crate::dom::RGBA> { self.scroll_padding_color.as_ref() }
897}
898
899#[derive(Default)]
900pub struct ScrollSnapContainerHighlightConfigBuilder<'a> {
901 snapport_border: Option<LineStyle<'a>>,
902 snap_area_border: Option<LineStyle<'a>>,
903 scroll_margin_color: Option<crate::dom::RGBA>,
904 scroll_padding_color: Option<crate::dom::RGBA>,
905}
906
907impl<'a> ScrollSnapContainerHighlightConfigBuilder<'a> {
908 pub fn snapport_border(mut self, snapport_border: LineStyle<'a>) -> Self { self.snapport_border = Some(snapport_border); self }
910 pub fn snap_area_border(mut self, snap_area_border: LineStyle<'a>) -> Self { self.snap_area_border = Some(snap_area_border); self }
912 pub fn scroll_margin_color(mut self, scroll_margin_color: crate::dom::RGBA) -> Self { self.scroll_margin_color = Some(scroll_margin_color); self }
914 pub fn scroll_padding_color(mut self, scroll_padding_color: crate::dom::RGBA) -> Self { self.scroll_padding_color = Some(scroll_padding_color); self }
916 pub fn build(self) -> ScrollSnapContainerHighlightConfig<'a> {
917 ScrollSnapContainerHighlightConfig {
918 snapport_border: self.snapport_border,
919 snap_area_border: self.snap_area_border,
920 scroll_margin_color: self.scroll_margin_color,
921 scroll_padding_color: self.scroll_padding_color,
922 }
923 }
924}
925
926
927#[derive(Debug, Clone, Serialize, Deserialize, Default)]
928#[serde(rename_all = "camelCase")]
929pub struct ScrollSnapHighlightConfig<'a> {
930 #[serde(rename = "scrollSnapContainerHighlightConfig")]
932 scroll_snap_container_highlight_config: ScrollSnapContainerHighlightConfig<'a>,
933 #[serde(rename = "nodeId")]
935 node_id: crate::dom::NodeId,
936}
937
938impl<'a> ScrollSnapHighlightConfig<'a> {
939 pub fn builder(scroll_snap_container_highlight_config: ScrollSnapContainerHighlightConfig<'a>, node_id: crate::dom::NodeId) -> ScrollSnapHighlightConfigBuilder<'a> {
943 ScrollSnapHighlightConfigBuilder {
944 scroll_snap_container_highlight_config: scroll_snap_container_highlight_config,
945 node_id: node_id,
946 }
947 }
948 pub fn scroll_snap_container_highlight_config(&self) -> &ScrollSnapContainerHighlightConfig<'a> { &self.scroll_snap_container_highlight_config }
950 pub fn node_id(&self) -> &crate::dom::NodeId { &self.node_id }
952}
953
954
955pub struct ScrollSnapHighlightConfigBuilder<'a> {
956 scroll_snap_container_highlight_config: ScrollSnapContainerHighlightConfig<'a>,
957 node_id: crate::dom::NodeId,
958}
959
960impl<'a> ScrollSnapHighlightConfigBuilder<'a> {
961 pub fn build(self) -> ScrollSnapHighlightConfig<'a> {
962 ScrollSnapHighlightConfig {
963 scroll_snap_container_highlight_config: self.scroll_snap_container_highlight_config,
964 node_id: self.node_id,
965 }
966 }
967}
968
969#[derive(Debug, Clone, Serialize, Deserialize, Default)]
972#[serde(rename_all = "camelCase")]
973pub struct HingeConfig {
974 rect: crate::dom::Rect,
976 #[serde(skip_serializing_if = "Option::is_none", rename = "contentColor")]
978 content_color: Option<crate::dom::RGBA>,
979 #[serde(skip_serializing_if = "Option::is_none", rename = "outlineColor")]
981 outline_color: Option<crate::dom::RGBA>,
982}
983
984impl HingeConfig {
985 pub fn builder(rect: crate::dom::Rect) -> HingeConfigBuilder {
988 HingeConfigBuilder {
989 rect: rect,
990 content_color: None,
991 outline_color: None,
992 }
993 }
994 pub fn rect(&self) -> &crate::dom::Rect { &self.rect }
996 pub fn content_color(&self) -> Option<&crate::dom::RGBA> { self.content_color.as_ref() }
998 pub fn outline_color(&self) -> Option<&crate::dom::RGBA> { self.outline_color.as_ref() }
1000}
1001
1002
1003pub struct HingeConfigBuilder {
1004 rect: crate::dom::Rect,
1005 content_color: Option<crate::dom::RGBA>,
1006 outline_color: Option<crate::dom::RGBA>,
1007}
1008
1009impl HingeConfigBuilder {
1010 pub fn content_color(mut self, content_color: crate::dom::RGBA) -> Self { self.content_color = Some(content_color); self }
1012 pub fn outline_color(mut self, outline_color: crate::dom::RGBA) -> Self { self.outline_color = Some(outline_color); self }
1014 pub fn build(self) -> HingeConfig {
1015 HingeConfig {
1016 rect: self.rect,
1017 content_color: self.content_color,
1018 outline_color: self.outline_color,
1019 }
1020 }
1021}
1022
1023#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1026#[serde(rename_all = "camelCase")]
1027pub struct WindowControlsOverlayConfig<'a> {
1028 #[serde(rename = "showCSS")]
1030 show_css: bool,
1031 #[serde(rename = "selectedPlatform")]
1033 selected_platform: Cow<'a, str>,
1034 #[serde(rename = "themeColor")]
1036 theme_color: Cow<'a, str>,
1037}
1038
1039impl<'a> WindowControlsOverlayConfig<'a> {
1040 pub fn builder(show_css: bool, selected_platform: impl Into<Cow<'a, str>>, theme_color: impl Into<Cow<'a, str>>) -> WindowControlsOverlayConfigBuilder<'a> {
1045 WindowControlsOverlayConfigBuilder {
1046 show_css: show_css,
1047 selected_platform: selected_platform.into(),
1048 theme_color: theme_color.into(),
1049 }
1050 }
1051 pub fn show_css(&self) -> bool { self.show_css }
1053 pub fn selected_platform(&self) -> &str { self.selected_platform.as_ref() }
1055 pub fn theme_color(&self) -> &str { self.theme_color.as_ref() }
1057}
1058
1059
1060pub struct WindowControlsOverlayConfigBuilder<'a> {
1061 show_css: bool,
1062 selected_platform: Cow<'a, str>,
1063 theme_color: Cow<'a, str>,
1064}
1065
1066impl<'a> WindowControlsOverlayConfigBuilder<'a> {
1067 pub fn build(self) -> WindowControlsOverlayConfig<'a> {
1068 WindowControlsOverlayConfig {
1069 show_css: self.show_css,
1070 selected_platform: self.selected_platform,
1071 theme_color: self.theme_color,
1072 }
1073 }
1074}
1075
1076
1077#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1078#[serde(rename_all = "camelCase")]
1079pub struct ContainerQueryHighlightConfig<'a> {
1080 #[serde(rename = "containerQueryContainerHighlightConfig")]
1082 container_query_container_highlight_config: ContainerQueryContainerHighlightConfig<'a>,
1083 #[serde(rename = "nodeId")]
1085 node_id: crate::dom::NodeId,
1086}
1087
1088impl<'a> ContainerQueryHighlightConfig<'a> {
1089 pub fn builder(container_query_container_highlight_config: ContainerQueryContainerHighlightConfig<'a>, node_id: crate::dom::NodeId) -> ContainerQueryHighlightConfigBuilder<'a> {
1093 ContainerQueryHighlightConfigBuilder {
1094 container_query_container_highlight_config: container_query_container_highlight_config,
1095 node_id: node_id,
1096 }
1097 }
1098 pub fn container_query_container_highlight_config(&self) -> &ContainerQueryContainerHighlightConfig<'a> { &self.container_query_container_highlight_config }
1100 pub fn node_id(&self) -> &crate::dom::NodeId { &self.node_id }
1102}
1103
1104
1105pub struct ContainerQueryHighlightConfigBuilder<'a> {
1106 container_query_container_highlight_config: ContainerQueryContainerHighlightConfig<'a>,
1107 node_id: crate::dom::NodeId,
1108}
1109
1110impl<'a> ContainerQueryHighlightConfigBuilder<'a> {
1111 pub fn build(self) -> ContainerQueryHighlightConfig<'a> {
1112 ContainerQueryHighlightConfig {
1113 container_query_container_highlight_config: self.container_query_container_highlight_config,
1114 node_id: self.node_id,
1115 }
1116 }
1117}
1118
1119
1120#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1121#[serde(rename_all = "camelCase")]
1122pub struct ContainerQueryContainerHighlightConfig<'a> {
1123 #[serde(skip_serializing_if = "Option::is_none", rename = "containerBorder")]
1125 container_border: Option<LineStyle<'a>>,
1126 #[serde(skip_serializing_if = "Option::is_none", rename = "descendantBorder")]
1128 descendant_border: Option<LineStyle<'a>>,
1129}
1130
1131impl<'a> ContainerQueryContainerHighlightConfig<'a> {
1132 pub fn builder() -> ContainerQueryContainerHighlightConfigBuilder<'a> {
1134 ContainerQueryContainerHighlightConfigBuilder {
1135 container_border: None,
1136 descendant_border: None,
1137 }
1138 }
1139 pub fn container_border(&self) -> Option<&LineStyle<'a>> { self.container_border.as_ref() }
1141 pub fn descendant_border(&self) -> Option<&LineStyle<'a>> { self.descendant_border.as_ref() }
1143}
1144
1145#[derive(Default)]
1146pub struct ContainerQueryContainerHighlightConfigBuilder<'a> {
1147 container_border: Option<LineStyle<'a>>,
1148 descendant_border: Option<LineStyle<'a>>,
1149}
1150
1151impl<'a> ContainerQueryContainerHighlightConfigBuilder<'a> {
1152 pub fn container_border(mut self, container_border: LineStyle<'a>) -> Self { self.container_border = Some(container_border); self }
1154 pub fn descendant_border(mut self, descendant_border: LineStyle<'a>) -> Self { self.descendant_border = Some(descendant_border); self }
1156 pub fn build(self) -> ContainerQueryContainerHighlightConfig<'a> {
1157 ContainerQueryContainerHighlightConfig {
1158 container_border: self.container_border,
1159 descendant_border: self.descendant_border,
1160 }
1161 }
1162}
1163
1164
1165#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1166#[serde(rename_all = "camelCase")]
1167pub struct IsolatedElementHighlightConfig {
1168 #[serde(rename = "isolationModeHighlightConfig")]
1170 isolation_mode_highlight_config: IsolationModeHighlightConfig,
1171 #[serde(rename = "nodeId")]
1173 node_id: crate::dom::NodeId,
1174}
1175
1176impl IsolatedElementHighlightConfig {
1177 pub fn builder(isolation_mode_highlight_config: IsolationModeHighlightConfig, node_id: crate::dom::NodeId) -> IsolatedElementHighlightConfigBuilder {
1181 IsolatedElementHighlightConfigBuilder {
1182 isolation_mode_highlight_config: isolation_mode_highlight_config,
1183 node_id: node_id,
1184 }
1185 }
1186 pub fn isolation_mode_highlight_config(&self) -> &IsolationModeHighlightConfig { &self.isolation_mode_highlight_config }
1188 pub fn node_id(&self) -> &crate::dom::NodeId { &self.node_id }
1190}
1191
1192
1193pub struct IsolatedElementHighlightConfigBuilder {
1194 isolation_mode_highlight_config: IsolationModeHighlightConfig,
1195 node_id: crate::dom::NodeId,
1196}
1197
1198impl IsolatedElementHighlightConfigBuilder {
1199 pub fn build(self) -> IsolatedElementHighlightConfig {
1200 IsolatedElementHighlightConfig {
1201 isolation_mode_highlight_config: self.isolation_mode_highlight_config,
1202 node_id: self.node_id,
1203 }
1204 }
1205}
1206
1207
1208#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1209#[serde(rename_all = "camelCase")]
1210pub struct IsolationModeHighlightConfig {
1211 #[serde(skip_serializing_if = "Option::is_none", rename = "resizerColor")]
1213 resizer_color: Option<crate::dom::RGBA>,
1214 #[serde(skip_serializing_if = "Option::is_none", rename = "resizerHandleColor")]
1216 resizer_handle_color: Option<crate::dom::RGBA>,
1217 #[serde(skip_serializing_if = "Option::is_none", rename = "maskColor")]
1219 mask_color: Option<crate::dom::RGBA>,
1220}
1221
1222impl IsolationModeHighlightConfig {
1223 pub fn builder() -> IsolationModeHighlightConfigBuilder {
1225 IsolationModeHighlightConfigBuilder {
1226 resizer_color: None,
1227 resizer_handle_color: None,
1228 mask_color: None,
1229 }
1230 }
1231 pub fn resizer_color(&self) -> Option<&crate::dom::RGBA> { self.resizer_color.as_ref() }
1233 pub fn resizer_handle_color(&self) -> Option<&crate::dom::RGBA> { self.resizer_handle_color.as_ref() }
1235 pub fn mask_color(&self) -> Option<&crate::dom::RGBA> { self.mask_color.as_ref() }
1237}
1238
1239#[derive(Default)]
1240pub struct IsolationModeHighlightConfigBuilder {
1241 resizer_color: Option<crate::dom::RGBA>,
1242 resizer_handle_color: Option<crate::dom::RGBA>,
1243 mask_color: Option<crate::dom::RGBA>,
1244}
1245
1246impl IsolationModeHighlightConfigBuilder {
1247 pub fn resizer_color(mut self, resizer_color: crate::dom::RGBA) -> Self { self.resizer_color = Some(resizer_color); self }
1249 pub fn resizer_handle_color(mut self, resizer_handle_color: crate::dom::RGBA) -> Self { self.resizer_handle_color = Some(resizer_handle_color); self }
1251 pub fn mask_color(mut self, mask_color: crate::dom::RGBA) -> Self { self.mask_color = Some(mask_color); self }
1253 pub fn build(self) -> IsolationModeHighlightConfig {
1254 IsolationModeHighlightConfig {
1255 resizer_color: self.resizer_color,
1256 resizer_handle_color: self.resizer_handle_color,
1257 mask_color: self.mask_color,
1258 }
1259 }
1260}
1261
1262
1263#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
1264pub enum InspectMode {
1265 #[default]
1266 #[serde(rename = "searchForNode")]
1267 SearchForNode,
1268 #[serde(rename = "searchForUAShadowDOM")]
1269 SearchForUAShadowDOM,
1270 #[serde(rename = "captureAreaScreenshot")]
1271 CaptureAreaScreenshot,
1272 #[serde(rename = "none")]
1273 None,
1274}
1275
1276
1277#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1278#[serde(rename_all = "camelCase")]
1279pub struct InspectedElementAnchorConfig {
1280 #[serde(skip_serializing_if = "Option::is_none", rename = "nodeId")]
1282 node_id: Option<crate::dom::NodeId>,
1283 #[serde(skip_serializing_if = "Option::is_none", rename = "backendNodeId")]
1285 backend_node_id: Option<crate::dom::BackendNodeId>,
1286}
1287
1288impl InspectedElementAnchorConfig {
1289 pub fn builder() -> InspectedElementAnchorConfigBuilder {
1291 InspectedElementAnchorConfigBuilder {
1292 node_id: None,
1293 backend_node_id: None,
1294 }
1295 }
1296 pub fn node_id(&self) -> Option<&crate::dom::NodeId> { self.node_id.as_ref() }
1298 pub fn backend_node_id(&self) -> Option<&crate::dom::BackendNodeId> { self.backend_node_id.as_ref() }
1300}
1301
1302#[derive(Default)]
1303pub struct InspectedElementAnchorConfigBuilder {
1304 node_id: Option<crate::dom::NodeId>,
1305 backend_node_id: Option<crate::dom::BackendNodeId>,
1306}
1307
1308impl InspectedElementAnchorConfigBuilder {
1309 pub fn node_id(mut self, node_id: crate::dom::NodeId) -> Self { self.node_id = Some(node_id); self }
1311 pub fn backend_node_id(mut self, backend_node_id: crate::dom::BackendNodeId) -> Self { self.backend_node_id = Some(backend_node_id); self }
1313 pub fn build(self) -> InspectedElementAnchorConfig {
1314 InspectedElementAnchorConfig {
1315 node_id: self.node_id,
1316 backend_node_id: self.backend_node_id,
1317 }
1318 }
1319}
1320
1321#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1322pub struct DisableParams {}
1323
1324impl DisableParams { pub const METHOD: &'static str = "Overlay.disable"; }
1325
1326impl<'a> crate::CdpCommand<'a> for DisableParams {
1327 const METHOD: &'static str = "Overlay.disable";
1328 type Response = crate::EmptyReturns;
1329}
1330
1331#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1332pub struct EnableParams {}
1333
1334impl EnableParams { pub const METHOD: &'static str = "Overlay.enable"; }
1335
1336impl<'a> crate::CdpCommand<'a> for EnableParams {
1337 const METHOD: &'static str = "Overlay.enable";
1338 type Response = crate::EmptyReturns;
1339}
1340
1341#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1344#[serde(rename_all = "camelCase")]
1345pub struct GetHighlightObjectForTestParams {
1346 #[serde(rename = "nodeId")]
1348 node_id: crate::dom::NodeId,
1349 #[serde(skip_serializing_if = "Option::is_none", rename = "includeDistance")]
1351 include_distance: Option<bool>,
1352 #[serde(skip_serializing_if = "Option::is_none", rename = "includeStyle")]
1354 include_style: Option<bool>,
1355 #[serde(skip_serializing_if = "Option::is_none", rename = "colorFormat")]
1357 color_format: Option<ColorFormat>,
1358 #[serde(skip_serializing_if = "Option::is_none", rename = "showAccessibilityInfo")]
1360 show_accessibility_info: Option<bool>,
1361}
1362
1363impl GetHighlightObjectForTestParams {
1364 pub fn builder(node_id: crate::dom::NodeId) -> GetHighlightObjectForTestParamsBuilder {
1367 GetHighlightObjectForTestParamsBuilder {
1368 node_id: node_id,
1369 include_distance: None,
1370 include_style: None,
1371 color_format: None,
1372 show_accessibility_info: None,
1373 }
1374 }
1375 pub fn node_id(&self) -> &crate::dom::NodeId { &self.node_id }
1377 pub fn include_distance(&self) -> Option<bool> { self.include_distance }
1379 pub fn include_style(&self) -> Option<bool> { self.include_style }
1381 pub fn color_format(&self) -> Option<&ColorFormat> { self.color_format.as_ref() }
1383 pub fn show_accessibility_info(&self) -> Option<bool> { self.show_accessibility_info }
1385}
1386
1387
1388pub struct GetHighlightObjectForTestParamsBuilder {
1389 node_id: crate::dom::NodeId,
1390 include_distance: Option<bool>,
1391 include_style: Option<bool>,
1392 color_format: Option<ColorFormat>,
1393 show_accessibility_info: Option<bool>,
1394}
1395
1396impl GetHighlightObjectForTestParamsBuilder {
1397 pub fn include_distance(mut self, include_distance: bool) -> Self { self.include_distance = Some(include_distance); self }
1399 pub fn include_style(mut self, include_style: bool) -> Self { self.include_style = Some(include_style); self }
1401 pub fn color_format(mut self, color_format: impl Into<ColorFormat>) -> Self { self.color_format = Some(color_format.into()); self }
1403 pub fn show_accessibility_info(mut self, show_accessibility_info: bool) -> Self { self.show_accessibility_info = Some(show_accessibility_info); self }
1405 pub fn build(self) -> GetHighlightObjectForTestParams {
1406 GetHighlightObjectForTestParams {
1407 node_id: self.node_id,
1408 include_distance: self.include_distance,
1409 include_style: self.include_style,
1410 color_format: self.color_format,
1411 show_accessibility_info: self.show_accessibility_info,
1412 }
1413 }
1414}
1415
1416#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1419#[serde(rename_all = "camelCase")]
1420pub struct GetHighlightObjectForTestReturns {
1421 highlight: serde_json::Map<String, JsonValue>,
1423}
1424
1425impl GetHighlightObjectForTestReturns {
1426 pub fn builder(highlight: serde_json::Map<String, JsonValue>) -> GetHighlightObjectForTestReturnsBuilder {
1429 GetHighlightObjectForTestReturnsBuilder {
1430 highlight: highlight,
1431 }
1432 }
1433 pub fn highlight(&self) -> &serde_json::Map<String, JsonValue> { &self.highlight }
1435}
1436
1437
1438pub struct GetHighlightObjectForTestReturnsBuilder {
1439 highlight: serde_json::Map<String, JsonValue>,
1440}
1441
1442impl GetHighlightObjectForTestReturnsBuilder {
1443 pub fn build(self) -> GetHighlightObjectForTestReturns {
1444 GetHighlightObjectForTestReturns {
1445 highlight: self.highlight,
1446 }
1447 }
1448}
1449
1450impl GetHighlightObjectForTestParams { pub const METHOD: &'static str = "Overlay.getHighlightObjectForTest"; }
1451
1452impl<'a> crate::CdpCommand<'a> for GetHighlightObjectForTestParams {
1453 const METHOD: &'static str = "Overlay.getHighlightObjectForTest";
1454 type Response = GetHighlightObjectForTestReturns;
1455}
1456
1457#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1460#[serde(rename_all = "camelCase")]
1461pub struct GetGridHighlightObjectsForTestParams {
1462 #[serde(rename = "nodeIds")]
1464 node_ids: Vec<crate::dom::NodeId>,
1465}
1466
1467impl GetGridHighlightObjectsForTestParams {
1468 pub fn builder(node_ids: Vec<crate::dom::NodeId>) -> GetGridHighlightObjectsForTestParamsBuilder {
1471 GetGridHighlightObjectsForTestParamsBuilder {
1472 node_ids: node_ids,
1473 }
1474 }
1475 pub fn node_ids(&self) -> &[crate::dom::NodeId] { &self.node_ids }
1477}
1478
1479
1480pub struct GetGridHighlightObjectsForTestParamsBuilder {
1481 node_ids: Vec<crate::dom::NodeId>,
1482}
1483
1484impl GetGridHighlightObjectsForTestParamsBuilder {
1485 pub fn build(self) -> GetGridHighlightObjectsForTestParams {
1486 GetGridHighlightObjectsForTestParams {
1487 node_ids: self.node_ids,
1488 }
1489 }
1490}
1491
1492#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1495#[serde(rename_all = "camelCase")]
1496pub struct GetGridHighlightObjectsForTestReturns {
1497 highlights: serde_json::Map<String, JsonValue>,
1499}
1500
1501impl GetGridHighlightObjectsForTestReturns {
1502 pub fn builder(highlights: serde_json::Map<String, JsonValue>) -> GetGridHighlightObjectsForTestReturnsBuilder {
1505 GetGridHighlightObjectsForTestReturnsBuilder {
1506 highlights: highlights,
1507 }
1508 }
1509 pub fn highlights(&self) -> &serde_json::Map<String, JsonValue> { &self.highlights }
1511}
1512
1513
1514pub struct GetGridHighlightObjectsForTestReturnsBuilder {
1515 highlights: serde_json::Map<String, JsonValue>,
1516}
1517
1518impl GetGridHighlightObjectsForTestReturnsBuilder {
1519 pub fn build(self) -> GetGridHighlightObjectsForTestReturns {
1520 GetGridHighlightObjectsForTestReturns {
1521 highlights: self.highlights,
1522 }
1523 }
1524}
1525
1526impl GetGridHighlightObjectsForTestParams { pub const METHOD: &'static str = "Overlay.getGridHighlightObjectsForTest"; }
1527
1528impl<'a> crate::CdpCommand<'a> for GetGridHighlightObjectsForTestParams {
1529 const METHOD: &'static str = "Overlay.getGridHighlightObjectsForTest";
1530 type Response = GetGridHighlightObjectsForTestReturns;
1531}
1532
1533#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1536#[serde(rename_all = "camelCase")]
1537pub struct GetSourceOrderHighlightObjectForTestParams {
1538 #[serde(rename = "nodeId")]
1540 node_id: crate::dom::NodeId,
1541}
1542
1543impl GetSourceOrderHighlightObjectForTestParams {
1544 pub fn builder(node_id: crate::dom::NodeId) -> GetSourceOrderHighlightObjectForTestParamsBuilder {
1547 GetSourceOrderHighlightObjectForTestParamsBuilder {
1548 node_id: node_id,
1549 }
1550 }
1551 pub fn node_id(&self) -> &crate::dom::NodeId { &self.node_id }
1553}
1554
1555
1556pub struct GetSourceOrderHighlightObjectForTestParamsBuilder {
1557 node_id: crate::dom::NodeId,
1558}
1559
1560impl GetSourceOrderHighlightObjectForTestParamsBuilder {
1561 pub fn build(self) -> GetSourceOrderHighlightObjectForTestParams {
1562 GetSourceOrderHighlightObjectForTestParams {
1563 node_id: self.node_id,
1564 }
1565 }
1566}
1567
1568#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1571#[serde(rename_all = "camelCase")]
1572pub struct GetSourceOrderHighlightObjectForTestReturns {
1573 highlight: serde_json::Map<String, JsonValue>,
1575}
1576
1577impl GetSourceOrderHighlightObjectForTestReturns {
1578 pub fn builder(highlight: serde_json::Map<String, JsonValue>) -> GetSourceOrderHighlightObjectForTestReturnsBuilder {
1581 GetSourceOrderHighlightObjectForTestReturnsBuilder {
1582 highlight: highlight,
1583 }
1584 }
1585 pub fn highlight(&self) -> &serde_json::Map<String, JsonValue> { &self.highlight }
1587}
1588
1589
1590pub struct GetSourceOrderHighlightObjectForTestReturnsBuilder {
1591 highlight: serde_json::Map<String, JsonValue>,
1592}
1593
1594impl GetSourceOrderHighlightObjectForTestReturnsBuilder {
1595 pub fn build(self) -> GetSourceOrderHighlightObjectForTestReturns {
1596 GetSourceOrderHighlightObjectForTestReturns {
1597 highlight: self.highlight,
1598 }
1599 }
1600}
1601
1602impl GetSourceOrderHighlightObjectForTestParams { pub const METHOD: &'static str = "Overlay.getSourceOrderHighlightObjectForTest"; }
1603
1604impl<'a> crate::CdpCommand<'a> for GetSourceOrderHighlightObjectForTestParams {
1605 const METHOD: &'static str = "Overlay.getSourceOrderHighlightObjectForTest";
1606 type Response = GetSourceOrderHighlightObjectForTestReturns;
1607}
1608
1609#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1610pub struct HideHighlightParams {}
1611
1612impl HideHighlightParams { pub const METHOD: &'static str = "Overlay.hideHighlight"; }
1613
1614impl<'a> crate::CdpCommand<'a> for HideHighlightParams {
1615 const METHOD: &'static str = "Overlay.hideHighlight";
1616 type Response = crate::EmptyReturns;
1617}
1618
1619#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1625#[serde(rename_all = "camelCase")]
1626pub struct HighlightFrameParams<'a> {
1627 #[serde(rename = "frameId")]
1629 frame_id: crate::page::FrameId<'a>,
1630 #[serde(skip_serializing_if = "Option::is_none", rename = "contentColor")]
1632 content_color: Option<crate::dom::RGBA>,
1633 #[serde(skip_serializing_if = "Option::is_none", rename = "contentOutlineColor")]
1635 content_outline_color: Option<crate::dom::RGBA>,
1636}
1637
1638impl<'a> HighlightFrameParams<'a> {
1639 pub fn builder(frame_id: crate::page::FrameId<'a>) -> HighlightFrameParamsBuilder<'a> {
1642 HighlightFrameParamsBuilder {
1643 frame_id: frame_id,
1644 content_color: None,
1645 content_outline_color: None,
1646 }
1647 }
1648 pub fn frame_id(&self) -> &crate::page::FrameId<'a> { &self.frame_id }
1650 pub fn content_color(&self) -> Option<&crate::dom::RGBA> { self.content_color.as_ref() }
1652 pub fn content_outline_color(&self) -> Option<&crate::dom::RGBA> { self.content_outline_color.as_ref() }
1654}
1655
1656
1657pub struct HighlightFrameParamsBuilder<'a> {
1658 frame_id: crate::page::FrameId<'a>,
1659 content_color: Option<crate::dom::RGBA>,
1660 content_outline_color: Option<crate::dom::RGBA>,
1661}
1662
1663impl<'a> HighlightFrameParamsBuilder<'a> {
1664 pub fn content_color(mut self, content_color: crate::dom::RGBA) -> Self { self.content_color = Some(content_color); self }
1666 pub fn content_outline_color(mut self, content_outline_color: crate::dom::RGBA) -> Self { self.content_outline_color = Some(content_outline_color); self }
1668 pub fn build(self) -> HighlightFrameParams<'a> {
1669 HighlightFrameParams {
1670 frame_id: self.frame_id,
1671 content_color: self.content_color,
1672 content_outline_color: self.content_outline_color,
1673 }
1674 }
1675}
1676
1677impl<'a> HighlightFrameParams<'a> { pub const METHOD: &'static str = "Overlay.highlightFrame"; }
1678
1679impl<'a> crate::CdpCommand<'a> for HighlightFrameParams<'a> {
1680 const METHOD: &'static str = "Overlay.highlightFrame";
1681 type Response = crate::EmptyReturns;
1682}
1683
1684#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1688#[serde(rename_all = "camelCase")]
1689pub struct HighlightNodeParams<'a> {
1690 #[serde(rename = "highlightConfig")]
1692 highlight_config: HighlightConfig<'a>,
1693 #[serde(skip_serializing_if = "Option::is_none", rename = "nodeId")]
1695 node_id: Option<crate::dom::NodeId>,
1696 #[serde(skip_serializing_if = "Option::is_none", rename = "backendNodeId")]
1698 backend_node_id: Option<crate::dom::BackendNodeId>,
1699 #[serde(skip_serializing_if = "Option::is_none", rename = "objectId")]
1701 object_id: Option<crate::runtime::RemoteObjectId<'a>>,
1702 #[serde(skip_serializing_if = "Option::is_none")]
1704 selector: Option<Cow<'a, str>>,
1705}
1706
1707impl<'a> HighlightNodeParams<'a> {
1708 pub fn builder(highlight_config: HighlightConfig<'a>) -> HighlightNodeParamsBuilder<'a> {
1711 HighlightNodeParamsBuilder {
1712 highlight_config: highlight_config,
1713 node_id: None,
1714 backend_node_id: None,
1715 object_id: None,
1716 selector: None,
1717 }
1718 }
1719 pub fn highlight_config(&self) -> &HighlightConfig<'a> { &self.highlight_config }
1721 pub fn node_id(&self) -> Option<&crate::dom::NodeId> { self.node_id.as_ref() }
1723 pub fn backend_node_id(&self) -> Option<&crate::dom::BackendNodeId> { self.backend_node_id.as_ref() }
1725 pub fn object_id(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.object_id.as_ref() }
1727 pub fn selector(&self) -> Option<&str> { self.selector.as_deref() }
1729}
1730
1731
1732pub struct HighlightNodeParamsBuilder<'a> {
1733 highlight_config: HighlightConfig<'a>,
1734 node_id: Option<crate::dom::NodeId>,
1735 backend_node_id: Option<crate::dom::BackendNodeId>,
1736 object_id: Option<crate::runtime::RemoteObjectId<'a>>,
1737 selector: Option<Cow<'a, str>>,
1738}
1739
1740impl<'a> HighlightNodeParamsBuilder<'a> {
1741 pub fn node_id(mut self, node_id: crate::dom::NodeId) -> Self { self.node_id = Some(node_id); self }
1743 pub fn backend_node_id(mut self, backend_node_id: crate::dom::BackendNodeId) -> Self { self.backend_node_id = Some(backend_node_id); self }
1745 pub fn object_id(mut self, object_id: crate::runtime::RemoteObjectId<'a>) -> Self { self.object_id = Some(object_id); self }
1747 pub fn selector(mut self, selector: impl Into<Cow<'a, str>>) -> Self { self.selector = Some(selector.into()); self }
1749 pub fn build(self) -> HighlightNodeParams<'a> {
1750 HighlightNodeParams {
1751 highlight_config: self.highlight_config,
1752 node_id: self.node_id,
1753 backend_node_id: self.backend_node_id,
1754 object_id: self.object_id,
1755 selector: self.selector,
1756 }
1757 }
1758}
1759
1760impl<'a> HighlightNodeParams<'a> { pub const METHOD: &'static str = "Overlay.highlightNode"; }
1761
1762impl<'a> crate::CdpCommand<'a> for HighlightNodeParams<'a> {
1763 const METHOD: &'static str = "Overlay.highlightNode";
1764 type Response = crate::EmptyReturns;
1765}
1766
1767#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1770#[serde(rename_all = "camelCase")]
1771pub struct HighlightQuadParams {
1772 quad: crate::dom::Quad,
1774 #[serde(skip_serializing_if = "Option::is_none")]
1776 color: Option<crate::dom::RGBA>,
1777 #[serde(skip_serializing_if = "Option::is_none", rename = "outlineColor")]
1779 outline_color: Option<crate::dom::RGBA>,
1780}
1781
1782impl HighlightQuadParams {
1783 pub fn builder(quad: crate::dom::Quad) -> HighlightQuadParamsBuilder {
1786 HighlightQuadParamsBuilder {
1787 quad: quad,
1788 color: None,
1789 outline_color: None,
1790 }
1791 }
1792 pub fn quad(&self) -> &crate::dom::Quad { &self.quad }
1794 pub fn color(&self) -> Option<&crate::dom::RGBA> { self.color.as_ref() }
1796 pub fn outline_color(&self) -> Option<&crate::dom::RGBA> { self.outline_color.as_ref() }
1798}
1799
1800
1801pub struct HighlightQuadParamsBuilder {
1802 quad: crate::dom::Quad,
1803 color: Option<crate::dom::RGBA>,
1804 outline_color: Option<crate::dom::RGBA>,
1805}
1806
1807impl HighlightQuadParamsBuilder {
1808 pub fn color(mut self, color: crate::dom::RGBA) -> Self { self.color = Some(color); self }
1810 pub fn outline_color(mut self, outline_color: crate::dom::RGBA) -> Self { self.outline_color = Some(outline_color); self }
1812 pub fn build(self) -> HighlightQuadParams {
1813 HighlightQuadParams {
1814 quad: self.quad,
1815 color: self.color,
1816 outline_color: self.outline_color,
1817 }
1818 }
1819}
1820
1821impl HighlightQuadParams { pub const METHOD: &'static str = "Overlay.highlightQuad"; }
1822
1823impl<'a> crate::CdpCommand<'a> for HighlightQuadParams {
1824 const METHOD: &'static str = "Overlay.highlightQuad";
1825 type Response = crate::EmptyReturns;
1826}
1827
1828#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1834#[serde(rename_all = "camelCase")]
1835pub struct HighlightRectParams {
1836 x: i32,
1838 y: i32,
1840 width: u64,
1842 height: i64,
1844 #[serde(skip_serializing_if = "Option::is_none")]
1846 color: Option<crate::dom::RGBA>,
1847 #[serde(skip_serializing_if = "Option::is_none", rename = "outlineColor")]
1849 outline_color: Option<crate::dom::RGBA>,
1850}
1851
1852impl HighlightRectParams {
1853 pub fn builder(x: i32, y: i32, width: u64, height: i64) -> HighlightRectParamsBuilder {
1859 HighlightRectParamsBuilder {
1860 x: x,
1861 y: y,
1862 width: width,
1863 height: height,
1864 color: None,
1865 outline_color: None,
1866 }
1867 }
1868 pub fn x(&self) -> i32 { self.x }
1870 pub fn y(&self) -> i32 { self.y }
1872 pub fn width(&self) -> u64 { self.width }
1874 pub fn height(&self) -> i64 { self.height }
1876 pub fn color(&self) -> Option<&crate::dom::RGBA> { self.color.as_ref() }
1878 pub fn outline_color(&self) -> Option<&crate::dom::RGBA> { self.outline_color.as_ref() }
1880}
1881
1882
1883pub struct HighlightRectParamsBuilder {
1884 x: i32,
1885 y: i32,
1886 width: u64,
1887 height: i64,
1888 color: Option<crate::dom::RGBA>,
1889 outline_color: Option<crate::dom::RGBA>,
1890}
1891
1892impl HighlightRectParamsBuilder {
1893 pub fn color(mut self, color: crate::dom::RGBA) -> Self { self.color = Some(color); self }
1895 pub fn outline_color(mut self, outline_color: crate::dom::RGBA) -> Self { self.outline_color = Some(outline_color); self }
1897 pub fn build(self) -> HighlightRectParams {
1898 HighlightRectParams {
1899 x: self.x,
1900 y: self.y,
1901 width: self.width,
1902 height: self.height,
1903 color: self.color,
1904 outline_color: self.outline_color,
1905 }
1906 }
1907}
1908
1909impl HighlightRectParams { pub const METHOD: &'static str = "Overlay.highlightRect"; }
1910
1911impl<'a> crate::CdpCommand<'a> for HighlightRectParams {
1912 const METHOD: &'static str = "Overlay.highlightRect";
1913 type Response = crate::EmptyReturns;
1914}
1915
1916#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1920#[serde(rename_all = "camelCase")]
1921pub struct HighlightSourceOrderParams<'a> {
1922 #[serde(rename = "sourceOrderConfig")]
1924 source_order_config: SourceOrderConfig,
1925 #[serde(skip_serializing_if = "Option::is_none", rename = "nodeId")]
1927 node_id: Option<crate::dom::NodeId>,
1928 #[serde(skip_serializing_if = "Option::is_none", rename = "backendNodeId")]
1930 backend_node_id: Option<crate::dom::BackendNodeId>,
1931 #[serde(skip_serializing_if = "Option::is_none", rename = "objectId")]
1933 object_id: Option<crate::runtime::RemoteObjectId<'a>>,
1934}
1935
1936impl<'a> HighlightSourceOrderParams<'a> {
1937 pub fn builder(source_order_config: SourceOrderConfig) -> HighlightSourceOrderParamsBuilder<'a> {
1940 HighlightSourceOrderParamsBuilder {
1941 source_order_config: source_order_config,
1942 node_id: None,
1943 backend_node_id: None,
1944 object_id: None,
1945 }
1946 }
1947 pub fn source_order_config(&self) -> &SourceOrderConfig { &self.source_order_config }
1949 pub fn node_id(&self) -> Option<&crate::dom::NodeId> { self.node_id.as_ref() }
1951 pub fn backend_node_id(&self) -> Option<&crate::dom::BackendNodeId> { self.backend_node_id.as_ref() }
1953 pub fn object_id(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.object_id.as_ref() }
1955}
1956
1957
1958pub struct HighlightSourceOrderParamsBuilder<'a> {
1959 source_order_config: SourceOrderConfig,
1960 node_id: Option<crate::dom::NodeId>,
1961 backend_node_id: Option<crate::dom::BackendNodeId>,
1962 object_id: Option<crate::runtime::RemoteObjectId<'a>>,
1963}
1964
1965impl<'a> HighlightSourceOrderParamsBuilder<'a> {
1966 pub fn node_id(mut self, node_id: crate::dom::NodeId) -> Self { self.node_id = Some(node_id); self }
1968 pub fn backend_node_id(mut self, backend_node_id: crate::dom::BackendNodeId) -> Self { self.backend_node_id = Some(backend_node_id); self }
1970 pub fn object_id(mut self, object_id: crate::runtime::RemoteObjectId<'a>) -> Self { self.object_id = Some(object_id); self }
1972 pub fn build(self) -> HighlightSourceOrderParams<'a> {
1973 HighlightSourceOrderParams {
1974 source_order_config: self.source_order_config,
1975 node_id: self.node_id,
1976 backend_node_id: self.backend_node_id,
1977 object_id: self.object_id,
1978 }
1979 }
1980}
1981
1982impl<'a> HighlightSourceOrderParams<'a> { pub const METHOD: &'static str = "Overlay.highlightSourceOrder"; }
1983
1984impl<'a> crate::CdpCommand<'a> for HighlightSourceOrderParams<'a> {
1985 const METHOD: &'static str = "Overlay.highlightSourceOrder";
1986 type Response = crate::EmptyReturns;
1987}
1988
1989#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1993#[serde(rename_all = "camelCase")]
1994pub struct SetInspectModeParams<'a> {
1995 mode: InspectMode,
1997 #[serde(skip_serializing_if = "Option::is_none", rename = "highlightConfig")]
2000 highlight_config: Option<HighlightConfig<'a>>,
2001}
2002
2003impl<'a> SetInspectModeParams<'a> {
2004 pub fn builder(mode: impl Into<InspectMode>) -> SetInspectModeParamsBuilder<'a> {
2007 SetInspectModeParamsBuilder {
2008 mode: mode.into(),
2009 highlight_config: None,
2010 }
2011 }
2012 pub fn mode(&self) -> &InspectMode { &self.mode }
2014 pub fn highlight_config(&self) -> Option<&HighlightConfig<'a>> { self.highlight_config.as_ref() }
2017}
2018
2019
2020pub struct SetInspectModeParamsBuilder<'a> {
2021 mode: InspectMode,
2022 highlight_config: Option<HighlightConfig<'a>>,
2023}
2024
2025impl<'a> SetInspectModeParamsBuilder<'a> {
2026 pub fn highlight_config(mut self, highlight_config: HighlightConfig<'a>) -> Self { self.highlight_config = Some(highlight_config); self }
2029 pub fn build(self) -> SetInspectModeParams<'a> {
2030 SetInspectModeParams {
2031 mode: self.mode,
2032 highlight_config: self.highlight_config,
2033 }
2034 }
2035}
2036
2037impl<'a> SetInspectModeParams<'a> { pub const METHOD: &'static str = "Overlay.setInspectMode"; }
2038
2039impl<'a> crate::CdpCommand<'a> for SetInspectModeParams<'a> {
2040 const METHOD: &'static str = "Overlay.setInspectMode";
2041 type Response = crate::EmptyReturns;
2042}
2043
2044#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2047#[serde(rename_all = "camelCase")]
2048pub struct SetShowAdHighlightsParams {
2049 show: bool,
2051}
2052
2053impl SetShowAdHighlightsParams {
2054 pub fn builder(show: bool) -> SetShowAdHighlightsParamsBuilder {
2057 SetShowAdHighlightsParamsBuilder {
2058 show: show,
2059 }
2060 }
2061 pub fn show(&self) -> bool { self.show }
2063}
2064
2065
2066pub struct SetShowAdHighlightsParamsBuilder {
2067 show: bool,
2068}
2069
2070impl SetShowAdHighlightsParamsBuilder {
2071 pub fn build(self) -> SetShowAdHighlightsParams {
2072 SetShowAdHighlightsParams {
2073 show: self.show,
2074 }
2075 }
2076}
2077
2078impl SetShowAdHighlightsParams { pub const METHOD: &'static str = "Overlay.setShowAdHighlights"; }
2079
2080impl<'a> crate::CdpCommand<'a> for SetShowAdHighlightsParams {
2081 const METHOD: &'static str = "Overlay.setShowAdHighlights";
2082 type Response = crate::EmptyReturns;
2083}
2084
2085
2086#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2087#[serde(rename_all = "camelCase")]
2088pub struct SetPausedInDebuggerMessageParams<'a> {
2089 #[serde(skip_serializing_if = "Option::is_none")]
2091 message: Option<Cow<'a, str>>,
2092}
2093
2094impl<'a> SetPausedInDebuggerMessageParams<'a> {
2095 pub fn builder() -> SetPausedInDebuggerMessageParamsBuilder<'a> {
2097 SetPausedInDebuggerMessageParamsBuilder {
2098 message: None,
2099 }
2100 }
2101 pub fn message(&self) -> Option<&str> { self.message.as_deref() }
2103}
2104
2105#[derive(Default)]
2106pub struct SetPausedInDebuggerMessageParamsBuilder<'a> {
2107 message: Option<Cow<'a, str>>,
2108}
2109
2110impl<'a> SetPausedInDebuggerMessageParamsBuilder<'a> {
2111 pub fn message(mut self, message: impl Into<Cow<'a, str>>) -> Self { self.message = Some(message.into()); self }
2113 pub fn build(self) -> SetPausedInDebuggerMessageParams<'a> {
2114 SetPausedInDebuggerMessageParams {
2115 message: self.message,
2116 }
2117 }
2118}
2119
2120impl<'a> SetPausedInDebuggerMessageParams<'a> { pub const METHOD: &'static str = "Overlay.setPausedInDebuggerMessage"; }
2121
2122impl<'a> crate::CdpCommand<'a> for SetPausedInDebuggerMessageParams<'a> {
2123 const METHOD: &'static str = "Overlay.setPausedInDebuggerMessage";
2124 type Response = crate::EmptyReturns;
2125}
2126
2127#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2130#[serde(rename_all = "camelCase")]
2131pub struct SetShowDebugBordersParams {
2132 show: bool,
2134}
2135
2136impl SetShowDebugBordersParams {
2137 pub fn builder(show: bool) -> SetShowDebugBordersParamsBuilder {
2140 SetShowDebugBordersParamsBuilder {
2141 show: show,
2142 }
2143 }
2144 pub fn show(&self) -> bool { self.show }
2146}
2147
2148
2149pub struct SetShowDebugBordersParamsBuilder {
2150 show: bool,
2151}
2152
2153impl SetShowDebugBordersParamsBuilder {
2154 pub fn build(self) -> SetShowDebugBordersParams {
2155 SetShowDebugBordersParams {
2156 show: self.show,
2157 }
2158 }
2159}
2160
2161impl SetShowDebugBordersParams { pub const METHOD: &'static str = "Overlay.setShowDebugBorders"; }
2162
2163impl<'a> crate::CdpCommand<'a> for SetShowDebugBordersParams {
2164 const METHOD: &'static str = "Overlay.setShowDebugBorders";
2165 type Response = crate::EmptyReturns;
2166}
2167
2168#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2171#[serde(rename_all = "camelCase")]
2172pub struct SetShowFPSCounterParams {
2173 show: bool,
2175}
2176
2177impl SetShowFPSCounterParams {
2178 pub fn builder(show: bool) -> SetShowFPSCounterParamsBuilder {
2181 SetShowFPSCounterParamsBuilder {
2182 show: show,
2183 }
2184 }
2185 pub fn show(&self) -> bool { self.show }
2187}
2188
2189
2190pub struct SetShowFPSCounterParamsBuilder {
2191 show: bool,
2192}
2193
2194impl SetShowFPSCounterParamsBuilder {
2195 pub fn build(self) -> SetShowFPSCounterParams {
2196 SetShowFPSCounterParams {
2197 show: self.show,
2198 }
2199 }
2200}
2201
2202impl SetShowFPSCounterParams { pub const METHOD: &'static str = "Overlay.setShowFPSCounter"; }
2203
2204impl<'a> crate::CdpCommand<'a> for SetShowFPSCounterParams {
2205 const METHOD: &'static str = "Overlay.setShowFPSCounter";
2206 type Response = crate::EmptyReturns;
2207}
2208
2209#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2212#[serde(rename_all = "camelCase")]
2213pub struct SetShowGridOverlaysParams {
2214 #[serde(rename = "gridNodeHighlightConfigs")]
2216 grid_node_highlight_configs: Vec<GridNodeHighlightConfig>,
2217}
2218
2219impl SetShowGridOverlaysParams {
2220 pub fn builder(grid_node_highlight_configs: Vec<GridNodeHighlightConfig>) -> SetShowGridOverlaysParamsBuilder {
2223 SetShowGridOverlaysParamsBuilder {
2224 grid_node_highlight_configs: grid_node_highlight_configs,
2225 }
2226 }
2227 pub fn grid_node_highlight_configs(&self) -> &[GridNodeHighlightConfig] { &self.grid_node_highlight_configs }
2229}
2230
2231
2232pub struct SetShowGridOverlaysParamsBuilder {
2233 grid_node_highlight_configs: Vec<GridNodeHighlightConfig>,
2234}
2235
2236impl SetShowGridOverlaysParamsBuilder {
2237 pub fn build(self) -> SetShowGridOverlaysParams {
2238 SetShowGridOverlaysParams {
2239 grid_node_highlight_configs: self.grid_node_highlight_configs,
2240 }
2241 }
2242}
2243
2244impl SetShowGridOverlaysParams { pub const METHOD: &'static str = "Overlay.setShowGridOverlays"; }
2245
2246impl<'a> crate::CdpCommand<'a> for SetShowGridOverlaysParams {
2247 const METHOD: &'static str = "Overlay.setShowGridOverlays";
2248 type Response = crate::EmptyReturns;
2249}
2250
2251
2252#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2253#[serde(rename_all = "camelCase")]
2254pub struct SetShowFlexOverlaysParams<'a> {
2255 #[serde(rename = "flexNodeHighlightConfigs")]
2257 flex_node_highlight_configs: Vec<FlexNodeHighlightConfig<'a>>,
2258}
2259
2260impl<'a> SetShowFlexOverlaysParams<'a> {
2261 pub fn builder(flex_node_highlight_configs: Vec<FlexNodeHighlightConfig<'a>>) -> SetShowFlexOverlaysParamsBuilder<'a> {
2264 SetShowFlexOverlaysParamsBuilder {
2265 flex_node_highlight_configs: flex_node_highlight_configs,
2266 }
2267 }
2268 pub fn flex_node_highlight_configs(&self) -> &[FlexNodeHighlightConfig<'a>] { &self.flex_node_highlight_configs }
2270}
2271
2272
2273pub struct SetShowFlexOverlaysParamsBuilder<'a> {
2274 flex_node_highlight_configs: Vec<FlexNodeHighlightConfig<'a>>,
2275}
2276
2277impl<'a> SetShowFlexOverlaysParamsBuilder<'a> {
2278 pub fn build(self) -> SetShowFlexOverlaysParams<'a> {
2279 SetShowFlexOverlaysParams {
2280 flex_node_highlight_configs: self.flex_node_highlight_configs,
2281 }
2282 }
2283}
2284
2285impl<'a> SetShowFlexOverlaysParams<'a> { pub const METHOD: &'static str = "Overlay.setShowFlexOverlays"; }
2286
2287impl<'a> crate::CdpCommand<'a> for SetShowFlexOverlaysParams<'a> {
2288 const METHOD: &'static str = "Overlay.setShowFlexOverlays";
2289 type Response = crate::EmptyReturns;
2290}
2291
2292
2293#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2294#[serde(rename_all = "camelCase")]
2295pub struct SetShowScrollSnapOverlaysParams<'a> {
2296 #[serde(rename = "scrollSnapHighlightConfigs")]
2298 scroll_snap_highlight_configs: Vec<ScrollSnapHighlightConfig<'a>>,
2299}
2300
2301impl<'a> SetShowScrollSnapOverlaysParams<'a> {
2302 pub fn builder(scroll_snap_highlight_configs: Vec<ScrollSnapHighlightConfig<'a>>) -> SetShowScrollSnapOverlaysParamsBuilder<'a> {
2305 SetShowScrollSnapOverlaysParamsBuilder {
2306 scroll_snap_highlight_configs: scroll_snap_highlight_configs,
2307 }
2308 }
2309 pub fn scroll_snap_highlight_configs(&self) -> &[ScrollSnapHighlightConfig<'a>] { &self.scroll_snap_highlight_configs }
2311}
2312
2313
2314pub struct SetShowScrollSnapOverlaysParamsBuilder<'a> {
2315 scroll_snap_highlight_configs: Vec<ScrollSnapHighlightConfig<'a>>,
2316}
2317
2318impl<'a> SetShowScrollSnapOverlaysParamsBuilder<'a> {
2319 pub fn build(self) -> SetShowScrollSnapOverlaysParams<'a> {
2320 SetShowScrollSnapOverlaysParams {
2321 scroll_snap_highlight_configs: self.scroll_snap_highlight_configs,
2322 }
2323 }
2324}
2325
2326impl<'a> SetShowScrollSnapOverlaysParams<'a> { pub const METHOD: &'static str = "Overlay.setShowScrollSnapOverlays"; }
2327
2328impl<'a> crate::CdpCommand<'a> for SetShowScrollSnapOverlaysParams<'a> {
2329 const METHOD: &'static str = "Overlay.setShowScrollSnapOverlays";
2330 type Response = crate::EmptyReturns;
2331}
2332
2333
2334#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2335#[serde(rename_all = "camelCase")]
2336pub struct SetShowContainerQueryOverlaysParams<'a> {
2337 #[serde(rename = "containerQueryHighlightConfigs")]
2339 container_query_highlight_configs: Vec<ContainerQueryHighlightConfig<'a>>,
2340}
2341
2342impl<'a> SetShowContainerQueryOverlaysParams<'a> {
2343 pub fn builder(container_query_highlight_configs: Vec<ContainerQueryHighlightConfig<'a>>) -> SetShowContainerQueryOverlaysParamsBuilder<'a> {
2346 SetShowContainerQueryOverlaysParamsBuilder {
2347 container_query_highlight_configs: container_query_highlight_configs,
2348 }
2349 }
2350 pub fn container_query_highlight_configs(&self) -> &[ContainerQueryHighlightConfig<'a>] { &self.container_query_highlight_configs }
2352}
2353
2354
2355pub struct SetShowContainerQueryOverlaysParamsBuilder<'a> {
2356 container_query_highlight_configs: Vec<ContainerQueryHighlightConfig<'a>>,
2357}
2358
2359impl<'a> SetShowContainerQueryOverlaysParamsBuilder<'a> {
2360 pub fn build(self) -> SetShowContainerQueryOverlaysParams<'a> {
2361 SetShowContainerQueryOverlaysParams {
2362 container_query_highlight_configs: self.container_query_highlight_configs,
2363 }
2364 }
2365}
2366
2367impl<'a> SetShowContainerQueryOverlaysParams<'a> { pub const METHOD: &'static str = "Overlay.setShowContainerQueryOverlays"; }
2368
2369impl<'a> crate::CdpCommand<'a> for SetShowContainerQueryOverlaysParams<'a> {
2370 const METHOD: &'static str = "Overlay.setShowContainerQueryOverlays";
2371 type Response = crate::EmptyReturns;
2372}
2373
2374
2375#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2376#[serde(rename_all = "camelCase")]
2377pub struct SetShowInspectedElementAnchorParams {
2378 #[serde(rename = "inspectedElementAnchorConfig")]
2380 inspected_element_anchor_config: InspectedElementAnchorConfig,
2381}
2382
2383impl SetShowInspectedElementAnchorParams {
2384 pub fn builder(inspected_element_anchor_config: InspectedElementAnchorConfig) -> SetShowInspectedElementAnchorParamsBuilder {
2387 SetShowInspectedElementAnchorParamsBuilder {
2388 inspected_element_anchor_config: inspected_element_anchor_config,
2389 }
2390 }
2391 pub fn inspected_element_anchor_config(&self) -> &InspectedElementAnchorConfig { &self.inspected_element_anchor_config }
2393}
2394
2395
2396pub struct SetShowInspectedElementAnchorParamsBuilder {
2397 inspected_element_anchor_config: InspectedElementAnchorConfig,
2398}
2399
2400impl SetShowInspectedElementAnchorParamsBuilder {
2401 pub fn build(self) -> SetShowInspectedElementAnchorParams {
2402 SetShowInspectedElementAnchorParams {
2403 inspected_element_anchor_config: self.inspected_element_anchor_config,
2404 }
2405 }
2406}
2407
2408impl SetShowInspectedElementAnchorParams { pub const METHOD: &'static str = "Overlay.setShowInspectedElementAnchor"; }
2409
2410impl<'a> crate::CdpCommand<'a> for SetShowInspectedElementAnchorParams {
2411 const METHOD: &'static str = "Overlay.setShowInspectedElementAnchor";
2412 type Response = crate::EmptyReturns;
2413}
2414
2415#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2418#[serde(rename_all = "camelCase")]
2419pub struct SetShowPaintRectsParams {
2420 result: bool,
2422}
2423
2424impl SetShowPaintRectsParams {
2425 pub fn builder(result: bool) -> SetShowPaintRectsParamsBuilder {
2428 SetShowPaintRectsParamsBuilder {
2429 result: result,
2430 }
2431 }
2432 pub fn result(&self) -> bool { self.result }
2434}
2435
2436
2437pub struct SetShowPaintRectsParamsBuilder {
2438 result: bool,
2439}
2440
2441impl SetShowPaintRectsParamsBuilder {
2442 pub fn build(self) -> SetShowPaintRectsParams {
2443 SetShowPaintRectsParams {
2444 result: self.result,
2445 }
2446 }
2447}
2448
2449impl SetShowPaintRectsParams { pub const METHOD: &'static str = "Overlay.setShowPaintRects"; }
2450
2451impl<'a> crate::CdpCommand<'a> for SetShowPaintRectsParams {
2452 const METHOD: &'static str = "Overlay.setShowPaintRects";
2453 type Response = crate::EmptyReturns;
2454}
2455
2456#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2459#[serde(rename_all = "camelCase")]
2460pub struct SetShowLayoutShiftRegionsParams {
2461 result: bool,
2463}
2464
2465impl SetShowLayoutShiftRegionsParams {
2466 pub fn builder(result: bool) -> SetShowLayoutShiftRegionsParamsBuilder {
2469 SetShowLayoutShiftRegionsParamsBuilder {
2470 result: result,
2471 }
2472 }
2473 pub fn result(&self) -> bool { self.result }
2475}
2476
2477
2478pub struct SetShowLayoutShiftRegionsParamsBuilder {
2479 result: bool,
2480}
2481
2482impl SetShowLayoutShiftRegionsParamsBuilder {
2483 pub fn build(self) -> SetShowLayoutShiftRegionsParams {
2484 SetShowLayoutShiftRegionsParams {
2485 result: self.result,
2486 }
2487 }
2488}
2489
2490impl SetShowLayoutShiftRegionsParams { pub const METHOD: &'static str = "Overlay.setShowLayoutShiftRegions"; }
2491
2492impl<'a> crate::CdpCommand<'a> for SetShowLayoutShiftRegionsParams {
2493 const METHOD: &'static str = "Overlay.setShowLayoutShiftRegions";
2494 type Response = crate::EmptyReturns;
2495}
2496
2497#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2500#[serde(rename_all = "camelCase")]
2501pub struct SetShowScrollBottleneckRectsParams {
2502 show: bool,
2504}
2505
2506impl SetShowScrollBottleneckRectsParams {
2507 pub fn builder(show: bool) -> SetShowScrollBottleneckRectsParamsBuilder {
2510 SetShowScrollBottleneckRectsParamsBuilder {
2511 show: show,
2512 }
2513 }
2514 pub fn show(&self) -> bool { self.show }
2516}
2517
2518
2519pub struct SetShowScrollBottleneckRectsParamsBuilder {
2520 show: bool,
2521}
2522
2523impl SetShowScrollBottleneckRectsParamsBuilder {
2524 pub fn build(self) -> SetShowScrollBottleneckRectsParams {
2525 SetShowScrollBottleneckRectsParams {
2526 show: self.show,
2527 }
2528 }
2529}
2530
2531impl SetShowScrollBottleneckRectsParams { pub const METHOD: &'static str = "Overlay.setShowScrollBottleneckRects"; }
2532
2533impl<'a> crate::CdpCommand<'a> for SetShowScrollBottleneckRectsParams {
2534 const METHOD: &'static str = "Overlay.setShowScrollBottleneckRects";
2535 type Response = crate::EmptyReturns;
2536}
2537
2538#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2541#[serde(rename_all = "camelCase")]
2542pub struct SetShowHitTestBordersParams {
2543 show: bool,
2545}
2546
2547impl SetShowHitTestBordersParams {
2548 pub fn builder(show: bool) -> SetShowHitTestBordersParamsBuilder {
2551 SetShowHitTestBordersParamsBuilder {
2552 show: show,
2553 }
2554 }
2555 pub fn show(&self) -> bool { self.show }
2557}
2558
2559
2560pub struct SetShowHitTestBordersParamsBuilder {
2561 show: bool,
2562}
2563
2564impl SetShowHitTestBordersParamsBuilder {
2565 pub fn build(self) -> SetShowHitTestBordersParams {
2566 SetShowHitTestBordersParams {
2567 show: self.show,
2568 }
2569 }
2570}
2571
2572impl SetShowHitTestBordersParams { pub const METHOD: &'static str = "Overlay.setShowHitTestBorders"; }
2573
2574impl<'a> crate::CdpCommand<'a> for SetShowHitTestBordersParams {
2575 const METHOD: &'static str = "Overlay.setShowHitTestBorders";
2576 type Response = crate::EmptyReturns;
2577}
2578
2579#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2582#[serde(rename_all = "camelCase")]
2583pub struct SetShowWebVitalsParams {
2584 show: bool,
2585}
2586
2587impl SetShowWebVitalsParams {
2588 pub fn builder(show: bool) -> SetShowWebVitalsParamsBuilder {
2591 SetShowWebVitalsParamsBuilder {
2592 show: show,
2593 }
2594 }
2595 pub fn show(&self) -> bool { self.show }
2596}
2597
2598
2599pub struct SetShowWebVitalsParamsBuilder {
2600 show: bool,
2601}
2602
2603impl SetShowWebVitalsParamsBuilder {
2604 pub fn build(self) -> SetShowWebVitalsParams {
2605 SetShowWebVitalsParams {
2606 show: self.show,
2607 }
2608 }
2609}
2610
2611impl SetShowWebVitalsParams { pub const METHOD: &'static str = "Overlay.setShowWebVitals"; }
2612
2613impl<'a> crate::CdpCommand<'a> for SetShowWebVitalsParams {
2614 const METHOD: &'static str = "Overlay.setShowWebVitals";
2615 type Response = crate::EmptyReturns;
2616}
2617
2618#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2621#[serde(rename_all = "camelCase")]
2622pub struct SetShowViewportSizeOnResizeParams {
2623 show: bool,
2625}
2626
2627impl SetShowViewportSizeOnResizeParams {
2628 pub fn builder(show: bool) -> SetShowViewportSizeOnResizeParamsBuilder {
2631 SetShowViewportSizeOnResizeParamsBuilder {
2632 show: show,
2633 }
2634 }
2635 pub fn show(&self) -> bool { self.show }
2637}
2638
2639
2640pub struct SetShowViewportSizeOnResizeParamsBuilder {
2641 show: bool,
2642}
2643
2644impl SetShowViewportSizeOnResizeParamsBuilder {
2645 pub fn build(self) -> SetShowViewportSizeOnResizeParams {
2646 SetShowViewportSizeOnResizeParams {
2647 show: self.show,
2648 }
2649 }
2650}
2651
2652impl SetShowViewportSizeOnResizeParams { pub const METHOD: &'static str = "Overlay.setShowViewportSizeOnResize"; }
2653
2654impl<'a> crate::CdpCommand<'a> for SetShowViewportSizeOnResizeParams {
2655 const METHOD: &'static str = "Overlay.setShowViewportSizeOnResize";
2656 type Response = crate::EmptyReturns;
2657}
2658
2659#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2662#[serde(rename_all = "camelCase")]
2663pub struct SetShowHingeParams {
2664 #[serde(skip_serializing_if = "Option::is_none", rename = "hingeConfig")]
2666 hinge_config: Option<HingeConfig>,
2667}
2668
2669impl SetShowHingeParams {
2670 pub fn builder() -> SetShowHingeParamsBuilder {
2672 SetShowHingeParamsBuilder {
2673 hinge_config: None,
2674 }
2675 }
2676 pub fn hinge_config(&self) -> Option<&HingeConfig> { self.hinge_config.as_ref() }
2678}
2679
2680#[derive(Default)]
2681pub struct SetShowHingeParamsBuilder {
2682 hinge_config: Option<HingeConfig>,
2683}
2684
2685impl SetShowHingeParamsBuilder {
2686 pub fn hinge_config(mut self, hinge_config: HingeConfig) -> Self { self.hinge_config = Some(hinge_config); self }
2688 pub fn build(self) -> SetShowHingeParams {
2689 SetShowHingeParams {
2690 hinge_config: self.hinge_config,
2691 }
2692 }
2693}
2694
2695impl SetShowHingeParams { pub const METHOD: &'static str = "Overlay.setShowHinge"; }
2696
2697impl<'a> crate::CdpCommand<'a> for SetShowHingeParams {
2698 const METHOD: &'static str = "Overlay.setShowHinge";
2699 type Response = crate::EmptyReturns;
2700}
2701
2702#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2705#[serde(rename_all = "camelCase")]
2706pub struct SetShowIsolatedElementsParams {
2707 #[serde(rename = "isolatedElementHighlightConfigs")]
2709 isolated_element_highlight_configs: Vec<IsolatedElementHighlightConfig>,
2710}
2711
2712impl SetShowIsolatedElementsParams {
2713 pub fn builder(isolated_element_highlight_configs: Vec<IsolatedElementHighlightConfig>) -> SetShowIsolatedElementsParamsBuilder {
2716 SetShowIsolatedElementsParamsBuilder {
2717 isolated_element_highlight_configs: isolated_element_highlight_configs,
2718 }
2719 }
2720 pub fn isolated_element_highlight_configs(&self) -> &[IsolatedElementHighlightConfig] { &self.isolated_element_highlight_configs }
2722}
2723
2724
2725pub struct SetShowIsolatedElementsParamsBuilder {
2726 isolated_element_highlight_configs: Vec<IsolatedElementHighlightConfig>,
2727}
2728
2729impl SetShowIsolatedElementsParamsBuilder {
2730 pub fn build(self) -> SetShowIsolatedElementsParams {
2731 SetShowIsolatedElementsParams {
2732 isolated_element_highlight_configs: self.isolated_element_highlight_configs,
2733 }
2734 }
2735}
2736
2737impl SetShowIsolatedElementsParams { pub const METHOD: &'static str = "Overlay.setShowIsolatedElements"; }
2738
2739impl<'a> crate::CdpCommand<'a> for SetShowIsolatedElementsParams {
2740 const METHOD: &'static str = "Overlay.setShowIsolatedElements";
2741 type Response = crate::EmptyReturns;
2742}
2743
2744#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2747#[serde(rename_all = "camelCase")]
2748pub struct SetShowWindowControlsOverlayParams<'a> {
2749 #[serde(skip_serializing_if = "Option::is_none", rename = "windowControlsOverlayConfig")]
2751 window_controls_overlay_config: Option<WindowControlsOverlayConfig<'a>>,
2752}
2753
2754impl<'a> SetShowWindowControlsOverlayParams<'a> {
2755 pub fn builder() -> SetShowWindowControlsOverlayParamsBuilder<'a> {
2757 SetShowWindowControlsOverlayParamsBuilder {
2758 window_controls_overlay_config: None,
2759 }
2760 }
2761 pub fn window_controls_overlay_config(&self) -> Option<&WindowControlsOverlayConfig<'a>> { self.window_controls_overlay_config.as_ref() }
2763}
2764
2765#[derive(Default)]
2766pub struct SetShowWindowControlsOverlayParamsBuilder<'a> {
2767 window_controls_overlay_config: Option<WindowControlsOverlayConfig<'a>>,
2768}
2769
2770impl<'a> SetShowWindowControlsOverlayParamsBuilder<'a> {
2771 pub fn window_controls_overlay_config(mut self, window_controls_overlay_config: WindowControlsOverlayConfig<'a>) -> Self { self.window_controls_overlay_config = Some(window_controls_overlay_config); self }
2773 pub fn build(self) -> SetShowWindowControlsOverlayParams<'a> {
2774 SetShowWindowControlsOverlayParams {
2775 window_controls_overlay_config: self.window_controls_overlay_config,
2776 }
2777 }
2778}
2779
2780impl<'a> SetShowWindowControlsOverlayParams<'a> { pub const METHOD: &'static str = "Overlay.setShowWindowControlsOverlay"; }
2781
2782impl<'a> crate::CdpCommand<'a> for SetShowWindowControlsOverlayParams<'a> {
2783 const METHOD: &'static str = "Overlay.setShowWindowControlsOverlay";
2784 type Response = crate::EmptyReturns;
2785}