1use serde::{Serialize, Deserialize};
11use serde_json::Value as JsonValue;
12use std::borrow::Cow;
13
14pub type NodeId = i64;
17
18pub type BackendNodeId = i64;
22
23pub type StyleSheetId<'a> = Cow<'a, str>;
26
27#[derive(Debug, Clone, Serialize, Deserialize, Default)]
30#[serde(rename_all = "camelCase")]
31pub struct BackendNode<'a> {
32 nodeType: i64,
34 nodeName: Cow<'a, str>,
36 backendNodeId: BackendNodeId,
37}
38
39impl<'a> BackendNode<'a> {
40 pub fn builder(nodeType: i64, nodeName: impl Into<Cow<'a, str>>, backendNodeId: BackendNodeId) -> BackendNodeBuilder<'a> {
41 BackendNodeBuilder {
42 nodeType: nodeType,
43 nodeName: nodeName.into(),
44 backendNodeId: backendNodeId,
45 }
46 }
47 pub fn nodeType(&self) -> i64 { self.nodeType }
48 pub fn nodeName(&self) -> &str { self.nodeName.as_ref() }
49 pub fn backendNodeId(&self) -> &BackendNodeId { &self.backendNodeId }
50}
51
52
53pub struct BackendNodeBuilder<'a> {
54 nodeType: i64,
55 nodeName: Cow<'a, str>,
56 backendNodeId: BackendNodeId,
57}
58
59impl<'a> BackendNodeBuilder<'a> {
60 pub fn build(self) -> BackendNode<'a> {
61 BackendNode {
62 nodeType: self.nodeType,
63 nodeName: self.nodeName,
64 backendNodeId: self.backendNodeId,
65 }
66 }
67}
68
69#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
72pub enum PseudoType {
73 #[default]
74 #[serde(rename = "first-line")]
75 FirstLine,
76 #[serde(rename = "first-letter")]
77 FirstLetter,
78 #[serde(rename = "checkmark")]
79 Checkmark,
80 #[serde(rename = "before")]
81 Before,
82 #[serde(rename = "after")]
83 After,
84 #[serde(rename = "expand-icon")]
85 ExpandIcon,
86 #[serde(rename = "picker-icon")]
87 PickerIcon,
88 #[serde(rename = "interest-hint")]
89 InterestHint,
90 #[serde(rename = "marker")]
91 Marker,
92 #[serde(rename = "backdrop")]
93 Backdrop,
94 #[serde(rename = "column")]
95 Column,
96 #[serde(rename = "selection")]
97 Selection,
98 #[serde(rename = "search-text")]
99 SearchText,
100 #[serde(rename = "target-text")]
101 TargetText,
102 #[serde(rename = "spelling-error")]
103 SpellingError,
104 #[serde(rename = "grammar-error")]
105 GrammarError,
106 #[serde(rename = "highlight")]
107 Highlight,
108 #[serde(rename = "first-line-inherited")]
109 FirstLineInherited,
110 #[serde(rename = "scroll-marker")]
111 ScrollMarker,
112 #[serde(rename = "scroll-marker-group")]
113 ScrollMarkerGroup,
114 #[serde(rename = "scroll-button")]
115 ScrollButton,
116 #[serde(rename = "scrollbar")]
117 Scrollbar,
118 #[serde(rename = "scrollbar-thumb")]
119 ScrollbarThumb,
120 #[serde(rename = "scrollbar-button")]
121 ScrollbarButton,
122 #[serde(rename = "scrollbar-track")]
123 ScrollbarTrack,
124 #[serde(rename = "scrollbar-track-piece")]
125 ScrollbarTrackPiece,
126 #[serde(rename = "scrollbar-corner")]
127 ScrollbarCorner,
128 #[serde(rename = "resizer")]
129 Resizer,
130 #[serde(rename = "input-list-button")]
131 InputListButton,
132 #[serde(rename = "view-transition")]
133 ViewTransition,
134 #[serde(rename = "view-transition-group")]
135 ViewTransitionGroup,
136 #[serde(rename = "view-transition-image-pair")]
137 ViewTransitionImagePair,
138 #[serde(rename = "view-transition-group-children")]
139 ViewTransitionGroupChildren,
140 #[serde(rename = "view-transition-old")]
141 ViewTransitionOld,
142 #[serde(rename = "view-transition-new")]
143 ViewTransitionNew,
144 #[serde(rename = "placeholder")]
145 Placeholder,
146 #[serde(rename = "file-selector-button")]
147 FileSelectorButton,
148 #[serde(rename = "details-content")]
149 DetailsContent,
150 #[serde(rename = "picker")]
151 Picker,
152 #[serde(rename = "permission-icon")]
153 PermissionIcon,
154 #[serde(rename = "overscroll-area-parent")]
155 OverscrollAreaParent,
156}
157
158#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
161pub enum ShadowRootType {
162 #[default]
163 #[serde(rename = "user-agent")]
164 UserAgent,
165 #[serde(rename = "open")]
166 Open,
167 #[serde(rename = "closed")]
168 Closed,
169}
170
171#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
174pub enum CompatibilityMode {
175 #[default]
176 #[serde(rename = "QuirksMode")]
177 QuirksMode,
178 #[serde(rename = "LimitedQuirksMode")]
179 LimitedQuirksMode,
180 #[serde(rename = "NoQuirksMode")]
181 NoQuirksMode,
182}
183
184#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
187pub enum PhysicalAxes {
188 #[default]
189 #[serde(rename = "Horizontal")]
190 Horizontal,
191 #[serde(rename = "Vertical")]
192 Vertical,
193 #[serde(rename = "Both")]
194 Both,
195}
196
197#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
200pub enum LogicalAxes {
201 #[default]
202 #[serde(rename = "Inline")]
203 Inline,
204 #[serde(rename = "Block")]
205 Block,
206 #[serde(rename = "Both")]
207 Both,
208}
209
210#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
213pub enum ScrollOrientation {
214 #[default]
215 #[serde(rename = "horizontal")]
216 Horizontal,
217 #[serde(rename = "vertical")]
218 Vertical,
219}
220
221#[derive(Debug, Clone, Serialize, Deserialize, Default)]
225#[serde(rename_all = "camelCase")]
226pub struct Node<'a> {
227 nodeId: NodeId,
231 #[serde(skip_serializing_if = "Option::is_none")]
233 parentId: Option<NodeId>,
234 backendNodeId: BackendNodeId,
236 nodeType: i64,
238 nodeName: Cow<'a, str>,
240 localName: Cow<'a, str>,
242 nodeValue: Cow<'a, str>,
244 #[serde(skip_serializing_if = "Option::is_none")]
246 childNodeCount: Option<u64>,
247 #[serde(skip_serializing_if = "Option::is_none")]
249 children: Option<Vec<Box<Node<'a>>>>,
250 #[serde(skip_serializing_if = "Option::is_none")]
252 attributes: Option<Vec<Cow<'a, str>>>,
253 #[serde(skip_serializing_if = "Option::is_none")]
255 documentURL: Option<Cow<'a, str>>,
256 #[serde(skip_serializing_if = "Option::is_none")]
258 baseURL: Option<Cow<'a, str>>,
259 #[serde(skip_serializing_if = "Option::is_none")]
261 publicId: Option<Cow<'a, str>>,
262 #[serde(skip_serializing_if = "Option::is_none")]
264 systemId: Option<Cow<'a, str>>,
265 #[serde(skip_serializing_if = "Option::is_none")]
267 internalSubset: Option<Cow<'a, str>>,
268 #[serde(skip_serializing_if = "Option::is_none")]
270 xmlVersion: Option<Cow<'a, str>>,
271 #[serde(skip_serializing_if = "Option::is_none")]
273 name: Option<Cow<'a, str>>,
274 #[serde(skip_serializing_if = "Option::is_none")]
276 value: Option<Cow<'a, str>>,
277 #[serde(skip_serializing_if = "Option::is_none")]
279 pseudoType: Option<PseudoType>,
280 #[serde(skip_serializing_if = "Option::is_none")]
283 pseudoIdentifier: Option<Cow<'a, str>>,
284 #[serde(skip_serializing_if = "Option::is_none")]
286 shadowRootType: Option<ShadowRootType>,
287 #[serde(skip_serializing_if = "Option::is_none")]
289 frameId: Option<crate::page::FrameId<'a>>,
290 #[serde(skip_serializing_if = "Option::is_none")]
292 contentDocument: Option<Box<Node<'a>>>,
293 #[serde(skip_serializing_if = "Option::is_none")]
295 shadowRoots: Option<Vec<Box<Node<'a>>>>,
296 #[serde(skip_serializing_if = "Option::is_none")]
298 templateContent: Option<Box<Node<'a>>>,
299 #[serde(skip_serializing_if = "Option::is_none")]
301 pseudoElements: Option<Vec<Box<Node<'a>>>>,
302 #[serde(skip_serializing_if = "Option::is_none")]
306 importedDocument: Option<Box<Node<'a>>>,
307 #[serde(skip_serializing_if = "Option::is_none")]
309 distributedNodes: Option<Vec<BackendNode<'a>>>,
310 #[serde(skip_serializing_if = "Option::is_none")]
312 isSVG: Option<bool>,
313 #[serde(skip_serializing_if = "Option::is_none")]
314 compatibilityMode: Option<CompatibilityMode>,
315 #[serde(skip_serializing_if = "Option::is_none")]
316 assignedSlot: Option<BackendNode<'a>>,
317 #[serde(skip_serializing_if = "Option::is_none")]
318 isScrollable: Option<bool>,
319 #[serde(skip_serializing_if = "Option::is_none")]
320 affectedByStartingStyles: Option<bool>,
321 #[serde(skip_serializing_if = "Option::is_none")]
322 adoptedStyleSheets: Option<Vec<StyleSheetId<'a>>>,
323 #[serde(skip_serializing_if = "Option::is_none")]
324 adProvenance: Option<crate::network::AdProvenance<'a>>,
325}
326
327impl<'a> Node<'a> {
328 pub fn builder(nodeId: NodeId, backendNodeId: BackendNodeId, nodeType: i64, nodeName: impl Into<Cow<'a, str>>, localName: impl Into<Cow<'a, str>>, nodeValue: impl Into<Cow<'a, str>>) -> NodeBuilder<'a> {
329 NodeBuilder {
330 nodeId: nodeId,
331 parentId: None,
332 backendNodeId: backendNodeId,
333 nodeType: nodeType,
334 nodeName: nodeName.into(),
335 localName: localName.into(),
336 nodeValue: nodeValue.into(),
337 childNodeCount: None,
338 children: None,
339 attributes: None,
340 documentURL: None,
341 baseURL: None,
342 publicId: None,
343 systemId: None,
344 internalSubset: None,
345 xmlVersion: None,
346 name: None,
347 value: None,
348 pseudoType: None,
349 pseudoIdentifier: None,
350 shadowRootType: None,
351 frameId: None,
352 contentDocument: None,
353 shadowRoots: None,
354 templateContent: None,
355 pseudoElements: None,
356 importedDocument: None,
357 distributedNodes: None,
358 isSVG: None,
359 compatibilityMode: None,
360 assignedSlot: None,
361 isScrollable: None,
362 affectedByStartingStyles: None,
363 adoptedStyleSheets: None,
364 adProvenance: None,
365 }
366 }
367 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
368 pub fn parentId(&self) -> Option<&NodeId> { self.parentId.as_ref() }
369 pub fn backendNodeId(&self) -> &BackendNodeId { &self.backendNodeId }
370 pub fn nodeType(&self) -> i64 { self.nodeType }
371 pub fn nodeName(&self) -> &str { self.nodeName.as_ref() }
372 pub fn localName(&self) -> &str { self.localName.as_ref() }
373 pub fn nodeValue(&self) -> &str { self.nodeValue.as_ref() }
374 pub fn childNodeCount(&self) -> Option<u64> { self.childNodeCount }
375 pub fn children(&self) -> Option<&[Box<Node<'a>>]> { self.children.as_deref() }
376 pub fn attributes(&self) -> Option<&[Cow<'a, str>]> { self.attributes.as_deref() }
377 pub fn documentURL(&self) -> Option<&str> { self.documentURL.as_deref() }
378 pub fn baseURL(&self) -> Option<&str> { self.baseURL.as_deref() }
379 pub fn publicId(&self) -> Option<&str> { self.publicId.as_deref() }
380 pub fn systemId(&self) -> Option<&str> { self.systemId.as_deref() }
381 pub fn internalSubset(&self) -> Option<&str> { self.internalSubset.as_deref() }
382 pub fn xmlVersion(&self) -> Option<&str> { self.xmlVersion.as_deref() }
383 pub fn name(&self) -> Option<&str> { self.name.as_deref() }
384 pub fn value(&self) -> Option<&str> { self.value.as_deref() }
385 pub fn pseudoType(&self) -> Option<&PseudoType> { self.pseudoType.as_ref() }
386 pub fn pseudoIdentifier(&self) -> Option<&str> { self.pseudoIdentifier.as_deref() }
387 pub fn shadowRootType(&self) -> Option<&ShadowRootType> { self.shadowRootType.as_ref() }
388 pub fn frameId(&self) -> Option<&crate::page::FrameId<'a>> { self.frameId.as_ref() }
389 pub fn contentDocument(&self) -> Option<&Node<'a>> { self.contentDocument.as_deref() }
390 pub fn shadowRoots(&self) -> Option<&[Box<Node<'a>>]> { self.shadowRoots.as_deref() }
391 pub fn templateContent(&self) -> Option<&Node<'a>> { self.templateContent.as_deref() }
392 pub fn pseudoElements(&self) -> Option<&[Box<Node<'a>>]> { self.pseudoElements.as_deref() }
393 pub fn importedDocument(&self) -> Option<&Node<'a>> { self.importedDocument.as_deref() }
394 pub fn distributedNodes(&self) -> Option<&[BackendNode<'a>]> { self.distributedNodes.as_deref() }
395 pub fn isSVG(&self) -> Option<bool> { self.isSVG }
396 pub fn compatibilityMode(&self) -> Option<&CompatibilityMode> { self.compatibilityMode.as_ref() }
397 pub fn assignedSlot(&self) -> Option<&BackendNode<'a>> { self.assignedSlot.as_ref() }
398 pub fn isScrollable(&self) -> Option<bool> { self.isScrollable }
399 pub fn affectedByStartingStyles(&self) -> Option<bool> { self.affectedByStartingStyles }
400 pub fn adoptedStyleSheets(&self) -> Option<&[StyleSheetId<'a>]> { self.adoptedStyleSheets.as_deref() }
401 pub fn adProvenance(&self) -> Option<&crate::network::AdProvenance<'a>> { self.adProvenance.as_ref() }
402}
403
404
405pub struct NodeBuilder<'a> {
406 nodeId: NodeId,
407 parentId: Option<NodeId>,
408 backendNodeId: BackendNodeId,
409 nodeType: i64,
410 nodeName: Cow<'a, str>,
411 localName: Cow<'a, str>,
412 nodeValue: Cow<'a, str>,
413 childNodeCount: Option<u64>,
414 children: Option<Vec<Box<Node<'a>>>>,
415 attributes: Option<Vec<Cow<'a, str>>>,
416 documentURL: Option<Cow<'a, str>>,
417 baseURL: Option<Cow<'a, str>>,
418 publicId: Option<Cow<'a, str>>,
419 systemId: Option<Cow<'a, str>>,
420 internalSubset: Option<Cow<'a, str>>,
421 xmlVersion: Option<Cow<'a, str>>,
422 name: Option<Cow<'a, str>>,
423 value: Option<Cow<'a, str>>,
424 pseudoType: Option<PseudoType>,
425 pseudoIdentifier: Option<Cow<'a, str>>,
426 shadowRootType: Option<ShadowRootType>,
427 frameId: Option<crate::page::FrameId<'a>>,
428 contentDocument: Option<Box<Node<'a>>>,
429 shadowRoots: Option<Vec<Box<Node<'a>>>>,
430 templateContent: Option<Box<Node<'a>>>,
431 pseudoElements: Option<Vec<Box<Node<'a>>>>,
432 importedDocument: Option<Box<Node<'a>>>,
433 distributedNodes: Option<Vec<BackendNode<'a>>>,
434 isSVG: Option<bool>,
435 compatibilityMode: Option<CompatibilityMode>,
436 assignedSlot: Option<BackendNode<'a>>,
437 isScrollable: Option<bool>,
438 affectedByStartingStyles: Option<bool>,
439 adoptedStyleSheets: Option<Vec<StyleSheetId<'a>>>,
440 adProvenance: Option<crate::network::AdProvenance<'a>>,
441}
442
443impl<'a> NodeBuilder<'a> {
444 pub fn parentId(mut self, parentId: NodeId) -> Self { self.parentId = Some(parentId); self }
446 pub fn childNodeCount(mut self, childNodeCount: u64) -> Self { self.childNodeCount = Some(childNodeCount); self }
448 pub fn children(mut self, children: Vec<Box<Node<'a>>>) -> Self { self.children = Some(children); self }
450 pub fn attributes(mut self, attributes: Vec<Cow<'a, str>>) -> Self { self.attributes = Some(attributes); self }
452 pub fn documentURL(mut self, documentURL: impl Into<Cow<'a, str>>) -> Self { self.documentURL = Some(documentURL.into()); self }
454 pub fn baseURL(mut self, baseURL: impl Into<Cow<'a, str>>) -> Self { self.baseURL = Some(baseURL.into()); self }
456 pub fn publicId(mut self, publicId: impl Into<Cow<'a, str>>) -> Self { self.publicId = Some(publicId.into()); self }
458 pub fn systemId(mut self, systemId: impl Into<Cow<'a, str>>) -> Self { self.systemId = Some(systemId.into()); self }
460 pub fn internalSubset(mut self, internalSubset: impl Into<Cow<'a, str>>) -> Self { self.internalSubset = Some(internalSubset.into()); self }
462 pub fn xmlVersion(mut self, xmlVersion: impl Into<Cow<'a, str>>) -> Self { self.xmlVersion = Some(xmlVersion.into()); self }
464 pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self { self.name = Some(name.into()); self }
466 pub fn value(mut self, value: impl Into<Cow<'a, str>>) -> Self { self.value = Some(value.into()); self }
468 pub fn pseudoType(mut self, pseudoType: PseudoType) -> Self { self.pseudoType = Some(pseudoType); self }
470 pub fn pseudoIdentifier(mut self, pseudoIdentifier: impl Into<Cow<'a, str>>) -> Self { self.pseudoIdentifier = Some(pseudoIdentifier.into()); self }
473 pub fn shadowRootType(mut self, shadowRootType: ShadowRootType) -> Self { self.shadowRootType = Some(shadowRootType); self }
475 pub fn frameId(mut self, frameId: crate::page::FrameId<'a>) -> Self { self.frameId = Some(frameId); self }
477 pub fn contentDocument(mut self, contentDocument: Box<Node<'a>>) -> Self { self.contentDocument = Some(contentDocument); self }
479 pub fn shadowRoots(mut self, shadowRoots: Vec<Box<Node<'a>>>) -> Self { self.shadowRoots = Some(shadowRoots); self }
481 pub fn templateContent(mut self, templateContent: Box<Node<'a>>) -> Self { self.templateContent = Some(templateContent); self }
483 pub fn pseudoElements(mut self, pseudoElements: Vec<Box<Node<'a>>>) -> Self { self.pseudoElements = Some(pseudoElements); self }
485 pub fn importedDocument(mut self, importedDocument: Box<Node<'a>>) -> Self { self.importedDocument = Some(importedDocument); self }
489 pub fn distributedNodes(mut self, distributedNodes: Vec<BackendNode<'a>>) -> Self { self.distributedNodes = Some(distributedNodes); self }
491 pub fn isSVG(mut self, isSVG: bool) -> Self { self.isSVG = Some(isSVG); self }
493 pub fn compatibilityMode(mut self, compatibilityMode: CompatibilityMode) -> Self { self.compatibilityMode = Some(compatibilityMode); self }
494 pub fn assignedSlot(mut self, assignedSlot: BackendNode<'a>) -> Self { self.assignedSlot = Some(assignedSlot); self }
495 pub fn isScrollable(mut self, isScrollable: bool) -> Self { self.isScrollable = Some(isScrollable); self }
496 pub fn affectedByStartingStyles(mut self, affectedByStartingStyles: bool) -> Self { self.affectedByStartingStyles = Some(affectedByStartingStyles); self }
497 pub fn adoptedStyleSheets(mut self, adoptedStyleSheets: Vec<StyleSheetId<'a>>) -> Self { self.adoptedStyleSheets = Some(adoptedStyleSheets); self }
498 pub fn adProvenance(mut self, adProvenance: crate::network::AdProvenance<'a>) -> Self { self.adProvenance = Some(adProvenance); self }
499 pub fn build(self) -> Node<'a> {
500 Node {
501 nodeId: self.nodeId,
502 parentId: self.parentId,
503 backendNodeId: self.backendNodeId,
504 nodeType: self.nodeType,
505 nodeName: self.nodeName,
506 localName: self.localName,
507 nodeValue: self.nodeValue,
508 childNodeCount: self.childNodeCount,
509 children: self.children,
510 attributes: self.attributes,
511 documentURL: self.documentURL,
512 baseURL: self.baseURL,
513 publicId: self.publicId,
514 systemId: self.systemId,
515 internalSubset: self.internalSubset,
516 xmlVersion: self.xmlVersion,
517 name: self.name,
518 value: self.value,
519 pseudoType: self.pseudoType,
520 pseudoIdentifier: self.pseudoIdentifier,
521 shadowRootType: self.shadowRootType,
522 frameId: self.frameId,
523 contentDocument: self.contentDocument,
524 shadowRoots: self.shadowRoots,
525 templateContent: self.templateContent,
526 pseudoElements: self.pseudoElements,
527 importedDocument: self.importedDocument,
528 distributedNodes: self.distributedNodes,
529 isSVG: self.isSVG,
530 compatibilityMode: self.compatibilityMode,
531 assignedSlot: self.assignedSlot,
532 isScrollable: self.isScrollable,
533 affectedByStartingStyles: self.affectedByStartingStyles,
534 adoptedStyleSheets: self.adoptedStyleSheets,
535 adProvenance: self.adProvenance,
536 }
537 }
538}
539
540#[derive(Debug, Clone, Serialize, Deserialize, Default)]
543#[serde(rename_all = "camelCase")]
544pub struct DetachedElementInfo<'a> {
545 treeNode: Node<'a>,
546 retainedNodeIds: Vec<NodeId>,
547}
548
549impl<'a> DetachedElementInfo<'a> {
550 pub fn builder(treeNode: Node<'a>, retainedNodeIds: Vec<NodeId>) -> DetachedElementInfoBuilder<'a> {
551 DetachedElementInfoBuilder {
552 treeNode: treeNode,
553 retainedNodeIds: retainedNodeIds,
554 }
555 }
556 pub fn treeNode(&self) -> &Node<'a> { &self.treeNode }
557 pub fn retainedNodeIds(&self) -> &[NodeId] { &self.retainedNodeIds }
558}
559
560
561pub struct DetachedElementInfoBuilder<'a> {
562 treeNode: Node<'a>,
563 retainedNodeIds: Vec<NodeId>,
564}
565
566impl<'a> DetachedElementInfoBuilder<'a> {
567 pub fn build(self) -> DetachedElementInfo<'a> {
568 DetachedElementInfo {
569 treeNode: self.treeNode,
570 retainedNodeIds: self.retainedNodeIds,
571 }
572 }
573}
574
575#[derive(Debug, Clone, Serialize, Deserialize, Default)]
578#[serde(rename_all = "camelCase")]
579pub struct RGBA {
580 r: i64,
582 g: i64,
584 b: i64,
586 #[serde(skip_serializing_if = "Option::is_none")]
588 a: Option<f64>,
589}
590
591impl RGBA {
592 pub fn builder(r: i64, g: i64, b: i64) -> RGBABuilder {
593 RGBABuilder {
594 r: r,
595 g: g,
596 b: b,
597 a: None,
598 }
599 }
600 pub fn r(&self) -> i64 { self.r }
601 pub fn g(&self) -> i64 { self.g }
602 pub fn b(&self) -> i64 { self.b }
603 pub fn a(&self) -> Option<f64> { self.a }
604}
605
606
607pub struct RGBABuilder {
608 r: i64,
609 g: i64,
610 b: i64,
611 a: Option<f64>,
612}
613
614impl RGBABuilder {
615 pub fn a(mut self, a: f64) -> Self { self.a = Some(a); self }
617 pub fn build(self) -> RGBA {
618 RGBA {
619 r: self.r,
620 g: self.g,
621 b: self.b,
622 a: self.a,
623 }
624 }
625}
626
627pub type Quad = Vec<f64>;
630
631#[derive(Debug, Clone, Serialize, Deserialize, Default)]
634#[serde(rename_all = "camelCase")]
635pub struct BoxModel {
636 content: Quad,
638 padding: Quad,
640 border: Quad,
642 margin: Quad,
644 width: u64,
646 height: i64,
648 #[serde(skip_serializing_if = "Option::is_none")]
650 shapeOutside: Option<ShapeOutsideInfo>,
651}
652
653impl BoxModel {
654 pub fn builder(content: Quad, padding: Quad, border: Quad, margin: Quad, width: u64, height: i64) -> BoxModelBuilder {
655 BoxModelBuilder {
656 content: content,
657 padding: padding,
658 border: border,
659 margin: margin,
660 width: width,
661 height: height,
662 shapeOutside: None,
663 }
664 }
665 pub fn content(&self) -> &Quad { &self.content }
666 pub fn padding(&self) -> &Quad { &self.padding }
667 pub fn border(&self) -> &Quad { &self.border }
668 pub fn margin(&self) -> &Quad { &self.margin }
669 pub fn width(&self) -> u64 { self.width }
670 pub fn height(&self) -> i64 { self.height }
671 pub fn shapeOutside(&self) -> Option<&ShapeOutsideInfo> { self.shapeOutside.as_ref() }
672}
673
674
675pub struct BoxModelBuilder {
676 content: Quad,
677 padding: Quad,
678 border: Quad,
679 margin: Quad,
680 width: u64,
681 height: i64,
682 shapeOutside: Option<ShapeOutsideInfo>,
683}
684
685impl BoxModelBuilder {
686 pub fn shapeOutside(mut self, shapeOutside: ShapeOutsideInfo) -> Self { self.shapeOutside = Some(shapeOutside); self }
688 pub fn build(self) -> BoxModel {
689 BoxModel {
690 content: self.content,
691 padding: self.padding,
692 border: self.border,
693 margin: self.margin,
694 width: self.width,
695 height: self.height,
696 shapeOutside: self.shapeOutside,
697 }
698 }
699}
700
701#[derive(Debug, Clone, Serialize, Deserialize, Default)]
704#[serde(rename_all = "camelCase")]
705pub struct ShapeOutsideInfo {
706 bounds: Quad,
708 shape: Vec<JsonValue>,
710 marginShape: Vec<JsonValue>,
712}
713
714impl ShapeOutsideInfo {
715 pub fn builder(bounds: Quad, shape: Vec<JsonValue>, marginShape: Vec<JsonValue>) -> ShapeOutsideInfoBuilder {
716 ShapeOutsideInfoBuilder {
717 bounds: bounds,
718 shape: shape,
719 marginShape: marginShape,
720 }
721 }
722 pub fn bounds(&self) -> &Quad { &self.bounds }
723 pub fn shape(&self) -> &[JsonValue] { &self.shape }
724 pub fn marginShape(&self) -> &[JsonValue] { &self.marginShape }
725}
726
727
728pub struct ShapeOutsideInfoBuilder {
729 bounds: Quad,
730 shape: Vec<JsonValue>,
731 marginShape: Vec<JsonValue>,
732}
733
734impl ShapeOutsideInfoBuilder {
735 pub fn build(self) -> ShapeOutsideInfo {
736 ShapeOutsideInfo {
737 bounds: self.bounds,
738 shape: self.shape,
739 marginShape: self.marginShape,
740 }
741 }
742}
743
744#[derive(Debug, Clone, Serialize, Deserialize, Default)]
747#[serde(rename_all = "camelCase")]
748pub struct Rect {
749 x: f64,
751 y: f64,
753 width: f64,
755 height: f64,
757}
758
759impl Rect {
760 pub fn builder(x: f64, y: f64, width: f64, height: f64) -> RectBuilder {
761 RectBuilder {
762 x: x,
763 y: y,
764 width: width,
765 height: height,
766 }
767 }
768 pub fn x(&self) -> f64 { self.x }
769 pub fn y(&self) -> f64 { self.y }
770 pub fn width(&self) -> f64 { self.width }
771 pub fn height(&self) -> f64 { self.height }
772}
773
774
775pub struct RectBuilder {
776 x: f64,
777 y: f64,
778 width: f64,
779 height: f64,
780}
781
782impl RectBuilder {
783 pub fn build(self) -> Rect {
784 Rect {
785 x: self.x,
786 y: self.y,
787 width: self.width,
788 height: self.height,
789 }
790 }
791}
792
793
794#[derive(Debug, Clone, Serialize, Deserialize, Default)]
795#[serde(rename_all = "camelCase")]
796pub struct CSSComputedStyleProperty<'a> {
797 name: Cow<'a, str>,
799 value: Cow<'a, str>,
801}
802
803impl<'a> CSSComputedStyleProperty<'a> {
804 pub fn builder(name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> CSSComputedStylePropertyBuilder<'a> {
805 CSSComputedStylePropertyBuilder {
806 name: name.into(),
807 value: value.into(),
808 }
809 }
810 pub fn name(&self) -> &str { self.name.as_ref() }
811 pub fn value(&self) -> &str { self.value.as_ref() }
812}
813
814
815pub struct CSSComputedStylePropertyBuilder<'a> {
816 name: Cow<'a, str>,
817 value: Cow<'a, str>,
818}
819
820impl<'a> CSSComputedStylePropertyBuilder<'a> {
821 pub fn build(self) -> CSSComputedStyleProperty<'a> {
822 CSSComputedStyleProperty {
823 name: self.name,
824 value: self.value,
825 }
826 }
827}
828
829#[derive(Debug, Clone, Serialize, Deserialize, Default)]
832#[serde(rename_all = "camelCase")]
833pub struct CollectClassNamesFromSubtreeParams {
834 nodeId: NodeId,
836}
837
838impl CollectClassNamesFromSubtreeParams {
839 pub fn builder(nodeId: NodeId) -> CollectClassNamesFromSubtreeParamsBuilder {
840 CollectClassNamesFromSubtreeParamsBuilder {
841 nodeId: nodeId,
842 }
843 }
844 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
845}
846
847
848pub struct CollectClassNamesFromSubtreeParamsBuilder {
849 nodeId: NodeId,
850}
851
852impl CollectClassNamesFromSubtreeParamsBuilder {
853 pub fn build(self) -> CollectClassNamesFromSubtreeParams {
854 CollectClassNamesFromSubtreeParams {
855 nodeId: self.nodeId,
856 }
857 }
858}
859
860#[derive(Debug, Clone, Serialize, Deserialize, Default)]
863#[serde(rename_all = "camelCase")]
864pub struct CollectClassNamesFromSubtreeReturns<'a> {
865 classNames: Vec<Cow<'a, str>>,
867}
868
869impl<'a> CollectClassNamesFromSubtreeReturns<'a> {
870 pub fn builder(classNames: Vec<Cow<'a, str>>) -> CollectClassNamesFromSubtreeReturnsBuilder<'a> {
871 CollectClassNamesFromSubtreeReturnsBuilder {
872 classNames: classNames,
873 }
874 }
875 pub fn classNames(&self) -> &[Cow<'a, str>] { &self.classNames }
876}
877
878
879pub struct CollectClassNamesFromSubtreeReturnsBuilder<'a> {
880 classNames: Vec<Cow<'a, str>>,
881}
882
883impl<'a> CollectClassNamesFromSubtreeReturnsBuilder<'a> {
884 pub fn build(self) -> CollectClassNamesFromSubtreeReturns<'a> {
885 CollectClassNamesFromSubtreeReturns {
886 classNames: self.classNames,
887 }
888 }
889}
890
891impl CollectClassNamesFromSubtreeParams { pub const METHOD: &'static str = "DOM.collectClassNamesFromSubtree"; }
892
893impl<'a> crate::CdpCommand<'a> for CollectClassNamesFromSubtreeParams {
894 const METHOD: &'static str = "DOM.collectClassNamesFromSubtree";
895 type Response = CollectClassNamesFromSubtreeReturns<'a>;
896}
897
898#[derive(Debug, Clone, Serialize, Deserialize, Default)]
902#[serde(rename_all = "camelCase")]
903pub struct CopyToParams {
904 nodeId: NodeId,
906 targetNodeId: NodeId,
908 #[serde(skip_serializing_if = "Option::is_none")]
911 insertBeforeNodeId: Option<NodeId>,
912}
913
914impl CopyToParams {
915 pub fn builder(nodeId: NodeId, targetNodeId: NodeId) -> CopyToParamsBuilder {
916 CopyToParamsBuilder {
917 nodeId: nodeId,
918 targetNodeId: targetNodeId,
919 insertBeforeNodeId: None,
920 }
921 }
922 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
923 pub fn targetNodeId(&self) -> &NodeId { &self.targetNodeId }
924 pub fn insertBeforeNodeId(&self) -> Option<&NodeId> { self.insertBeforeNodeId.as_ref() }
925}
926
927
928pub struct CopyToParamsBuilder {
929 nodeId: NodeId,
930 targetNodeId: NodeId,
931 insertBeforeNodeId: Option<NodeId>,
932}
933
934impl CopyToParamsBuilder {
935 pub fn insertBeforeNodeId(mut self, insertBeforeNodeId: NodeId) -> Self { self.insertBeforeNodeId = Some(insertBeforeNodeId); self }
938 pub fn build(self) -> CopyToParams {
939 CopyToParams {
940 nodeId: self.nodeId,
941 targetNodeId: self.targetNodeId,
942 insertBeforeNodeId: self.insertBeforeNodeId,
943 }
944 }
945}
946
947#[derive(Debug, Clone, Serialize, Deserialize, Default)]
951#[serde(rename_all = "camelCase")]
952pub struct CopyToReturns {
953 nodeId: NodeId,
955}
956
957impl CopyToReturns {
958 pub fn builder(nodeId: NodeId) -> CopyToReturnsBuilder {
959 CopyToReturnsBuilder {
960 nodeId: nodeId,
961 }
962 }
963 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
964}
965
966
967pub struct CopyToReturnsBuilder {
968 nodeId: NodeId,
969}
970
971impl CopyToReturnsBuilder {
972 pub fn build(self) -> CopyToReturns {
973 CopyToReturns {
974 nodeId: self.nodeId,
975 }
976 }
977}
978
979impl CopyToParams { pub const METHOD: &'static str = "DOM.copyTo"; }
980
981impl<'a> crate::CdpCommand<'a> for CopyToParams {
982 const METHOD: &'static str = "DOM.copyTo";
983 type Response = CopyToReturns;
984}
985
986#[derive(Debug, Clone, Serialize, Deserialize, Default)]
990#[serde(rename_all = "camelCase")]
991pub struct DescribeNodeParams<'a> {
992 #[serde(skip_serializing_if = "Option::is_none")]
994 nodeId: Option<NodeId>,
995 #[serde(skip_serializing_if = "Option::is_none")]
997 backendNodeId: Option<BackendNodeId>,
998 #[serde(skip_serializing_if = "Option::is_none")]
1000 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1001 #[serde(skip_serializing_if = "Option::is_none")]
1004 depth: Option<i64>,
1005 #[serde(skip_serializing_if = "Option::is_none")]
1008 pierce: Option<bool>,
1009}
1010
1011impl<'a> DescribeNodeParams<'a> {
1012 pub fn builder() -> DescribeNodeParamsBuilder<'a> {
1013 DescribeNodeParamsBuilder {
1014 nodeId: None,
1015 backendNodeId: None,
1016 objectId: None,
1017 depth: None,
1018 pierce: None,
1019 }
1020 }
1021 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
1022 pub fn backendNodeId(&self) -> Option<&BackendNodeId> { self.backendNodeId.as_ref() }
1023 pub fn objectId(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.objectId.as_ref() }
1024 pub fn depth(&self) -> Option<i64> { self.depth }
1025 pub fn pierce(&self) -> Option<bool> { self.pierce }
1026}
1027
1028#[derive(Default)]
1029pub struct DescribeNodeParamsBuilder<'a> {
1030 nodeId: Option<NodeId>,
1031 backendNodeId: Option<BackendNodeId>,
1032 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1033 depth: Option<i64>,
1034 pierce: Option<bool>,
1035}
1036
1037impl<'a> DescribeNodeParamsBuilder<'a> {
1038 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
1040 pub fn backendNodeId(mut self, backendNodeId: BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
1042 pub fn objectId(mut self, objectId: crate::runtime::RemoteObjectId<'a>) -> Self { self.objectId = Some(objectId); self }
1044 pub fn depth(mut self, depth: i64) -> Self { self.depth = Some(depth); self }
1047 pub fn pierce(mut self, pierce: bool) -> Self { self.pierce = Some(pierce); self }
1050 pub fn build(self) -> DescribeNodeParams<'a> {
1051 DescribeNodeParams {
1052 nodeId: self.nodeId,
1053 backendNodeId: self.backendNodeId,
1054 objectId: self.objectId,
1055 depth: self.depth,
1056 pierce: self.pierce,
1057 }
1058 }
1059}
1060
1061#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1065#[serde(rename_all = "camelCase")]
1066pub struct DescribeNodeReturns<'a> {
1067 node: Node<'a>,
1069}
1070
1071impl<'a> DescribeNodeReturns<'a> {
1072 pub fn builder(node: Node<'a>) -> DescribeNodeReturnsBuilder<'a> {
1073 DescribeNodeReturnsBuilder {
1074 node: node,
1075 }
1076 }
1077 pub fn node(&self) -> &Node<'a> { &self.node }
1078}
1079
1080
1081pub struct DescribeNodeReturnsBuilder<'a> {
1082 node: Node<'a>,
1083}
1084
1085impl<'a> DescribeNodeReturnsBuilder<'a> {
1086 pub fn build(self) -> DescribeNodeReturns<'a> {
1087 DescribeNodeReturns {
1088 node: self.node,
1089 }
1090 }
1091}
1092
1093impl<'a> DescribeNodeParams<'a> { pub const METHOD: &'static str = "DOM.describeNode"; }
1094
1095impl<'a> crate::CdpCommand<'a> for DescribeNodeParams<'a> {
1096 const METHOD: &'static str = "DOM.describeNode";
1097 type Response = DescribeNodeReturns<'a>;
1098}
1099
1100#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1105#[serde(rename_all = "camelCase")]
1106pub struct ScrollIntoViewIfNeededParams<'a> {
1107 #[serde(skip_serializing_if = "Option::is_none")]
1109 nodeId: Option<NodeId>,
1110 #[serde(skip_serializing_if = "Option::is_none")]
1112 backendNodeId: Option<BackendNodeId>,
1113 #[serde(skip_serializing_if = "Option::is_none")]
1115 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1116 #[serde(skip_serializing_if = "Option::is_none")]
1119 rect: Option<Rect>,
1120}
1121
1122impl<'a> ScrollIntoViewIfNeededParams<'a> {
1123 pub fn builder() -> ScrollIntoViewIfNeededParamsBuilder<'a> {
1124 ScrollIntoViewIfNeededParamsBuilder {
1125 nodeId: None,
1126 backendNodeId: None,
1127 objectId: None,
1128 rect: None,
1129 }
1130 }
1131 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
1132 pub fn backendNodeId(&self) -> Option<&BackendNodeId> { self.backendNodeId.as_ref() }
1133 pub fn objectId(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.objectId.as_ref() }
1134 pub fn rect(&self) -> Option<&Rect> { self.rect.as_ref() }
1135}
1136
1137#[derive(Default)]
1138pub struct ScrollIntoViewIfNeededParamsBuilder<'a> {
1139 nodeId: Option<NodeId>,
1140 backendNodeId: Option<BackendNodeId>,
1141 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1142 rect: Option<Rect>,
1143}
1144
1145impl<'a> ScrollIntoViewIfNeededParamsBuilder<'a> {
1146 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
1148 pub fn backendNodeId(mut self, backendNodeId: BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
1150 pub fn objectId(mut self, objectId: crate::runtime::RemoteObjectId<'a>) -> Self { self.objectId = Some(objectId); self }
1152 pub fn rect(mut self, rect: Rect) -> Self { self.rect = Some(rect); self }
1155 pub fn build(self) -> ScrollIntoViewIfNeededParams<'a> {
1156 ScrollIntoViewIfNeededParams {
1157 nodeId: self.nodeId,
1158 backendNodeId: self.backendNodeId,
1159 objectId: self.objectId,
1160 rect: self.rect,
1161 }
1162 }
1163}
1164
1165impl<'a> ScrollIntoViewIfNeededParams<'a> { pub const METHOD: &'static str = "DOM.scrollIntoViewIfNeeded"; }
1166
1167impl<'a> crate::CdpCommand<'a> for ScrollIntoViewIfNeededParams<'a> {
1168 const METHOD: &'static str = "DOM.scrollIntoViewIfNeeded";
1169 type Response = crate::EmptyReturns;
1170}
1171
1172#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1173pub struct DisableParams {}
1174
1175impl DisableParams { pub const METHOD: &'static str = "DOM.disable"; }
1176
1177impl<'a> crate::CdpCommand<'a> for DisableParams {
1178 const METHOD: &'static str = "DOM.disable";
1179 type Response = crate::EmptyReturns;
1180}
1181
1182#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1186#[serde(rename_all = "camelCase")]
1187pub struct DiscardSearchResultsParams<'a> {
1188 searchId: Cow<'a, str>,
1190}
1191
1192impl<'a> DiscardSearchResultsParams<'a> {
1193 pub fn builder(searchId: impl Into<Cow<'a, str>>) -> DiscardSearchResultsParamsBuilder<'a> {
1194 DiscardSearchResultsParamsBuilder {
1195 searchId: searchId.into(),
1196 }
1197 }
1198 pub fn searchId(&self) -> &str { self.searchId.as_ref() }
1199}
1200
1201
1202pub struct DiscardSearchResultsParamsBuilder<'a> {
1203 searchId: Cow<'a, str>,
1204}
1205
1206impl<'a> DiscardSearchResultsParamsBuilder<'a> {
1207 pub fn build(self) -> DiscardSearchResultsParams<'a> {
1208 DiscardSearchResultsParams {
1209 searchId: self.searchId,
1210 }
1211 }
1212}
1213
1214impl<'a> DiscardSearchResultsParams<'a> { pub const METHOD: &'static str = "DOM.discardSearchResults"; }
1215
1216impl<'a> crate::CdpCommand<'a> for DiscardSearchResultsParams<'a> {
1217 const METHOD: &'static str = "DOM.discardSearchResults";
1218 type Response = crate::EmptyReturns;
1219}
1220
1221#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1224#[serde(rename_all = "camelCase")]
1225pub struct EnableParams<'a> {
1226 #[serde(skip_serializing_if = "Option::is_none")]
1228 includeWhitespace: Option<Cow<'a, str>>,
1229}
1230
1231impl<'a> EnableParams<'a> {
1232 pub fn builder() -> EnableParamsBuilder<'a> {
1233 EnableParamsBuilder {
1234 includeWhitespace: None,
1235 }
1236 }
1237 pub fn includeWhitespace(&self) -> Option<&str> { self.includeWhitespace.as_deref() }
1238}
1239
1240#[derive(Default)]
1241pub struct EnableParamsBuilder<'a> {
1242 includeWhitespace: Option<Cow<'a, str>>,
1243}
1244
1245impl<'a> EnableParamsBuilder<'a> {
1246 pub fn includeWhitespace(mut self, includeWhitespace: impl Into<Cow<'a, str>>) -> Self { self.includeWhitespace = Some(includeWhitespace.into()); self }
1248 pub fn build(self) -> EnableParams<'a> {
1249 EnableParams {
1250 includeWhitespace: self.includeWhitespace,
1251 }
1252 }
1253}
1254
1255impl<'a> EnableParams<'a> { pub const METHOD: &'static str = "DOM.enable"; }
1256
1257impl<'a> crate::CdpCommand<'a> for EnableParams<'a> {
1258 const METHOD: &'static str = "DOM.enable";
1259 type Response = crate::EmptyReturns;
1260}
1261
1262#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1265#[serde(rename_all = "camelCase")]
1266pub struct FocusParams<'a> {
1267 #[serde(skip_serializing_if = "Option::is_none")]
1269 nodeId: Option<NodeId>,
1270 #[serde(skip_serializing_if = "Option::is_none")]
1272 backendNodeId: Option<BackendNodeId>,
1273 #[serde(skip_serializing_if = "Option::is_none")]
1275 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1276}
1277
1278impl<'a> FocusParams<'a> {
1279 pub fn builder() -> FocusParamsBuilder<'a> {
1280 FocusParamsBuilder {
1281 nodeId: None,
1282 backendNodeId: None,
1283 objectId: None,
1284 }
1285 }
1286 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
1287 pub fn backendNodeId(&self) -> Option<&BackendNodeId> { self.backendNodeId.as_ref() }
1288 pub fn objectId(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.objectId.as_ref() }
1289}
1290
1291#[derive(Default)]
1292pub struct FocusParamsBuilder<'a> {
1293 nodeId: Option<NodeId>,
1294 backendNodeId: Option<BackendNodeId>,
1295 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1296}
1297
1298impl<'a> FocusParamsBuilder<'a> {
1299 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
1301 pub fn backendNodeId(mut self, backendNodeId: BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
1303 pub fn objectId(mut self, objectId: crate::runtime::RemoteObjectId<'a>) -> Self { self.objectId = Some(objectId); self }
1305 pub fn build(self) -> FocusParams<'a> {
1306 FocusParams {
1307 nodeId: self.nodeId,
1308 backendNodeId: self.backendNodeId,
1309 objectId: self.objectId,
1310 }
1311 }
1312}
1313
1314impl<'a> FocusParams<'a> { pub const METHOD: &'static str = "DOM.focus"; }
1315
1316impl<'a> crate::CdpCommand<'a> for FocusParams<'a> {
1317 const METHOD: &'static str = "DOM.focus";
1318 type Response = crate::EmptyReturns;
1319}
1320
1321#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1324#[serde(rename_all = "camelCase")]
1325pub struct GetAttributesParams {
1326 nodeId: NodeId,
1328}
1329
1330impl GetAttributesParams {
1331 pub fn builder(nodeId: NodeId) -> GetAttributesParamsBuilder {
1332 GetAttributesParamsBuilder {
1333 nodeId: nodeId,
1334 }
1335 }
1336 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
1337}
1338
1339
1340pub struct GetAttributesParamsBuilder {
1341 nodeId: NodeId,
1342}
1343
1344impl GetAttributesParamsBuilder {
1345 pub fn build(self) -> GetAttributesParams {
1346 GetAttributesParams {
1347 nodeId: self.nodeId,
1348 }
1349 }
1350}
1351
1352#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1355#[serde(rename_all = "camelCase")]
1356pub struct GetAttributesReturns<'a> {
1357 attributes: Vec<Cow<'a, str>>,
1359}
1360
1361impl<'a> GetAttributesReturns<'a> {
1362 pub fn builder(attributes: Vec<Cow<'a, str>>) -> GetAttributesReturnsBuilder<'a> {
1363 GetAttributesReturnsBuilder {
1364 attributes: attributes,
1365 }
1366 }
1367 pub fn attributes(&self) -> &[Cow<'a, str>] { &self.attributes }
1368}
1369
1370
1371pub struct GetAttributesReturnsBuilder<'a> {
1372 attributes: Vec<Cow<'a, str>>,
1373}
1374
1375impl<'a> GetAttributesReturnsBuilder<'a> {
1376 pub fn build(self) -> GetAttributesReturns<'a> {
1377 GetAttributesReturns {
1378 attributes: self.attributes,
1379 }
1380 }
1381}
1382
1383impl GetAttributesParams { pub const METHOD: &'static str = "DOM.getAttributes"; }
1384
1385impl<'a> crate::CdpCommand<'a> for GetAttributesParams {
1386 const METHOD: &'static str = "DOM.getAttributes";
1387 type Response = GetAttributesReturns<'a>;
1388}
1389
1390#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1393#[serde(rename_all = "camelCase")]
1394pub struct GetBoxModelParams<'a> {
1395 #[serde(skip_serializing_if = "Option::is_none")]
1397 nodeId: Option<NodeId>,
1398 #[serde(skip_serializing_if = "Option::is_none")]
1400 backendNodeId: Option<BackendNodeId>,
1401 #[serde(skip_serializing_if = "Option::is_none")]
1403 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1404}
1405
1406impl<'a> GetBoxModelParams<'a> {
1407 pub fn builder() -> GetBoxModelParamsBuilder<'a> {
1408 GetBoxModelParamsBuilder {
1409 nodeId: None,
1410 backendNodeId: None,
1411 objectId: None,
1412 }
1413 }
1414 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
1415 pub fn backendNodeId(&self) -> Option<&BackendNodeId> { self.backendNodeId.as_ref() }
1416 pub fn objectId(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.objectId.as_ref() }
1417}
1418
1419#[derive(Default)]
1420pub struct GetBoxModelParamsBuilder<'a> {
1421 nodeId: Option<NodeId>,
1422 backendNodeId: Option<BackendNodeId>,
1423 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1424}
1425
1426impl<'a> GetBoxModelParamsBuilder<'a> {
1427 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
1429 pub fn backendNodeId(mut self, backendNodeId: BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
1431 pub fn objectId(mut self, objectId: crate::runtime::RemoteObjectId<'a>) -> Self { self.objectId = Some(objectId); self }
1433 pub fn build(self) -> GetBoxModelParams<'a> {
1434 GetBoxModelParams {
1435 nodeId: self.nodeId,
1436 backendNodeId: self.backendNodeId,
1437 objectId: self.objectId,
1438 }
1439 }
1440}
1441
1442#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1445#[serde(rename_all = "camelCase")]
1446pub struct GetBoxModelReturns {
1447 model: BoxModel,
1449}
1450
1451impl GetBoxModelReturns {
1452 pub fn builder(model: BoxModel) -> GetBoxModelReturnsBuilder {
1453 GetBoxModelReturnsBuilder {
1454 model: model,
1455 }
1456 }
1457 pub fn model(&self) -> &BoxModel { &self.model }
1458}
1459
1460
1461pub struct GetBoxModelReturnsBuilder {
1462 model: BoxModel,
1463}
1464
1465impl GetBoxModelReturnsBuilder {
1466 pub fn build(self) -> GetBoxModelReturns {
1467 GetBoxModelReturns {
1468 model: self.model,
1469 }
1470 }
1471}
1472
1473impl<'a> GetBoxModelParams<'a> { pub const METHOD: &'static str = "DOM.getBoxModel"; }
1474
1475impl<'a> crate::CdpCommand<'a> for GetBoxModelParams<'a> {
1476 const METHOD: &'static str = "DOM.getBoxModel";
1477 type Response = GetBoxModelReturns;
1478}
1479
1480#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1484#[serde(rename_all = "camelCase")]
1485pub struct GetContentQuadsParams<'a> {
1486 #[serde(skip_serializing_if = "Option::is_none")]
1488 nodeId: Option<NodeId>,
1489 #[serde(skip_serializing_if = "Option::is_none")]
1491 backendNodeId: Option<BackendNodeId>,
1492 #[serde(skip_serializing_if = "Option::is_none")]
1494 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1495}
1496
1497impl<'a> GetContentQuadsParams<'a> {
1498 pub fn builder() -> GetContentQuadsParamsBuilder<'a> {
1499 GetContentQuadsParamsBuilder {
1500 nodeId: None,
1501 backendNodeId: None,
1502 objectId: None,
1503 }
1504 }
1505 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
1506 pub fn backendNodeId(&self) -> Option<&BackendNodeId> { self.backendNodeId.as_ref() }
1507 pub fn objectId(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.objectId.as_ref() }
1508}
1509
1510#[derive(Default)]
1511pub struct GetContentQuadsParamsBuilder<'a> {
1512 nodeId: Option<NodeId>,
1513 backendNodeId: Option<BackendNodeId>,
1514 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1515}
1516
1517impl<'a> GetContentQuadsParamsBuilder<'a> {
1518 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
1520 pub fn backendNodeId(mut self, backendNodeId: BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
1522 pub fn objectId(mut self, objectId: crate::runtime::RemoteObjectId<'a>) -> Self { self.objectId = Some(objectId); self }
1524 pub fn build(self) -> GetContentQuadsParams<'a> {
1525 GetContentQuadsParams {
1526 nodeId: self.nodeId,
1527 backendNodeId: self.backendNodeId,
1528 objectId: self.objectId,
1529 }
1530 }
1531}
1532
1533#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1537#[serde(rename_all = "camelCase")]
1538pub struct GetContentQuadsReturns {
1539 quads: Vec<Quad>,
1541}
1542
1543impl GetContentQuadsReturns {
1544 pub fn builder(quads: Vec<Quad>) -> GetContentQuadsReturnsBuilder {
1545 GetContentQuadsReturnsBuilder {
1546 quads: quads,
1547 }
1548 }
1549 pub fn quads(&self) -> &[Quad] { &self.quads }
1550}
1551
1552
1553pub struct GetContentQuadsReturnsBuilder {
1554 quads: Vec<Quad>,
1555}
1556
1557impl GetContentQuadsReturnsBuilder {
1558 pub fn build(self) -> GetContentQuadsReturns {
1559 GetContentQuadsReturns {
1560 quads: self.quads,
1561 }
1562 }
1563}
1564
1565impl<'a> GetContentQuadsParams<'a> { pub const METHOD: &'static str = "DOM.getContentQuads"; }
1566
1567impl<'a> crate::CdpCommand<'a> for GetContentQuadsParams<'a> {
1568 const METHOD: &'static str = "DOM.getContentQuads";
1569 type Response = GetContentQuadsReturns;
1570}
1571
1572#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1576#[serde(rename_all = "camelCase")]
1577pub struct GetDocumentParams {
1578 #[serde(skip_serializing_if = "Option::is_none")]
1581 depth: Option<i64>,
1582 #[serde(skip_serializing_if = "Option::is_none")]
1585 pierce: Option<bool>,
1586}
1587
1588impl GetDocumentParams {
1589 pub fn builder() -> GetDocumentParamsBuilder {
1590 GetDocumentParamsBuilder {
1591 depth: None,
1592 pierce: None,
1593 }
1594 }
1595 pub fn depth(&self) -> Option<i64> { self.depth }
1596 pub fn pierce(&self) -> Option<bool> { self.pierce }
1597}
1598
1599#[derive(Default)]
1600pub struct GetDocumentParamsBuilder {
1601 depth: Option<i64>,
1602 pierce: Option<bool>,
1603}
1604
1605impl GetDocumentParamsBuilder {
1606 pub fn depth(mut self, depth: i64) -> Self { self.depth = Some(depth); self }
1609 pub fn pierce(mut self, pierce: bool) -> Self { self.pierce = Some(pierce); self }
1612 pub fn build(self) -> GetDocumentParams {
1613 GetDocumentParams {
1614 depth: self.depth,
1615 pierce: self.pierce,
1616 }
1617 }
1618}
1619
1620#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1624#[serde(rename_all = "camelCase")]
1625pub struct GetDocumentReturns<'a> {
1626 root: Node<'a>,
1628}
1629
1630impl<'a> GetDocumentReturns<'a> {
1631 pub fn builder(root: Node<'a>) -> GetDocumentReturnsBuilder<'a> {
1632 GetDocumentReturnsBuilder {
1633 root: root,
1634 }
1635 }
1636 pub fn root(&self) -> &Node<'a> { &self.root }
1637}
1638
1639
1640pub struct GetDocumentReturnsBuilder<'a> {
1641 root: Node<'a>,
1642}
1643
1644impl<'a> GetDocumentReturnsBuilder<'a> {
1645 pub fn build(self) -> GetDocumentReturns<'a> {
1646 GetDocumentReturns {
1647 root: self.root,
1648 }
1649 }
1650}
1651
1652impl GetDocumentParams { pub const METHOD: &'static str = "DOM.getDocument"; }
1653
1654impl<'a> crate::CdpCommand<'a> for GetDocumentParams {
1655 const METHOD: &'static str = "DOM.getDocument";
1656 type Response = GetDocumentReturns<'a>;
1657}
1658
1659#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1664#[serde(rename_all = "camelCase")]
1665pub struct GetFlattenedDocumentParams {
1666 #[serde(skip_serializing_if = "Option::is_none")]
1669 depth: Option<i64>,
1670 #[serde(skip_serializing_if = "Option::is_none")]
1673 pierce: Option<bool>,
1674}
1675
1676impl GetFlattenedDocumentParams {
1677 pub fn builder() -> GetFlattenedDocumentParamsBuilder {
1678 GetFlattenedDocumentParamsBuilder {
1679 depth: None,
1680 pierce: None,
1681 }
1682 }
1683 pub fn depth(&self) -> Option<i64> { self.depth }
1684 pub fn pierce(&self) -> Option<bool> { self.pierce }
1685}
1686
1687#[derive(Default)]
1688pub struct GetFlattenedDocumentParamsBuilder {
1689 depth: Option<i64>,
1690 pierce: Option<bool>,
1691}
1692
1693impl GetFlattenedDocumentParamsBuilder {
1694 pub fn depth(mut self, depth: i64) -> Self { self.depth = Some(depth); self }
1697 pub fn pierce(mut self, pierce: bool) -> Self { self.pierce = Some(pierce); self }
1700 pub fn build(self) -> GetFlattenedDocumentParams {
1701 GetFlattenedDocumentParams {
1702 depth: self.depth,
1703 pierce: self.pierce,
1704 }
1705 }
1706}
1707
1708#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1713#[serde(rename_all = "camelCase")]
1714pub struct GetFlattenedDocumentReturns<'a> {
1715 nodes: Vec<Node<'a>>,
1717}
1718
1719impl<'a> GetFlattenedDocumentReturns<'a> {
1720 pub fn builder(nodes: Vec<Node<'a>>) -> GetFlattenedDocumentReturnsBuilder<'a> {
1721 GetFlattenedDocumentReturnsBuilder {
1722 nodes: nodes,
1723 }
1724 }
1725 pub fn nodes(&self) -> &[Node<'a>] { &self.nodes }
1726}
1727
1728
1729pub struct GetFlattenedDocumentReturnsBuilder<'a> {
1730 nodes: Vec<Node<'a>>,
1731}
1732
1733impl<'a> GetFlattenedDocumentReturnsBuilder<'a> {
1734 pub fn build(self) -> GetFlattenedDocumentReturns<'a> {
1735 GetFlattenedDocumentReturns {
1736 nodes: self.nodes,
1737 }
1738 }
1739}
1740
1741impl GetFlattenedDocumentParams { pub const METHOD: &'static str = "DOM.getFlattenedDocument"; }
1742
1743impl<'a> crate::CdpCommand<'a> for GetFlattenedDocumentParams {
1744 const METHOD: &'static str = "DOM.getFlattenedDocument";
1745 type Response = GetFlattenedDocumentReturns<'a>;
1746}
1747
1748#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1751#[serde(rename_all = "camelCase")]
1752pub struct GetNodesForSubtreeByStyleParams<'a> {
1753 nodeId: NodeId,
1755 computedStyles: Vec<CSSComputedStyleProperty<'a>>,
1757 #[serde(skip_serializing_if = "Option::is_none")]
1760 pierce: Option<bool>,
1761}
1762
1763impl<'a> GetNodesForSubtreeByStyleParams<'a> {
1764 pub fn builder(nodeId: NodeId, computedStyles: Vec<CSSComputedStyleProperty<'a>>) -> GetNodesForSubtreeByStyleParamsBuilder<'a> {
1765 GetNodesForSubtreeByStyleParamsBuilder {
1766 nodeId: nodeId,
1767 computedStyles: computedStyles,
1768 pierce: None,
1769 }
1770 }
1771 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
1772 pub fn computedStyles(&self) -> &[CSSComputedStyleProperty<'a>] { &self.computedStyles }
1773 pub fn pierce(&self) -> Option<bool> { self.pierce }
1774}
1775
1776
1777pub struct GetNodesForSubtreeByStyleParamsBuilder<'a> {
1778 nodeId: NodeId,
1779 computedStyles: Vec<CSSComputedStyleProperty<'a>>,
1780 pierce: Option<bool>,
1781}
1782
1783impl<'a> GetNodesForSubtreeByStyleParamsBuilder<'a> {
1784 pub fn pierce(mut self, pierce: bool) -> Self { self.pierce = Some(pierce); self }
1787 pub fn build(self) -> GetNodesForSubtreeByStyleParams<'a> {
1788 GetNodesForSubtreeByStyleParams {
1789 nodeId: self.nodeId,
1790 computedStyles: self.computedStyles,
1791 pierce: self.pierce,
1792 }
1793 }
1794}
1795
1796#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1799#[serde(rename_all = "camelCase")]
1800pub struct GetNodesForSubtreeByStyleReturns {
1801 nodeIds: Vec<NodeId>,
1803}
1804
1805impl GetNodesForSubtreeByStyleReturns {
1806 pub fn builder(nodeIds: Vec<NodeId>) -> GetNodesForSubtreeByStyleReturnsBuilder {
1807 GetNodesForSubtreeByStyleReturnsBuilder {
1808 nodeIds: nodeIds,
1809 }
1810 }
1811 pub fn nodeIds(&self) -> &[NodeId] { &self.nodeIds }
1812}
1813
1814
1815pub struct GetNodesForSubtreeByStyleReturnsBuilder {
1816 nodeIds: Vec<NodeId>,
1817}
1818
1819impl GetNodesForSubtreeByStyleReturnsBuilder {
1820 pub fn build(self) -> GetNodesForSubtreeByStyleReturns {
1821 GetNodesForSubtreeByStyleReturns {
1822 nodeIds: self.nodeIds,
1823 }
1824 }
1825}
1826
1827impl<'a> GetNodesForSubtreeByStyleParams<'a> { pub const METHOD: &'static str = "DOM.getNodesForSubtreeByStyle"; }
1828
1829impl<'a> crate::CdpCommand<'a> for GetNodesForSubtreeByStyleParams<'a> {
1830 const METHOD: &'static str = "DOM.getNodesForSubtreeByStyle";
1831 type Response = GetNodesForSubtreeByStyleReturns;
1832}
1833
1834#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1838#[serde(rename_all = "camelCase")]
1839pub struct GetNodeForLocationParams {
1840 x: i32,
1842 y: i32,
1844 #[serde(skip_serializing_if = "Option::is_none")]
1846 includeUserAgentShadowDOM: Option<bool>,
1847 #[serde(skip_serializing_if = "Option::is_none")]
1849 ignorePointerEventsNone: Option<bool>,
1850}
1851
1852impl GetNodeForLocationParams {
1853 pub fn builder(x: i32, y: i32) -> GetNodeForLocationParamsBuilder {
1854 GetNodeForLocationParamsBuilder {
1855 x: x,
1856 y: y,
1857 includeUserAgentShadowDOM: None,
1858 ignorePointerEventsNone: None,
1859 }
1860 }
1861 pub fn x(&self) -> i32 { self.x }
1862 pub fn y(&self) -> i32 { self.y }
1863 pub fn includeUserAgentShadowDOM(&self) -> Option<bool> { self.includeUserAgentShadowDOM }
1864 pub fn ignorePointerEventsNone(&self) -> Option<bool> { self.ignorePointerEventsNone }
1865}
1866
1867
1868pub struct GetNodeForLocationParamsBuilder {
1869 x: i32,
1870 y: i32,
1871 includeUserAgentShadowDOM: Option<bool>,
1872 ignorePointerEventsNone: Option<bool>,
1873}
1874
1875impl GetNodeForLocationParamsBuilder {
1876 pub fn includeUserAgentShadowDOM(mut self, includeUserAgentShadowDOM: bool) -> Self { self.includeUserAgentShadowDOM = Some(includeUserAgentShadowDOM); self }
1878 pub fn ignorePointerEventsNone(mut self, ignorePointerEventsNone: bool) -> Self { self.ignorePointerEventsNone = Some(ignorePointerEventsNone); self }
1880 pub fn build(self) -> GetNodeForLocationParams {
1881 GetNodeForLocationParams {
1882 x: self.x,
1883 y: self.y,
1884 includeUserAgentShadowDOM: self.includeUserAgentShadowDOM,
1885 ignorePointerEventsNone: self.ignorePointerEventsNone,
1886 }
1887 }
1888}
1889
1890#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1894#[serde(rename_all = "camelCase")]
1895pub struct GetNodeForLocationReturns<'a> {
1896 backendNodeId: BackendNodeId,
1898 frameId: crate::page::FrameId<'a>,
1900 #[serde(skip_serializing_if = "Option::is_none")]
1902 nodeId: Option<NodeId>,
1903}
1904
1905impl<'a> GetNodeForLocationReturns<'a> {
1906 pub fn builder(backendNodeId: BackendNodeId, frameId: crate::page::FrameId<'a>) -> GetNodeForLocationReturnsBuilder<'a> {
1907 GetNodeForLocationReturnsBuilder {
1908 backendNodeId: backendNodeId,
1909 frameId: frameId,
1910 nodeId: None,
1911 }
1912 }
1913 pub fn backendNodeId(&self) -> &BackendNodeId { &self.backendNodeId }
1914 pub fn frameId(&self) -> &crate::page::FrameId<'a> { &self.frameId }
1915 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
1916}
1917
1918
1919pub struct GetNodeForLocationReturnsBuilder<'a> {
1920 backendNodeId: BackendNodeId,
1921 frameId: crate::page::FrameId<'a>,
1922 nodeId: Option<NodeId>,
1923}
1924
1925impl<'a> GetNodeForLocationReturnsBuilder<'a> {
1926 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
1928 pub fn build(self) -> GetNodeForLocationReturns<'a> {
1929 GetNodeForLocationReturns {
1930 backendNodeId: self.backendNodeId,
1931 frameId: self.frameId,
1932 nodeId: self.nodeId,
1933 }
1934 }
1935}
1936
1937impl GetNodeForLocationParams { pub const METHOD: &'static str = "DOM.getNodeForLocation"; }
1938
1939impl<'a> crate::CdpCommand<'a> for GetNodeForLocationParams {
1940 const METHOD: &'static str = "DOM.getNodeForLocation";
1941 type Response = GetNodeForLocationReturns<'a>;
1942}
1943
1944#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1947#[serde(rename_all = "camelCase")]
1948pub struct GetOuterHTMLParams<'a> {
1949 #[serde(skip_serializing_if = "Option::is_none")]
1951 nodeId: Option<NodeId>,
1952 #[serde(skip_serializing_if = "Option::is_none")]
1954 backendNodeId: Option<BackendNodeId>,
1955 #[serde(skip_serializing_if = "Option::is_none")]
1957 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1958 #[serde(skip_serializing_if = "Option::is_none")]
1960 includeShadowDOM: Option<bool>,
1961}
1962
1963impl<'a> GetOuterHTMLParams<'a> {
1964 pub fn builder() -> GetOuterHTMLParamsBuilder<'a> {
1965 GetOuterHTMLParamsBuilder {
1966 nodeId: None,
1967 backendNodeId: None,
1968 objectId: None,
1969 includeShadowDOM: None,
1970 }
1971 }
1972 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
1973 pub fn backendNodeId(&self) -> Option<&BackendNodeId> { self.backendNodeId.as_ref() }
1974 pub fn objectId(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.objectId.as_ref() }
1975 pub fn includeShadowDOM(&self) -> Option<bool> { self.includeShadowDOM }
1976}
1977
1978#[derive(Default)]
1979pub struct GetOuterHTMLParamsBuilder<'a> {
1980 nodeId: Option<NodeId>,
1981 backendNodeId: Option<BackendNodeId>,
1982 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
1983 includeShadowDOM: Option<bool>,
1984}
1985
1986impl<'a> GetOuterHTMLParamsBuilder<'a> {
1987 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
1989 pub fn backendNodeId(mut self, backendNodeId: BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
1991 pub fn objectId(mut self, objectId: crate::runtime::RemoteObjectId<'a>) -> Self { self.objectId = Some(objectId); self }
1993 pub fn includeShadowDOM(mut self, includeShadowDOM: bool) -> Self { self.includeShadowDOM = Some(includeShadowDOM); self }
1995 pub fn build(self) -> GetOuterHTMLParams<'a> {
1996 GetOuterHTMLParams {
1997 nodeId: self.nodeId,
1998 backendNodeId: self.backendNodeId,
1999 objectId: self.objectId,
2000 includeShadowDOM: self.includeShadowDOM,
2001 }
2002 }
2003}
2004
2005#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2008#[serde(rename_all = "camelCase")]
2009pub struct GetOuterHTMLReturns<'a> {
2010 outerHTML: Cow<'a, str>,
2012}
2013
2014impl<'a> GetOuterHTMLReturns<'a> {
2015 pub fn builder(outerHTML: impl Into<Cow<'a, str>>) -> GetOuterHTMLReturnsBuilder<'a> {
2016 GetOuterHTMLReturnsBuilder {
2017 outerHTML: outerHTML.into(),
2018 }
2019 }
2020 pub fn outerHTML(&self) -> &str { self.outerHTML.as_ref() }
2021}
2022
2023
2024pub struct GetOuterHTMLReturnsBuilder<'a> {
2025 outerHTML: Cow<'a, str>,
2026}
2027
2028impl<'a> GetOuterHTMLReturnsBuilder<'a> {
2029 pub fn build(self) -> GetOuterHTMLReturns<'a> {
2030 GetOuterHTMLReturns {
2031 outerHTML: self.outerHTML,
2032 }
2033 }
2034}
2035
2036impl<'a> GetOuterHTMLParams<'a> { pub const METHOD: &'static str = "DOM.getOuterHTML"; }
2037
2038impl<'a> crate::CdpCommand<'a> for GetOuterHTMLParams<'a> {
2039 const METHOD: &'static str = "DOM.getOuterHTML";
2040 type Response = GetOuterHTMLReturns<'a>;
2041}
2042
2043#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2046#[serde(rename_all = "camelCase")]
2047pub struct GetRelayoutBoundaryParams {
2048 nodeId: NodeId,
2050}
2051
2052impl GetRelayoutBoundaryParams {
2053 pub fn builder(nodeId: NodeId) -> GetRelayoutBoundaryParamsBuilder {
2054 GetRelayoutBoundaryParamsBuilder {
2055 nodeId: nodeId,
2056 }
2057 }
2058 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2059}
2060
2061
2062pub struct GetRelayoutBoundaryParamsBuilder {
2063 nodeId: NodeId,
2064}
2065
2066impl GetRelayoutBoundaryParamsBuilder {
2067 pub fn build(self) -> GetRelayoutBoundaryParams {
2068 GetRelayoutBoundaryParams {
2069 nodeId: self.nodeId,
2070 }
2071 }
2072}
2073
2074#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2077#[serde(rename_all = "camelCase")]
2078pub struct GetRelayoutBoundaryReturns {
2079 nodeId: NodeId,
2081}
2082
2083impl GetRelayoutBoundaryReturns {
2084 pub fn builder(nodeId: NodeId) -> GetRelayoutBoundaryReturnsBuilder {
2085 GetRelayoutBoundaryReturnsBuilder {
2086 nodeId: nodeId,
2087 }
2088 }
2089 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2090}
2091
2092
2093pub struct GetRelayoutBoundaryReturnsBuilder {
2094 nodeId: NodeId,
2095}
2096
2097impl GetRelayoutBoundaryReturnsBuilder {
2098 pub fn build(self) -> GetRelayoutBoundaryReturns {
2099 GetRelayoutBoundaryReturns {
2100 nodeId: self.nodeId,
2101 }
2102 }
2103}
2104
2105impl GetRelayoutBoundaryParams { pub const METHOD: &'static str = "DOM.getRelayoutBoundary"; }
2106
2107impl<'a> crate::CdpCommand<'a> for GetRelayoutBoundaryParams {
2108 const METHOD: &'static str = "DOM.getRelayoutBoundary";
2109 type Response = GetRelayoutBoundaryReturns;
2110}
2111
2112#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2116#[serde(rename_all = "camelCase")]
2117pub struct GetSearchResultsParams<'a> {
2118 searchId: Cow<'a, str>,
2120 fromIndex: u64,
2122 toIndex: u64,
2124}
2125
2126impl<'a> GetSearchResultsParams<'a> {
2127 pub fn builder(searchId: impl Into<Cow<'a, str>>, fromIndex: u64, toIndex: u64) -> GetSearchResultsParamsBuilder<'a> {
2128 GetSearchResultsParamsBuilder {
2129 searchId: searchId.into(),
2130 fromIndex: fromIndex,
2131 toIndex: toIndex,
2132 }
2133 }
2134 pub fn searchId(&self) -> &str { self.searchId.as_ref() }
2135 pub fn fromIndex(&self) -> u64 { self.fromIndex }
2136 pub fn toIndex(&self) -> u64 { self.toIndex }
2137}
2138
2139
2140pub struct GetSearchResultsParamsBuilder<'a> {
2141 searchId: Cow<'a, str>,
2142 fromIndex: u64,
2143 toIndex: u64,
2144}
2145
2146impl<'a> GetSearchResultsParamsBuilder<'a> {
2147 pub fn build(self) -> GetSearchResultsParams<'a> {
2148 GetSearchResultsParams {
2149 searchId: self.searchId,
2150 fromIndex: self.fromIndex,
2151 toIndex: self.toIndex,
2152 }
2153 }
2154}
2155
2156#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2160#[serde(rename_all = "camelCase")]
2161pub struct GetSearchResultsReturns {
2162 nodeIds: Vec<NodeId>,
2164}
2165
2166impl GetSearchResultsReturns {
2167 pub fn builder(nodeIds: Vec<NodeId>) -> GetSearchResultsReturnsBuilder {
2168 GetSearchResultsReturnsBuilder {
2169 nodeIds: nodeIds,
2170 }
2171 }
2172 pub fn nodeIds(&self) -> &[NodeId] { &self.nodeIds }
2173}
2174
2175
2176pub struct GetSearchResultsReturnsBuilder {
2177 nodeIds: Vec<NodeId>,
2178}
2179
2180impl GetSearchResultsReturnsBuilder {
2181 pub fn build(self) -> GetSearchResultsReturns {
2182 GetSearchResultsReturns {
2183 nodeIds: self.nodeIds,
2184 }
2185 }
2186}
2187
2188impl<'a> GetSearchResultsParams<'a> { pub const METHOD: &'static str = "DOM.getSearchResults"; }
2189
2190impl<'a> crate::CdpCommand<'a> for GetSearchResultsParams<'a> {
2191 const METHOD: &'static str = "DOM.getSearchResults";
2192 type Response = GetSearchResultsReturns;
2193}
2194
2195#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2196pub struct HideHighlightParams {}
2197
2198impl HideHighlightParams { pub const METHOD: &'static str = "DOM.hideHighlight"; }
2199
2200impl<'a> crate::CdpCommand<'a> for HideHighlightParams {
2201 const METHOD: &'static str = "DOM.hideHighlight";
2202 type Response = crate::EmptyReturns;
2203}
2204
2205#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2206pub struct HighlightNodeParams {}
2207
2208impl HighlightNodeParams { pub const METHOD: &'static str = "DOM.highlightNode"; }
2209
2210impl<'a> crate::CdpCommand<'a> for HighlightNodeParams {
2211 const METHOD: &'static str = "DOM.highlightNode";
2212 type Response = crate::EmptyReturns;
2213}
2214
2215#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2216pub struct HighlightRectParams {}
2217
2218impl HighlightRectParams { pub const METHOD: &'static str = "DOM.highlightRect"; }
2219
2220impl<'a> crate::CdpCommand<'a> for HighlightRectParams {
2221 const METHOD: &'static str = "DOM.highlightRect";
2222 type Response = crate::EmptyReturns;
2223}
2224
2225#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2226pub struct MarkUndoableStateParams {}
2227
2228impl MarkUndoableStateParams { pub const METHOD: &'static str = "DOM.markUndoableState"; }
2229
2230impl<'a> crate::CdpCommand<'a> for MarkUndoableStateParams {
2231 const METHOD: &'static str = "DOM.markUndoableState";
2232 type Response = crate::EmptyReturns;
2233}
2234
2235#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2238#[serde(rename_all = "camelCase")]
2239pub struct MoveToParams {
2240 nodeId: NodeId,
2242 targetNodeId: NodeId,
2244 #[serde(skip_serializing_if = "Option::is_none")]
2247 insertBeforeNodeId: Option<NodeId>,
2248}
2249
2250impl MoveToParams {
2251 pub fn builder(nodeId: NodeId, targetNodeId: NodeId) -> MoveToParamsBuilder {
2252 MoveToParamsBuilder {
2253 nodeId: nodeId,
2254 targetNodeId: targetNodeId,
2255 insertBeforeNodeId: None,
2256 }
2257 }
2258 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2259 pub fn targetNodeId(&self) -> &NodeId { &self.targetNodeId }
2260 pub fn insertBeforeNodeId(&self) -> Option<&NodeId> { self.insertBeforeNodeId.as_ref() }
2261}
2262
2263
2264pub struct MoveToParamsBuilder {
2265 nodeId: NodeId,
2266 targetNodeId: NodeId,
2267 insertBeforeNodeId: Option<NodeId>,
2268}
2269
2270impl MoveToParamsBuilder {
2271 pub fn insertBeforeNodeId(mut self, insertBeforeNodeId: NodeId) -> Self { self.insertBeforeNodeId = Some(insertBeforeNodeId); self }
2274 pub fn build(self) -> MoveToParams {
2275 MoveToParams {
2276 nodeId: self.nodeId,
2277 targetNodeId: self.targetNodeId,
2278 insertBeforeNodeId: self.insertBeforeNodeId,
2279 }
2280 }
2281}
2282
2283#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2286#[serde(rename_all = "camelCase")]
2287pub struct MoveToReturns {
2288 nodeId: NodeId,
2290}
2291
2292impl MoveToReturns {
2293 pub fn builder(nodeId: NodeId) -> MoveToReturnsBuilder {
2294 MoveToReturnsBuilder {
2295 nodeId: nodeId,
2296 }
2297 }
2298 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2299}
2300
2301
2302pub struct MoveToReturnsBuilder {
2303 nodeId: NodeId,
2304}
2305
2306impl MoveToReturnsBuilder {
2307 pub fn build(self) -> MoveToReturns {
2308 MoveToReturns {
2309 nodeId: self.nodeId,
2310 }
2311 }
2312}
2313
2314impl MoveToParams { pub const METHOD: &'static str = "DOM.moveTo"; }
2315
2316impl<'a> crate::CdpCommand<'a> for MoveToParams {
2317 const METHOD: &'static str = "DOM.moveTo";
2318 type Response = MoveToReturns;
2319}
2320
2321#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2325#[serde(rename_all = "camelCase")]
2326pub struct PerformSearchParams<'a> {
2327 query: Cow<'a, str>,
2329 #[serde(skip_serializing_if = "Option::is_none")]
2331 includeUserAgentShadowDOM: Option<bool>,
2332}
2333
2334impl<'a> PerformSearchParams<'a> {
2335 pub fn builder(query: impl Into<Cow<'a, str>>) -> PerformSearchParamsBuilder<'a> {
2336 PerformSearchParamsBuilder {
2337 query: query.into(),
2338 includeUserAgentShadowDOM: None,
2339 }
2340 }
2341 pub fn query(&self) -> &str { self.query.as_ref() }
2342 pub fn includeUserAgentShadowDOM(&self) -> Option<bool> { self.includeUserAgentShadowDOM }
2343}
2344
2345
2346pub struct PerformSearchParamsBuilder<'a> {
2347 query: Cow<'a, str>,
2348 includeUserAgentShadowDOM: Option<bool>,
2349}
2350
2351impl<'a> PerformSearchParamsBuilder<'a> {
2352 pub fn includeUserAgentShadowDOM(mut self, includeUserAgentShadowDOM: bool) -> Self { self.includeUserAgentShadowDOM = Some(includeUserAgentShadowDOM); self }
2354 pub fn build(self) -> PerformSearchParams<'a> {
2355 PerformSearchParams {
2356 query: self.query,
2357 includeUserAgentShadowDOM: self.includeUserAgentShadowDOM,
2358 }
2359 }
2360}
2361
2362#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2366#[serde(rename_all = "camelCase")]
2367pub struct PerformSearchReturns<'a> {
2368 searchId: Cow<'a, str>,
2370 resultCount: u64,
2372}
2373
2374impl<'a> PerformSearchReturns<'a> {
2375 pub fn builder(searchId: impl Into<Cow<'a, str>>, resultCount: u64) -> PerformSearchReturnsBuilder<'a> {
2376 PerformSearchReturnsBuilder {
2377 searchId: searchId.into(),
2378 resultCount: resultCount,
2379 }
2380 }
2381 pub fn searchId(&self) -> &str { self.searchId.as_ref() }
2382 pub fn resultCount(&self) -> u64 { self.resultCount }
2383}
2384
2385
2386pub struct PerformSearchReturnsBuilder<'a> {
2387 searchId: Cow<'a, str>,
2388 resultCount: u64,
2389}
2390
2391impl<'a> PerformSearchReturnsBuilder<'a> {
2392 pub fn build(self) -> PerformSearchReturns<'a> {
2393 PerformSearchReturns {
2394 searchId: self.searchId,
2395 resultCount: self.resultCount,
2396 }
2397 }
2398}
2399
2400impl<'a> PerformSearchParams<'a> { pub const METHOD: &'static str = "DOM.performSearch"; }
2401
2402impl<'a> crate::CdpCommand<'a> for PerformSearchParams<'a> {
2403 const METHOD: &'static str = "DOM.performSearch";
2404 type Response = PerformSearchReturns<'a>;
2405}
2406
2407#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2410#[serde(rename_all = "camelCase")]
2411pub struct PushNodeByPathToFrontendParams<'a> {
2412 path: Cow<'a, str>,
2414}
2415
2416impl<'a> PushNodeByPathToFrontendParams<'a> {
2417 pub fn builder(path: impl Into<Cow<'a, str>>) -> PushNodeByPathToFrontendParamsBuilder<'a> {
2418 PushNodeByPathToFrontendParamsBuilder {
2419 path: path.into(),
2420 }
2421 }
2422 pub fn path(&self) -> &str { self.path.as_ref() }
2423}
2424
2425
2426pub struct PushNodeByPathToFrontendParamsBuilder<'a> {
2427 path: Cow<'a, str>,
2428}
2429
2430impl<'a> PushNodeByPathToFrontendParamsBuilder<'a> {
2431 pub fn build(self) -> PushNodeByPathToFrontendParams<'a> {
2432 PushNodeByPathToFrontendParams {
2433 path: self.path,
2434 }
2435 }
2436}
2437
2438#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2441#[serde(rename_all = "camelCase")]
2442pub struct PushNodeByPathToFrontendReturns {
2443 nodeId: NodeId,
2445}
2446
2447impl PushNodeByPathToFrontendReturns {
2448 pub fn builder(nodeId: NodeId) -> PushNodeByPathToFrontendReturnsBuilder {
2449 PushNodeByPathToFrontendReturnsBuilder {
2450 nodeId: nodeId,
2451 }
2452 }
2453 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2454}
2455
2456
2457pub struct PushNodeByPathToFrontendReturnsBuilder {
2458 nodeId: NodeId,
2459}
2460
2461impl PushNodeByPathToFrontendReturnsBuilder {
2462 pub fn build(self) -> PushNodeByPathToFrontendReturns {
2463 PushNodeByPathToFrontendReturns {
2464 nodeId: self.nodeId,
2465 }
2466 }
2467}
2468
2469impl<'a> PushNodeByPathToFrontendParams<'a> { pub const METHOD: &'static str = "DOM.pushNodeByPathToFrontend"; }
2470
2471impl<'a> crate::CdpCommand<'a> for PushNodeByPathToFrontendParams<'a> {
2472 const METHOD: &'static str = "DOM.pushNodeByPathToFrontend";
2473 type Response = PushNodeByPathToFrontendReturns;
2474}
2475
2476#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2479#[serde(rename_all = "camelCase")]
2480pub struct PushNodesByBackendIdsToFrontendParams {
2481 backendNodeIds: Vec<BackendNodeId>,
2483}
2484
2485impl PushNodesByBackendIdsToFrontendParams {
2486 pub fn builder(backendNodeIds: Vec<BackendNodeId>) -> PushNodesByBackendIdsToFrontendParamsBuilder {
2487 PushNodesByBackendIdsToFrontendParamsBuilder {
2488 backendNodeIds: backendNodeIds,
2489 }
2490 }
2491 pub fn backendNodeIds(&self) -> &[BackendNodeId] { &self.backendNodeIds }
2492}
2493
2494
2495pub struct PushNodesByBackendIdsToFrontendParamsBuilder {
2496 backendNodeIds: Vec<BackendNodeId>,
2497}
2498
2499impl PushNodesByBackendIdsToFrontendParamsBuilder {
2500 pub fn build(self) -> PushNodesByBackendIdsToFrontendParams {
2501 PushNodesByBackendIdsToFrontendParams {
2502 backendNodeIds: self.backendNodeIds,
2503 }
2504 }
2505}
2506
2507#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2510#[serde(rename_all = "camelCase")]
2511pub struct PushNodesByBackendIdsToFrontendReturns {
2512 nodeIds: Vec<NodeId>,
2515}
2516
2517impl PushNodesByBackendIdsToFrontendReturns {
2518 pub fn builder(nodeIds: Vec<NodeId>) -> PushNodesByBackendIdsToFrontendReturnsBuilder {
2519 PushNodesByBackendIdsToFrontendReturnsBuilder {
2520 nodeIds: nodeIds,
2521 }
2522 }
2523 pub fn nodeIds(&self) -> &[NodeId] { &self.nodeIds }
2524}
2525
2526
2527pub struct PushNodesByBackendIdsToFrontendReturnsBuilder {
2528 nodeIds: Vec<NodeId>,
2529}
2530
2531impl PushNodesByBackendIdsToFrontendReturnsBuilder {
2532 pub fn build(self) -> PushNodesByBackendIdsToFrontendReturns {
2533 PushNodesByBackendIdsToFrontendReturns {
2534 nodeIds: self.nodeIds,
2535 }
2536 }
2537}
2538
2539impl PushNodesByBackendIdsToFrontendParams { pub const METHOD: &'static str = "DOM.pushNodesByBackendIdsToFrontend"; }
2540
2541impl<'a> crate::CdpCommand<'a> for PushNodesByBackendIdsToFrontendParams {
2542 const METHOD: &'static str = "DOM.pushNodesByBackendIdsToFrontend";
2543 type Response = PushNodesByBackendIdsToFrontendReturns;
2544}
2545
2546#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2549#[serde(rename_all = "camelCase")]
2550pub struct QuerySelectorParams<'a> {
2551 nodeId: NodeId,
2553 selector: Cow<'a, str>,
2555}
2556
2557impl<'a> QuerySelectorParams<'a> {
2558 pub fn builder(nodeId: NodeId, selector: impl Into<Cow<'a, str>>) -> QuerySelectorParamsBuilder<'a> {
2559 QuerySelectorParamsBuilder {
2560 nodeId: nodeId,
2561 selector: selector.into(),
2562 }
2563 }
2564 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2565 pub fn selector(&self) -> &str { self.selector.as_ref() }
2566}
2567
2568
2569pub struct QuerySelectorParamsBuilder<'a> {
2570 nodeId: NodeId,
2571 selector: Cow<'a, str>,
2572}
2573
2574impl<'a> QuerySelectorParamsBuilder<'a> {
2575 pub fn build(self) -> QuerySelectorParams<'a> {
2576 QuerySelectorParams {
2577 nodeId: self.nodeId,
2578 selector: self.selector,
2579 }
2580 }
2581}
2582
2583#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2586#[serde(rename_all = "camelCase")]
2587pub struct QuerySelectorReturns {
2588 nodeId: NodeId,
2590}
2591
2592impl QuerySelectorReturns {
2593 pub fn builder(nodeId: NodeId) -> QuerySelectorReturnsBuilder {
2594 QuerySelectorReturnsBuilder {
2595 nodeId: nodeId,
2596 }
2597 }
2598 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2599}
2600
2601
2602pub struct QuerySelectorReturnsBuilder {
2603 nodeId: NodeId,
2604}
2605
2606impl QuerySelectorReturnsBuilder {
2607 pub fn build(self) -> QuerySelectorReturns {
2608 QuerySelectorReturns {
2609 nodeId: self.nodeId,
2610 }
2611 }
2612}
2613
2614impl<'a> QuerySelectorParams<'a> { pub const METHOD: &'static str = "DOM.querySelector"; }
2615
2616impl<'a> crate::CdpCommand<'a> for QuerySelectorParams<'a> {
2617 const METHOD: &'static str = "DOM.querySelector";
2618 type Response = QuerySelectorReturns;
2619}
2620
2621#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2624#[serde(rename_all = "camelCase")]
2625pub struct QuerySelectorAllParams<'a> {
2626 nodeId: NodeId,
2628 selector: Cow<'a, str>,
2630}
2631
2632impl<'a> QuerySelectorAllParams<'a> {
2633 pub fn builder(nodeId: NodeId, selector: impl Into<Cow<'a, str>>) -> QuerySelectorAllParamsBuilder<'a> {
2634 QuerySelectorAllParamsBuilder {
2635 nodeId: nodeId,
2636 selector: selector.into(),
2637 }
2638 }
2639 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2640 pub fn selector(&self) -> &str { self.selector.as_ref() }
2641}
2642
2643
2644pub struct QuerySelectorAllParamsBuilder<'a> {
2645 nodeId: NodeId,
2646 selector: Cow<'a, str>,
2647}
2648
2649impl<'a> QuerySelectorAllParamsBuilder<'a> {
2650 pub fn build(self) -> QuerySelectorAllParams<'a> {
2651 QuerySelectorAllParams {
2652 nodeId: self.nodeId,
2653 selector: self.selector,
2654 }
2655 }
2656}
2657
2658#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2661#[serde(rename_all = "camelCase")]
2662pub struct QuerySelectorAllReturns {
2663 nodeIds: Vec<NodeId>,
2665}
2666
2667impl QuerySelectorAllReturns {
2668 pub fn builder(nodeIds: Vec<NodeId>) -> QuerySelectorAllReturnsBuilder {
2669 QuerySelectorAllReturnsBuilder {
2670 nodeIds: nodeIds,
2671 }
2672 }
2673 pub fn nodeIds(&self) -> &[NodeId] { &self.nodeIds }
2674}
2675
2676
2677pub struct QuerySelectorAllReturnsBuilder {
2678 nodeIds: Vec<NodeId>,
2679}
2680
2681impl QuerySelectorAllReturnsBuilder {
2682 pub fn build(self) -> QuerySelectorAllReturns {
2683 QuerySelectorAllReturns {
2684 nodeIds: self.nodeIds,
2685 }
2686 }
2687}
2688
2689impl<'a> QuerySelectorAllParams<'a> { pub const METHOD: &'static str = "DOM.querySelectorAll"; }
2690
2691impl<'a> crate::CdpCommand<'a> for QuerySelectorAllParams<'a> {
2692 const METHOD: &'static str = "DOM.querySelectorAll";
2693 type Response = QuerySelectorAllReturns;
2694}
2695
2696#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2701#[serde(rename_all = "camelCase")]
2702pub struct GetTopLayerElementsReturns {
2703 nodeIds: Vec<NodeId>,
2705}
2706
2707impl GetTopLayerElementsReturns {
2708 pub fn builder(nodeIds: Vec<NodeId>) -> GetTopLayerElementsReturnsBuilder {
2709 GetTopLayerElementsReturnsBuilder {
2710 nodeIds: nodeIds,
2711 }
2712 }
2713 pub fn nodeIds(&self) -> &[NodeId] { &self.nodeIds }
2714}
2715
2716
2717pub struct GetTopLayerElementsReturnsBuilder {
2718 nodeIds: Vec<NodeId>,
2719}
2720
2721impl GetTopLayerElementsReturnsBuilder {
2722 pub fn build(self) -> GetTopLayerElementsReturns {
2723 GetTopLayerElementsReturns {
2724 nodeIds: self.nodeIds,
2725 }
2726 }
2727}
2728
2729#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2730pub struct GetTopLayerElementsParams {}
2731
2732impl GetTopLayerElementsParams { pub const METHOD: &'static str = "DOM.getTopLayerElements"; }
2733
2734impl<'a> crate::CdpCommand<'a> for GetTopLayerElementsParams {
2735 const METHOD: &'static str = "DOM.getTopLayerElements";
2736 type Response = GetTopLayerElementsReturns;
2737}
2738
2739#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2742#[serde(rename_all = "camelCase")]
2743pub struct GetElementByRelationParams<'a> {
2744 nodeId: NodeId,
2746 relation: Cow<'a, str>,
2748}
2749
2750impl<'a> GetElementByRelationParams<'a> {
2751 pub fn builder(nodeId: NodeId, relation: impl Into<Cow<'a, str>>) -> GetElementByRelationParamsBuilder<'a> {
2752 GetElementByRelationParamsBuilder {
2753 nodeId: nodeId,
2754 relation: relation.into(),
2755 }
2756 }
2757 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2758 pub fn relation(&self) -> &str { self.relation.as_ref() }
2759}
2760
2761
2762pub struct GetElementByRelationParamsBuilder<'a> {
2763 nodeId: NodeId,
2764 relation: Cow<'a, str>,
2765}
2766
2767impl<'a> GetElementByRelationParamsBuilder<'a> {
2768 pub fn build(self) -> GetElementByRelationParams<'a> {
2769 GetElementByRelationParams {
2770 nodeId: self.nodeId,
2771 relation: self.relation,
2772 }
2773 }
2774}
2775
2776#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2779#[serde(rename_all = "camelCase")]
2780pub struct GetElementByRelationReturns {
2781 nodeId: NodeId,
2783}
2784
2785impl GetElementByRelationReturns {
2786 pub fn builder(nodeId: NodeId) -> GetElementByRelationReturnsBuilder {
2787 GetElementByRelationReturnsBuilder {
2788 nodeId: nodeId,
2789 }
2790 }
2791 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2792}
2793
2794
2795pub struct GetElementByRelationReturnsBuilder {
2796 nodeId: NodeId,
2797}
2798
2799impl GetElementByRelationReturnsBuilder {
2800 pub fn build(self) -> GetElementByRelationReturns {
2801 GetElementByRelationReturns {
2802 nodeId: self.nodeId,
2803 }
2804 }
2805}
2806
2807impl<'a> GetElementByRelationParams<'a> { pub const METHOD: &'static str = "DOM.getElementByRelation"; }
2808
2809impl<'a> crate::CdpCommand<'a> for GetElementByRelationParams<'a> {
2810 const METHOD: &'static str = "DOM.getElementByRelation";
2811 type Response = GetElementByRelationReturns;
2812}
2813
2814#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2815pub struct RedoParams {}
2816
2817impl RedoParams { pub const METHOD: &'static str = "DOM.redo"; }
2818
2819impl<'a> crate::CdpCommand<'a> for RedoParams {
2820 const METHOD: &'static str = "DOM.redo";
2821 type Response = crate::EmptyReturns;
2822}
2823
2824#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2827#[serde(rename_all = "camelCase")]
2828pub struct RemoveAttributeParams<'a> {
2829 nodeId: NodeId,
2831 name: Cow<'a, str>,
2833}
2834
2835impl<'a> RemoveAttributeParams<'a> {
2836 pub fn builder(nodeId: NodeId, name: impl Into<Cow<'a, str>>) -> RemoveAttributeParamsBuilder<'a> {
2837 RemoveAttributeParamsBuilder {
2838 nodeId: nodeId,
2839 name: name.into(),
2840 }
2841 }
2842 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2843 pub fn name(&self) -> &str { self.name.as_ref() }
2844}
2845
2846
2847pub struct RemoveAttributeParamsBuilder<'a> {
2848 nodeId: NodeId,
2849 name: Cow<'a, str>,
2850}
2851
2852impl<'a> RemoveAttributeParamsBuilder<'a> {
2853 pub fn build(self) -> RemoveAttributeParams<'a> {
2854 RemoveAttributeParams {
2855 nodeId: self.nodeId,
2856 name: self.name,
2857 }
2858 }
2859}
2860
2861impl<'a> RemoveAttributeParams<'a> { pub const METHOD: &'static str = "DOM.removeAttribute"; }
2862
2863impl<'a> crate::CdpCommand<'a> for RemoveAttributeParams<'a> {
2864 const METHOD: &'static str = "DOM.removeAttribute";
2865 type Response = crate::EmptyReturns;
2866}
2867
2868#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2871#[serde(rename_all = "camelCase")]
2872pub struct RemoveNodeParams {
2873 nodeId: NodeId,
2875}
2876
2877impl RemoveNodeParams {
2878 pub fn builder(nodeId: NodeId) -> RemoveNodeParamsBuilder {
2879 RemoveNodeParamsBuilder {
2880 nodeId: nodeId,
2881 }
2882 }
2883 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2884}
2885
2886
2887pub struct RemoveNodeParamsBuilder {
2888 nodeId: NodeId,
2889}
2890
2891impl RemoveNodeParamsBuilder {
2892 pub fn build(self) -> RemoveNodeParams {
2893 RemoveNodeParams {
2894 nodeId: self.nodeId,
2895 }
2896 }
2897}
2898
2899impl RemoveNodeParams { pub const METHOD: &'static str = "DOM.removeNode"; }
2900
2901impl<'a> crate::CdpCommand<'a> for RemoveNodeParams {
2902 const METHOD: &'static str = "DOM.removeNode";
2903 type Response = crate::EmptyReturns;
2904}
2905
2906#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2911#[serde(rename_all = "camelCase")]
2912pub struct RequestChildNodesParams {
2913 nodeId: NodeId,
2915 #[serde(skip_serializing_if = "Option::is_none")]
2918 depth: Option<i64>,
2919 #[serde(skip_serializing_if = "Option::is_none")]
2922 pierce: Option<bool>,
2923}
2924
2925impl RequestChildNodesParams {
2926 pub fn builder(nodeId: NodeId) -> RequestChildNodesParamsBuilder {
2927 RequestChildNodesParamsBuilder {
2928 nodeId: nodeId,
2929 depth: None,
2930 pierce: None,
2931 }
2932 }
2933 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
2934 pub fn depth(&self) -> Option<i64> { self.depth }
2935 pub fn pierce(&self) -> Option<bool> { self.pierce }
2936}
2937
2938
2939pub struct RequestChildNodesParamsBuilder {
2940 nodeId: NodeId,
2941 depth: Option<i64>,
2942 pierce: Option<bool>,
2943}
2944
2945impl RequestChildNodesParamsBuilder {
2946 pub fn depth(mut self, depth: i64) -> Self { self.depth = Some(depth); self }
2949 pub fn pierce(mut self, pierce: bool) -> Self { self.pierce = Some(pierce); self }
2952 pub fn build(self) -> RequestChildNodesParams {
2953 RequestChildNodesParams {
2954 nodeId: self.nodeId,
2955 depth: self.depth,
2956 pierce: self.pierce,
2957 }
2958 }
2959}
2960
2961impl RequestChildNodesParams { pub const METHOD: &'static str = "DOM.requestChildNodes"; }
2962
2963impl<'a> crate::CdpCommand<'a> for RequestChildNodesParams {
2964 const METHOD: &'static str = "DOM.requestChildNodes";
2965 type Response = crate::EmptyReturns;
2966}
2967
2968#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2973#[serde(rename_all = "camelCase")]
2974pub struct RequestNodeParams<'a> {
2975 objectId: crate::runtime::RemoteObjectId<'a>,
2977}
2978
2979impl<'a> RequestNodeParams<'a> {
2980 pub fn builder(objectId: crate::runtime::RemoteObjectId<'a>) -> RequestNodeParamsBuilder<'a> {
2981 RequestNodeParamsBuilder {
2982 objectId: objectId,
2983 }
2984 }
2985 pub fn objectId(&self) -> &crate::runtime::RemoteObjectId<'a> { &self.objectId }
2986}
2987
2988
2989pub struct RequestNodeParamsBuilder<'a> {
2990 objectId: crate::runtime::RemoteObjectId<'a>,
2991}
2992
2993impl<'a> RequestNodeParamsBuilder<'a> {
2994 pub fn build(self) -> RequestNodeParams<'a> {
2995 RequestNodeParams {
2996 objectId: self.objectId,
2997 }
2998 }
2999}
3000
3001#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3006#[serde(rename_all = "camelCase")]
3007pub struct RequestNodeReturns {
3008 nodeId: NodeId,
3010}
3011
3012impl RequestNodeReturns {
3013 pub fn builder(nodeId: NodeId) -> RequestNodeReturnsBuilder {
3014 RequestNodeReturnsBuilder {
3015 nodeId: nodeId,
3016 }
3017 }
3018 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3019}
3020
3021
3022pub struct RequestNodeReturnsBuilder {
3023 nodeId: NodeId,
3024}
3025
3026impl RequestNodeReturnsBuilder {
3027 pub fn build(self) -> RequestNodeReturns {
3028 RequestNodeReturns {
3029 nodeId: self.nodeId,
3030 }
3031 }
3032}
3033
3034impl<'a> RequestNodeParams<'a> { pub const METHOD: &'static str = "DOM.requestNode"; }
3035
3036impl<'a> crate::CdpCommand<'a> for RequestNodeParams<'a> {
3037 const METHOD: &'static str = "DOM.requestNode";
3038 type Response = RequestNodeReturns;
3039}
3040
3041#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3044#[serde(rename_all = "camelCase")]
3045pub struct ResolveNodeParams<'a> {
3046 #[serde(skip_serializing_if = "Option::is_none")]
3048 nodeId: Option<NodeId>,
3049 #[serde(skip_serializing_if = "Option::is_none")]
3051 backendNodeId: Option<crate::dom::BackendNodeId>,
3052 #[serde(skip_serializing_if = "Option::is_none")]
3054 objectGroup: Option<Cow<'a, str>>,
3055 #[serde(skip_serializing_if = "Option::is_none")]
3057 executionContextId: Option<crate::runtime::ExecutionContextId>,
3058}
3059
3060impl<'a> ResolveNodeParams<'a> {
3061 pub fn builder() -> ResolveNodeParamsBuilder<'a> {
3062 ResolveNodeParamsBuilder {
3063 nodeId: None,
3064 backendNodeId: None,
3065 objectGroup: None,
3066 executionContextId: None,
3067 }
3068 }
3069 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
3070 pub fn backendNodeId(&self) -> Option<&crate::dom::BackendNodeId> { self.backendNodeId.as_ref() }
3071 pub fn objectGroup(&self) -> Option<&str> { self.objectGroup.as_deref() }
3072 pub fn executionContextId(&self) -> Option<&crate::runtime::ExecutionContextId> { self.executionContextId.as_ref() }
3073}
3074
3075#[derive(Default)]
3076pub struct ResolveNodeParamsBuilder<'a> {
3077 nodeId: Option<NodeId>,
3078 backendNodeId: Option<crate::dom::BackendNodeId>,
3079 objectGroup: Option<Cow<'a, str>>,
3080 executionContextId: Option<crate::runtime::ExecutionContextId>,
3081}
3082
3083impl<'a> ResolveNodeParamsBuilder<'a> {
3084 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
3086 pub fn backendNodeId(mut self, backendNodeId: crate::dom::BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
3088 pub fn objectGroup(mut self, objectGroup: impl Into<Cow<'a, str>>) -> Self { self.objectGroup = Some(objectGroup.into()); self }
3090 pub fn executionContextId(mut self, executionContextId: crate::runtime::ExecutionContextId) -> Self { self.executionContextId = Some(executionContextId); self }
3092 pub fn build(self) -> ResolveNodeParams<'a> {
3093 ResolveNodeParams {
3094 nodeId: self.nodeId,
3095 backendNodeId: self.backendNodeId,
3096 objectGroup: self.objectGroup,
3097 executionContextId: self.executionContextId,
3098 }
3099 }
3100}
3101
3102#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3105#[serde(rename_all = "camelCase")]
3106pub struct ResolveNodeReturns {
3107 object: crate::runtime::RemoteObject,
3109}
3110
3111impl ResolveNodeReturns {
3112 pub fn builder(object: crate::runtime::RemoteObject) -> ResolveNodeReturnsBuilder {
3113 ResolveNodeReturnsBuilder {
3114 object: object,
3115 }
3116 }
3117 pub fn object(&self) -> &crate::runtime::RemoteObject { &self.object }
3118}
3119
3120
3121pub struct ResolveNodeReturnsBuilder {
3122 object: crate::runtime::RemoteObject,
3123}
3124
3125impl ResolveNodeReturnsBuilder {
3126 pub fn build(self) -> ResolveNodeReturns {
3127 ResolveNodeReturns {
3128 object: self.object,
3129 }
3130 }
3131}
3132
3133impl<'a> ResolveNodeParams<'a> { pub const METHOD: &'static str = "DOM.resolveNode"; }
3134
3135impl<'a> crate::CdpCommand<'a> for ResolveNodeParams<'a> {
3136 const METHOD: &'static str = "DOM.resolveNode";
3137 type Response = ResolveNodeReturns;
3138}
3139
3140#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3143#[serde(rename_all = "camelCase")]
3144pub struct SetAttributeValueParams<'a> {
3145 nodeId: NodeId,
3147 name: Cow<'a, str>,
3149 value: Cow<'a, str>,
3151}
3152
3153impl<'a> SetAttributeValueParams<'a> {
3154 pub fn builder(nodeId: NodeId, name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> SetAttributeValueParamsBuilder<'a> {
3155 SetAttributeValueParamsBuilder {
3156 nodeId: nodeId,
3157 name: name.into(),
3158 value: value.into(),
3159 }
3160 }
3161 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3162 pub fn name(&self) -> &str { self.name.as_ref() }
3163 pub fn value(&self) -> &str { self.value.as_ref() }
3164}
3165
3166
3167pub struct SetAttributeValueParamsBuilder<'a> {
3168 nodeId: NodeId,
3169 name: Cow<'a, str>,
3170 value: Cow<'a, str>,
3171}
3172
3173impl<'a> SetAttributeValueParamsBuilder<'a> {
3174 pub fn build(self) -> SetAttributeValueParams<'a> {
3175 SetAttributeValueParams {
3176 nodeId: self.nodeId,
3177 name: self.name,
3178 value: self.value,
3179 }
3180 }
3181}
3182
3183impl<'a> SetAttributeValueParams<'a> { pub const METHOD: &'static str = "DOM.setAttributeValue"; }
3184
3185impl<'a> crate::CdpCommand<'a> for SetAttributeValueParams<'a> {
3186 const METHOD: &'static str = "DOM.setAttributeValue";
3187 type Response = crate::EmptyReturns;
3188}
3189
3190#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3194#[serde(rename_all = "camelCase")]
3195pub struct SetAttributesAsTextParams<'a> {
3196 nodeId: NodeId,
3198 text: Cow<'a, str>,
3200 #[serde(skip_serializing_if = "Option::is_none")]
3203 name: Option<Cow<'a, str>>,
3204}
3205
3206impl<'a> SetAttributesAsTextParams<'a> {
3207 pub fn builder(nodeId: NodeId, text: impl Into<Cow<'a, str>>) -> SetAttributesAsTextParamsBuilder<'a> {
3208 SetAttributesAsTextParamsBuilder {
3209 nodeId: nodeId,
3210 text: text.into(),
3211 name: None,
3212 }
3213 }
3214 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3215 pub fn text(&self) -> &str { self.text.as_ref() }
3216 pub fn name(&self) -> Option<&str> { self.name.as_deref() }
3217}
3218
3219
3220pub struct SetAttributesAsTextParamsBuilder<'a> {
3221 nodeId: NodeId,
3222 text: Cow<'a, str>,
3223 name: Option<Cow<'a, str>>,
3224}
3225
3226impl<'a> SetAttributesAsTextParamsBuilder<'a> {
3227 pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self { self.name = Some(name.into()); self }
3230 pub fn build(self) -> SetAttributesAsTextParams<'a> {
3231 SetAttributesAsTextParams {
3232 nodeId: self.nodeId,
3233 text: self.text,
3234 name: self.name,
3235 }
3236 }
3237}
3238
3239impl<'a> SetAttributesAsTextParams<'a> { pub const METHOD: &'static str = "DOM.setAttributesAsText"; }
3240
3241impl<'a> crate::CdpCommand<'a> for SetAttributesAsTextParams<'a> {
3242 const METHOD: &'static str = "DOM.setAttributesAsText";
3243 type Response = crate::EmptyReturns;
3244}
3245
3246#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3249#[serde(rename_all = "camelCase")]
3250pub struct SetFileInputFilesParams<'a> {
3251 files: Vec<Cow<'a, str>>,
3253 #[serde(skip_serializing_if = "Option::is_none")]
3255 nodeId: Option<NodeId>,
3256 #[serde(skip_serializing_if = "Option::is_none")]
3258 backendNodeId: Option<BackendNodeId>,
3259 #[serde(skip_serializing_if = "Option::is_none")]
3261 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
3262}
3263
3264impl<'a> SetFileInputFilesParams<'a> {
3265 pub fn builder(files: Vec<Cow<'a, str>>) -> SetFileInputFilesParamsBuilder<'a> {
3266 SetFileInputFilesParamsBuilder {
3267 files: files,
3268 nodeId: None,
3269 backendNodeId: None,
3270 objectId: None,
3271 }
3272 }
3273 pub fn files(&self) -> &[Cow<'a, str>] { &self.files }
3274 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
3275 pub fn backendNodeId(&self) -> Option<&BackendNodeId> { self.backendNodeId.as_ref() }
3276 pub fn objectId(&self) -> Option<&crate::runtime::RemoteObjectId<'a>> { self.objectId.as_ref() }
3277}
3278
3279
3280pub struct SetFileInputFilesParamsBuilder<'a> {
3281 files: Vec<Cow<'a, str>>,
3282 nodeId: Option<NodeId>,
3283 backendNodeId: Option<BackendNodeId>,
3284 objectId: Option<crate::runtime::RemoteObjectId<'a>>,
3285}
3286
3287impl<'a> SetFileInputFilesParamsBuilder<'a> {
3288 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
3290 pub fn backendNodeId(mut self, backendNodeId: BackendNodeId) -> Self { self.backendNodeId = Some(backendNodeId); self }
3292 pub fn objectId(mut self, objectId: crate::runtime::RemoteObjectId<'a>) -> Self { self.objectId = Some(objectId); self }
3294 pub fn build(self) -> SetFileInputFilesParams<'a> {
3295 SetFileInputFilesParams {
3296 files: self.files,
3297 nodeId: self.nodeId,
3298 backendNodeId: self.backendNodeId,
3299 objectId: self.objectId,
3300 }
3301 }
3302}
3303
3304impl<'a> SetFileInputFilesParams<'a> { pub const METHOD: &'static str = "DOM.setFileInputFiles"; }
3305
3306impl<'a> crate::CdpCommand<'a> for SetFileInputFilesParams<'a> {
3307 const METHOD: &'static str = "DOM.setFileInputFiles";
3308 type Response = crate::EmptyReturns;
3309}
3310
3311#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3314#[serde(rename_all = "camelCase")]
3315pub struct SetNodeStackTracesEnabledParams {
3316 enable: bool,
3318}
3319
3320impl SetNodeStackTracesEnabledParams {
3321 pub fn builder(enable: bool) -> SetNodeStackTracesEnabledParamsBuilder {
3322 SetNodeStackTracesEnabledParamsBuilder {
3323 enable: enable,
3324 }
3325 }
3326 pub fn enable(&self) -> bool { self.enable }
3327}
3328
3329
3330pub struct SetNodeStackTracesEnabledParamsBuilder {
3331 enable: bool,
3332}
3333
3334impl SetNodeStackTracesEnabledParamsBuilder {
3335 pub fn build(self) -> SetNodeStackTracesEnabledParams {
3336 SetNodeStackTracesEnabledParams {
3337 enable: self.enable,
3338 }
3339 }
3340}
3341
3342impl SetNodeStackTracesEnabledParams { pub const METHOD: &'static str = "DOM.setNodeStackTracesEnabled"; }
3343
3344impl<'a> crate::CdpCommand<'a> for SetNodeStackTracesEnabledParams {
3345 const METHOD: &'static str = "DOM.setNodeStackTracesEnabled";
3346 type Response = crate::EmptyReturns;
3347}
3348
3349#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3352#[serde(rename_all = "camelCase")]
3353pub struct GetNodeStackTracesParams {
3354 nodeId: NodeId,
3356}
3357
3358impl GetNodeStackTracesParams {
3359 pub fn builder(nodeId: NodeId) -> GetNodeStackTracesParamsBuilder {
3360 GetNodeStackTracesParamsBuilder {
3361 nodeId: nodeId,
3362 }
3363 }
3364 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3365}
3366
3367
3368pub struct GetNodeStackTracesParamsBuilder {
3369 nodeId: NodeId,
3370}
3371
3372impl GetNodeStackTracesParamsBuilder {
3373 pub fn build(self) -> GetNodeStackTracesParams {
3374 GetNodeStackTracesParams {
3375 nodeId: self.nodeId,
3376 }
3377 }
3378}
3379
3380#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3383#[serde(rename_all = "camelCase")]
3384pub struct GetNodeStackTracesReturns {
3385 #[serde(skip_serializing_if = "Option::is_none")]
3387 creation: Option<crate::runtime::StackTrace>,
3388}
3389
3390impl GetNodeStackTracesReturns {
3391 pub fn builder() -> GetNodeStackTracesReturnsBuilder {
3392 GetNodeStackTracesReturnsBuilder {
3393 creation: None,
3394 }
3395 }
3396 pub fn creation(&self) -> Option<&crate::runtime::StackTrace> { self.creation.as_ref() }
3397}
3398
3399#[derive(Default)]
3400pub struct GetNodeStackTracesReturnsBuilder {
3401 creation: Option<crate::runtime::StackTrace>,
3402}
3403
3404impl GetNodeStackTracesReturnsBuilder {
3405 pub fn creation(mut self, creation: crate::runtime::StackTrace) -> Self { self.creation = Some(creation); self }
3407 pub fn build(self) -> GetNodeStackTracesReturns {
3408 GetNodeStackTracesReturns {
3409 creation: self.creation,
3410 }
3411 }
3412}
3413
3414impl GetNodeStackTracesParams { pub const METHOD: &'static str = "DOM.getNodeStackTraces"; }
3415
3416impl<'a> crate::CdpCommand<'a> for GetNodeStackTracesParams {
3417 const METHOD: &'static str = "DOM.getNodeStackTraces";
3418 type Response = GetNodeStackTracesReturns;
3419}
3420
3421#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3425#[serde(rename_all = "camelCase")]
3426pub struct GetFileInfoParams<'a> {
3427 objectId: crate::runtime::RemoteObjectId<'a>,
3429}
3430
3431impl<'a> GetFileInfoParams<'a> {
3432 pub fn builder(objectId: crate::runtime::RemoteObjectId<'a>) -> GetFileInfoParamsBuilder<'a> {
3433 GetFileInfoParamsBuilder {
3434 objectId: objectId,
3435 }
3436 }
3437 pub fn objectId(&self) -> &crate::runtime::RemoteObjectId<'a> { &self.objectId }
3438}
3439
3440
3441pub struct GetFileInfoParamsBuilder<'a> {
3442 objectId: crate::runtime::RemoteObjectId<'a>,
3443}
3444
3445impl<'a> GetFileInfoParamsBuilder<'a> {
3446 pub fn build(self) -> GetFileInfoParams<'a> {
3447 GetFileInfoParams {
3448 objectId: self.objectId,
3449 }
3450 }
3451}
3452
3453#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3457#[serde(rename_all = "camelCase")]
3458pub struct GetFileInfoReturns<'a> {
3459 path: Cow<'a, str>,
3460}
3461
3462impl<'a> GetFileInfoReturns<'a> {
3463 pub fn builder(path: impl Into<Cow<'a, str>>) -> GetFileInfoReturnsBuilder<'a> {
3464 GetFileInfoReturnsBuilder {
3465 path: path.into(),
3466 }
3467 }
3468 pub fn path(&self) -> &str { self.path.as_ref() }
3469}
3470
3471
3472pub struct GetFileInfoReturnsBuilder<'a> {
3473 path: Cow<'a, str>,
3474}
3475
3476impl<'a> GetFileInfoReturnsBuilder<'a> {
3477 pub fn build(self) -> GetFileInfoReturns<'a> {
3478 GetFileInfoReturns {
3479 path: self.path,
3480 }
3481 }
3482}
3483
3484impl<'a> GetFileInfoParams<'a> { pub const METHOD: &'static str = "DOM.getFileInfo"; }
3485
3486impl<'a> crate::CdpCommand<'a> for GetFileInfoParams<'a> {
3487 const METHOD: &'static str = "DOM.getFileInfo";
3488 type Response = GetFileInfoReturns<'a>;
3489}
3490
3491#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3494#[serde(rename_all = "camelCase")]
3495pub struct GetDetachedDomNodesReturns<'a> {
3496 detachedNodes: Vec<DetachedElementInfo<'a>>,
3498}
3499
3500impl<'a> GetDetachedDomNodesReturns<'a> {
3501 pub fn builder(detachedNodes: Vec<DetachedElementInfo<'a>>) -> GetDetachedDomNodesReturnsBuilder<'a> {
3502 GetDetachedDomNodesReturnsBuilder {
3503 detachedNodes: detachedNodes,
3504 }
3505 }
3506 pub fn detachedNodes(&self) -> &[DetachedElementInfo<'a>] { &self.detachedNodes }
3507}
3508
3509
3510pub struct GetDetachedDomNodesReturnsBuilder<'a> {
3511 detachedNodes: Vec<DetachedElementInfo<'a>>,
3512}
3513
3514impl<'a> GetDetachedDomNodesReturnsBuilder<'a> {
3515 pub fn build(self) -> GetDetachedDomNodesReturns<'a> {
3516 GetDetachedDomNodesReturns {
3517 detachedNodes: self.detachedNodes,
3518 }
3519 }
3520}
3521
3522#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3523pub struct GetDetachedDomNodesParams {}
3524
3525impl GetDetachedDomNodesParams { pub const METHOD: &'static str = "DOM.getDetachedDomNodes"; }
3526
3527impl<'a> crate::CdpCommand<'a> for GetDetachedDomNodesParams {
3528 const METHOD: &'static str = "DOM.getDetachedDomNodes";
3529 type Response = GetDetachedDomNodesReturns<'a>;
3530}
3531
3532#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3536#[serde(rename_all = "camelCase")]
3537pub struct SetInspectedNodeParams {
3538 nodeId: NodeId,
3540}
3541
3542impl SetInspectedNodeParams {
3543 pub fn builder(nodeId: NodeId) -> SetInspectedNodeParamsBuilder {
3544 SetInspectedNodeParamsBuilder {
3545 nodeId: nodeId,
3546 }
3547 }
3548 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3549}
3550
3551
3552pub struct SetInspectedNodeParamsBuilder {
3553 nodeId: NodeId,
3554}
3555
3556impl SetInspectedNodeParamsBuilder {
3557 pub fn build(self) -> SetInspectedNodeParams {
3558 SetInspectedNodeParams {
3559 nodeId: self.nodeId,
3560 }
3561 }
3562}
3563
3564impl SetInspectedNodeParams { pub const METHOD: &'static str = "DOM.setInspectedNode"; }
3565
3566impl<'a> crate::CdpCommand<'a> for SetInspectedNodeParams {
3567 const METHOD: &'static str = "DOM.setInspectedNode";
3568 type Response = crate::EmptyReturns;
3569}
3570
3571#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3574#[serde(rename_all = "camelCase")]
3575pub struct SetNodeNameParams<'a> {
3576 nodeId: NodeId,
3578 name: Cow<'a, str>,
3580}
3581
3582impl<'a> SetNodeNameParams<'a> {
3583 pub fn builder(nodeId: NodeId, name: impl Into<Cow<'a, str>>) -> SetNodeNameParamsBuilder<'a> {
3584 SetNodeNameParamsBuilder {
3585 nodeId: nodeId,
3586 name: name.into(),
3587 }
3588 }
3589 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3590 pub fn name(&self) -> &str { self.name.as_ref() }
3591}
3592
3593
3594pub struct SetNodeNameParamsBuilder<'a> {
3595 nodeId: NodeId,
3596 name: Cow<'a, str>,
3597}
3598
3599impl<'a> SetNodeNameParamsBuilder<'a> {
3600 pub fn build(self) -> SetNodeNameParams<'a> {
3601 SetNodeNameParams {
3602 nodeId: self.nodeId,
3603 name: self.name,
3604 }
3605 }
3606}
3607
3608#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3611#[serde(rename_all = "camelCase")]
3612pub struct SetNodeNameReturns {
3613 nodeId: NodeId,
3615}
3616
3617impl SetNodeNameReturns {
3618 pub fn builder(nodeId: NodeId) -> SetNodeNameReturnsBuilder {
3619 SetNodeNameReturnsBuilder {
3620 nodeId: nodeId,
3621 }
3622 }
3623 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3624}
3625
3626
3627pub struct SetNodeNameReturnsBuilder {
3628 nodeId: NodeId,
3629}
3630
3631impl SetNodeNameReturnsBuilder {
3632 pub fn build(self) -> SetNodeNameReturns {
3633 SetNodeNameReturns {
3634 nodeId: self.nodeId,
3635 }
3636 }
3637}
3638
3639impl<'a> SetNodeNameParams<'a> { pub const METHOD: &'static str = "DOM.setNodeName"; }
3640
3641impl<'a> crate::CdpCommand<'a> for SetNodeNameParams<'a> {
3642 const METHOD: &'static str = "DOM.setNodeName";
3643 type Response = SetNodeNameReturns;
3644}
3645
3646#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3649#[serde(rename_all = "camelCase")]
3650pub struct SetNodeValueParams<'a> {
3651 nodeId: NodeId,
3653 value: Cow<'a, str>,
3655}
3656
3657impl<'a> SetNodeValueParams<'a> {
3658 pub fn builder(nodeId: NodeId, value: impl Into<Cow<'a, str>>) -> SetNodeValueParamsBuilder<'a> {
3659 SetNodeValueParamsBuilder {
3660 nodeId: nodeId,
3661 value: value.into(),
3662 }
3663 }
3664 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3665 pub fn value(&self) -> &str { self.value.as_ref() }
3666}
3667
3668
3669pub struct SetNodeValueParamsBuilder<'a> {
3670 nodeId: NodeId,
3671 value: Cow<'a, str>,
3672}
3673
3674impl<'a> SetNodeValueParamsBuilder<'a> {
3675 pub fn build(self) -> SetNodeValueParams<'a> {
3676 SetNodeValueParams {
3677 nodeId: self.nodeId,
3678 value: self.value,
3679 }
3680 }
3681}
3682
3683impl<'a> SetNodeValueParams<'a> { pub const METHOD: &'static str = "DOM.setNodeValue"; }
3684
3685impl<'a> crate::CdpCommand<'a> for SetNodeValueParams<'a> {
3686 const METHOD: &'static str = "DOM.setNodeValue";
3687 type Response = crate::EmptyReturns;
3688}
3689
3690#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3693#[serde(rename_all = "camelCase")]
3694pub struct SetOuterHTMLParams<'a> {
3695 nodeId: NodeId,
3697 outerHTML: Cow<'a, str>,
3699}
3700
3701impl<'a> SetOuterHTMLParams<'a> {
3702 pub fn builder(nodeId: NodeId, outerHTML: impl Into<Cow<'a, str>>) -> SetOuterHTMLParamsBuilder<'a> {
3703 SetOuterHTMLParamsBuilder {
3704 nodeId: nodeId,
3705 outerHTML: outerHTML.into(),
3706 }
3707 }
3708 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3709 pub fn outerHTML(&self) -> &str { self.outerHTML.as_ref() }
3710}
3711
3712
3713pub struct SetOuterHTMLParamsBuilder<'a> {
3714 nodeId: NodeId,
3715 outerHTML: Cow<'a, str>,
3716}
3717
3718impl<'a> SetOuterHTMLParamsBuilder<'a> {
3719 pub fn build(self) -> SetOuterHTMLParams<'a> {
3720 SetOuterHTMLParams {
3721 nodeId: self.nodeId,
3722 outerHTML: self.outerHTML,
3723 }
3724 }
3725}
3726
3727impl<'a> SetOuterHTMLParams<'a> { pub const METHOD: &'static str = "DOM.setOuterHTML"; }
3728
3729impl<'a> crate::CdpCommand<'a> for SetOuterHTMLParams<'a> {
3730 const METHOD: &'static str = "DOM.setOuterHTML";
3731 type Response = crate::EmptyReturns;
3732}
3733
3734#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3735pub struct UndoParams {}
3736
3737impl UndoParams { pub const METHOD: &'static str = "DOM.undo"; }
3738
3739impl<'a> crate::CdpCommand<'a> for UndoParams {
3740 const METHOD: &'static str = "DOM.undo";
3741 type Response = crate::EmptyReturns;
3742}
3743
3744#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3747#[serde(rename_all = "camelCase")]
3748pub struct GetFrameOwnerParams<'a> {
3749 frameId: crate::page::FrameId<'a>,
3750}
3751
3752impl<'a> GetFrameOwnerParams<'a> {
3753 pub fn builder(frameId: crate::page::FrameId<'a>) -> GetFrameOwnerParamsBuilder<'a> {
3754 GetFrameOwnerParamsBuilder {
3755 frameId: frameId,
3756 }
3757 }
3758 pub fn frameId(&self) -> &crate::page::FrameId<'a> { &self.frameId }
3759}
3760
3761
3762pub struct GetFrameOwnerParamsBuilder<'a> {
3763 frameId: crate::page::FrameId<'a>,
3764}
3765
3766impl<'a> GetFrameOwnerParamsBuilder<'a> {
3767 pub fn build(self) -> GetFrameOwnerParams<'a> {
3768 GetFrameOwnerParams {
3769 frameId: self.frameId,
3770 }
3771 }
3772}
3773
3774#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3777#[serde(rename_all = "camelCase")]
3778pub struct GetFrameOwnerReturns {
3779 backendNodeId: BackendNodeId,
3781 #[serde(skip_serializing_if = "Option::is_none")]
3783 nodeId: Option<NodeId>,
3784}
3785
3786impl GetFrameOwnerReturns {
3787 pub fn builder(backendNodeId: BackendNodeId) -> GetFrameOwnerReturnsBuilder {
3788 GetFrameOwnerReturnsBuilder {
3789 backendNodeId: backendNodeId,
3790 nodeId: None,
3791 }
3792 }
3793 pub fn backendNodeId(&self) -> &BackendNodeId { &self.backendNodeId }
3794 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
3795}
3796
3797
3798pub struct GetFrameOwnerReturnsBuilder {
3799 backendNodeId: BackendNodeId,
3800 nodeId: Option<NodeId>,
3801}
3802
3803impl GetFrameOwnerReturnsBuilder {
3804 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
3806 pub fn build(self) -> GetFrameOwnerReturns {
3807 GetFrameOwnerReturns {
3808 backendNodeId: self.backendNodeId,
3809 nodeId: self.nodeId,
3810 }
3811 }
3812}
3813
3814impl<'a> GetFrameOwnerParams<'a> { pub const METHOD: &'static str = "DOM.getFrameOwner"; }
3815
3816impl<'a> crate::CdpCommand<'a> for GetFrameOwnerParams<'a> {
3817 const METHOD: &'static str = "DOM.getFrameOwner";
3818 type Response = GetFrameOwnerReturns;
3819}
3820
3821#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3828#[serde(rename_all = "camelCase")]
3829pub struct GetContainerForNodeParams<'a> {
3830 nodeId: NodeId,
3831 #[serde(skip_serializing_if = "Option::is_none")]
3832 containerName: Option<Cow<'a, str>>,
3833 #[serde(skip_serializing_if = "Option::is_none")]
3834 physicalAxes: Option<PhysicalAxes>,
3835 #[serde(skip_serializing_if = "Option::is_none")]
3836 logicalAxes: Option<LogicalAxes>,
3837 #[serde(skip_serializing_if = "Option::is_none")]
3838 queriesScrollState: Option<bool>,
3839 #[serde(skip_serializing_if = "Option::is_none")]
3840 queriesAnchored: Option<bool>,
3841}
3842
3843impl<'a> GetContainerForNodeParams<'a> {
3844 pub fn builder(nodeId: NodeId) -> GetContainerForNodeParamsBuilder<'a> {
3845 GetContainerForNodeParamsBuilder {
3846 nodeId: nodeId,
3847 containerName: None,
3848 physicalAxes: None,
3849 logicalAxes: None,
3850 queriesScrollState: None,
3851 queriesAnchored: None,
3852 }
3853 }
3854 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3855 pub fn containerName(&self) -> Option<&str> { self.containerName.as_deref() }
3856 pub fn physicalAxes(&self) -> Option<&PhysicalAxes> { self.physicalAxes.as_ref() }
3857 pub fn logicalAxes(&self) -> Option<&LogicalAxes> { self.logicalAxes.as_ref() }
3858 pub fn queriesScrollState(&self) -> Option<bool> { self.queriesScrollState }
3859 pub fn queriesAnchored(&self) -> Option<bool> { self.queriesAnchored }
3860}
3861
3862
3863pub struct GetContainerForNodeParamsBuilder<'a> {
3864 nodeId: NodeId,
3865 containerName: Option<Cow<'a, str>>,
3866 physicalAxes: Option<PhysicalAxes>,
3867 logicalAxes: Option<LogicalAxes>,
3868 queriesScrollState: Option<bool>,
3869 queriesAnchored: Option<bool>,
3870}
3871
3872impl<'a> GetContainerForNodeParamsBuilder<'a> {
3873 pub fn containerName(mut self, containerName: impl Into<Cow<'a, str>>) -> Self { self.containerName = Some(containerName.into()); self }
3874 pub fn physicalAxes(mut self, physicalAxes: PhysicalAxes) -> Self { self.physicalAxes = Some(physicalAxes); self }
3875 pub fn logicalAxes(mut self, logicalAxes: LogicalAxes) -> Self { self.logicalAxes = Some(logicalAxes); self }
3876 pub fn queriesScrollState(mut self, queriesScrollState: bool) -> Self { self.queriesScrollState = Some(queriesScrollState); self }
3877 pub fn queriesAnchored(mut self, queriesAnchored: bool) -> Self { self.queriesAnchored = Some(queriesAnchored); self }
3878 pub fn build(self) -> GetContainerForNodeParams<'a> {
3879 GetContainerForNodeParams {
3880 nodeId: self.nodeId,
3881 containerName: self.containerName,
3882 physicalAxes: self.physicalAxes,
3883 logicalAxes: self.logicalAxes,
3884 queriesScrollState: self.queriesScrollState,
3885 queriesAnchored: self.queriesAnchored,
3886 }
3887 }
3888}
3889
3890#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3897#[serde(rename_all = "camelCase")]
3898pub struct GetContainerForNodeReturns {
3899 #[serde(skip_serializing_if = "Option::is_none")]
3901 nodeId: Option<NodeId>,
3902}
3903
3904impl GetContainerForNodeReturns {
3905 pub fn builder() -> GetContainerForNodeReturnsBuilder {
3906 GetContainerForNodeReturnsBuilder {
3907 nodeId: None,
3908 }
3909 }
3910 pub fn nodeId(&self) -> Option<&NodeId> { self.nodeId.as_ref() }
3911}
3912
3913#[derive(Default)]
3914pub struct GetContainerForNodeReturnsBuilder {
3915 nodeId: Option<NodeId>,
3916}
3917
3918impl GetContainerForNodeReturnsBuilder {
3919 pub fn nodeId(mut self, nodeId: NodeId) -> Self { self.nodeId = Some(nodeId); self }
3921 pub fn build(self) -> GetContainerForNodeReturns {
3922 GetContainerForNodeReturns {
3923 nodeId: self.nodeId,
3924 }
3925 }
3926}
3927
3928impl<'a> GetContainerForNodeParams<'a> { pub const METHOD: &'static str = "DOM.getContainerForNode"; }
3929
3930impl<'a> crate::CdpCommand<'a> for GetContainerForNodeParams<'a> {
3931 const METHOD: &'static str = "DOM.getContainerForNode";
3932 type Response = GetContainerForNodeReturns;
3933}
3934
3935#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3939#[serde(rename_all = "camelCase")]
3940pub struct GetQueryingDescendantsForContainerParams {
3941 nodeId: NodeId,
3943}
3944
3945impl GetQueryingDescendantsForContainerParams {
3946 pub fn builder(nodeId: NodeId) -> GetQueryingDescendantsForContainerParamsBuilder {
3947 GetQueryingDescendantsForContainerParamsBuilder {
3948 nodeId: nodeId,
3949 }
3950 }
3951 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
3952}
3953
3954
3955pub struct GetQueryingDescendantsForContainerParamsBuilder {
3956 nodeId: NodeId,
3957}
3958
3959impl GetQueryingDescendantsForContainerParamsBuilder {
3960 pub fn build(self) -> GetQueryingDescendantsForContainerParams {
3961 GetQueryingDescendantsForContainerParams {
3962 nodeId: self.nodeId,
3963 }
3964 }
3965}
3966
3967#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3971#[serde(rename_all = "camelCase")]
3972pub struct GetQueryingDescendantsForContainerReturns {
3973 nodeIds: Vec<NodeId>,
3975}
3976
3977impl GetQueryingDescendantsForContainerReturns {
3978 pub fn builder(nodeIds: Vec<NodeId>) -> GetQueryingDescendantsForContainerReturnsBuilder {
3979 GetQueryingDescendantsForContainerReturnsBuilder {
3980 nodeIds: nodeIds,
3981 }
3982 }
3983 pub fn nodeIds(&self) -> &[NodeId] { &self.nodeIds }
3984}
3985
3986
3987pub struct GetQueryingDescendantsForContainerReturnsBuilder {
3988 nodeIds: Vec<NodeId>,
3989}
3990
3991impl GetQueryingDescendantsForContainerReturnsBuilder {
3992 pub fn build(self) -> GetQueryingDescendantsForContainerReturns {
3993 GetQueryingDescendantsForContainerReturns {
3994 nodeIds: self.nodeIds,
3995 }
3996 }
3997}
3998
3999impl GetQueryingDescendantsForContainerParams { pub const METHOD: &'static str = "DOM.getQueryingDescendantsForContainer"; }
4000
4001impl<'a> crate::CdpCommand<'a> for GetQueryingDescendantsForContainerParams {
4002 const METHOD: &'static str = "DOM.getQueryingDescendantsForContainer";
4003 type Response = GetQueryingDescendantsForContainerReturns;
4004}
4005
4006#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4010#[serde(rename_all = "camelCase")]
4011pub struct GetAnchorElementParams<'a> {
4012 nodeId: NodeId,
4014 #[serde(skip_serializing_if = "Option::is_none")]
4019 anchorSpecifier: Option<Cow<'a, str>>,
4020}
4021
4022impl<'a> GetAnchorElementParams<'a> {
4023 pub fn builder(nodeId: NodeId) -> GetAnchorElementParamsBuilder<'a> {
4024 GetAnchorElementParamsBuilder {
4025 nodeId: nodeId,
4026 anchorSpecifier: None,
4027 }
4028 }
4029 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
4030 pub fn anchorSpecifier(&self) -> Option<&str> { self.anchorSpecifier.as_deref() }
4031}
4032
4033
4034pub struct GetAnchorElementParamsBuilder<'a> {
4035 nodeId: NodeId,
4036 anchorSpecifier: Option<Cow<'a, str>>,
4037}
4038
4039impl<'a> GetAnchorElementParamsBuilder<'a> {
4040 pub fn anchorSpecifier(mut self, anchorSpecifier: impl Into<Cow<'a, str>>) -> Self { self.anchorSpecifier = Some(anchorSpecifier.into()); self }
4045 pub fn build(self) -> GetAnchorElementParams<'a> {
4046 GetAnchorElementParams {
4047 nodeId: self.nodeId,
4048 anchorSpecifier: self.anchorSpecifier,
4049 }
4050 }
4051}
4052
4053#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4057#[serde(rename_all = "camelCase")]
4058pub struct GetAnchorElementReturns {
4059 nodeId: NodeId,
4061}
4062
4063impl GetAnchorElementReturns {
4064 pub fn builder(nodeId: NodeId) -> GetAnchorElementReturnsBuilder {
4065 GetAnchorElementReturnsBuilder {
4066 nodeId: nodeId,
4067 }
4068 }
4069 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
4070}
4071
4072
4073pub struct GetAnchorElementReturnsBuilder {
4074 nodeId: NodeId,
4075}
4076
4077impl GetAnchorElementReturnsBuilder {
4078 pub fn build(self) -> GetAnchorElementReturns {
4079 GetAnchorElementReturns {
4080 nodeId: self.nodeId,
4081 }
4082 }
4083}
4084
4085impl<'a> GetAnchorElementParams<'a> { pub const METHOD: &'static str = "DOM.getAnchorElement"; }
4086
4087impl<'a> crate::CdpCommand<'a> for GetAnchorElementParams<'a> {
4088 const METHOD: &'static str = "DOM.getAnchorElement";
4089 type Response = GetAnchorElementReturns;
4090}
4091
4092#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4096#[serde(rename_all = "camelCase")]
4097pub struct ForceShowPopoverParams {
4098 nodeId: NodeId,
4100 enable: bool,
4103}
4104
4105impl ForceShowPopoverParams {
4106 pub fn builder(nodeId: NodeId, enable: bool) -> ForceShowPopoverParamsBuilder {
4107 ForceShowPopoverParamsBuilder {
4108 nodeId: nodeId,
4109 enable: enable,
4110 }
4111 }
4112 pub fn nodeId(&self) -> &NodeId { &self.nodeId }
4113 pub fn enable(&self) -> bool { self.enable }
4114}
4115
4116
4117pub struct ForceShowPopoverParamsBuilder {
4118 nodeId: NodeId,
4119 enable: bool,
4120}
4121
4122impl ForceShowPopoverParamsBuilder {
4123 pub fn build(self) -> ForceShowPopoverParams {
4124 ForceShowPopoverParams {
4125 nodeId: self.nodeId,
4126 enable: self.enable,
4127 }
4128 }
4129}
4130
4131#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4135#[serde(rename_all = "camelCase")]
4136pub struct ForceShowPopoverReturns {
4137 nodeIds: Vec<NodeId>,
4139}
4140
4141impl ForceShowPopoverReturns {
4142 pub fn builder(nodeIds: Vec<NodeId>) -> ForceShowPopoverReturnsBuilder {
4143 ForceShowPopoverReturnsBuilder {
4144 nodeIds: nodeIds,
4145 }
4146 }
4147 pub fn nodeIds(&self) -> &[NodeId] { &self.nodeIds }
4148}
4149
4150
4151pub struct ForceShowPopoverReturnsBuilder {
4152 nodeIds: Vec<NodeId>,
4153}
4154
4155impl ForceShowPopoverReturnsBuilder {
4156 pub fn build(self) -> ForceShowPopoverReturns {
4157 ForceShowPopoverReturns {
4158 nodeIds: self.nodeIds,
4159 }
4160 }
4161}
4162
4163impl ForceShowPopoverParams { pub const METHOD: &'static str = "DOM.forceShowPopover"; }
4164
4165impl<'a> crate::CdpCommand<'a> for ForceShowPopoverParams {
4166 const METHOD: &'static str = "DOM.forceShowPopover";
4167 type Response = ForceShowPopoverReturns;
4168}