1use serde::{Serialize, Deserialize};
10use serde_json::Value as JsonValue;
11use std::borrow::Cow;
12
13#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
18pub enum StyleSheetOrigin {
19 #[default]
20 #[serde(rename = "injected")]
21 Injected,
22 #[serde(rename = "user-agent")]
23 UserAgent,
24 #[serde(rename = "inspector")]
25 Inspector,
26 #[serde(rename = "regular")]
27 Regular,
28}
29
30#[derive(Debug, Clone, Serialize, Deserialize, Default)]
33#[serde(rename_all = "camelCase")]
34pub struct PseudoElementMatches<'a> {
35 pseudoType: crate::dom::PseudoType,
37 #[serde(skip_serializing_if = "Option::is_none")]
39 pseudoIdentifier: Option<Cow<'a, str>>,
40 matches: Vec<RuleMatch<'a>>,
42}
43
44impl<'a> PseudoElementMatches<'a> {
45 pub fn builder(pseudoType: crate::dom::PseudoType, matches: Vec<RuleMatch<'a>>) -> PseudoElementMatchesBuilder<'a> {
46 PseudoElementMatchesBuilder {
47 pseudoType: pseudoType,
48 pseudoIdentifier: None,
49 matches: matches,
50 }
51 }
52 pub fn pseudoType(&self) -> &crate::dom::PseudoType { &self.pseudoType }
53 pub fn pseudoIdentifier(&self) -> Option<&str> { self.pseudoIdentifier.as_deref() }
54 pub fn matches(&self) -> &[RuleMatch<'a>] { &self.matches }
55}
56
57
58pub struct PseudoElementMatchesBuilder<'a> {
59 pseudoType: crate::dom::PseudoType,
60 pseudoIdentifier: Option<Cow<'a, str>>,
61 matches: Vec<RuleMatch<'a>>,
62}
63
64impl<'a> PseudoElementMatchesBuilder<'a> {
65 pub fn pseudoIdentifier(mut self, pseudoIdentifier: impl Into<Cow<'a, str>>) -> Self { self.pseudoIdentifier = Some(pseudoIdentifier.into()); self }
67 pub fn build(self) -> PseudoElementMatches<'a> {
68 PseudoElementMatches {
69 pseudoType: self.pseudoType,
70 pseudoIdentifier: self.pseudoIdentifier,
71 matches: self.matches,
72 }
73 }
74}
75
76#[derive(Debug, Clone, Serialize, Deserialize, Default)]
79#[serde(rename_all = "camelCase")]
80pub struct CSSAnimationStyle<'a> {
81 #[serde(skip_serializing_if = "Option::is_none")]
83 name: Option<Cow<'a, str>>,
84 style: CSSStyle<'a>,
86}
87
88impl<'a> CSSAnimationStyle<'a> {
89 pub fn builder(style: CSSStyle<'a>) -> CSSAnimationStyleBuilder<'a> {
90 CSSAnimationStyleBuilder {
91 name: None,
92 style: style,
93 }
94 }
95 pub fn name(&self) -> Option<&str> { self.name.as_deref() }
96 pub fn style(&self) -> &CSSStyle<'a> { &self.style }
97}
98
99
100pub struct CSSAnimationStyleBuilder<'a> {
101 name: Option<Cow<'a, str>>,
102 style: CSSStyle<'a>,
103}
104
105impl<'a> CSSAnimationStyleBuilder<'a> {
106 pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self { self.name = Some(name.into()); self }
108 pub fn build(self) -> CSSAnimationStyle<'a> {
109 CSSAnimationStyle {
110 name: self.name,
111 style: self.style,
112 }
113 }
114}
115
116#[derive(Debug, Clone, Serialize, Deserialize, Default)]
119#[serde(rename_all = "camelCase")]
120pub struct InheritedStyleEntry<'a> {
121 #[serde(skip_serializing_if = "Option::is_none")]
123 inlineStyle: Option<CSSStyle<'a>>,
124 matchedCSSRules: Vec<RuleMatch<'a>>,
126}
127
128impl<'a> InheritedStyleEntry<'a> {
129 pub fn builder(matchedCSSRules: Vec<RuleMatch<'a>>) -> InheritedStyleEntryBuilder<'a> {
130 InheritedStyleEntryBuilder {
131 inlineStyle: None,
132 matchedCSSRules: matchedCSSRules,
133 }
134 }
135 pub fn inlineStyle(&self) -> Option<&CSSStyle<'a>> { self.inlineStyle.as_ref() }
136 pub fn matchedCSSRules(&self) -> &[RuleMatch<'a>] { &self.matchedCSSRules }
137}
138
139
140pub struct InheritedStyleEntryBuilder<'a> {
141 inlineStyle: Option<CSSStyle<'a>>,
142 matchedCSSRules: Vec<RuleMatch<'a>>,
143}
144
145impl<'a> InheritedStyleEntryBuilder<'a> {
146 pub fn inlineStyle(mut self, inlineStyle: CSSStyle<'a>) -> Self { self.inlineStyle = Some(inlineStyle); self }
148 pub fn build(self) -> InheritedStyleEntry<'a> {
149 InheritedStyleEntry {
150 inlineStyle: self.inlineStyle,
151 matchedCSSRules: self.matchedCSSRules,
152 }
153 }
154}
155
156#[derive(Debug, Clone, Serialize, Deserialize, Default)]
159#[serde(rename_all = "camelCase")]
160pub struct InheritedAnimatedStyleEntry<'a> {
161 #[serde(skip_serializing_if = "Option::is_none")]
163 animationStyles: Option<Vec<CSSAnimationStyle<'a>>>,
164 #[serde(skip_serializing_if = "Option::is_none")]
166 transitionsStyle: Option<CSSStyle<'a>>,
167}
168
169impl<'a> InheritedAnimatedStyleEntry<'a> {
170 pub fn builder() -> InheritedAnimatedStyleEntryBuilder<'a> {
171 InheritedAnimatedStyleEntryBuilder {
172 animationStyles: None,
173 transitionsStyle: None,
174 }
175 }
176 pub fn animationStyles(&self) -> Option<&[CSSAnimationStyle<'a>]> { self.animationStyles.as_deref() }
177 pub fn transitionsStyle(&self) -> Option<&CSSStyle<'a>> { self.transitionsStyle.as_ref() }
178}
179
180#[derive(Default)]
181pub struct InheritedAnimatedStyleEntryBuilder<'a> {
182 animationStyles: Option<Vec<CSSAnimationStyle<'a>>>,
183 transitionsStyle: Option<CSSStyle<'a>>,
184}
185
186impl<'a> InheritedAnimatedStyleEntryBuilder<'a> {
187 pub fn animationStyles(mut self, animationStyles: Vec<CSSAnimationStyle<'a>>) -> Self { self.animationStyles = Some(animationStyles); self }
189 pub fn transitionsStyle(mut self, transitionsStyle: CSSStyle<'a>) -> Self { self.transitionsStyle = Some(transitionsStyle); self }
191 pub fn build(self) -> InheritedAnimatedStyleEntry<'a> {
192 InheritedAnimatedStyleEntry {
193 animationStyles: self.animationStyles,
194 transitionsStyle: self.transitionsStyle,
195 }
196 }
197}
198
199#[derive(Debug, Clone, Serialize, Deserialize, Default)]
202#[serde(rename_all = "camelCase")]
203pub struct InheritedPseudoElementMatches<'a> {
204 pseudoElements: Vec<PseudoElementMatches<'a>>,
206}
207
208impl<'a> InheritedPseudoElementMatches<'a> {
209 pub fn builder(pseudoElements: Vec<PseudoElementMatches<'a>>) -> InheritedPseudoElementMatchesBuilder<'a> {
210 InheritedPseudoElementMatchesBuilder {
211 pseudoElements: pseudoElements,
212 }
213 }
214 pub fn pseudoElements(&self) -> &[PseudoElementMatches<'a>] { &self.pseudoElements }
215}
216
217
218pub struct InheritedPseudoElementMatchesBuilder<'a> {
219 pseudoElements: Vec<PseudoElementMatches<'a>>,
220}
221
222impl<'a> InheritedPseudoElementMatchesBuilder<'a> {
223 pub fn build(self) -> InheritedPseudoElementMatches<'a> {
224 InheritedPseudoElementMatches {
225 pseudoElements: self.pseudoElements,
226 }
227 }
228}
229
230#[derive(Debug, Clone, Serialize, Deserialize, Default)]
233#[serde(rename_all = "camelCase")]
234pub struct RuleMatch<'a> {
235 rule: CSSRule<'a>,
237 matchingSelectors: Vec<i64>,
239}
240
241impl<'a> RuleMatch<'a> {
242 pub fn builder(rule: CSSRule<'a>, matchingSelectors: Vec<i64>) -> RuleMatchBuilder<'a> {
243 RuleMatchBuilder {
244 rule: rule,
245 matchingSelectors: matchingSelectors,
246 }
247 }
248 pub fn rule(&self) -> &CSSRule<'a> { &self.rule }
249 pub fn matchingSelectors(&self) -> &[i64] { &self.matchingSelectors }
250}
251
252
253pub struct RuleMatchBuilder<'a> {
254 rule: CSSRule<'a>,
255 matchingSelectors: Vec<i64>,
256}
257
258impl<'a> RuleMatchBuilder<'a> {
259 pub fn build(self) -> RuleMatch<'a> {
260 RuleMatch {
261 rule: self.rule,
262 matchingSelectors: self.matchingSelectors,
263 }
264 }
265}
266
267#[derive(Debug, Clone, Serialize, Deserialize, Default)]
270#[serde(rename_all = "camelCase")]
271pub struct ProtocolValue<'a> {
272 text: Cow<'a, str>,
274 #[serde(skip_serializing_if = "Option::is_none")]
276 range: Option<SourceRange>,
277 #[serde(skip_serializing_if = "Option::is_none")]
279 specificity: Option<Specificity>,
280}
281
282impl<'a> ProtocolValue<'a> {
283 pub fn builder(text: impl Into<Cow<'a, str>>) -> ProtocolValueBuilder<'a> {
284 ProtocolValueBuilder {
285 text: text.into(),
286 range: None,
287 specificity: None,
288 }
289 }
290 pub fn text(&self) -> &str { self.text.as_ref() }
291 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
292 pub fn specificity(&self) -> Option<&Specificity> { self.specificity.as_ref() }
293}
294
295
296pub struct ProtocolValueBuilder<'a> {
297 text: Cow<'a, str>,
298 range: Option<SourceRange>,
299 specificity: Option<Specificity>,
300}
301
302impl<'a> ProtocolValueBuilder<'a> {
303 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
305 pub fn specificity(mut self, specificity: Specificity) -> Self { self.specificity = Some(specificity); self }
307 pub fn build(self) -> ProtocolValue<'a> {
308 ProtocolValue {
309 text: self.text,
310 range: self.range,
311 specificity: self.specificity,
312 }
313 }
314}
315
316#[derive(Debug, Clone, Serialize, Deserialize, Default)]
320#[serde(rename_all = "camelCase")]
321pub struct Specificity {
322 a: i64,
324 b: i64,
327 c: i64,
329}
330
331impl Specificity {
332 pub fn builder(a: i64, b: i64, c: i64) -> SpecificityBuilder {
333 SpecificityBuilder {
334 a: a,
335 b: b,
336 c: c,
337 }
338 }
339 pub fn a(&self) -> i64 { self.a }
340 pub fn b(&self) -> i64 { self.b }
341 pub fn c(&self) -> i64 { self.c }
342}
343
344
345pub struct SpecificityBuilder {
346 a: i64,
347 b: i64,
348 c: i64,
349}
350
351impl SpecificityBuilder {
352 pub fn build(self) -> Specificity {
353 Specificity {
354 a: self.a,
355 b: self.b,
356 c: self.c,
357 }
358 }
359}
360
361#[derive(Debug, Clone, Serialize, Deserialize, Default)]
364#[serde(rename_all = "camelCase")]
365pub struct SelectorList<'a> {
366 selectors: Vec<ProtocolValue<'a>>,
368 text: Cow<'a, str>,
370}
371
372impl<'a> SelectorList<'a> {
373 pub fn builder(selectors: Vec<ProtocolValue<'a>>, text: impl Into<Cow<'a, str>>) -> SelectorListBuilder<'a> {
374 SelectorListBuilder {
375 selectors: selectors,
376 text: text.into(),
377 }
378 }
379 pub fn selectors(&self) -> &[ProtocolValue<'a>] { &self.selectors }
380 pub fn text(&self) -> &str { self.text.as_ref() }
381}
382
383
384pub struct SelectorListBuilder<'a> {
385 selectors: Vec<ProtocolValue<'a>>,
386 text: Cow<'a, str>,
387}
388
389impl<'a> SelectorListBuilder<'a> {
390 pub fn build(self) -> SelectorList<'a> {
391 SelectorList {
392 selectors: self.selectors,
393 text: self.text,
394 }
395 }
396}
397
398#[derive(Debug, Clone, Serialize, Deserialize, Default)]
401#[serde(rename_all = "camelCase")]
402pub struct CSSStyleSheetHeader<'a> {
403 styleSheetId: crate::dom::StyleSheetId<'a>,
405 frameId: crate::page::FrameId<'a>,
407 sourceURL: Cow<'a, str>,
411 #[serde(skip_serializing_if = "Option::is_none")]
413 sourceMapURL: Option<Cow<'a, str>>,
414 origin: StyleSheetOrigin,
416 title: Cow<'a, str>,
418 #[serde(skip_serializing_if = "Option::is_none")]
420 ownerNode: Option<crate::dom::BackendNodeId>,
421 disabled: bool,
423 #[serde(skip_serializing_if = "Option::is_none")]
425 hasSourceURL: Option<bool>,
426 isInline: bool,
429 isMutable: bool,
434 isConstructed: bool,
437 startLine: f64,
439 startColumn: f64,
441 length: f64,
443 endLine: f64,
445 endColumn: f64,
447 #[serde(skip_serializing_if = "Option::is_none")]
449 loadingFailed: Option<bool>,
450}
451
452impl<'a> CSSStyleSheetHeader<'a> {
453 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, frameId: crate::page::FrameId<'a>, sourceURL: impl Into<Cow<'a, str>>, origin: StyleSheetOrigin, title: impl Into<Cow<'a, str>>, disabled: bool, isInline: bool, isMutable: bool, isConstructed: bool, startLine: f64, startColumn: f64, length: f64, endLine: f64, endColumn: f64) -> CSSStyleSheetHeaderBuilder<'a> {
454 CSSStyleSheetHeaderBuilder {
455 styleSheetId: styleSheetId,
456 frameId: frameId,
457 sourceURL: sourceURL.into(),
458 sourceMapURL: None,
459 origin: origin,
460 title: title.into(),
461 ownerNode: None,
462 disabled: disabled,
463 hasSourceURL: None,
464 isInline: isInline,
465 isMutable: isMutable,
466 isConstructed: isConstructed,
467 startLine: startLine,
468 startColumn: startColumn,
469 length: length,
470 endLine: endLine,
471 endColumn: endColumn,
472 loadingFailed: None,
473 }
474 }
475 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
476 pub fn frameId(&self) -> &crate::page::FrameId<'a> { &self.frameId }
477 pub fn sourceURL(&self) -> &str { self.sourceURL.as_ref() }
478 pub fn sourceMapURL(&self) -> Option<&str> { self.sourceMapURL.as_deref() }
479 pub fn origin(&self) -> &StyleSheetOrigin { &self.origin }
480 pub fn title(&self) -> &str { self.title.as_ref() }
481 pub fn ownerNode(&self) -> Option<&crate::dom::BackendNodeId> { self.ownerNode.as_ref() }
482 pub fn disabled(&self) -> bool { self.disabled }
483 pub fn hasSourceURL(&self) -> Option<bool> { self.hasSourceURL }
484 pub fn isInline(&self) -> bool { self.isInline }
485 pub fn isMutable(&self) -> bool { self.isMutable }
486 pub fn isConstructed(&self) -> bool { self.isConstructed }
487 pub fn startLine(&self) -> f64 { self.startLine }
488 pub fn startColumn(&self) -> f64 { self.startColumn }
489 pub fn length(&self) -> f64 { self.length }
490 pub fn endLine(&self) -> f64 { self.endLine }
491 pub fn endColumn(&self) -> f64 { self.endColumn }
492 pub fn loadingFailed(&self) -> Option<bool> { self.loadingFailed }
493}
494
495
496pub struct CSSStyleSheetHeaderBuilder<'a> {
497 styleSheetId: crate::dom::StyleSheetId<'a>,
498 frameId: crate::page::FrameId<'a>,
499 sourceURL: Cow<'a, str>,
500 sourceMapURL: Option<Cow<'a, str>>,
501 origin: StyleSheetOrigin,
502 title: Cow<'a, str>,
503 ownerNode: Option<crate::dom::BackendNodeId>,
504 disabled: bool,
505 hasSourceURL: Option<bool>,
506 isInline: bool,
507 isMutable: bool,
508 isConstructed: bool,
509 startLine: f64,
510 startColumn: f64,
511 length: f64,
512 endLine: f64,
513 endColumn: f64,
514 loadingFailed: Option<bool>,
515}
516
517impl<'a> CSSStyleSheetHeaderBuilder<'a> {
518 pub fn sourceMapURL(mut self, sourceMapURL: impl Into<Cow<'a, str>>) -> Self { self.sourceMapURL = Some(sourceMapURL.into()); self }
520 pub fn ownerNode(mut self, ownerNode: crate::dom::BackendNodeId) -> Self { self.ownerNode = Some(ownerNode); self }
522 pub fn hasSourceURL(mut self, hasSourceURL: bool) -> Self { self.hasSourceURL = Some(hasSourceURL); self }
524 pub fn loadingFailed(mut self, loadingFailed: bool) -> Self { self.loadingFailed = Some(loadingFailed); self }
526 pub fn build(self) -> CSSStyleSheetHeader<'a> {
527 CSSStyleSheetHeader {
528 styleSheetId: self.styleSheetId,
529 frameId: self.frameId,
530 sourceURL: self.sourceURL,
531 sourceMapURL: self.sourceMapURL,
532 origin: self.origin,
533 title: self.title,
534 ownerNode: self.ownerNode,
535 disabled: self.disabled,
536 hasSourceURL: self.hasSourceURL,
537 isInline: self.isInline,
538 isMutable: self.isMutable,
539 isConstructed: self.isConstructed,
540 startLine: self.startLine,
541 startColumn: self.startColumn,
542 length: self.length,
543 endLine: self.endLine,
544 endColumn: self.endColumn,
545 loadingFailed: self.loadingFailed,
546 }
547 }
548}
549
550#[derive(Debug, Clone, Serialize, Deserialize, Default)]
553#[serde(rename_all = "camelCase")]
554pub struct CSSRule<'a> {
555 #[serde(skip_serializing_if = "Option::is_none")]
558 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
559 selectorList: SelectorList<'a>,
561 #[serde(skip_serializing_if = "Option::is_none")]
563 nestingSelectors: Option<Vec<Cow<'a, str>>>,
564 origin: StyleSheetOrigin,
566 style: CSSStyle<'a>,
568 #[serde(skip_serializing_if = "Option::is_none")]
570 originTreeScopeNodeId: Option<crate::dom::BackendNodeId>,
571 #[serde(skip_serializing_if = "Option::is_none")]
574 media: Option<Vec<CSSMedia<'a>>>,
575 #[serde(skip_serializing_if = "Option::is_none")]
578 containerQueries: Option<Vec<CSSContainerQuery<'a>>>,
579 #[serde(skip_serializing_if = "Option::is_none")]
582 supports: Option<Vec<CSSSupports<'a>>>,
583 #[serde(skip_serializing_if = "Option::is_none")]
586 layers: Option<Vec<CSSLayer<'a>>>,
587 #[serde(skip_serializing_if = "Option::is_none")]
590 scopes: Option<Vec<CSSScope<'a>>>,
591 #[serde(skip_serializing_if = "Option::is_none")]
593 ruleTypes: Option<Vec<CSSRuleType>>,
594 #[serde(skip_serializing_if = "Option::is_none")]
597 startingStyles: Option<Vec<CSSStartingStyle<'a>>>,
598 #[serde(skip_serializing_if = "Option::is_none")]
601 navigations: Option<Vec<CSSNavigation<'a>>>,
602}
603
604impl<'a> CSSRule<'a> {
605 pub fn builder(selectorList: SelectorList<'a>, origin: StyleSheetOrigin, style: CSSStyle<'a>) -> CSSRuleBuilder<'a> {
606 CSSRuleBuilder {
607 styleSheetId: None,
608 selectorList: selectorList,
609 nestingSelectors: None,
610 origin: origin,
611 style: style,
612 originTreeScopeNodeId: None,
613 media: None,
614 containerQueries: None,
615 supports: None,
616 layers: None,
617 scopes: None,
618 ruleTypes: None,
619 startingStyles: None,
620 navigations: None,
621 }
622 }
623 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
624 pub fn selectorList(&self) -> &SelectorList<'a> { &self.selectorList }
625 pub fn nestingSelectors(&self) -> Option<&[Cow<'a, str>]> { self.nestingSelectors.as_deref() }
626 pub fn origin(&self) -> &StyleSheetOrigin { &self.origin }
627 pub fn style(&self) -> &CSSStyle<'a> { &self.style }
628 pub fn originTreeScopeNodeId(&self) -> Option<&crate::dom::BackendNodeId> { self.originTreeScopeNodeId.as_ref() }
629 pub fn media(&self) -> Option<&[CSSMedia<'a>]> { self.media.as_deref() }
630 pub fn containerQueries(&self) -> Option<&[CSSContainerQuery<'a>]> { self.containerQueries.as_deref() }
631 pub fn supports(&self) -> Option<&[CSSSupports<'a>]> { self.supports.as_deref() }
632 pub fn layers(&self) -> Option<&[CSSLayer<'a>]> { self.layers.as_deref() }
633 pub fn scopes(&self) -> Option<&[CSSScope<'a>]> { self.scopes.as_deref() }
634 pub fn ruleTypes(&self) -> Option<&[CSSRuleType]> { self.ruleTypes.as_deref() }
635 pub fn startingStyles(&self) -> Option<&[CSSStartingStyle<'a>]> { self.startingStyles.as_deref() }
636 pub fn navigations(&self) -> Option<&[CSSNavigation<'a>]> { self.navigations.as_deref() }
637}
638
639
640pub struct CSSRuleBuilder<'a> {
641 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
642 selectorList: SelectorList<'a>,
643 nestingSelectors: Option<Vec<Cow<'a, str>>>,
644 origin: StyleSheetOrigin,
645 style: CSSStyle<'a>,
646 originTreeScopeNodeId: Option<crate::dom::BackendNodeId>,
647 media: Option<Vec<CSSMedia<'a>>>,
648 containerQueries: Option<Vec<CSSContainerQuery<'a>>>,
649 supports: Option<Vec<CSSSupports<'a>>>,
650 layers: Option<Vec<CSSLayer<'a>>>,
651 scopes: Option<Vec<CSSScope<'a>>>,
652 ruleTypes: Option<Vec<CSSRuleType>>,
653 startingStyles: Option<Vec<CSSStartingStyle<'a>>>,
654 navigations: Option<Vec<CSSNavigation<'a>>>,
655}
656
657impl<'a> CSSRuleBuilder<'a> {
658 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
661 pub fn nestingSelectors(mut self, nestingSelectors: Vec<Cow<'a, str>>) -> Self { self.nestingSelectors = Some(nestingSelectors); self }
663 pub fn originTreeScopeNodeId(mut self, originTreeScopeNodeId: crate::dom::BackendNodeId) -> Self { self.originTreeScopeNodeId = Some(originTreeScopeNodeId); self }
665 pub fn media(mut self, media: Vec<CSSMedia<'a>>) -> Self { self.media = Some(media); self }
668 pub fn containerQueries(mut self, containerQueries: Vec<CSSContainerQuery<'a>>) -> Self { self.containerQueries = Some(containerQueries); self }
671 pub fn supports(mut self, supports: Vec<CSSSupports<'a>>) -> Self { self.supports = Some(supports); self }
674 pub fn layers(mut self, layers: Vec<CSSLayer<'a>>) -> Self { self.layers = Some(layers); self }
677 pub fn scopes(mut self, scopes: Vec<CSSScope<'a>>) -> Self { self.scopes = Some(scopes); self }
680 pub fn ruleTypes(mut self, ruleTypes: Vec<CSSRuleType>) -> Self { self.ruleTypes = Some(ruleTypes); self }
682 pub fn startingStyles(mut self, startingStyles: Vec<CSSStartingStyle<'a>>) -> Self { self.startingStyles = Some(startingStyles); self }
685 pub fn navigations(mut self, navigations: Vec<CSSNavigation<'a>>) -> Self { self.navigations = Some(navigations); self }
688 pub fn build(self) -> CSSRule<'a> {
689 CSSRule {
690 styleSheetId: self.styleSheetId,
691 selectorList: self.selectorList,
692 nestingSelectors: self.nestingSelectors,
693 origin: self.origin,
694 style: self.style,
695 originTreeScopeNodeId: self.originTreeScopeNodeId,
696 media: self.media,
697 containerQueries: self.containerQueries,
698 supports: self.supports,
699 layers: self.layers,
700 scopes: self.scopes,
701 ruleTypes: self.ruleTypes,
702 startingStyles: self.startingStyles,
703 navigations: self.navigations,
704 }
705 }
706}
707
708#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
712pub enum CSSRuleType {
713 #[default]
714 #[serde(rename = "MediaRule")]
715 MediaRule,
716 #[serde(rename = "SupportsRule")]
717 SupportsRule,
718 #[serde(rename = "ContainerRule")]
719 ContainerRule,
720 #[serde(rename = "LayerRule")]
721 LayerRule,
722 #[serde(rename = "ScopeRule")]
723 ScopeRule,
724 #[serde(rename = "StyleRule")]
725 StyleRule,
726 #[serde(rename = "StartingStyleRule")]
727 StartingStyleRule,
728 #[serde(rename = "NavigationRule")]
729 NavigationRule,
730}
731
732#[derive(Debug, Clone, Serialize, Deserialize, Default)]
735#[serde(rename_all = "camelCase")]
736pub struct RuleUsage<'a> {
737 styleSheetId: crate::dom::StyleSheetId<'a>,
740 startOffset: f64,
742 endOffset: f64,
744 used: bool,
746}
747
748impl<'a> RuleUsage<'a> {
749 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, startOffset: f64, endOffset: f64, used: bool) -> RuleUsageBuilder<'a> {
750 RuleUsageBuilder {
751 styleSheetId: styleSheetId,
752 startOffset: startOffset,
753 endOffset: endOffset,
754 used: used,
755 }
756 }
757 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
758 pub fn startOffset(&self) -> f64 { self.startOffset }
759 pub fn endOffset(&self) -> f64 { self.endOffset }
760 pub fn used(&self) -> bool { self.used }
761}
762
763
764pub struct RuleUsageBuilder<'a> {
765 styleSheetId: crate::dom::StyleSheetId<'a>,
766 startOffset: f64,
767 endOffset: f64,
768 used: bool,
769}
770
771impl<'a> RuleUsageBuilder<'a> {
772 pub fn build(self) -> RuleUsage<'a> {
773 RuleUsage {
774 styleSheetId: self.styleSheetId,
775 startOffset: self.startOffset,
776 endOffset: self.endOffset,
777 used: self.used,
778 }
779 }
780}
781
782#[derive(Debug, Clone, Serialize, Deserialize, Default)]
785#[serde(rename_all = "camelCase")]
786pub struct SourceRange {
787 startLine: i64,
789 startColumn: i64,
791 endLine: i64,
793 endColumn: i64,
795}
796
797impl SourceRange {
798 pub fn builder(startLine: i64, startColumn: i64, endLine: i64, endColumn: i64) -> SourceRangeBuilder {
799 SourceRangeBuilder {
800 startLine: startLine,
801 startColumn: startColumn,
802 endLine: endLine,
803 endColumn: endColumn,
804 }
805 }
806 pub fn startLine(&self) -> i64 { self.startLine }
807 pub fn startColumn(&self) -> i64 { self.startColumn }
808 pub fn endLine(&self) -> i64 { self.endLine }
809 pub fn endColumn(&self) -> i64 { self.endColumn }
810}
811
812
813pub struct SourceRangeBuilder {
814 startLine: i64,
815 startColumn: i64,
816 endLine: i64,
817 endColumn: i64,
818}
819
820impl SourceRangeBuilder {
821 pub fn build(self) -> SourceRange {
822 SourceRange {
823 startLine: self.startLine,
824 startColumn: self.startColumn,
825 endLine: self.endLine,
826 endColumn: self.endColumn,
827 }
828 }
829}
830
831
832#[derive(Debug, Clone, Serialize, Deserialize, Default)]
833#[serde(rename_all = "camelCase")]
834pub struct ShorthandEntry<'a> {
835 name: Cow<'a, str>,
837 value: Cow<'a, str>,
839 #[serde(skip_serializing_if = "Option::is_none")]
841 important: Option<bool>,
842}
843
844impl<'a> ShorthandEntry<'a> {
845 pub fn builder(name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> ShorthandEntryBuilder<'a> {
846 ShorthandEntryBuilder {
847 name: name.into(),
848 value: value.into(),
849 important: None,
850 }
851 }
852 pub fn name(&self) -> &str { self.name.as_ref() }
853 pub fn value(&self) -> &str { self.value.as_ref() }
854 pub fn important(&self) -> Option<bool> { self.important }
855}
856
857
858pub struct ShorthandEntryBuilder<'a> {
859 name: Cow<'a, str>,
860 value: Cow<'a, str>,
861 important: Option<bool>,
862}
863
864impl<'a> ShorthandEntryBuilder<'a> {
865 pub fn important(mut self, important: bool) -> Self { self.important = Some(important); self }
867 pub fn build(self) -> ShorthandEntry<'a> {
868 ShorthandEntry {
869 name: self.name,
870 value: self.value,
871 important: self.important,
872 }
873 }
874}
875
876
877#[derive(Debug, Clone, Serialize, Deserialize, Default)]
878#[serde(rename_all = "camelCase")]
879pub struct CSSComputedStyleProperty<'a> {
880 name: Cow<'a, str>,
882 value: Cow<'a, str>,
884}
885
886impl<'a> CSSComputedStyleProperty<'a> {
887 pub fn builder(name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> CSSComputedStylePropertyBuilder<'a> {
888 CSSComputedStylePropertyBuilder {
889 name: name.into(),
890 value: value.into(),
891 }
892 }
893 pub fn name(&self) -> &str { self.name.as_ref() }
894 pub fn value(&self) -> &str { self.value.as_ref() }
895}
896
897
898pub struct CSSComputedStylePropertyBuilder<'a> {
899 name: Cow<'a, str>,
900 value: Cow<'a, str>,
901}
902
903impl<'a> CSSComputedStylePropertyBuilder<'a> {
904 pub fn build(self) -> CSSComputedStyleProperty<'a> {
905 CSSComputedStyleProperty {
906 name: self.name,
907 value: self.value,
908 }
909 }
910}
911
912
913#[derive(Debug, Clone, Serialize, Deserialize, Default)]
914#[serde(rename_all = "camelCase")]
915pub struct ComputedStyleExtraFields {
916 isAppearanceBase: bool,
920}
921
922impl ComputedStyleExtraFields {
923 pub fn builder(isAppearanceBase: bool) -> ComputedStyleExtraFieldsBuilder {
924 ComputedStyleExtraFieldsBuilder {
925 isAppearanceBase: isAppearanceBase,
926 }
927 }
928 pub fn isAppearanceBase(&self) -> bool { self.isAppearanceBase }
929}
930
931
932pub struct ComputedStyleExtraFieldsBuilder {
933 isAppearanceBase: bool,
934}
935
936impl ComputedStyleExtraFieldsBuilder {
937 pub fn build(self) -> ComputedStyleExtraFields {
938 ComputedStyleExtraFields {
939 isAppearanceBase: self.isAppearanceBase,
940 }
941 }
942}
943
944#[derive(Debug, Clone, Serialize, Deserialize, Default)]
947#[serde(rename_all = "camelCase")]
948pub struct CSSStyle<'a> {
949 #[serde(skip_serializing_if = "Option::is_none")]
952 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
953 cssProperties: Vec<CSSProperty<'a>>,
955 shorthandEntries: Vec<ShorthandEntry<'a>>,
957 #[serde(skip_serializing_if = "Option::is_none")]
959 cssText: Option<Cow<'a, str>>,
960 #[serde(skip_serializing_if = "Option::is_none")]
962 range: Option<SourceRange>,
963}
964
965impl<'a> CSSStyle<'a> {
966 pub fn builder(cssProperties: Vec<CSSProperty<'a>>, shorthandEntries: Vec<ShorthandEntry<'a>>) -> CSSStyleBuilder<'a> {
967 CSSStyleBuilder {
968 styleSheetId: None,
969 cssProperties: cssProperties,
970 shorthandEntries: shorthandEntries,
971 cssText: None,
972 range: None,
973 }
974 }
975 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
976 pub fn cssProperties(&self) -> &[CSSProperty<'a>] { &self.cssProperties }
977 pub fn shorthandEntries(&self) -> &[ShorthandEntry<'a>] { &self.shorthandEntries }
978 pub fn cssText(&self) -> Option<&str> { self.cssText.as_deref() }
979 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
980}
981
982
983pub struct CSSStyleBuilder<'a> {
984 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
985 cssProperties: Vec<CSSProperty<'a>>,
986 shorthandEntries: Vec<ShorthandEntry<'a>>,
987 cssText: Option<Cow<'a, str>>,
988 range: Option<SourceRange>,
989}
990
991impl<'a> CSSStyleBuilder<'a> {
992 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
995 pub fn cssText(mut self, cssText: impl Into<Cow<'a, str>>) -> Self { self.cssText = Some(cssText.into()); self }
997 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
999 pub fn build(self) -> CSSStyle<'a> {
1000 CSSStyle {
1001 styleSheetId: self.styleSheetId,
1002 cssProperties: self.cssProperties,
1003 shorthandEntries: self.shorthandEntries,
1004 cssText: self.cssText,
1005 range: self.range,
1006 }
1007 }
1008}
1009
1010#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1013#[serde(rename_all = "camelCase")]
1014pub struct CSSProperty<'a> {
1015 name: Cow<'a, str>,
1017 value: Cow<'a, str>,
1019 #[serde(skip_serializing_if = "Option::is_none")]
1021 important: Option<bool>,
1022 #[serde(skip_serializing_if = "Option::is_none")]
1024 implicit: Option<bool>,
1025 #[serde(skip_serializing_if = "Option::is_none")]
1027 text: Option<Cow<'a, str>>,
1028 #[serde(skip_serializing_if = "Option::is_none")]
1030 parsedOk: Option<bool>,
1031 #[serde(skip_serializing_if = "Option::is_none")]
1033 disabled: Option<bool>,
1034 #[serde(skip_serializing_if = "Option::is_none")]
1036 range: Option<SourceRange>,
1037 #[serde(skip_serializing_if = "Option::is_none")]
1040 longhandProperties: Option<Vec<Box<CSSProperty<'a>>>>,
1041}
1042
1043impl<'a> CSSProperty<'a> {
1044 pub fn builder(name: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> CSSPropertyBuilder<'a> {
1045 CSSPropertyBuilder {
1046 name: name.into(),
1047 value: value.into(),
1048 important: None,
1049 implicit: None,
1050 text: None,
1051 parsedOk: None,
1052 disabled: None,
1053 range: None,
1054 longhandProperties: None,
1055 }
1056 }
1057 pub fn name(&self) -> &str { self.name.as_ref() }
1058 pub fn value(&self) -> &str { self.value.as_ref() }
1059 pub fn important(&self) -> Option<bool> { self.important }
1060 pub fn implicit(&self) -> Option<bool> { self.implicit }
1061 pub fn text(&self) -> Option<&str> { self.text.as_deref() }
1062 pub fn parsedOk(&self) -> Option<bool> { self.parsedOk }
1063 pub fn disabled(&self) -> Option<bool> { self.disabled }
1064 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
1065 pub fn longhandProperties(&self) -> Option<&[Box<CSSProperty<'a>>]> { self.longhandProperties.as_deref() }
1066}
1067
1068
1069pub struct CSSPropertyBuilder<'a> {
1070 name: Cow<'a, str>,
1071 value: Cow<'a, str>,
1072 important: Option<bool>,
1073 implicit: Option<bool>,
1074 text: Option<Cow<'a, str>>,
1075 parsedOk: Option<bool>,
1076 disabled: Option<bool>,
1077 range: Option<SourceRange>,
1078 longhandProperties: Option<Vec<Box<CSSProperty<'a>>>>,
1079}
1080
1081impl<'a> CSSPropertyBuilder<'a> {
1082 pub fn important(mut self, important: bool) -> Self { self.important = Some(important); self }
1084 pub fn implicit(mut self, implicit: bool) -> Self { self.implicit = Some(implicit); self }
1086 pub fn text(mut self, text: impl Into<Cow<'a, str>>) -> Self { self.text = Some(text.into()); self }
1088 pub fn parsedOk(mut self, parsedOk: bool) -> Self { self.parsedOk = Some(parsedOk); self }
1090 pub fn disabled(mut self, disabled: bool) -> Self { self.disabled = Some(disabled); self }
1092 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
1094 pub fn longhandProperties(mut self, longhandProperties: Vec<Box<CSSProperty<'a>>>) -> Self { self.longhandProperties = Some(longhandProperties); self }
1097 pub fn build(self) -> CSSProperty<'a> {
1098 CSSProperty {
1099 name: self.name,
1100 value: self.value,
1101 important: self.important,
1102 implicit: self.implicit,
1103 text: self.text,
1104 parsedOk: self.parsedOk,
1105 disabled: self.disabled,
1106 range: self.range,
1107 longhandProperties: self.longhandProperties,
1108 }
1109 }
1110}
1111
1112#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1115#[serde(rename_all = "camelCase")]
1116pub struct CSSMedia<'a> {
1117 text: Cow<'a, str>,
1119 source: Cow<'a, str>,
1124 #[serde(skip_serializing_if = "Option::is_none")]
1126 sourceURL: Option<Cow<'a, str>>,
1127 #[serde(skip_serializing_if = "Option::is_none")]
1130 range: Option<SourceRange>,
1131 #[serde(skip_serializing_if = "Option::is_none")]
1133 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1134 #[serde(skip_serializing_if = "Option::is_none")]
1136 mediaList: Option<Vec<MediaQuery<'a>>>,
1137}
1138
1139impl<'a> CSSMedia<'a> {
1140 pub fn builder(text: impl Into<Cow<'a, str>>, source: impl Into<Cow<'a, str>>) -> CSSMediaBuilder<'a> {
1141 CSSMediaBuilder {
1142 text: text.into(),
1143 source: source.into(),
1144 sourceURL: None,
1145 range: None,
1146 styleSheetId: None,
1147 mediaList: None,
1148 }
1149 }
1150 pub fn text(&self) -> &str { self.text.as_ref() }
1151 pub fn source(&self) -> &str { self.source.as_ref() }
1152 pub fn sourceURL(&self) -> Option<&str> { self.sourceURL.as_deref() }
1153 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
1154 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
1155 pub fn mediaList(&self) -> Option<&[MediaQuery<'a>]> { self.mediaList.as_deref() }
1156}
1157
1158
1159pub struct CSSMediaBuilder<'a> {
1160 text: Cow<'a, str>,
1161 source: Cow<'a, str>,
1162 sourceURL: Option<Cow<'a, str>>,
1163 range: Option<SourceRange>,
1164 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1165 mediaList: Option<Vec<MediaQuery<'a>>>,
1166}
1167
1168impl<'a> CSSMediaBuilder<'a> {
1169 pub fn sourceURL(mut self, sourceURL: impl Into<Cow<'a, str>>) -> Self { self.sourceURL = Some(sourceURL.into()); self }
1171 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
1174 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
1176 pub fn mediaList(mut self, mediaList: Vec<MediaQuery<'a>>) -> Self { self.mediaList = Some(mediaList); self }
1178 pub fn build(self) -> CSSMedia<'a> {
1179 CSSMedia {
1180 text: self.text,
1181 source: self.source,
1182 sourceURL: self.sourceURL,
1183 range: self.range,
1184 styleSheetId: self.styleSheetId,
1185 mediaList: self.mediaList,
1186 }
1187 }
1188}
1189
1190#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1193#[serde(rename_all = "camelCase")]
1194pub struct MediaQuery<'a> {
1195 expressions: Vec<MediaQueryExpression<'a>>,
1197 active: bool,
1199}
1200
1201impl<'a> MediaQuery<'a> {
1202 pub fn builder(expressions: Vec<MediaQueryExpression<'a>>, active: bool) -> MediaQueryBuilder<'a> {
1203 MediaQueryBuilder {
1204 expressions: expressions,
1205 active: active,
1206 }
1207 }
1208 pub fn expressions(&self) -> &[MediaQueryExpression<'a>] { &self.expressions }
1209 pub fn active(&self) -> bool { self.active }
1210}
1211
1212
1213pub struct MediaQueryBuilder<'a> {
1214 expressions: Vec<MediaQueryExpression<'a>>,
1215 active: bool,
1216}
1217
1218impl<'a> MediaQueryBuilder<'a> {
1219 pub fn build(self) -> MediaQuery<'a> {
1220 MediaQuery {
1221 expressions: self.expressions,
1222 active: self.active,
1223 }
1224 }
1225}
1226
1227#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1230#[serde(rename_all = "camelCase")]
1231pub struct MediaQueryExpression<'a> {
1232 value: f64,
1234 unit: Cow<'a, str>,
1236 feature: Cow<'a, str>,
1238 #[serde(skip_serializing_if = "Option::is_none")]
1240 valueRange: Option<SourceRange>,
1241 #[serde(skip_serializing_if = "Option::is_none")]
1243 computedLength: Option<f64>,
1244}
1245
1246impl<'a> MediaQueryExpression<'a> {
1247 pub fn builder(value: f64, unit: impl Into<Cow<'a, str>>, feature: impl Into<Cow<'a, str>>) -> MediaQueryExpressionBuilder<'a> {
1248 MediaQueryExpressionBuilder {
1249 value: value,
1250 unit: unit.into(),
1251 feature: feature.into(),
1252 valueRange: None,
1253 computedLength: None,
1254 }
1255 }
1256 pub fn value(&self) -> f64 { self.value }
1257 pub fn unit(&self) -> &str { self.unit.as_ref() }
1258 pub fn feature(&self) -> &str { self.feature.as_ref() }
1259 pub fn valueRange(&self) -> Option<&SourceRange> { self.valueRange.as_ref() }
1260 pub fn computedLength(&self) -> Option<f64> { self.computedLength }
1261}
1262
1263
1264pub struct MediaQueryExpressionBuilder<'a> {
1265 value: f64,
1266 unit: Cow<'a, str>,
1267 feature: Cow<'a, str>,
1268 valueRange: Option<SourceRange>,
1269 computedLength: Option<f64>,
1270}
1271
1272impl<'a> MediaQueryExpressionBuilder<'a> {
1273 pub fn valueRange(mut self, valueRange: SourceRange) -> Self { self.valueRange = Some(valueRange); self }
1275 pub fn computedLength(mut self, computedLength: f64) -> Self { self.computedLength = Some(computedLength); self }
1277 pub fn build(self) -> MediaQueryExpression<'a> {
1278 MediaQueryExpression {
1279 value: self.value,
1280 unit: self.unit,
1281 feature: self.feature,
1282 valueRange: self.valueRange,
1283 computedLength: self.computedLength,
1284 }
1285 }
1286}
1287
1288#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1291#[serde(rename_all = "camelCase")]
1292pub struct CSSContainerQuery<'a> {
1293 text: Cow<'a, str>,
1295 #[serde(skip_serializing_if = "Option::is_none")]
1298 range: Option<SourceRange>,
1299 #[serde(skip_serializing_if = "Option::is_none")]
1301 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1302 #[serde(skip_serializing_if = "Option::is_none")]
1304 name: Option<Cow<'a, str>>,
1305 #[serde(skip_serializing_if = "Option::is_none")]
1307 physicalAxes: Option<crate::dom::PhysicalAxes>,
1308 #[serde(skip_serializing_if = "Option::is_none")]
1310 logicalAxes: Option<crate::dom::LogicalAxes>,
1311 #[serde(skip_serializing_if = "Option::is_none")]
1313 queriesScrollState: Option<bool>,
1314 #[serde(skip_serializing_if = "Option::is_none")]
1316 queriesAnchored: Option<bool>,
1317}
1318
1319impl<'a> CSSContainerQuery<'a> {
1320 pub fn builder(text: impl Into<Cow<'a, str>>) -> CSSContainerQueryBuilder<'a> {
1321 CSSContainerQueryBuilder {
1322 text: text.into(),
1323 range: None,
1324 styleSheetId: None,
1325 name: None,
1326 physicalAxes: None,
1327 logicalAxes: None,
1328 queriesScrollState: None,
1329 queriesAnchored: None,
1330 }
1331 }
1332 pub fn text(&self) -> &str { self.text.as_ref() }
1333 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
1334 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
1335 pub fn name(&self) -> Option<&str> { self.name.as_deref() }
1336 pub fn physicalAxes(&self) -> Option<&crate::dom::PhysicalAxes> { self.physicalAxes.as_ref() }
1337 pub fn logicalAxes(&self) -> Option<&crate::dom::LogicalAxes> { self.logicalAxes.as_ref() }
1338 pub fn queriesScrollState(&self) -> Option<bool> { self.queriesScrollState }
1339 pub fn queriesAnchored(&self) -> Option<bool> { self.queriesAnchored }
1340}
1341
1342
1343pub struct CSSContainerQueryBuilder<'a> {
1344 text: Cow<'a, str>,
1345 range: Option<SourceRange>,
1346 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1347 name: Option<Cow<'a, str>>,
1348 physicalAxes: Option<crate::dom::PhysicalAxes>,
1349 logicalAxes: Option<crate::dom::LogicalAxes>,
1350 queriesScrollState: Option<bool>,
1351 queriesAnchored: Option<bool>,
1352}
1353
1354impl<'a> CSSContainerQueryBuilder<'a> {
1355 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
1358 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
1360 pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self { self.name = Some(name.into()); self }
1362 pub fn physicalAxes(mut self, physicalAxes: crate::dom::PhysicalAxes) -> Self { self.physicalAxes = Some(physicalAxes); self }
1364 pub fn logicalAxes(mut self, logicalAxes: crate::dom::LogicalAxes) -> Self { self.logicalAxes = Some(logicalAxes); self }
1366 pub fn queriesScrollState(mut self, queriesScrollState: bool) -> Self { self.queriesScrollState = Some(queriesScrollState); self }
1368 pub fn queriesAnchored(mut self, queriesAnchored: bool) -> Self { self.queriesAnchored = Some(queriesAnchored); self }
1370 pub fn build(self) -> CSSContainerQuery<'a> {
1371 CSSContainerQuery {
1372 text: self.text,
1373 range: self.range,
1374 styleSheetId: self.styleSheetId,
1375 name: self.name,
1376 physicalAxes: self.physicalAxes,
1377 logicalAxes: self.logicalAxes,
1378 queriesScrollState: self.queriesScrollState,
1379 queriesAnchored: self.queriesAnchored,
1380 }
1381 }
1382}
1383
1384#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1387#[serde(rename_all = "camelCase")]
1388pub struct CSSSupports<'a> {
1389 text: Cow<'a, str>,
1391 active: bool,
1393 #[serde(skip_serializing_if = "Option::is_none")]
1396 range: Option<SourceRange>,
1397 #[serde(skip_serializing_if = "Option::is_none")]
1399 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1400}
1401
1402impl<'a> CSSSupports<'a> {
1403 pub fn builder(text: impl Into<Cow<'a, str>>, active: bool) -> CSSSupportsBuilder<'a> {
1404 CSSSupportsBuilder {
1405 text: text.into(),
1406 active: active,
1407 range: None,
1408 styleSheetId: None,
1409 }
1410 }
1411 pub fn text(&self) -> &str { self.text.as_ref() }
1412 pub fn active(&self) -> bool { self.active }
1413 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
1414 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
1415}
1416
1417
1418pub struct CSSSupportsBuilder<'a> {
1419 text: Cow<'a, str>,
1420 active: bool,
1421 range: Option<SourceRange>,
1422 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1423}
1424
1425impl<'a> CSSSupportsBuilder<'a> {
1426 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
1429 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
1431 pub fn build(self) -> CSSSupports<'a> {
1432 CSSSupports {
1433 text: self.text,
1434 active: self.active,
1435 range: self.range,
1436 styleSheetId: self.styleSheetId,
1437 }
1438 }
1439}
1440
1441#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1444#[serde(rename_all = "camelCase")]
1445pub struct CSSNavigation<'a> {
1446 text: Cow<'a, str>,
1448 #[serde(skip_serializing_if = "Option::is_none")]
1450 active: Option<bool>,
1451 #[serde(skip_serializing_if = "Option::is_none")]
1454 range: Option<SourceRange>,
1455 #[serde(skip_serializing_if = "Option::is_none")]
1457 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1458}
1459
1460impl<'a> CSSNavigation<'a> {
1461 pub fn builder(text: impl Into<Cow<'a, str>>) -> CSSNavigationBuilder<'a> {
1462 CSSNavigationBuilder {
1463 text: text.into(),
1464 active: None,
1465 range: None,
1466 styleSheetId: None,
1467 }
1468 }
1469 pub fn text(&self) -> &str { self.text.as_ref() }
1470 pub fn active(&self) -> Option<bool> { self.active }
1471 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
1472 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
1473}
1474
1475
1476pub struct CSSNavigationBuilder<'a> {
1477 text: Cow<'a, str>,
1478 active: Option<bool>,
1479 range: Option<SourceRange>,
1480 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1481}
1482
1483impl<'a> CSSNavigationBuilder<'a> {
1484 pub fn active(mut self, active: bool) -> Self { self.active = Some(active); self }
1486 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
1489 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
1491 pub fn build(self) -> CSSNavigation<'a> {
1492 CSSNavigation {
1493 text: self.text,
1494 active: self.active,
1495 range: self.range,
1496 styleSheetId: self.styleSheetId,
1497 }
1498 }
1499}
1500
1501#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1504#[serde(rename_all = "camelCase")]
1505pub struct CSSScope<'a> {
1506 text: Cow<'a, str>,
1508 #[serde(skip_serializing_if = "Option::is_none")]
1511 range: Option<SourceRange>,
1512 #[serde(skip_serializing_if = "Option::is_none")]
1514 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1515}
1516
1517impl<'a> CSSScope<'a> {
1518 pub fn builder(text: impl Into<Cow<'a, str>>) -> CSSScopeBuilder<'a> {
1519 CSSScopeBuilder {
1520 text: text.into(),
1521 range: None,
1522 styleSheetId: None,
1523 }
1524 }
1525 pub fn text(&self) -> &str { self.text.as_ref() }
1526 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
1527 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
1528}
1529
1530
1531pub struct CSSScopeBuilder<'a> {
1532 text: Cow<'a, str>,
1533 range: Option<SourceRange>,
1534 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1535}
1536
1537impl<'a> CSSScopeBuilder<'a> {
1538 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
1541 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
1543 pub fn build(self) -> CSSScope<'a> {
1544 CSSScope {
1545 text: self.text,
1546 range: self.range,
1547 styleSheetId: self.styleSheetId,
1548 }
1549 }
1550}
1551
1552#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1555#[serde(rename_all = "camelCase")]
1556pub struct CSSLayer<'a> {
1557 text: Cow<'a, str>,
1559 #[serde(skip_serializing_if = "Option::is_none")]
1562 range: Option<SourceRange>,
1563 #[serde(skip_serializing_if = "Option::is_none")]
1565 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1566}
1567
1568impl<'a> CSSLayer<'a> {
1569 pub fn builder(text: impl Into<Cow<'a, str>>) -> CSSLayerBuilder<'a> {
1570 CSSLayerBuilder {
1571 text: text.into(),
1572 range: None,
1573 styleSheetId: None,
1574 }
1575 }
1576 pub fn text(&self) -> &str { self.text.as_ref() }
1577 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
1578 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
1579}
1580
1581
1582pub struct CSSLayerBuilder<'a> {
1583 text: Cow<'a, str>,
1584 range: Option<SourceRange>,
1585 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1586}
1587
1588impl<'a> CSSLayerBuilder<'a> {
1589 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
1592 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
1594 pub fn build(self) -> CSSLayer<'a> {
1595 CSSLayer {
1596 text: self.text,
1597 range: self.range,
1598 styleSheetId: self.styleSheetId,
1599 }
1600 }
1601}
1602
1603#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1606#[serde(rename_all = "camelCase")]
1607pub struct CSSStartingStyle<'a> {
1608 #[serde(skip_serializing_if = "Option::is_none")]
1611 range: Option<SourceRange>,
1612 #[serde(skip_serializing_if = "Option::is_none")]
1614 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1615}
1616
1617impl<'a> CSSStartingStyle<'a> {
1618 pub fn builder() -> CSSStartingStyleBuilder<'a> {
1619 CSSStartingStyleBuilder {
1620 range: None,
1621 styleSheetId: None,
1622 }
1623 }
1624 pub fn range(&self) -> Option<&SourceRange> { self.range.as_ref() }
1625 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
1626}
1627
1628#[derive(Default)]
1629pub struct CSSStartingStyleBuilder<'a> {
1630 range: Option<SourceRange>,
1631 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1632}
1633
1634impl<'a> CSSStartingStyleBuilder<'a> {
1635 pub fn range(mut self, range: SourceRange) -> Self { self.range = Some(range); self }
1638 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
1640 pub fn build(self) -> CSSStartingStyle<'a> {
1641 CSSStartingStyle {
1642 range: self.range,
1643 styleSheetId: self.styleSheetId,
1644 }
1645 }
1646}
1647
1648#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1651#[serde(rename_all = "camelCase")]
1652pub struct CSSLayerData<'a> {
1653 name: Cow<'a, str>,
1655 #[serde(skip_serializing_if = "Option::is_none")]
1657 subLayers: Option<Vec<Box<CSSLayerData<'a>>>>,
1658 order: f64,
1661}
1662
1663impl<'a> CSSLayerData<'a> {
1664 pub fn builder(name: impl Into<Cow<'a, str>>, order: f64) -> CSSLayerDataBuilder<'a> {
1665 CSSLayerDataBuilder {
1666 name: name.into(),
1667 subLayers: None,
1668 order: order,
1669 }
1670 }
1671 pub fn name(&self) -> &str { self.name.as_ref() }
1672 pub fn subLayers(&self) -> Option<&[Box<CSSLayerData<'a>>]> { self.subLayers.as_deref() }
1673 pub fn order(&self) -> f64 { self.order }
1674}
1675
1676
1677pub struct CSSLayerDataBuilder<'a> {
1678 name: Cow<'a, str>,
1679 subLayers: Option<Vec<Box<CSSLayerData<'a>>>>,
1680 order: f64,
1681}
1682
1683impl<'a> CSSLayerDataBuilder<'a> {
1684 pub fn subLayers(mut self, subLayers: Vec<Box<CSSLayerData<'a>>>) -> Self { self.subLayers = Some(subLayers); self }
1686 pub fn build(self) -> CSSLayerData<'a> {
1687 CSSLayerData {
1688 name: self.name,
1689 subLayers: self.subLayers,
1690 order: self.order,
1691 }
1692 }
1693}
1694
1695#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1698#[serde(rename_all = "camelCase")]
1699pub struct PlatformFontUsage<'a> {
1700 familyName: Cow<'a, str>,
1702 postScriptName: Cow<'a, str>,
1704 isCustomFont: bool,
1706 glyphCount: f64,
1708}
1709
1710impl<'a> PlatformFontUsage<'a> {
1711 pub fn builder(familyName: impl Into<Cow<'a, str>>, postScriptName: impl Into<Cow<'a, str>>, isCustomFont: bool, glyphCount: f64) -> PlatformFontUsageBuilder<'a> {
1712 PlatformFontUsageBuilder {
1713 familyName: familyName.into(),
1714 postScriptName: postScriptName.into(),
1715 isCustomFont: isCustomFont,
1716 glyphCount: glyphCount,
1717 }
1718 }
1719 pub fn familyName(&self) -> &str { self.familyName.as_ref() }
1720 pub fn postScriptName(&self) -> &str { self.postScriptName.as_ref() }
1721 pub fn isCustomFont(&self) -> bool { self.isCustomFont }
1722 pub fn glyphCount(&self) -> f64 { self.glyphCount }
1723}
1724
1725
1726pub struct PlatformFontUsageBuilder<'a> {
1727 familyName: Cow<'a, str>,
1728 postScriptName: Cow<'a, str>,
1729 isCustomFont: bool,
1730 glyphCount: f64,
1731}
1732
1733impl<'a> PlatformFontUsageBuilder<'a> {
1734 pub fn build(self) -> PlatformFontUsage<'a> {
1735 PlatformFontUsage {
1736 familyName: self.familyName,
1737 postScriptName: self.postScriptName,
1738 isCustomFont: self.isCustomFont,
1739 glyphCount: self.glyphCount,
1740 }
1741 }
1742}
1743
1744#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1747#[serde(rename_all = "camelCase")]
1748pub struct FontVariationAxis<'a> {
1749 tag: Cow<'a, str>,
1751 name: Cow<'a, str>,
1753 minValue: f64,
1755 maxValue: f64,
1757 defaultValue: f64,
1759}
1760
1761impl<'a> FontVariationAxis<'a> {
1762 pub fn builder(tag: impl Into<Cow<'a, str>>, name: impl Into<Cow<'a, str>>, minValue: f64, maxValue: f64, defaultValue: f64) -> FontVariationAxisBuilder<'a> {
1763 FontVariationAxisBuilder {
1764 tag: tag.into(),
1765 name: name.into(),
1766 minValue: minValue,
1767 maxValue: maxValue,
1768 defaultValue: defaultValue,
1769 }
1770 }
1771 pub fn tag(&self) -> &str { self.tag.as_ref() }
1772 pub fn name(&self) -> &str { self.name.as_ref() }
1773 pub fn minValue(&self) -> f64 { self.minValue }
1774 pub fn maxValue(&self) -> f64 { self.maxValue }
1775 pub fn defaultValue(&self) -> f64 { self.defaultValue }
1776}
1777
1778
1779pub struct FontVariationAxisBuilder<'a> {
1780 tag: Cow<'a, str>,
1781 name: Cow<'a, str>,
1782 minValue: f64,
1783 maxValue: f64,
1784 defaultValue: f64,
1785}
1786
1787impl<'a> FontVariationAxisBuilder<'a> {
1788 pub fn build(self) -> FontVariationAxis<'a> {
1789 FontVariationAxis {
1790 tag: self.tag,
1791 name: self.name,
1792 minValue: self.minValue,
1793 maxValue: self.maxValue,
1794 defaultValue: self.defaultValue,
1795 }
1796 }
1797}
1798
1799#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1803#[serde(rename_all = "camelCase")]
1804pub struct FontFace<'a> {
1805 fontFamily: Cow<'a, str>,
1807 fontStyle: Cow<'a, str>,
1809 fontVariant: Cow<'a, str>,
1811 fontWeight: Cow<'a, str>,
1813 fontStretch: Cow<'a, str>,
1815 fontDisplay: Cow<'a, str>,
1817 unicodeRange: Cow<'a, str>,
1819 src: Cow<'a, str>,
1821 platformFontFamily: Cow<'a, str>,
1823 #[serde(skip_serializing_if = "Option::is_none")]
1825 fontVariationAxes: Option<Vec<FontVariationAxis<'a>>>,
1826}
1827
1828impl<'a> FontFace<'a> {
1829 pub fn builder(fontFamily: impl Into<Cow<'a, str>>, fontStyle: impl Into<Cow<'a, str>>, fontVariant: impl Into<Cow<'a, str>>, fontWeight: impl Into<Cow<'a, str>>, fontStretch: impl Into<Cow<'a, str>>, fontDisplay: impl Into<Cow<'a, str>>, unicodeRange: impl Into<Cow<'a, str>>, src: impl Into<Cow<'a, str>>, platformFontFamily: impl Into<Cow<'a, str>>) -> FontFaceBuilder<'a> {
1830 FontFaceBuilder {
1831 fontFamily: fontFamily.into(),
1832 fontStyle: fontStyle.into(),
1833 fontVariant: fontVariant.into(),
1834 fontWeight: fontWeight.into(),
1835 fontStretch: fontStretch.into(),
1836 fontDisplay: fontDisplay.into(),
1837 unicodeRange: unicodeRange.into(),
1838 src: src.into(),
1839 platformFontFamily: platformFontFamily.into(),
1840 fontVariationAxes: None,
1841 }
1842 }
1843 pub fn fontFamily(&self) -> &str { self.fontFamily.as_ref() }
1844 pub fn fontStyle(&self) -> &str { self.fontStyle.as_ref() }
1845 pub fn fontVariant(&self) -> &str { self.fontVariant.as_ref() }
1846 pub fn fontWeight(&self) -> &str { self.fontWeight.as_ref() }
1847 pub fn fontStretch(&self) -> &str { self.fontStretch.as_ref() }
1848 pub fn fontDisplay(&self) -> &str { self.fontDisplay.as_ref() }
1849 pub fn unicodeRange(&self) -> &str { self.unicodeRange.as_ref() }
1850 pub fn src(&self) -> &str { self.src.as_ref() }
1851 pub fn platformFontFamily(&self) -> &str { self.platformFontFamily.as_ref() }
1852 pub fn fontVariationAxes(&self) -> Option<&[FontVariationAxis<'a>]> { self.fontVariationAxes.as_deref() }
1853}
1854
1855
1856pub struct FontFaceBuilder<'a> {
1857 fontFamily: Cow<'a, str>,
1858 fontStyle: Cow<'a, str>,
1859 fontVariant: Cow<'a, str>,
1860 fontWeight: Cow<'a, str>,
1861 fontStretch: Cow<'a, str>,
1862 fontDisplay: Cow<'a, str>,
1863 unicodeRange: Cow<'a, str>,
1864 src: Cow<'a, str>,
1865 platformFontFamily: Cow<'a, str>,
1866 fontVariationAxes: Option<Vec<FontVariationAxis<'a>>>,
1867}
1868
1869impl<'a> FontFaceBuilder<'a> {
1870 pub fn fontVariationAxes(mut self, fontVariationAxes: Vec<FontVariationAxis<'a>>) -> Self { self.fontVariationAxes = Some(fontVariationAxes); self }
1872 pub fn build(self) -> FontFace<'a> {
1873 FontFace {
1874 fontFamily: self.fontFamily,
1875 fontStyle: self.fontStyle,
1876 fontVariant: self.fontVariant,
1877 fontWeight: self.fontWeight,
1878 fontStretch: self.fontStretch,
1879 fontDisplay: self.fontDisplay,
1880 unicodeRange: self.unicodeRange,
1881 src: self.src,
1882 platformFontFamily: self.platformFontFamily,
1883 fontVariationAxes: self.fontVariationAxes,
1884 }
1885 }
1886}
1887
1888#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1891#[serde(rename_all = "camelCase")]
1892pub struct CSSTryRule<'a> {
1893 #[serde(skip_serializing_if = "Option::is_none")]
1896 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1897 origin: StyleSheetOrigin,
1899 style: CSSStyle<'a>,
1901}
1902
1903impl<'a> CSSTryRule<'a> {
1904 pub fn builder(origin: StyleSheetOrigin, style: CSSStyle<'a>) -> CSSTryRuleBuilder<'a> {
1905 CSSTryRuleBuilder {
1906 styleSheetId: None,
1907 origin: origin,
1908 style: style,
1909 }
1910 }
1911 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
1912 pub fn origin(&self) -> &StyleSheetOrigin { &self.origin }
1913 pub fn style(&self) -> &CSSStyle<'a> { &self.style }
1914}
1915
1916
1917pub struct CSSTryRuleBuilder<'a> {
1918 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1919 origin: StyleSheetOrigin,
1920 style: CSSStyle<'a>,
1921}
1922
1923impl<'a> CSSTryRuleBuilder<'a> {
1924 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
1927 pub fn build(self) -> CSSTryRule<'a> {
1928 CSSTryRule {
1929 styleSheetId: self.styleSheetId,
1930 origin: self.origin,
1931 style: self.style,
1932 }
1933 }
1934}
1935
1936#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1939#[serde(rename_all = "camelCase")]
1940pub struct CSSPositionTryRule<'a> {
1941 name: ProtocolValue<'a>,
1943 #[serde(skip_serializing_if = "Option::is_none")]
1946 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1947 origin: StyleSheetOrigin,
1949 style: CSSStyle<'a>,
1951 active: bool,
1952}
1953
1954impl<'a> CSSPositionTryRule<'a> {
1955 pub fn builder(name: ProtocolValue<'a>, origin: StyleSheetOrigin, style: CSSStyle<'a>, active: bool) -> CSSPositionTryRuleBuilder<'a> {
1956 CSSPositionTryRuleBuilder {
1957 name: name,
1958 styleSheetId: None,
1959 origin: origin,
1960 style: style,
1961 active: active,
1962 }
1963 }
1964 pub fn name(&self) -> &ProtocolValue<'a> { &self.name }
1965 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
1966 pub fn origin(&self) -> &StyleSheetOrigin { &self.origin }
1967 pub fn style(&self) -> &CSSStyle<'a> { &self.style }
1968 pub fn active(&self) -> bool { self.active }
1969}
1970
1971
1972pub struct CSSPositionTryRuleBuilder<'a> {
1973 name: ProtocolValue<'a>,
1974 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
1975 origin: StyleSheetOrigin,
1976 style: CSSStyle<'a>,
1977 active: bool,
1978}
1979
1980impl<'a> CSSPositionTryRuleBuilder<'a> {
1981 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
1984 pub fn build(self) -> CSSPositionTryRule<'a> {
1985 CSSPositionTryRule {
1986 name: self.name,
1987 styleSheetId: self.styleSheetId,
1988 origin: self.origin,
1989 style: self.style,
1990 active: self.active,
1991 }
1992 }
1993}
1994
1995#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1998#[serde(rename_all = "camelCase")]
1999pub struct CSSKeyframesRule<'a> {
2000 animationName: ProtocolValue<'a>,
2002 keyframes: Vec<CSSKeyframeRule<'a>>,
2004}
2005
2006impl<'a> CSSKeyframesRule<'a> {
2007 pub fn builder(animationName: ProtocolValue<'a>, keyframes: Vec<CSSKeyframeRule<'a>>) -> CSSKeyframesRuleBuilder<'a> {
2008 CSSKeyframesRuleBuilder {
2009 animationName: animationName,
2010 keyframes: keyframes,
2011 }
2012 }
2013 pub fn animationName(&self) -> &ProtocolValue<'a> { &self.animationName }
2014 pub fn keyframes(&self) -> &[CSSKeyframeRule<'a>] { &self.keyframes }
2015}
2016
2017
2018pub struct CSSKeyframesRuleBuilder<'a> {
2019 animationName: ProtocolValue<'a>,
2020 keyframes: Vec<CSSKeyframeRule<'a>>,
2021}
2022
2023impl<'a> CSSKeyframesRuleBuilder<'a> {
2024 pub fn build(self) -> CSSKeyframesRule<'a> {
2025 CSSKeyframesRule {
2026 animationName: self.animationName,
2027 keyframes: self.keyframes,
2028 }
2029 }
2030}
2031
2032#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2035#[serde(rename_all = "camelCase")]
2036pub struct CSSPropertyRegistration<'a> {
2037 propertyName: Cow<'a, str>,
2038 #[serde(skip_serializing_if = "Option::is_none")]
2039 initialValue: Option<ProtocolValue<'a>>,
2040 inherits: bool,
2041 syntax: Cow<'a, str>,
2042}
2043
2044impl<'a> CSSPropertyRegistration<'a> {
2045 pub fn builder(propertyName: impl Into<Cow<'a, str>>, inherits: bool, syntax: impl Into<Cow<'a, str>>) -> CSSPropertyRegistrationBuilder<'a> {
2046 CSSPropertyRegistrationBuilder {
2047 propertyName: propertyName.into(),
2048 initialValue: None,
2049 inherits: inherits,
2050 syntax: syntax.into(),
2051 }
2052 }
2053 pub fn propertyName(&self) -> &str { self.propertyName.as_ref() }
2054 pub fn initialValue(&self) -> Option<&ProtocolValue<'a>> { self.initialValue.as_ref() }
2055 pub fn inherits(&self) -> bool { self.inherits }
2056 pub fn syntax(&self) -> &str { self.syntax.as_ref() }
2057}
2058
2059
2060pub struct CSSPropertyRegistrationBuilder<'a> {
2061 propertyName: Cow<'a, str>,
2062 initialValue: Option<ProtocolValue<'a>>,
2063 inherits: bool,
2064 syntax: Cow<'a, str>,
2065}
2066
2067impl<'a> CSSPropertyRegistrationBuilder<'a> {
2068 pub fn initialValue(mut self, initialValue: ProtocolValue<'a>) -> Self { self.initialValue = Some(initialValue); self }
2069 pub fn build(self) -> CSSPropertyRegistration<'a> {
2070 CSSPropertyRegistration {
2071 propertyName: self.propertyName,
2072 initialValue: self.initialValue,
2073 inherits: self.inherits,
2074 syntax: self.syntax,
2075 }
2076 }
2077}
2078
2079#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2082#[serde(rename_all = "camelCase")]
2083pub struct CSSAtRule<'a> {
2084 #[serde(rename = "type")]
2086 type_: Cow<'a, str>,
2087 #[serde(skip_serializing_if = "Option::is_none")]
2089 subsection: Option<Cow<'a, str>>,
2090 #[serde(skip_serializing_if = "Option::is_none")]
2093 name: Option<ProtocolValue<'a>>,
2094 #[serde(skip_serializing_if = "Option::is_none")]
2097 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
2098 origin: StyleSheetOrigin,
2100 style: CSSStyle<'a>,
2102}
2103
2104impl<'a> CSSAtRule<'a> {
2105 pub fn builder(type_: impl Into<Cow<'a, str>>, origin: StyleSheetOrigin, style: CSSStyle<'a>) -> CSSAtRuleBuilder<'a> {
2106 CSSAtRuleBuilder {
2107 type_: type_.into(),
2108 subsection: None,
2109 name: None,
2110 styleSheetId: None,
2111 origin: origin,
2112 style: style,
2113 }
2114 }
2115 pub fn type_(&self) -> &str { self.type_.as_ref() }
2116 pub fn subsection(&self) -> Option<&str> { self.subsection.as_deref() }
2117 pub fn name(&self) -> Option<&ProtocolValue<'a>> { self.name.as_ref() }
2118 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
2119 pub fn origin(&self) -> &StyleSheetOrigin { &self.origin }
2120 pub fn style(&self) -> &CSSStyle<'a> { &self.style }
2121}
2122
2123
2124pub struct CSSAtRuleBuilder<'a> {
2125 type_: Cow<'a, str>,
2126 subsection: Option<Cow<'a, str>>,
2127 name: Option<ProtocolValue<'a>>,
2128 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
2129 origin: StyleSheetOrigin,
2130 style: CSSStyle<'a>,
2131}
2132
2133impl<'a> CSSAtRuleBuilder<'a> {
2134 pub fn subsection(mut self, subsection: impl Into<Cow<'a, str>>) -> Self { self.subsection = Some(subsection.into()); self }
2136 pub fn name(mut self, name: ProtocolValue<'a>) -> Self { self.name = Some(name); self }
2139 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
2142 pub fn build(self) -> CSSAtRule<'a> {
2143 CSSAtRule {
2144 type_: self.type_,
2145 subsection: self.subsection,
2146 name: self.name,
2147 styleSheetId: self.styleSheetId,
2148 origin: self.origin,
2149 style: self.style,
2150 }
2151 }
2152}
2153
2154#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2157#[serde(rename_all = "camelCase")]
2158pub struct CSSPropertyRule<'a> {
2159 #[serde(skip_serializing_if = "Option::is_none")]
2162 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
2163 origin: StyleSheetOrigin,
2165 propertyName: ProtocolValue<'a>,
2167 style: CSSStyle<'a>,
2169}
2170
2171impl<'a> CSSPropertyRule<'a> {
2172 pub fn builder(origin: StyleSheetOrigin, propertyName: ProtocolValue<'a>, style: CSSStyle<'a>) -> CSSPropertyRuleBuilder<'a> {
2173 CSSPropertyRuleBuilder {
2174 styleSheetId: None,
2175 origin: origin,
2176 propertyName: propertyName,
2177 style: style,
2178 }
2179 }
2180 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
2181 pub fn origin(&self) -> &StyleSheetOrigin { &self.origin }
2182 pub fn propertyName(&self) -> &ProtocolValue<'a> { &self.propertyName }
2183 pub fn style(&self) -> &CSSStyle<'a> { &self.style }
2184}
2185
2186
2187pub struct CSSPropertyRuleBuilder<'a> {
2188 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
2189 origin: StyleSheetOrigin,
2190 propertyName: ProtocolValue<'a>,
2191 style: CSSStyle<'a>,
2192}
2193
2194impl<'a> CSSPropertyRuleBuilder<'a> {
2195 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
2198 pub fn build(self) -> CSSPropertyRule<'a> {
2199 CSSPropertyRule {
2200 styleSheetId: self.styleSheetId,
2201 origin: self.origin,
2202 propertyName: self.propertyName,
2203 style: self.style,
2204 }
2205 }
2206}
2207
2208#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2211#[serde(rename_all = "camelCase")]
2212pub struct CSSFunctionParameter<'a> {
2213 name: Cow<'a, str>,
2215 #[serde(rename = "type")]
2217 type_: Cow<'a, str>,
2218}
2219
2220impl<'a> CSSFunctionParameter<'a> {
2221 pub fn builder(name: impl Into<Cow<'a, str>>, type_: impl Into<Cow<'a, str>>) -> CSSFunctionParameterBuilder<'a> {
2222 CSSFunctionParameterBuilder {
2223 name: name.into(),
2224 type_: type_.into(),
2225 }
2226 }
2227 pub fn name(&self) -> &str { self.name.as_ref() }
2228 pub fn type_(&self) -> &str { self.type_.as_ref() }
2229}
2230
2231
2232pub struct CSSFunctionParameterBuilder<'a> {
2233 name: Cow<'a, str>,
2234 type_: Cow<'a, str>,
2235}
2236
2237impl<'a> CSSFunctionParameterBuilder<'a> {
2238 pub fn build(self) -> CSSFunctionParameter<'a> {
2239 CSSFunctionParameter {
2240 name: self.name,
2241 type_: self.type_,
2242 }
2243 }
2244}
2245
2246#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2249#[serde(rename_all = "camelCase")]
2250pub struct CSSFunctionConditionNode<'a> {
2251 #[serde(skip_serializing_if = "Option::is_none")]
2253 media: Option<CSSMedia<'a>>,
2254 #[serde(skip_serializing_if = "Option::is_none")]
2256 containerQueries: Option<CSSContainerQuery<'a>>,
2257 #[serde(skip_serializing_if = "Option::is_none")]
2259 supports: Option<CSSSupports<'a>>,
2260 #[serde(skip_serializing_if = "Option::is_none")]
2262 navigation: Option<CSSNavigation<'a>>,
2263 children: Vec<CSSFunctionNode<'a>>,
2265 conditionText: Cow<'a, str>,
2267}
2268
2269impl<'a> CSSFunctionConditionNode<'a> {
2270 pub fn builder(children: Vec<CSSFunctionNode<'a>>, conditionText: impl Into<Cow<'a, str>>) -> CSSFunctionConditionNodeBuilder<'a> {
2271 CSSFunctionConditionNodeBuilder {
2272 media: None,
2273 containerQueries: None,
2274 supports: None,
2275 navigation: None,
2276 children: children,
2277 conditionText: conditionText.into(),
2278 }
2279 }
2280 pub fn media(&self) -> Option<&CSSMedia<'a>> { self.media.as_ref() }
2281 pub fn containerQueries(&self) -> Option<&CSSContainerQuery<'a>> { self.containerQueries.as_ref() }
2282 pub fn supports(&self) -> Option<&CSSSupports<'a>> { self.supports.as_ref() }
2283 pub fn navigation(&self) -> Option<&CSSNavigation<'a>> { self.navigation.as_ref() }
2284 pub fn children(&self) -> &[CSSFunctionNode<'a>] { &self.children }
2285 pub fn conditionText(&self) -> &str { self.conditionText.as_ref() }
2286}
2287
2288
2289pub struct CSSFunctionConditionNodeBuilder<'a> {
2290 media: Option<CSSMedia<'a>>,
2291 containerQueries: Option<CSSContainerQuery<'a>>,
2292 supports: Option<CSSSupports<'a>>,
2293 navigation: Option<CSSNavigation<'a>>,
2294 children: Vec<CSSFunctionNode<'a>>,
2295 conditionText: Cow<'a, str>,
2296}
2297
2298impl<'a> CSSFunctionConditionNodeBuilder<'a> {
2299 pub fn media(mut self, media: CSSMedia<'a>) -> Self { self.media = Some(media); self }
2301 pub fn containerQueries(mut self, containerQueries: CSSContainerQuery<'a>) -> Self { self.containerQueries = Some(containerQueries); self }
2303 pub fn supports(mut self, supports: CSSSupports<'a>) -> Self { self.supports = Some(supports); self }
2305 pub fn navigation(mut self, navigation: CSSNavigation<'a>) -> Self { self.navigation = Some(navigation); self }
2307 pub fn build(self) -> CSSFunctionConditionNode<'a> {
2308 CSSFunctionConditionNode {
2309 media: self.media,
2310 containerQueries: self.containerQueries,
2311 supports: self.supports,
2312 navigation: self.navigation,
2313 children: self.children,
2314 conditionText: self.conditionText,
2315 }
2316 }
2317}
2318
2319#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2322#[serde(rename_all = "camelCase")]
2323pub struct CSSFunctionNode<'a> {
2324 #[serde(skip_serializing_if = "Option::is_none")]
2326 condition: Option<CSSFunctionConditionNode<'a>>,
2327 #[serde(skip_serializing_if = "Option::is_none")]
2329 style: Option<CSSStyle<'a>>,
2330}
2331
2332impl<'a> CSSFunctionNode<'a> {
2333 pub fn builder() -> CSSFunctionNodeBuilder<'a> {
2334 CSSFunctionNodeBuilder {
2335 condition: None,
2336 style: None,
2337 }
2338 }
2339 pub fn condition(&self) -> Option<&CSSFunctionConditionNode<'a>> { self.condition.as_ref() }
2340 pub fn style(&self) -> Option<&CSSStyle<'a>> { self.style.as_ref() }
2341}
2342
2343#[derive(Default)]
2344pub struct CSSFunctionNodeBuilder<'a> {
2345 condition: Option<CSSFunctionConditionNode<'a>>,
2346 style: Option<CSSStyle<'a>>,
2347}
2348
2349impl<'a> CSSFunctionNodeBuilder<'a> {
2350 pub fn condition(mut self, condition: CSSFunctionConditionNode<'a>) -> Self { self.condition = Some(condition); self }
2352 pub fn style(mut self, style: CSSStyle<'a>) -> Self { self.style = Some(style); self }
2354 pub fn build(self) -> CSSFunctionNode<'a> {
2355 CSSFunctionNode {
2356 condition: self.condition,
2357 style: self.style,
2358 }
2359 }
2360}
2361
2362#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2365#[serde(rename_all = "camelCase")]
2366pub struct CSSFunctionRule<'a> {
2367 name: ProtocolValue<'a>,
2369 #[serde(skip_serializing_if = "Option::is_none")]
2372 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
2373 origin: StyleSheetOrigin,
2375 parameters: Vec<CSSFunctionParameter<'a>>,
2377 children: Vec<CSSFunctionNode<'a>>,
2379 #[serde(skip_serializing_if = "Option::is_none")]
2381 originTreeScopeNodeId: Option<crate::dom::BackendNodeId>,
2382}
2383
2384impl<'a> CSSFunctionRule<'a> {
2385 pub fn builder(name: ProtocolValue<'a>, origin: StyleSheetOrigin, parameters: Vec<CSSFunctionParameter<'a>>, children: Vec<CSSFunctionNode<'a>>) -> CSSFunctionRuleBuilder<'a> {
2386 CSSFunctionRuleBuilder {
2387 name: name,
2388 styleSheetId: None,
2389 origin: origin,
2390 parameters: parameters,
2391 children: children,
2392 originTreeScopeNodeId: None,
2393 }
2394 }
2395 pub fn name(&self) -> &ProtocolValue<'a> { &self.name }
2396 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
2397 pub fn origin(&self) -> &StyleSheetOrigin { &self.origin }
2398 pub fn parameters(&self) -> &[CSSFunctionParameter<'a>] { &self.parameters }
2399 pub fn children(&self) -> &[CSSFunctionNode<'a>] { &self.children }
2400 pub fn originTreeScopeNodeId(&self) -> Option<&crate::dom::BackendNodeId> { self.originTreeScopeNodeId.as_ref() }
2401}
2402
2403
2404pub struct CSSFunctionRuleBuilder<'a> {
2405 name: ProtocolValue<'a>,
2406 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
2407 origin: StyleSheetOrigin,
2408 parameters: Vec<CSSFunctionParameter<'a>>,
2409 children: Vec<CSSFunctionNode<'a>>,
2410 originTreeScopeNodeId: Option<crate::dom::BackendNodeId>,
2411}
2412
2413impl<'a> CSSFunctionRuleBuilder<'a> {
2414 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
2417 pub fn originTreeScopeNodeId(mut self, originTreeScopeNodeId: crate::dom::BackendNodeId) -> Self { self.originTreeScopeNodeId = Some(originTreeScopeNodeId); self }
2419 pub fn build(self) -> CSSFunctionRule<'a> {
2420 CSSFunctionRule {
2421 name: self.name,
2422 styleSheetId: self.styleSheetId,
2423 origin: self.origin,
2424 parameters: self.parameters,
2425 children: self.children,
2426 originTreeScopeNodeId: self.originTreeScopeNodeId,
2427 }
2428 }
2429}
2430
2431#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2434#[serde(rename_all = "camelCase")]
2435pub struct CSSKeyframeRule<'a> {
2436 #[serde(skip_serializing_if = "Option::is_none")]
2439 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
2440 origin: StyleSheetOrigin,
2442 keyText: ProtocolValue<'a>,
2444 style: CSSStyle<'a>,
2446}
2447
2448impl<'a> CSSKeyframeRule<'a> {
2449 pub fn builder(origin: StyleSheetOrigin, keyText: ProtocolValue<'a>, style: CSSStyle<'a>) -> CSSKeyframeRuleBuilder<'a> {
2450 CSSKeyframeRuleBuilder {
2451 styleSheetId: None,
2452 origin: origin,
2453 keyText: keyText,
2454 style: style,
2455 }
2456 }
2457 pub fn styleSheetId(&self) -> Option<&crate::dom::StyleSheetId<'a>> { self.styleSheetId.as_ref() }
2458 pub fn origin(&self) -> &StyleSheetOrigin { &self.origin }
2459 pub fn keyText(&self) -> &ProtocolValue<'a> { &self.keyText }
2460 pub fn style(&self) -> &CSSStyle<'a> { &self.style }
2461}
2462
2463
2464pub struct CSSKeyframeRuleBuilder<'a> {
2465 styleSheetId: Option<crate::dom::StyleSheetId<'a>>,
2466 origin: StyleSheetOrigin,
2467 keyText: ProtocolValue<'a>,
2468 style: CSSStyle<'a>,
2469}
2470
2471impl<'a> CSSKeyframeRuleBuilder<'a> {
2472 pub fn styleSheetId(mut self, styleSheetId: crate::dom::StyleSheetId<'a>) -> Self { self.styleSheetId = Some(styleSheetId); self }
2475 pub fn build(self) -> CSSKeyframeRule<'a> {
2476 CSSKeyframeRule {
2477 styleSheetId: self.styleSheetId,
2478 origin: self.origin,
2479 keyText: self.keyText,
2480 style: self.style,
2481 }
2482 }
2483}
2484
2485#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2488#[serde(rename_all = "camelCase")]
2489pub struct StyleDeclarationEdit<'a> {
2490 styleSheetId: crate::dom::StyleSheetId<'a>,
2492 range: SourceRange,
2494 text: Cow<'a, str>,
2496}
2497
2498impl<'a> StyleDeclarationEdit<'a> {
2499 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, range: SourceRange, text: impl Into<Cow<'a, str>>) -> StyleDeclarationEditBuilder<'a> {
2500 StyleDeclarationEditBuilder {
2501 styleSheetId: styleSheetId,
2502 range: range,
2503 text: text.into(),
2504 }
2505 }
2506 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
2507 pub fn range(&self) -> &SourceRange { &self.range }
2508 pub fn text(&self) -> &str { self.text.as_ref() }
2509}
2510
2511
2512pub struct StyleDeclarationEditBuilder<'a> {
2513 styleSheetId: crate::dom::StyleSheetId<'a>,
2514 range: SourceRange,
2515 text: Cow<'a, str>,
2516}
2517
2518impl<'a> StyleDeclarationEditBuilder<'a> {
2519 pub fn build(self) -> StyleDeclarationEdit<'a> {
2520 StyleDeclarationEdit {
2521 styleSheetId: self.styleSheetId,
2522 range: self.range,
2523 text: self.text,
2524 }
2525 }
2526}
2527
2528#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2532#[serde(rename_all = "camelCase")]
2533pub struct AddRuleParams<'a> {
2534 styleSheetId: crate::dom::StyleSheetId<'a>,
2536 ruleText: Cow<'a, str>,
2538 location: SourceRange,
2540 #[serde(skip_serializing_if = "Option::is_none")]
2544 nodeForPropertySyntaxValidation: Option<crate::dom::NodeId>,
2545}
2546
2547impl<'a> AddRuleParams<'a> {
2548 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, ruleText: impl Into<Cow<'a, str>>, location: SourceRange) -> AddRuleParamsBuilder<'a> {
2549 AddRuleParamsBuilder {
2550 styleSheetId: styleSheetId,
2551 ruleText: ruleText.into(),
2552 location: location,
2553 nodeForPropertySyntaxValidation: None,
2554 }
2555 }
2556 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
2557 pub fn ruleText(&self) -> &str { self.ruleText.as_ref() }
2558 pub fn location(&self) -> &SourceRange { &self.location }
2559 pub fn nodeForPropertySyntaxValidation(&self) -> Option<&crate::dom::NodeId> { self.nodeForPropertySyntaxValidation.as_ref() }
2560}
2561
2562
2563pub struct AddRuleParamsBuilder<'a> {
2564 styleSheetId: crate::dom::StyleSheetId<'a>,
2565 ruleText: Cow<'a, str>,
2566 location: SourceRange,
2567 nodeForPropertySyntaxValidation: Option<crate::dom::NodeId>,
2568}
2569
2570impl<'a> AddRuleParamsBuilder<'a> {
2571 pub fn nodeForPropertySyntaxValidation(mut self, nodeForPropertySyntaxValidation: crate::dom::NodeId) -> Self { self.nodeForPropertySyntaxValidation = Some(nodeForPropertySyntaxValidation); self }
2575 pub fn build(self) -> AddRuleParams<'a> {
2576 AddRuleParams {
2577 styleSheetId: self.styleSheetId,
2578 ruleText: self.ruleText,
2579 location: self.location,
2580 nodeForPropertySyntaxValidation: self.nodeForPropertySyntaxValidation,
2581 }
2582 }
2583}
2584
2585#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2589#[serde(rename_all = "camelCase")]
2590pub struct AddRuleReturns<'a> {
2591 rule: CSSRule<'a>,
2593}
2594
2595impl<'a> AddRuleReturns<'a> {
2596 pub fn builder(rule: CSSRule<'a>) -> AddRuleReturnsBuilder<'a> {
2597 AddRuleReturnsBuilder {
2598 rule: rule,
2599 }
2600 }
2601 pub fn rule(&self) -> &CSSRule<'a> { &self.rule }
2602}
2603
2604
2605pub struct AddRuleReturnsBuilder<'a> {
2606 rule: CSSRule<'a>,
2607}
2608
2609impl<'a> AddRuleReturnsBuilder<'a> {
2610 pub fn build(self) -> AddRuleReturns<'a> {
2611 AddRuleReturns {
2612 rule: self.rule,
2613 }
2614 }
2615}
2616
2617impl<'a> AddRuleParams<'a> { pub const METHOD: &'static str = "CSS.addRule"; }
2618
2619impl<'a> crate::CdpCommand<'a> for AddRuleParams<'a> {
2620 const METHOD: &'static str = "CSS.addRule";
2621 type Response = AddRuleReturns<'a>;
2622}
2623
2624#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2627#[serde(rename_all = "camelCase")]
2628pub struct CollectClassNamesParams<'a> {
2629 styleSheetId: crate::dom::StyleSheetId<'a>,
2630}
2631
2632impl<'a> CollectClassNamesParams<'a> {
2633 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>) -> CollectClassNamesParamsBuilder<'a> {
2634 CollectClassNamesParamsBuilder {
2635 styleSheetId: styleSheetId,
2636 }
2637 }
2638 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
2639}
2640
2641
2642pub struct CollectClassNamesParamsBuilder<'a> {
2643 styleSheetId: crate::dom::StyleSheetId<'a>,
2644}
2645
2646impl<'a> CollectClassNamesParamsBuilder<'a> {
2647 pub fn build(self) -> CollectClassNamesParams<'a> {
2648 CollectClassNamesParams {
2649 styleSheetId: self.styleSheetId,
2650 }
2651 }
2652}
2653
2654#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2657#[serde(rename_all = "camelCase")]
2658pub struct CollectClassNamesReturns<'a> {
2659 classNames: Vec<Cow<'a, str>>,
2661}
2662
2663impl<'a> CollectClassNamesReturns<'a> {
2664 pub fn builder(classNames: Vec<Cow<'a, str>>) -> CollectClassNamesReturnsBuilder<'a> {
2665 CollectClassNamesReturnsBuilder {
2666 classNames: classNames,
2667 }
2668 }
2669 pub fn classNames(&self) -> &[Cow<'a, str>] { &self.classNames }
2670}
2671
2672
2673pub struct CollectClassNamesReturnsBuilder<'a> {
2674 classNames: Vec<Cow<'a, str>>,
2675}
2676
2677impl<'a> CollectClassNamesReturnsBuilder<'a> {
2678 pub fn build(self) -> CollectClassNamesReturns<'a> {
2679 CollectClassNamesReturns {
2680 classNames: self.classNames,
2681 }
2682 }
2683}
2684
2685impl<'a> CollectClassNamesParams<'a> { pub const METHOD: &'static str = "CSS.collectClassNames"; }
2686
2687impl<'a> crate::CdpCommand<'a> for CollectClassNamesParams<'a> {
2688 const METHOD: &'static str = "CSS.collectClassNames";
2689 type Response = CollectClassNamesReturns<'a>;
2690}
2691
2692#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2695#[serde(rename_all = "camelCase")]
2696pub struct CreateStyleSheetParams<'a> {
2697 frameId: crate::page::FrameId<'a>,
2699 #[serde(skip_serializing_if = "Option::is_none")]
2704 force: Option<bool>,
2705}
2706
2707impl<'a> CreateStyleSheetParams<'a> {
2708 pub fn builder(frameId: crate::page::FrameId<'a>) -> CreateStyleSheetParamsBuilder<'a> {
2709 CreateStyleSheetParamsBuilder {
2710 frameId: frameId,
2711 force: None,
2712 }
2713 }
2714 pub fn frameId(&self) -> &crate::page::FrameId<'a> { &self.frameId }
2715 pub fn force(&self) -> Option<bool> { self.force }
2716}
2717
2718
2719pub struct CreateStyleSheetParamsBuilder<'a> {
2720 frameId: crate::page::FrameId<'a>,
2721 force: Option<bool>,
2722}
2723
2724impl<'a> CreateStyleSheetParamsBuilder<'a> {
2725 pub fn force(mut self, force: bool) -> Self { self.force = Some(force); self }
2730 pub fn build(self) -> CreateStyleSheetParams<'a> {
2731 CreateStyleSheetParams {
2732 frameId: self.frameId,
2733 force: self.force,
2734 }
2735 }
2736}
2737
2738#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2741#[serde(rename_all = "camelCase")]
2742pub struct CreateStyleSheetReturns<'a> {
2743 styleSheetId: crate::dom::StyleSheetId<'a>,
2745}
2746
2747impl<'a> CreateStyleSheetReturns<'a> {
2748 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>) -> CreateStyleSheetReturnsBuilder<'a> {
2749 CreateStyleSheetReturnsBuilder {
2750 styleSheetId: styleSheetId,
2751 }
2752 }
2753 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
2754}
2755
2756
2757pub struct CreateStyleSheetReturnsBuilder<'a> {
2758 styleSheetId: crate::dom::StyleSheetId<'a>,
2759}
2760
2761impl<'a> CreateStyleSheetReturnsBuilder<'a> {
2762 pub fn build(self) -> CreateStyleSheetReturns<'a> {
2763 CreateStyleSheetReturns {
2764 styleSheetId: self.styleSheetId,
2765 }
2766 }
2767}
2768
2769impl<'a> CreateStyleSheetParams<'a> { pub const METHOD: &'static str = "CSS.createStyleSheet"; }
2770
2771impl<'a> crate::CdpCommand<'a> for CreateStyleSheetParams<'a> {
2772 const METHOD: &'static str = "CSS.createStyleSheet";
2773 type Response = CreateStyleSheetReturns<'a>;
2774}
2775
2776#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2777pub struct DisableParams {}
2778
2779impl DisableParams { pub const METHOD: &'static str = "CSS.disable"; }
2780
2781impl<'a> crate::CdpCommand<'a> for DisableParams {
2782 const METHOD: &'static str = "CSS.disable";
2783 type Response = crate::EmptyReturns;
2784}
2785
2786#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2787pub struct EnableParams {}
2788
2789impl EnableParams { pub const METHOD: &'static str = "CSS.enable"; }
2790
2791impl<'a> crate::CdpCommand<'a> for EnableParams {
2792 const METHOD: &'static str = "CSS.enable";
2793 type Response = crate::EmptyReturns;
2794}
2795
2796#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2800#[serde(rename_all = "camelCase")]
2801pub struct ForcePseudoStateParams<'a> {
2802 nodeId: crate::dom::NodeId,
2804 forcedPseudoClasses: Vec<Cow<'a, str>>,
2806}
2807
2808impl<'a> ForcePseudoStateParams<'a> {
2809 pub fn builder(nodeId: crate::dom::NodeId, forcedPseudoClasses: Vec<Cow<'a, str>>) -> ForcePseudoStateParamsBuilder<'a> {
2810 ForcePseudoStateParamsBuilder {
2811 nodeId: nodeId,
2812 forcedPseudoClasses: forcedPseudoClasses,
2813 }
2814 }
2815 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
2816 pub fn forcedPseudoClasses(&self) -> &[Cow<'a, str>] { &self.forcedPseudoClasses }
2817}
2818
2819
2820pub struct ForcePseudoStateParamsBuilder<'a> {
2821 nodeId: crate::dom::NodeId,
2822 forcedPseudoClasses: Vec<Cow<'a, str>>,
2823}
2824
2825impl<'a> ForcePseudoStateParamsBuilder<'a> {
2826 pub fn build(self) -> ForcePseudoStateParams<'a> {
2827 ForcePseudoStateParams {
2828 nodeId: self.nodeId,
2829 forcedPseudoClasses: self.forcedPseudoClasses,
2830 }
2831 }
2832}
2833
2834impl<'a> ForcePseudoStateParams<'a> { pub const METHOD: &'static str = "CSS.forcePseudoState"; }
2835
2836impl<'a> crate::CdpCommand<'a> for ForcePseudoStateParams<'a> {
2837 const METHOD: &'static str = "CSS.forcePseudoState";
2838 type Response = crate::EmptyReturns;
2839}
2840
2841#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2844#[serde(rename_all = "camelCase")]
2845pub struct ForceStartingStyleParams {
2846 nodeId: crate::dom::NodeId,
2848 forced: bool,
2850}
2851
2852impl ForceStartingStyleParams {
2853 pub fn builder(nodeId: crate::dom::NodeId, forced: bool) -> ForceStartingStyleParamsBuilder {
2854 ForceStartingStyleParamsBuilder {
2855 nodeId: nodeId,
2856 forced: forced,
2857 }
2858 }
2859 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
2860 pub fn forced(&self) -> bool { self.forced }
2861}
2862
2863
2864pub struct ForceStartingStyleParamsBuilder {
2865 nodeId: crate::dom::NodeId,
2866 forced: bool,
2867}
2868
2869impl ForceStartingStyleParamsBuilder {
2870 pub fn build(self) -> ForceStartingStyleParams {
2871 ForceStartingStyleParams {
2872 nodeId: self.nodeId,
2873 forced: self.forced,
2874 }
2875 }
2876}
2877
2878impl ForceStartingStyleParams { pub const METHOD: &'static str = "CSS.forceStartingStyle"; }
2879
2880impl<'a> crate::CdpCommand<'a> for ForceStartingStyleParams {
2881 const METHOD: &'static str = "CSS.forceStartingStyle";
2882 type Response = crate::EmptyReturns;
2883}
2884
2885
2886#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2887#[serde(rename_all = "camelCase")]
2888pub struct GetBackgroundColorsParams {
2889 nodeId: crate::dom::NodeId,
2891}
2892
2893impl GetBackgroundColorsParams {
2894 pub fn builder(nodeId: crate::dom::NodeId) -> GetBackgroundColorsParamsBuilder {
2895 GetBackgroundColorsParamsBuilder {
2896 nodeId: nodeId,
2897 }
2898 }
2899 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
2900}
2901
2902
2903pub struct GetBackgroundColorsParamsBuilder {
2904 nodeId: crate::dom::NodeId,
2905}
2906
2907impl GetBackgroundColorsParamsBuilder {
2908 pub fn build(self) -> GetBackgroundColorsParams {
2909 GetBackgroundColorsParams {
2910 nodeId: self.nodeId,
2911 }
2912 }
2913}
2914
2915
2916#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2917#[serde(rename_all = "camelCase")]
2918pub struct GetBackgroundColorsReturns<'a> {
2919 #[serde(skip_serializing_if = "Option::is_none")]
2925 backgroundColors: Option<Vec<Cow<'a, str>>>,
2926 #[serde(skip_serializing_if = "Option::is_none")]
2928 computedFontSize: Option<Cow<'a, str>>,
2929 #[serde(skip_serializing_if = "Option::is_none")]
2932 computedFontWeight: Option<Cow<'a, str>>,
2933}
2934
2935impl<'a> GetBackgroundColorsReturns<'a> {
2936 pub fn builder() -> GetBackgroundColorsReturnsBuilder<'a> {
2937 GetBackgroundColorsReturnsBuilder {
2938 backgroundColors: None,
2939 computedFontSize: None,
2940 computedFontWeight: None,
2941 }
2942 }
2943 pub fn backgroundColors(&self) -> Option<&[Cow<'a, str>]> { self.backgroundColors.as_deref() }
2944 pub fn computedFontSize(&self) -> Option<&str> { self.computedFontSize.as_deref() }
2945 pub fn computedFontWeight(&self) -> Option<&str> { self.computedFontWeight.as_deref() }
2946}
2947
2948#[derive(Default)]
2949pub struct GetBackgroundColorsReturnsBuilder<'a> {
2950 backgroundColors: Option<Vec<Cow<'a, str>>>,
2951 computedFontSize: Option<Cow<'a, str>>,
2952 computedFontWeight: Option<Cow<'a, str>>,
2953}
2954
2955impl<'a> GetBackgroundColorsReturnsBuilder<'a> {
2956 pub fn backgroundColors(mut self, backgroundColors: Vec<Cow<'a, str>>) -> Self { self.backgroundColors = Some(backgroundColors); self }
2962 pub fn computedFontSize(mut self, computedFontSize: impl Into<Cow<'a, str>>) -> Self { self.computedFontSize = Some(computedFontSize.into()); self }
2964 pub fn computedFontWeight(mut self, computedFontWeight: impl Into<Cow<'a, str>>) -> Self { self.computedFontWeight = Some(computedFontWeight.into()); self }
2967 pub fn build(self) -> GetBackgroundColorsReturns<'a> {
2968 GetBackgroundColorsReturns {
2969 backgroundColors: self.backgroundColors,
2970 computedFontSize: self.computedFontSize,
2971 computedFontWeight: self.computedFontWeight,
2972 }
2973 }
2974}
2975
2976impl GetBackgroundColorsParams { pub const METHOD: &'static str = "CSS.getBackgroundColors"; }
2977
2978impl<'a> crate::CdpCommand<'a> for GetBackgroundColorsParams {
2979 const METHOD: &'static str = "CSS.getBackgroundColors";
2980 type Response = GetBackgroundColorsReturns<'a>;
2981}
2982
2983#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2986#[serde(rename_all = "camelCase")]
2987pub struct GetComputedStyleForNodeParams {
2988 nodeId: crate::dom::NodeId,
2989}
2990
2991impl GetComputedStyleForNodeParams {
2992 pub fn builder(nodeId: crate::dom::NodeId) -> GetComputedStyleForNodeParamsBuilder {
2993 GetComputedStyleForNodeParamsBuilder {
2994 nodeId: nodeId,
2995 }
2996 }
2997 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
2998}
2999
3000
3001pub struct GetComputedStyleForNodeParamsBuilder {
3002 nodeId: crate::dom::NodeId,
3003}
3004
3005impl GetComputedStyleForNodeParamsBuilder {
3006 pub fn build(self) -> GetComputedStyleForNodeParams {
3007 GetComputedStyleForNodeParams {
3008 nodeId: self.nodeId,
3009 }
3010 }
3011}
3012
3013#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3016#[serde(rename_all = "camelCase")]
3017pub struct GetComputedStyleForNodeReturns<'a> {
3018 computedStyle: Vec<CSSComputedStyleProperty<'a>>,
3020 extraFields: ComputedStyleExtraFields,
3023}
3024
3025impl<'a> GetComputedStyleForNodeReturns<'a> {
3026 pub fn builder(computedStyle: Vec<CSSComputedStyleProperty<'a>>, extraFields: ComputedStyleExtraFields) -> GetComputedStyleForNodeReturnsBuilder<'a> {
3027 GetComputedStyleForNodeReturnsBuilder {
3028 computedStyle: computedStyle,
3029 extraFields: extraFields,
3030 }
3031 }
3032 pub fn computedStyle(&self) -> &[CSSComputedStyleProperty<'a>] { &self.computedStyle }
3033 pub fn extraFields(&self) -> &ComputedStyleExtraFields { &self.extraFields }
3034}
3035
3036
3037pub struct GetComputedStyleForNodeReturnsBuilder<'a> {
3038 computedStyle: Vec<CSSComputedStyleProperty<'a>>,
3039 extraFields: ComputedStyleExtraFields,
3040}
3041
3042impl<'a> GetComputedStyleForNodeReturnsBuilder<'a> {
3043 pub fn build(self) -> GetComputedStyleForNodeReturns<'a> {
3044 GetComputedStyleForNodeReturns {
3045 computedStyle: self.computedStyle,
3046 extraFields: self.extraFields,
3047 }
3048 }
3049}
3050
3051impl GetComputedStyleForNodeParams { pub const METHOD: &'static str = "CSS.getComputedStyleForNode"; }
3052
3053impl<'a> crate::CdpCommand<'a> for GetComputedStyleForNodeParams {
3054 const METHOD: &'static str = "CSS.getComputedStyleForNode";
3055 type Response = GetComputedStyleForNodeReturns<'a>;
3056}
3057
3058#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3071#[serde(rename_all = "camelCase")]
3072pub struct ResolveValuesParams<'a> {
3073 values: Vec<Cow<'a, str>>,
3075 nodeId: crate::dom::NodeId,
3077 #[serde(skip_serializing_if = "Option::is_none")]
3079 propertyName: Option<Cow<'a, str>>,
3080 #[serde(skip_serializing_if = "Option::is_none")]
3083 pseudoType: Option<crate::dom::PseudoType>,
3084 #[serde(skip_serializing_if = "Option::is_none")]
3086 pseudoIdentifier: Option<Cow<'a, str>>,
3087}
3088
3089impl<'a> ResolveValuesParams<'a> {
3090 pub fn builder(values: Vec<Cow<'a, str>>, nodeId: crate::dom::NodeId) -> ResolveValuesParamsBuilder<'a> {
3091 ResolveValuesParamsBuilder {
3092 values: values,
3093 nodeId: nodeId,
3094 propertyName: None,
3095 pseudoType: None,
3096 pseudoIdentifier: None,
3097 }
3098 }
3099 pub fn values(&self) -> &[Cow<'a, str>] { &self.values }
3100 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
3101 pub fn propertyName(&self) -> Option<&str> { self.propertyName.as_deref() }
3102 pub fn pseudoType(&self) -> Option<&crate::dom::PseudoType> { self.pseudoType.as_ref() }
3103 pub fn pseudoIdentifier(&self) -> Option<&str> { self.pseudoIdentifier.as_deref() }
3104}
3105
3106
3107pub struct ResolveValuesParamsBuilder<'a> {
3108 values: Vec<Cow<'a, str>>,
3109 nodeId: crate::dom::NodeId,
3110 propertyName: Option<Cow<'a, str>>,
3111 pseudoType: Option<crate::dom::PseudoType>,
3112 pseudoIdentifier: Option<Cow<'a, str>>,
3113}
3114
3115impl<'a> ResolveValuesParamsBuilder<'a> {
3116 pub fn propertyName(mut self, propertyName: impl Into<Cow<'a, str>>) -> Self { self.propertyName = Some(propertyName.into()); self }
3118 pub fn pseudoType(mut self, pseudoType: crate::dom::PseudoType) -> Self { self.pseudoType = Some(pseudoType); self }
3121 pub fn pseudoIdentifier(mut self, pseudoIdentifier: impl Into<Cow<'a, str>>) -> Self { self.pseudoIdentifier = Some(pseudoIdentifier.into()); self }
3123 pub fn build(self) -> ResolveValuesParams<'a> {
3124 ResolveValuesParams {
3125 values: self.values,
3126 nodeId: self.nodeId,
3127 propertyName: self.propertyName,
3128 pseudoType: self.pseudoType,
3129 pseudoIdentifier: self.pseudoIdentifier,
3130 }
3131 }
3132}
3133
3134#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3147#[serde(rename_all = "camelCase")]
3148pub struct ResolveValuesReturns<'a> {
3149 results: Vec<Cow<'a, str>>,
3150}
3151
3152impl<'a> ResolveValuesReturns<'a> {
3153 pub fn builder(results: Vec<Cow<'a, str>>) -> ResolveValuesReturnsBuilder<'a> {
3154 ResolveValuesReturnsBuilder {
3155 results: results,
3156 }
3157 }
3158 pub fn results(&self) -> &[Cow<'a, str>] { &self.results }
3159}
3160
3161
3162pub struct ResolveValuesReturnsBuilder<'a> {
3163 results: Vec<Cow<'a, str>>,
3164}
3165
3166impl<'a> ResolveValuesReturnsBuilder<'a> {
3167 pub fn build(self) -> ResolveValuesReturns<'a> {
3168 ResolveValuesReturns {
3169 results: self.results,
3170 }
3171 }
3172}
3173
3174impl<'a> ResolveValuesParams<'a> { pub const METHOD: &'static str = "CSS.resolveValues"; }
3175
3176impl<'a> crate::CdpCommand<'a> for ResolveValuesParams<'a> {
3177 const METHOD: &'static str = "CSS.resolveValues";
3178 type Response = ResolveValuesReturns<'a>;
3179}
3180
3181
3182#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3183#[serde(rename_all = "camelCase")]
3184pub struct GetLonghandPropertiesParams<'a> {
3185 shorthandName: Cow<'a, str>,
3186 value: Cow<'a, str>,
3187}
3188
3189impl<'a> GetLonghandPropertiesParams<'a> {
3190 pub fn builder(shorthandName: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> GetLonghandPropertiesParamsBuilder<'a> {
3191 GetLonghandPropertiesParamsBuilder {
3192 shorthandName: shorthandName.into(),
3193 value: value.into(),
3194 }
3195 }
3196 pub fn shorthandName(&self) -> &str { self.shorthandName.as_ref() }
3197 pub fn value(&self) -> &str { self.value.as_ref() }
3198}
3199
3200
3201pub struct GetLonghandPropertiesParamsBuilder<'a> {
3202 shorthandName: Cow<'a, str>,
3203 value: Cow<'a, str>,
3204}
3205
3206impl<'a> GetLonghandPropertiesParamsBuilder<'a> {
3207 pub fn build(self) -> GetLonghandPropertiesParams<'a> {
3208 GetLonghandPropertiesParams {
3209 shorthandName: self.shorthandName,
3210 value: self.value,
3211 }
3212 }
3213}
3214
3215
3216#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3217#[serde(rename_all = "camelCase")]
3218pub struct GetLonghandPropertiesReturns<'a> {
3219 longhandProperties: Vec<CSSProperty<'a>>,
3220}
3221
3222impl<'a> GetLonghandPropertiesReturns<'a> {
3223 pub fn builder(longhandProperties: Vec<CSSProperty<'a>>) -> GetLonghandPropertiesReturnsBuilder<'a> {
3224 GetLonghandPropertiesReturnsBuilder {
3225 longhandProperties: longhandProperties,
3226 }
3227 }
3228 pub fn longhandProperties(&self) -> &[CSSProperty<'a>] { &self.longhandProperties }
3229}
3230
3231
3232pub struct GetLonghandPropertiesReturnsBuilder<'a> {
3233 longhandProperties: Vec<CSSProperty<'a>>,
3234}
3235
3236impl<'a> GetLonghandPropertiesReturnsBuilder<'a> {
3237 pub fn build(self) -> GetLonghandPropertiesReturns<'a> {
3238 GetLonghandPropertiesReturns {
3239 longhandProperties: self.longhandProperties,
3240 }
3241 }
3242}
3243
3244impl<'a> GetLonghandPropertiesParams<'a> { pub const METHOD: &'static str = "CSS.getLonghandProperties"; }
3245
3246impl<'a> crate::CdpCommand<'a> for GetLonghandPropertiesParams<'a> {
3247 const METHOD: &'static str = "CSS.getLonghandProperties";
3248 type Response = GetLonghandPropertiesReturns<'a>;
3249}
3250
3251#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3255#[serde(rename_all = "camelCase")]
3256pub struct GetInlineStylesForNodeParams {
3257 nodeId: crate::dom::NodeId,
3258}
3259
3260impl GetInlineStylesForNodeParams {
3261 pub fn builder(nodeId: crate::dom::NodeId) -> GetInlineStylesForNodeParamsBuilder {
3262 GetInlineStylesForNodeParamsBuilder {
3263 nodeId: nodeId,
3264 }
3265 }
3266 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
3267}
3268
3269
3270pub struct GetInlineStylesForNodeParamsBuilder {
3271 nodeId: crate::dom::NodeId,
3272}
3273
3274impl GetInlineStylesForNodeParamsBuilder {
3275 pub fn build(self) -> GetInlineStylesForNodeParams {
3276 GetInlineStylesForNodeParams {
3277 nodeId: self.nodeId,
3278 }
3279 }
3280}
3281
3282#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3286#[serde(rename_all = "camelCase")]
3287pub struct GetInlineStylesForNodeReturns<'a> {
3288 #[serde(skip_serializing_if = "Option::is_none")]
3290 inlineStyle: Option<CSSStyle<'a>>,
3291 #[serde(skip_serializing_if = "Option::is_none")]
3293 attributesStyle: Option<CSSStyle<'a>>,
3294}
3295
3296impl<'a> GetInlineStylesForNodeReturns<'a> {
3297 pub fn builder() -> GetInlineStylesForNodeReturnsBuilder<'a> {
3298 GetInlineStylesForNodeReturnsBuilder {
3299 inlineStyle: None,
3300 attributesStyle: None,
3301 }
3302 }
3303 pub fn inlineStyle(&self) -> Option<&CSSStyle<'a>> { self.inlineStyle.as_ref() }
3304 pub fn attributesStyle(&self) -> Option<&CSSStyle<'a>> { self.attributesStyle.as_ref() }
3305}
3306
3307#[derive(Default)]
3308pub struct GetInlineStylesForNodeReturnsBuilder<'a> {
3309 inlineStyle: Option<CSSStyle<'a>>,
3310 attributesStyle: Option<CSSStyle<'a>>,
3311}
3312
3313impl<'a> GetInlineStylesForNodeReturnsBuilder<'a> {
3314 pub fn inlineStyle(mut self, inlineStyle: CSSStyle<'a>) -> Self { self.inlineStyle = Some(inlineStyle); self }
3316 pub fn attributesStyle(mut self, attributesStyle: CSSStyle<'a>) -> Self { self.attributesStyle = Some(attributesStyle); self }
3318 pub fn build(self) -> GetInlineStylesForNodeReturns<'a> {
3319 GetInlineStylesForNodeReturns {
3320 inlineStyle: self.inlineStyle,
3321 attributesStyle: self.attributesStyle,
3322 }
3323 }
3324}
3325
3326impl GetInlineStylesForNodeParams { pub const METHOD: &'static str = "CSS.getInlineStylesForNode"; }
3327
3328impl<'a> crate::CdpCommand<'a> for GetInlineStylesForNodeParams {
3329 const METHOD: &'static str = "CSS.getInlineStylesForNode";
3330 type Response = GetInlineStylesForNodeReturns<'a>;
3331}
3332
3333#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3337#[serde(rename_all = "camelCase")]
3338pub struct GetAnimatedStylesForNodeParams {
3339 nodeId: crate::dom::NodeId,
3340}
3341
3342impl GetAnimatedStylesForNodeParams {
3343 pub fn builder(nodeId: crate::dom::NodeId) -> GetAnimatedStylesForNodeParamsBuilder {
3344 GetAnimatedStylesForNodeParamsBuilder {
3345 nodeId: nodeId,
3346 }
3347 }
3348 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
3349}
3350
3351
3352pub struct GetAnimatedStylesForNodeParamsBuilder {
3353 nodeId: crate::dom::NodeId,
3354}
3355
3356impl GetAnimatedStylesForNodeParamsBuilder {
3357 pub fn build(self) -> GetAnimatedStylesForNodeParams {
3358 GetAnimatedStylesForNodeParams {
3359 nodeId: self.nodeId,
3360 }
3361 }
3362}
3363
3364#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3368#[serde(rename_all = "camelCase")]
3369pub struct GetAnimatedStylesForNodeReturns<'a> {
3370 #[serde(skip_serializing_if = "Option::is_none")]
3372 animationStyles: Option<Vec<CSSAnimationStyle<'a>>>,
3373 #[serde(skip_serializing_if = "Option::is_none")]
3375 transitionsStyle: Option<CSSStyle<'a>>,
3376 #[serde(skip_serializing_if = "Option::is_none")]
3379 inherited: Option<Vec<InheritedAnimatedStyleEntry<'a>>>,
3380}
3381
3382impl<'a> GetAnimatedStylesForNodeReturns<'a> {
3383 pub fn builder() -> GetAnimatedStylesForNodeReturnsBuilder<'a> {
3384 GetAnimatedStylesForNodeReturnsBuilder {
3385 animationStyles: None,
3386 transitionsStyle: None,
3387 inherited: None,
3388 }
3389 }
3390 pub fn animationStyles(&self) -> Option<&[CSSAnimationStyle<'a>]> { self.animationStyles.as_deref() }
3391 pub fn transitionsStyle(&self) -> Option<&CSSStyle<'a>> { self.transitionsStyle.as_ref() }
3392 pub fn inherited(&self) -> Option<&[InheritedAnimatedStyleEntry<'a>]> { self.inherited.as_deref() }
3393}
3394
3395#[derive(Default)]
3396pub struct GetAnimatedStylesForNodeReturnsBuilder<'a> {
3397 animationStyles: Option<Vec<CSSAnimationStyle<'a>>>,
3398 transitionsStyle: Option<CSSStyle<'a>>,
3399 inherited: Option<Vec<InheritedAnimatedStyleEntry<'a>>>,
3400}
3401
3402impl<'a> GetAnimatedStylesForNodeReturnsBuilder<'a> {
3403 pub fn animationStyles(mut self, animationStyles: Vec<CSSAnimationStyle<'a>>) -> Self { self.animationStyles = Some(animationStyles); self }
3405 pub fn transitionsStyle(mut self, transitionsStyle: CSSStyle<'a>) -> Self { self.transitionsStyle = Some(transitionsStyle); self }
3407 pub fn inherited(mut self, inherited: Vec<InheritedAnimatedStyleEntry<'a>>) -> Self { self.inherited = Some(inherited); self }
3410 pub fn build(self) -> GetAnimatedStylesForNodeReturns<'a> {
3411 GetAnimatedStylesForNodeReturns {
3412 animationStyles: self.animationStyles,
3413 transitionsStyle: self.transitionsStyle,
3414 inherited: self.inherited,
3415 }
3416 }
3417}
3418
3419impl GetAnimatedStylesForNodeParams { pub const METHOD: &'static str = "CSS.getAnimatedStylesForNode"; }
3420
3421impl<'a> crate::CdpCommand<'a> for GetAnimatedStylesForNodeParams {
3422 const METHOD: &'static str = "CSS.getAnimatedStylesForNode";
3423 type Response = GetAnimatedStylesForNodeReturns<'a>;
3424}
3425
3426#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3429#[serde(rename_all = "camelCase")]
3430pub struct GetMatchedStylesForNodeParams {
3431 nodeId: crate::dom::NodeId,
3432}
3433
3434impl GetMatchedStylesForNodeParams {
3435 pub fn builder(nodeId: crate::dom::NodeId) -> GetMatchedStylesForNodeParamsBuilder {
3436 GetMatchedStylesForNodeParamsBuilder {
3437 nodeId: nodeId,
3438 }
3439 }
3440 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
3441}
3442
3443
3444pub struct GetMatchedStylesForNodeParamsBuilder {
3445 nodeId: crate::dom::NodeId,
3446}
3447
3448impl GetMatchedStylesForNodeParamsBuilder {
3449 pub fn build(self) -> GetMatchedStylesForNodeParams {
3450 GetMatchedStylesForNodeParams {
3451 nodeId: self.nodeId,
3452 }
3453 }
3454}
3455
3456#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3459#[serde(rename_all = "camelCase")]
3460pub struct GetMatchedStylesForNodeReturns<'a> {
3461 #[serde(skip_serializing_if = "Option::is_none")]
3463 inlineStyle: Option<CSSStyle<'a>>,
3464 #[serde(skip_serializing_if = "Option::is_none")]
3466 attributesStyle: Option<CSSStyle<'a>>,
3467 #[serde(skip_serializing_if = "Option::is_none")]
3469 matchedCSSRules: Option<Vec<RuleMatch<'a>>>,
3470 #[serde(skip_serializing_if = "Option::is_none")]
3472 pseudoElements: Option<Vec<PseudoElementMatches<'a>>>,
3473 #[serde(skip_serializing_if = "Option::is_none")]
3475 inherited: Option<Vec<InheritedStyleEntry<'a>>>,
3476 #[serde(skip_serializing_if = "Option::is_none")]
3478 inheritedPseudoElements: Option<Vec<InheritedPseudoElementMatches<'a>>>,
3479 #[serde(skip_serializing_if = "Option::is_none")]
3481 cssKeyframesRules: Option<Vec<CSSKeyframesRule<'a>>>,
3482 #[serde(skip_serializing_if = "Option::is_none")]
3484 cssPositionTryRules: Option<Vec<CSSPositionTryRule<'a>>>,
3485 #[serde(skip_serializing_if = "Option::is_none")]
3488 activePositionFallbackIndex: Option<u64>,
3489 #[serde(skip_serializing_if = "Option::is_none")]
3491 cssPropertyRules: Option<Vec<CSSPropertyRule<'a>>>,
3492 #[serde(skip_serializing_if = "Option::is_none")]
3494 cssPropertyRegistrations: Option<Vec<CSSPropertyRegistration<'a>>>,
3495 #[serde(skip_serializing_if = "Option::is_none")]
3497 cssAtRules: Option<Vec<CSSAtRule<'a>>>,
3498 #[serde(skip_serializing_if = "Option::is_none")]
3500 parentLayoutNodeId: Option<crate::dom::NodeId>,
3501 #[serde(skip_serializing_if = "Option::is_none")]
3503 cssFunctionRules: Option<Vec<CSSFunctionRule<'a>>>,
3504}
3505
3506impl<'a> GetMatchedStylesForNodeReturns<'a> {
3507 pub fn builder() -> GetMatchedStylesForNodeReturnsBuilder<'a> {
3508 GetMatchedStylesForNodeReturnsBuilder {
3509 inlineStyle: None,
3510 attributesStyle: None,
3511 matchedCSSRules: None,
3512 pseudoElements: None,
3513 inherited: None,
3514 inheritedPseudoElements: None,
3515 cssKeyframesRules: None,
3516 cssPositionTryRules: None,
3517 activePositionFallbackIndex: None,
3518 cssPropertyRules: None,
3519 cssPropertyRegistrations: None,
3520 cssAtRules: None,
3521 parentLayoutNodeId: None,
3522 cssFunctionRules: None,
3523 }
3524 }
3525 pub fn inlineStyle(&self) -> Option<&CSSStyle<'a>> { self.inlineStyle.as_ref() }
3526 pub fn attributesStyle(&self) -> Option<&CSSStyle<'a>> { self.attributesStyle.as_ref() }
3527 pub fn matchedCSSRules(&self) -> Option<&[RuleMatch<'a>]> { self.matchedCSSRules.as_deref() }
3528 pub fn pseudoElements(&self) -> Option<&[PseudoElementMatches<'a>]> { self.pseudoElements.as_deref() }
3529 pub fn inherited(&self) -> Option<&[InheritedStyleEntry<'a>]> { self.inherited.as_deref() }
3530 pub fn inheritedPseudoElements(&self) -> Option<&[InheritedPseudoElementMatches<'a>]> { self.inheritedPseudoElements.as_deref() }
3531 pub fn cssKeyframesRules(&self) -> Option<&[CSSKeyframesRule<'a>]> { self.cssKeyframesRules.as_deref() }
3532 pub fn cssPositionTryRules(&self) -> Option<&[CSSPositionTryRule<'a>]> { self.cssPositionTryRules.as_deref() }
3533 pub fn activePositionFallbackIndex(&self) -> Option<u64> { self.activePositionFallbackIndex }
3534 pub fn cssPropertyRules(&self) -> Option<&[CSSPropertyRule<'a>]> { self.cssPropertyRules.as_deref() }
3535 pub fn cssPropertyRegistrations(&self) -> Option<&[CSSPropertyRegistration<'a>]> { self.cssPropertyRegistrations.as_deref() }
3536 pub fn cssAtRules(&self) -> Option<&[CSSAtRule<'a>]> { self.cssAtRules.as_deref() }
3537 pub fn parentLayoutNodeId(&self) -> Option<&crate::dom::NodeId> { self.parentLayoutNodeId.as_ref() }
3538 pub fn cssFunctionRules(&self) -> Option<&[CSSFunctionRule<'a>]> { self.cssFunctionRules.as_deref() }
3539}
3540
3541#[derive(Default)]
3542pub struct GetMatchedStylesForNodeReturnsBuilder<'a> {
3543 inlineStyle: Option<CSSStyle<'a>>,
3544 attributesStyle: Option<CSSStyle<'a>>,
3545 matchedCSSRules: Option<Vec<RuleMatch<'a>>>,
3546 pseudoElements: Option<Vec<PseudoElementMatches<'a>>>,
3547 inherited: Option<Vec<InheritedStyleEntry<'a>>>,
3548 inheritedPseudoElements: Option<Vec<InheritedPseudoElementMatches<'a>>>,
3549 cssKeyframesRules: Option<Vec<CSSKeyframesRule<'a>>>,
3550 cssPositionTryRules: Option<Vec<CSSPositionTryRule<'a>>>,
3551 activePositionFallbackIndex: Option<u64>,
3552 cssPropertyRules: Option<Vec<CSSPropertyRule<'a>>>,
3553 cssPropertyRegistrations: Option<Vec<CSSPropertyRegistration<'a>>>,
3554 cssAtRules: Option<Vec<CSSAtRule<'a>>>,
3555 parentLayoutNodeId: Option<crate::dom::NodeId>,
3556 cssFunctionRules: Option<Vec<CSSFunctionRule<'a>>>,
3557}
3558
3559impl<'a> GetMatchedStylesForNodeReturnsBuilder<'a> {
3560 pub fn inlineStyle(mut self, inlineStyle: CSSStyle<'a>) -> Self { self.inlineStyle = Some(inlineStyle); self }
3562 pub fn attributesStyle(mut self, attributesStyle: CSSStyle<'a>) -> Self { self.attributesStyle = Some(attributesStyle); self }
3564 pub fn matchedCSSRules(mut self, matchedCSSRules: Vec<RuleMatch<'a>>) -> Self { self.matchedCSSRules = Some(matchedCSSRules); self }
3566 pub fn pseudoElements(mut self, pseudoElements: Vec<PseudoElementMatches<'a>>) -> Self { self.pseudoElements = Some(pseudoElements); self }
3568 pub fn inherited(mut self, inherited: Vec<InheritedStyleEntry<'a>>) -> Self { self.inherited = Some(inherited); self }
3570 pub fn inheritedPseudoElements(mut self, inheritedPseudoElements: Vec<InheritedPseudoElementMatches<'a>>) -> Self { self.inheritedPseudoElements = Some(inheritedPseudoElements); self }
3572 pub fn cssKeyframesRules(mut self, cssKeyframesRules: Vec<CSSKeyframesRule<'a>>) -> Self { self.cssKeyframesRules = Some(cssKeyframesRules); self }
3574 pub fn cssPositionTryRules(mut self, cssPositionTryRules: Vec<CSSPositionTryRule<'a>>) -> Self { self.cssPositionTryRules = Some(cssPositionTryRules); self }
3576 pub fn activePositionFallbackIndex(mut self, activePositionFallbackIndex: u64) -> Self { self.activePositionFallbackIndex = Some(activePositionFallbackIndex); self }
3579 pub fn cssPropertyRules(mut self, cssPropertyRules: Vec<CSSPropertyRule<'a>>) -> Self { self.cssPropertyRules = Some(cssPropertyRules); self }
3581 pub fn cssPropertyRegistrations(mut self, cssPropertyRegistrations: Vec<CSSPropertyRegistration<'a>>) -> Self { self.cssPropertyRegistrations = Some(cssPropertyRegistrations); self }
3583 pub fn cssAtRules(mut self, cssAtRules: Vec<CSSAtRule<'a>>) -> Self { self.cssAtRules = Some(cssAtRules); self }
3585 pub fn parentLayoutNodeId(mut self, parentLayoutNodeId: crate::dom::NodeId) -> Self { self.parentLayoutNodeId = Some(parentLayoutNodeId); self }
3587 pub fn cssFunctionRules(mut self, cssFunctionRules: Vec<CSSFunctionRule<'a>>) -> Self { self.cssFunctionRules = Some(cssFunctionRules); self }
3589 pub fn build(self) -> GetMatchedStylesForNodeReturns<'a> {
3590 GetMatchedStylesForNodeReturns {
3591 inlineStyle: self.inlineStyle,
3592 attributesStyle: self.attributesStyle,
3593 matchedCSSRules: self.matchedCSSRules,
3594 pseudoElements: self.pseudoElements,
3595 inherited: self.inherited,
3596 inheritedPseudoElements: self.inheritedPseudoElements,
3597 cssKeyframesRules: self.cssKeyframesRules,
3598 cssPositionTryRules: self.cssPositionTryRules,
3599 activePositionFallbackIndex: self.activePositionFallbackIndex,
3600 cssPropertyRules: self.cssPropertyRules,
3601 cssPropertyRegistrations: self.cssPropertyRegistrations,
3602 cssAtRules: self.cssAtRules,
3603 parentLayoutNodeId: self.parentLayoutNodeId,
3604 cssFunctionRules: self.cssFunctionRules,
3605 }
3606 }
3607}
3608
3609impl GetMatchedStylesForNodeParams { pub const METHOD: &'static str = "CSS.getMatchedStylesForNode"; }
3610
3611impl<'a> crate::CdpCommand<'a> for GetMatchedStylesForNodeParams {
3612 const METHOD: &'static str = "CSS.getMatchedStylesForNode";
3613 type Response = GetMatchedStylesForNodeReturns<'a>;
3614}
3615
3616#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3619#[serde(rename_all = "camelCase")]
3620pub struct GetEnvironmentVariablesReturns {
3621 environmentVariables: serde_json::Map<String, JsonValue>,
3622}
3623
3624impl GetEnvironmentVariablesReturns {
3625 pub fn builder(environmentVariables: serde_json::Map<String, JsonValue>) -> GetEnvironmentVariablesReturnsBuilder {
3626 GetEnvironmentVariablesReturnsBuilder {
3627 environmentVariables: environmentVariables,
3628 }
3629 }
3630 pub fn environmentVariables(&self) -> &serde_json::Map<String, JsonValue> { &self.environmentVariables }
3631}
3632
3633
3634pub struct GetEnvironmentVariablesReturnsBuilder {
3635 environmentVariables: serde_json::Map<String, JsonValue>,
3636}
3637
3638impl GetEnvironmentVariablesReturnsBuilder {
3639 pub fn build(self) -> GetEnvironmentVariablesReturns {
3640 GetEnvironmentVariablesReturns {
3641 environmentVariables: self.environmentVariables,
3642 }
3643 }
3644}
3645
3646#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3647pub struct GetEnvironmentVariablesParams {}
3648
3649impl GetEnvironmentVariablesParams { pub const METHOD: &'static str = "CSS.getEnvironmentVariables"; }
3650
3651impl<'a> crate::CdpCommand<'a> for GetEnvironmentVariablesParams {
3652 const METHOD: &'static str = "CSS.getEnvironmentVariables";
3653 type Response = GetEnvironmentVariablesReturns;
3654}
3655
3656#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3659#[serde(rename_all = "camelCase")]
3660pub struct GetMediaQueriesReturns<'a> {
3661 medias: Vec<CSSMedia<'a>>,
3662}
3663
3664impl<'a> GetMediaQueriesReturns<'a> {
3665 pub fn builder(medias: Vec<CSSMedia<'a>>) -> GetMediaQueriesReturnsBuilder<'a> {
3666 GetMediaQueriesReturnsBuilder {
3667 medias: medias,
3668 }
3669 }
3670 pub fn medias(&self) -> &[CSSMedia<'a>] { &self.medias }
3671}
3672
3673
3674pub struct GetMediaQueriesReturnsBuilder<'a> {
3675 medias: Vec<CSSMedia<'a>>,
3676}
3677
3678impl<'a> GetMediaQueriesReturnsBuilder<'a> {
3679 pub fn build(self) -> GetMediaQueriesReturns<'a> {
3680 GetMediaQueriesReturns {
3681 medias: self.medias,
3682 }
3683 }
3684}
3685
3686#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3687pub struct GetMediaQueriesParams {}
3688
3689impl GetMediaQueriesParams { pub const METHOD: &'static str = "CSS.getMediaQueries"; }
3690
3691impl<'a> crate::CdpCommand<'a> for GetMediaQueriesParams {
3692 const METHOD: &'static str = "CSS.getMediaQueries";
3693 type Response = GetMediaQueriesReturns<'a>;
3694}
3695
3696#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3700#[serde(rename_all = "camelCase")]
3701pub struct GetPlatformFontsForNodeParams {
3702 nodeId: crate::dom::NodeId,
3703}
3704
3705impl GetPlatformFontsForNodeParams {
3706 pub fn builder(nodeId: crate::dom::NodeId) -> GetPlatformFontsForNodeParamsBuilder {
3707 GetPlatformFontsForNodeParamsBuilder {
3708 nodeId: nodeId,
3709 }
3710 }
3711 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
3712}
3713
3714
3715pub struct GetPlatformFontsForNodeParamsBuilder {
3716 nodeId: crate::dom::NodeId,
3717}
3718
3719impl GetPlatformFontsForNodeParamsBuilder {
3720 pub fn build(self) -> GetPlatformFontsForNodeParams {
3721 GetPlatformFontsForNodeParams {
3722 nodeId: self.nodeId,
3723 }
3724 }
3725}
3726
3727#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3731#[serde(rename_all = "camelCase")]
3732pub struct GetPlatformFontsForNodeReturns<'a> {
3733 fonts: Vec<PlatformFontUsage<'a>>,
3735}
3736
3737impl<'a> GetPlatformFontsForNodeReturns<'a> {
3738 pub fn builder(fonts: Vec<PlatformFontUsage<'a>>) -> GetPlatformFontsForNodeReturnsBuilder<'a> {
3739 GetPlatformFontsForNodeReturnsBuilder {
3740 fonts: fonts,
3741 }
3742 }
3743 pub fn fonts(&self) -> &[PlatformFontUsage<'a>] { &self.fonts }
3744}
3745
3746
3747pub struct GetPlatformFontsForNodeReturnsBuilder<'a> {
3748 fonts: Vec<PlatformFontUsage<'a>>,
3749}
3750
3751impl<'a> GetPlatformFontsForNodeReturnsBuilder<'a> {
3752 pub fn build(self) -> GetPlatformFontsForNodeReturns<'a> {
3753 GetPlatformFontsForNodeReturns {
3754 fonts: self.fonts,
3755 }
3756 }
3757}
3758
3759impl GetPlatformFontsForNodeParams { pub const METHOD: &'static str = "CSS.getPlatformFontsForNode"; }
3760
3761impl<'a> crate::CdpCommand<'a> for GetPlatformFontsForNodeParams {
3762 const METHOD: &'static str = "CSS.getPlatformFontsForNode";
3763 type Response = GetPlatformFontsForNodeReturns<'a>;
3764}
3765
3766#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3769#[serde(rename_all = "camelCase")]
3770pub struct GetStyleSheetTextParams<'a> {
3771 styleSheetId: crate::dom::StyleSheetId<'a>,
3772}
3773
3774impl<'a> GetStyleSheetTextParams<'a> {
3775 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>) -> GetStyleSheetTextParamsBuilder<'a> {
3776 GetStyleSheetTextParamsBuilder {
3777 styleSheetId: styleSheetId,
3778 }
3779 }
3780 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
3781}
3782
3783
3784pub struct GetStyleSheetTextParamsBuilder<'a> {
3785 styleSheetId: crate::dom::StyleSheetId<'a>,
3786}
3787
3788impl<'a> GetStyleSheetTextParamsBuilder<'a> {
3789 pub fn build(self) -> GetStyleSheetTextParams<'a> {
3790 GetStyleSheetTextParams {
3791 styleSheetId: self.styleSheetId,
3792 }
3793 }
3794}
3795
3796#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3799#[serde(rename_all = "camelCase")]
3800pub struct GetStyleSheetTextReturns<'a> {
3801 text: Cow<'a, str>,
3803}
3804
3805impl<'a> GetStyleSheetTextReturns<'a> {
3806 pub fn builder(text: impl Into<Cow<'a, str>>) -> GetStyleSheetTextReturnsBuilder<'a> {
3807 GetStyleSheetTextReturnsBuilder {
3808 text: text.into(),
3809 }
3810 }
3811 pub fn text(&self) -> &str { self.text.as_ref() }
3812}
3813
3814
3815pub struct GetStyleSheetTextReturnsBuilder<'a> {
3816 text: Cow<'a, str>,
3817}
3818
3819impl<'a> GetStyleSheetTextReturnsBuilder<'a> {
3820 pub fn build(self) -> GetStyleSheetTextReturns<'a> {
3821 GetStyleSheetTextReturns {
3822 text: self.text,
3823 }
3824 }
3825}
3826
3827impl<'a> GetStyleSheetTextParams<'a> { pub const METHOD: &'static str = "CSS.getStyleSheetText"; }
3828
3829impl<'a> crate::CdpCommand<'a> for GetStyleSheetTextParams<'a> {
3830 const METHOD: &'static str = "CSS.getStyleSheetText";
3831 type Response = GetStyleSheetTextReturns<'a>;
3832}
3833
3834#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3840#[serde(rename_all = "camelCase")]
3841pub struct GetLayersForNodeParams {
3842 nodeId: crate::dom::NodeId,
3843}
3844
3845impl GetLayersForNodeParams {
3846 pub fn builder(nodeId: crate::dom::NodeId) -> GetLayersForNodeParamsBuilder {
3847 GetLayersForNodeParamsBuilder {
3848 nodeId: nodeId,
3849 }
3850 }
3851 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
3852}
3853
3854
3855pub struct GetLayersForNodeParamsBuilder {
3856 nodeId: crate::dom::NodeId,
3857}
3858
3859impl GetLayersForNodeParamsBuilder {
3860 pub fn build(self) -> GetLayersForNodeParams {
3861 GetLayersForNodeParams {
3862 nodeId: self.nodeId,
3863 }
3864 }
3865}
3866
3867#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3873#[serde(rename_all = "camelCase")]
3874pub struct GetLayersForNodeReturns<'a> {
3875 rootLayer: CSSLayerData<'a>,
3876}
3877
3878impl<'a> GetLayersForNodeReturns<'a> {
3879 pub fn builder(rootLayer: CSSLayerData<'a>) -> GetLayersForNodeReturnsBuilder<'a> {
3880 GetLayersForNodeReturnsBuilder {
3881 rootLayer: rootLayer,
3882 }
3883 }
3884 pub fn rootLayer(&self) -> &CSSLayerData<'a> { &self.rootLayer }
3885}
3886
3887
3888pub struct GetLayersForNodeReturnsBuilder<'a> {
3889 rootLayer: CSSLayerData<'a>,
3890}
3891
3892impl<'a> GetLayersForNodeReturnsBuilder<'a> {
3893 pub fn build(self) -> GetLayersForNodeReturns<'a> {
3894 GetLayersForNodeReturns {
3895 rootLayer: self.rootLayer,
3896 }
3897 }
3898}
3899
3900impl GetLayersForNodeParams { pub const METHOD: &'static str = "CSS.getLayersForNode"; }
3901
3902impl<'a> crate::CdpCommand<'a> for GetLayersForNodeParams {
3903 const METHOD: &'static str = "CSS.getLayersForNode";
3904 type Response = GetLayersForNodeReturns<'a>;
3905}
3906
3907#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3911#[serde(rename_all = "camelCase")]
3912pub struct GetLocationForSelectorParams<'a> {
3913 styleSheetId: crate::dom::StyleSheetId<'a>,
3914 selectorText: Cow<'a, str>,
3915}
3916
3917impl<'a> GetLocationForSelectorParams<'a> {
3918 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, selectorText: impl Into<Cow<'a, str>>) -> GetLocationForSelectorParamsBuilder<'a> {
3919 GetLocationForSelectorParamsBuilder {
3920 styleSheetId: styleSheetId,
3921 selectorText: selectorText.into(),
3922 }
3923 }
3924 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
3925 pub fn selectorText(&self) -> &str { self.selectorText.as_ref() }
3926}
3927
3928
3929pub struct GetLocationForSelectorParamsBuilder<'a> {
3930 styleSheetId: crate::dom::StyleSheetId<'a>,
3931 selectorText: Cow<'a, str>,
3932}
3933
3934impl<'a> GetLocationForSelectorParamsBuilder<'a> {
3935 pub fn build(self) -> GetLocationForSelectorParams<'a> {
3936 GetLocationForSelectorParams {
3937 styleSheetId: self.styleSheetId,
3938 selectorText: self.selectorText,
3939 }
3940 }
3941}
3942
3943#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3947#[serde(rename_all = "camelCase")]
3948pub struct GetLocationForSelectorReturns {
3949 ranges: Vec<SourceRange>,
3950}
3951
3952impl GetLocationForSelectorReturns {
3953 pub fn builder(ranges: Vec<SourceRange>) -> GetLocationForSelectorReturnsBuilder {
3954 GetLocationForSelectorReturnsBuilder {
3955 ranges: ranges,
3956 }
3957 }
3958 pub fn ranges(&self) -> &[SourceRange] { &self.ranges }
3959}
3960
3961
3962pub struct GetLocationForSelectorReturnsBuilder {
3963 ranges: Vec<SourceRange>,
3964}
3965
3966impl GetLocationForSelectorReturnsBuilder {
3967 pub fn build(self) -> GetLocationForSelectorReturns {
3968 GetLocationForSelectorReturns {
3969 ranges: self.ranges,
3970 }
3971 }
3972}
3973
3974impl<'a> GetLocationForSelectorParams<'a> { pub const METHOD: &'static str = "CSS.getLocationForSelector"; }
3975
3976impl<'a> crate::CdpCommand<'a> for GetLocationForSelectorParams<'a> {
3977 const METHOD: &'static str = "CSS.getLocationForSelector";
3978 type Response = GetLocationForSelectorReturns;
3979}
3980
3981#[derive(Debug, Clone, Serialize, Deserialize, Default)]
3989#[serde(rename_all = "camelCase")]
3990pub struct TrackComputedStyleUpdatesForNodeParams {
3991 #[serde(skip_serializing_if = "Option::is_none")]
3992 nodeId: Option<crate::dom::NodeId>,
3993}
3994
3995impl TrackComputedStyleUpdatesForNodeParams {
3996 pub fn builder() -> TrackComputedStyleUpdatesForNodeParamsBuilder {
3997 TrackComputedStyleUpdatesForNodeParamsBuilder {
3998 nodeId: None,
3999 }
4000 }
4001 pub fn nodeId(&self) -> Option<&crate::dom::NodeId> { self.nodeId.as_ref() }
4002}
4003
4004#[derive(Default)]
4005pub struct TrackComputedStyleUpdatesForNodeParamsBuilder {
4006 nodeId: Option<crate::dom::NodeId>,
4007}
4008
4009impl TrackComputedStyleUpdatesForNodeParamsBuilder {
4010 pub fn nodeId(mut self, nodeId: crate::dom::NodeId) -> Self { self.nodeId = Some(nodeId); self }
4011 pub fn build(self) -> TrackComputedStyleUpdatesForNodeParams {
4012 TrackComputedStyleUpdatesForNodeParams {
4013 nodeId: self.nodeId,
4014 }
4015 }
4016}
4017
4018impl TrackComputedStyleUpdatesForNodeParams { pub const METHOD: &'static str = "CSS.trackComputedStyleUpdatesForNode"; }
4019
4020impl<'a> crate::CdpCommand<'a> for TrackComputedStyleUpdatesForNodeParams {
4021 const METHOD: &'static str = "CSS.trackComputedStyleUpdatesForNode";
4022 type Response = crate::EmptyReturns;
4023}
4024
4025#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4033#[serde(rename_all = "camelCase")]
4034pub struct TrackComputedStyleUpdatesParams<'a> {
4035 propertiesToTrack: Vec<CSSComputedStyleProperty<'a>>,
4036}
4037
4038impl<'a> TrackComputedStyleUpdatesParams<'a> {
4039 pub fn builder(propertiesToTrack: Vec<CSSComputedStyleProperty<'a>>) -> TrackComputedStyleUpdatesParamsBuilder<'a> {
4040 TrackComputedStyleUpdatesParamsBuilder {
4041 propertiesToTrack: propertiesToTrack,
4042 }
4043 }
4044 pub fn propertiesToTrack(&self) -> &[CSSComputedStyleProperty<'a>] { &self.propertiesToTrack }
4045}
4046
4047
4048pub struct TrackComputedStyleUpdatesParamsBuilder<'a> {
4049 propertiesToTrack: Vec<CSSComputedStyleProperty<'a>>,
4050}
4051
4052impl<'a> TrackComputedStyleUpdatesParamsBuilder<'a> {
4053 pub fn build(self) -> TrackComputedStyleUpdatesParams<'a> {
4054 TrackComputedStyleUpdatesParams {
4055 propertiesToTrack: self.propertiesToTrack,
4056 }
4057 }
4058}
4059
4060impl<'a> TrackComputedStyleUpdatesParams<'a> { pub const METHOD: &'static str = "CSS.trackComputedStyleUpdates"; }
4061
4062impl<'a> crate::CdpCommand<'a> for TrackComputedStyleUpdatesParams<'a> {
4063 const METHOD: &'static str = "CSS.trackComputedStyleUpdates";
4064 type Response = crate::EmptyReturns;
4065}
4066
4067#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4070#[serde(rename_all = "camelCase")]
4071pub struct TakeComputedStyleUpdatesReturns {
4072 nodeIds: Vec<crate::dom::NodeId>,
4074}
4075
4076impl TakeComputedStyleUpdatesReturns {
4077 pub fn builder(nodeIds: Vec<crate::dom::NodeId>) -> TakeComputedStyleUpdatesReturnsBuilder {
4078 TakeComputedStyleUpdatesReturnsBuilder {
4079 nodeIds: nodeIds,
4080 }
4081 }
4082 pub fn nodeIds(&self) -> &[crate::dom::NodeId] { &self.nodeIds }
4083}
4084
4085
4086pub struct TakeComputedStyleUpdatesReturnsBuilder {
4087 nodeIds: Vec<crate::dom::NodeId>,
4088}
4089
4090impl TakeComputedStyleUpdatesReturnsBuilder {
4091 pub fn build(self) -> TakeComputedStyleUpdatesReturns {
4092 TakeComputedStyleUpdatesReturns {
4093 nodeIds: self.nodeIds,
4094 }
4095 }
4096}
4097
4098#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4099pub struct TakeComputedStyleUpdatesParams {}
4100
4101impl TakeComputedStyleUpdatesParams { pub const METHOD: &'static str = "CSS.takeComputedStyleUpdates"; }
4102
4103impl<'a> crate::CdpCommand<'a> for TakeComputedStyleUpdatesParams {
4104 const METHOD: &'static str = "CSS.takeComputedStyleUpdates";
4105 type Response = TakeComputedStyleUpdatesReturns;
4106}
4107
4108#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4112#[serde(rename_all = "camelCase")]
4113pub struct SetEffectivePropertyValueForNodeParams<'a> {
4114 nodeId: crate::dom::NodeId,
4116 propertyName: Cow<'a, str>,
4117 value: Cow<'a, str>,
4118}
4119
4120impl<'a> SetEffectivePropertyValueForNodeParams<'a> {
4121 pub fn builder(nodeId: crate::dom::NodeId, propertyName: impl Into<Cow<'a, str>>, value: impl Into<Cow<'a, str>>) -> SetEffectivePropertyValueForNodeParamsBuilder<'a> {
4122 SetEffectivePropertyValueForNodeParamsBuilder {
4123 nodeId: nodeId,
4124 propertyName: propertyName.into(),
4125 value: value.into(),
4126 }
4127 }
4128 pub fn nodeId(&self) -> &crate::dom::NodeId { &self.nodeId }
4129 pub fn propertyName(&self) -> &str { self.propertyName.as_ref() }
4130 pub fn value(&self) -> &str { self.value.as_ref() }
4131}
4132
4133
4134pub struct SetEffectivePropertyValueForNodeParamsBuilder<'a> {
4135 nodeId: crate::dom::NodeId,
4136 propertyName: Cow<'a, str>,
4137 value: Cow<'a, str>,
4138}
4139
4140impl<'a> SetEffectivePropertyValueForNodeParamsBuilder<'a> {
4141 pub fn build(self) -> SetEffectivePropertyValueForNodeParams<'a> {
4142 SetEffectivePropertyValueForNodeParams {
4143 nodeId: self.nodeId,
4144 propertyName: self.propertyName,
4145 value: self.value,
4146 }
4147 }
4148}
4149
4150impl<'a> SetEffectivePropertyValueForNodeParams<'a> { pub const METHOD: &'static str = "CSS.setEffectivePropertyValueForNode"; }
4151
4152impl<'a> crate::CdpCommand<'a> for SetEffectivePropertyValueForNodeParams<'a> {
4153 const METHOD: &'static str = "CSS.setEffectivePropertyValueForNode";
4154 type Response = crate::EmptyReturns;
4155}
4156
4157#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4160#[serde(rename_all = "camelCase")]
4161pub struct SetPropertyRulePropertyNameParams<'a> {
4162 styleSheetId: crate::dom::StyleSheetId<'a>,
4163 range: SourceRange,
4164 propertyName: Cow<'a, str>,
4165}
4166
4167impl<'a> SetPropertyRulePropertyNameParams<'a> {
4168 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, range: SourceRange, propertyName: impl Into<Cow<'a, str>>) -> SetPropertyRulePropertyNameParamsBuilder<'a> {
4169 SetPropertyRulePropertyNameParamsBuilder {
4170 styleSheetId: styleSheetId,
4171 range: range,
4172 propertyName: propertyName.into(),
4173 }
4174 }
4175 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
4176 pub fn range(&self) -> &SourceRange { &self.range }
4177 pub fn propertyName(&self) -> &str { self.propertyName.as_ref() }
4178}
4179
4180
4181pub struct SetPropertyRulePropertyNameParamsBuilder<'a> {
4182 styleSheetId: crate::dom::StyleSheetId<'a>,
4183 range: SourceRange,
4184 propertyName: Cow<'a, str>,
4185}
4186
4187impl<'a> SetPropertyRulePropertyNameParamsBuilder<'a> {
4188 pub fn build(self) -> SetPropertyRulePropertyNameParams<'a> {
4189 SetPropertyRulePropertyNameParams {
4190 styleSheetId: self.styleSheetId,
4191 range: self.range,
4192 propertyName: self.propertyName,
4193 }
4194 }
4195}
4196
4197#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4200#[serde(rename_all = "camelCase")]
4201pub struct SetPropertyRulePropertyNameReturns<'a> {
4202 propertyName: ProtocolValue<'a>,
4204}
4205
4206impl<'a> SetPropertyRulePropertyNameReturns<'a> {
4207 pub fn builder(propertyName: ProtocolValue<'a>) -> SetPropertyRulePropertyNameReturnsBuilder<'a> {
4208 SetPropertyRulePropertyNameReturnsBuilder {
4209 propertyName: propertyName,
4210 }
4211 }
4212 pub fn propertyName(&self) -> &ProtocolValue<'a> { &self.propertyName }
4213}
4214
4215
4216pub struct SetPropertyRulePropertyNameReturnsBuilder<'a> {
4217 propertyName: ProtocolValue<'a>,
4218}
4219
4220impl<'a> SetPropertyRulePropertyNameReturnsBuilder<'a> {
4221 pub fn build(self) -> SetPropertyRulePropertyNameReturns<'a> {
4222 SetPropertyRulePropertyNameReturns {
4223 propertyName: self.propertyName,
4224 }
4225 }
4226}
4227
4228impl<'a> SetPropertyRulePropertyNameParams<'a> { pub const METHOD: &'static str = "CSS.setPropertyRulePropertyName"; }
4229
4230impl<'a> crate::CdpCommand<'a> for SetPropertyRulePropertyNameParams<'a> {
4231 const METHOD: &'static str = "CSS.setPropertyRulePropertyName";
4232 type Response = SetPropertyRulePropertyNameReturns<'a>;
4233}
4234
4235#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4238#[serde(rename_all = "camelCase")]
4239pub struct SetKeyframeKeyParams<'a> {
4240 styleSheetId: crate::dom::StyleSheetId<'a>,
4241 range: SourceRange,
4242 keyText: Cow<'a, str>,
4243}
4244
4245impl<'a> SetKeyframeKeyParams<'a> {
4246 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, range: SourceRange, keyText: impl Into<Cow<'a, str>>) -> SetKeyframeKeyParamsBuilder<'a> {
4247 SetKeyframeKeyParamsBuilder {
4248 styleSheetId: styleSheetId,
4249 range: range,
4250 keyText: keyText.into(),
4251 }
4252 }
4253 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
4254 pub fn range(&self) -> &SourceRange { &self.range }
4255 pub fn keyText(&self) -> &str { self.keyText.as_ref() }
4256}
4257
4258
4259pub struct SetKeyframeKeyParamsBuilder<'a> {
4260 styleSheetId: crate::dom::StyleSheetId<'a>,
4261 range: SourceRange,
4262 keyText: Cow<'a, str>,
4263}
4264
4265impl<'a> SetKeyframeKeyParamsBuilder<'a> {
4266 pub fn build(self) -> SetKeyframeKeyParams<'a> {
4267 SetKeyframeKeyParams {
4268 styleSheetId: self.styleSheetId,
4269 range: self.range,
4270 keyText: self.keyText,
4271 }
4272 }
4273}
4274
4275#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4278#[serde(rename_all = "camelCase")]
4279pub struct SetKeyframeKeyReturns<'a> {
4280 keyText: ProtocolValue<'a>,
4282}
4283
4284impl<'a> SetKeyframeKeyReturns<'a> {
4285 pub fn builder(keyText: ProtocolValue<'a>) -> SetKeyframeKeyReturnsBuilder<'a> {
4286 SetKeyframeKeyReturnsBuilder {
4287 keyText: keyText,
4288 }
4289 }
4290 pub fn keyText(&self) -> &ProtocolValue<'a> { &self.keyText }
4291}
4292
4293
4294pub struct SetKeyframeKeyReturnsBuilder<'a> {
4295 keyText: ProtocolValue<'a>,
4296}
4297
4298impl<'a> SetKeyframeKeyReturnsBuilder<'a> {
4299 pub fn build(self) -> SetKeyframeKeyReturns<'a> {
4300 SetKeyframeKeyReturns {
4301 keyText: self.keyText,
4302 }
4303 }
4304}
4305
4306impl<'a> SetKeyframeKeyParams<'a> { pub const METHOD: &'static str = "CSS.setKeyframeKey"; }
4307
4308impl<'a> crate::CdpCommand<'a> for SetKeyframeKeyParams<'a> {
4309 const METHOD: &'static str = "CSS.setKeyframeKey";
4310 type Response = SetKeyframeKeyReturns<'a>;
4311}
4312
4313#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4316#[serde(rename_all = "camelCase")]
4317pub struct SetMediaTextParams<'a> {
4318 styleSheetId: crate::dom::StyleSheetId<'a>,
4319 range: SourceRange,
4320 text: Cow<'a, str>,
4321}
4322
4323impl<'a> SetMediaTextParams<'a> {
4324 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, range: SourceRange, text: impl Into<Cow<'a, str>>) -> SetMediaTextParamsBuilder<'a> {
4325 SetMediaTextParamsBuilder {
4326 styleSheetId: styleSheetId,
4327 range: range,
4328 text: text.into(),
4329 }
4330 }
4331 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
4332 pub fn range(&self) -> &SourceRange { &self.range }
4333 pub fn text(&self) -> &str { self.text.as_ref() }
4334}
4335
4336
4337pub struct SetMediaTextParamsBuilder<'a> {
4338 styleSheetId: crate::dom::StyleSheetId<'a>,
4339 range: SourceRange,
4340 text: Cow<'a, str>,
4341}
4342
4343impl<'a> SetMediaTextParamsBuilder<'a> {
4344 pub fn build(self) -> SetMediaTextParams<'a> {
4345 SetMediaTextParams {
4346 styleSheetId: self.styleSheetId,
4347 range: self.range,
4348 text: self.text,
4349 }
4350 }
4351}
4352
4353#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4356#[serde(rename_all = "camelCase")]
4357pub struct SetMediaTextReturns<'a> {
4358 media: CSSMedia<'a>,
4360}
4361
4362impl<'a> SetMediaTextReturns<'a> {
4363 pub fn builder(media: CSSMedia<'a>) -> SetMediaTextReturnsBuilder<'a> {
4364 SetMediaTextReturnsBuilder {
4365 media: media,
4366 }
4367 }
4368 pub fn media(&self) -> &CSSMedia<'a> { &self.media }
4369}
4370
4371
4372pub struct SetMediaTextReturnsBuilder<'a> {
4373 media: CSSMedia<'a>,
4374}
4375
4376impl<'a> SetMediaTextReturnsBuilder<'a> {
4377 pub fn build(self) -> SetMediaTextReturns<'a> {
4378 SetMediaTextReturns {
4379 media: self.media,
4380 }
4381 }
4382}
4383
4384impl<'a> SetMediaTextParams<'a> { pub const METHOD: &'static str = "CSS.setMediaText"; }
4385
4386impl<'a> crate::CdpCommand<'a> for SetMediaTextParams<'a> {
4387 const METHOD: &'static str = "CSS.setMediaText";
4388 type Response = SetMediaTextReturns<'a>;
4389}
4390
4391#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4394#[serde(rename_all = "camelCase")]
4395pub struct SetContainerQueryTextParams<'a> {
4396 styleSheetId: crate::dom::StyleSheetId<'a>,
4397 range: SourceRange,
4398 text: Cow<'a, str>,
4399}
4400
4401impl<'a> SetContainerQueryTextParams<'a> {
4402 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, range: SourceRange, text: impl Into<Cow<'a, str>>) -> SetContainerQueryTextParamsBuilder<'a> {
4403 SetContainerQueryTextParamsBuilder {
4404 styleSheetId: styleSheetId,
4405 range: range,
4406 text: text.into(),
4407 }
4408 }
4409 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
4410 pub fn range(&self) -> &SourceRange { &self.range }
4411 pub fn text(&self) -> &str { self.text.as_ref() }
4412}
4413
4414
4415pub struct SetContainerQueryTextParamsBuilder<'a> {
4416 styleSheetId: crate::dom::StyleSheetId<'a>,
4417 range: SourceRange,
4418 text: Cow<'a, str>,
4419}
4420
4421impl<'a> SetContainerQueryTextParamsBuilder<'a> {
4422 pub fn build(self) -> SetContainerQueryTextParams<'a> {
4423 SetContainerQueryTextParams {
4424 styleSheetId: self.styleSheetId,
4425 range: self.range,
4426 text: self.text,
4427 }
4428 }
4429}
4430
4431#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4434#[serde(rename_all = "camelCase")]
4435pub struct SetContainerQueryTextReturns<'a> {
4436 containerQuery: CSSContainerQuery<'a>,
4438}
4439
4440impl<'a> SetContainerQueryTextReturns<'a> {
4441 pub fn builder(containerQuery: CSSContainerQuery<'a>) -> SetContainerQueryTextReturnsBuilder<'a> {
4442 SetContainerQueryTextReturnsBuilder {
4443 containerQuery: containerQuery,
4444 }
4445 }
4446 pub fn containerQuery(&self) -> &CSSContainerQuery<'a> { &self.containerQuery }
4447}
4448
4449
4450pub struct SetContainerQueryTextReturnsBuilder<'a> {
4451 containerQuery: CSSContainerQuery<'a>,
4452}
4453
4454impl<'a> SetContainerQueryTextReturnsBuilder<'a> {
4455 pub fn build(self) -> SetContainerQueryTextReturns<'a> {
4456 SetContainerQueryTextReturns {
4457 containerQuery: self.containerQuery,
4458 }
4459 }
4460}
4461
4462impl<'a> SetContainerQueryTextParams<'a> { pub const METHOD: &'static str = "CSS.setContainerQueryText"; }
4463
4464impl<'a> crate::CdpCommand<'a> for SetContainerQueryTextParams<'a> {
4465 const METHOD: &'static str = "CSS.setContainerQueryText";
4466 type Response = SetContainerQueryTextReturns<'a>;
4467}
4468
4469#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4472#[serde(rename_all = "camelCase")]
4473pub struct SetSupportsTextParams<'a> {
4474 styleSheetId: crate::dom::StyleSheetId<'a>,
4475 range: SourceRange,
4476 text: Cow<'a, str>,
4477}
4478
4479impl<'a> SetSupportsTextParams<'a> {
4480 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, range: SourceRange, text: impl Into<Cow<'a, str>>) -> SetSupportsTextParamsBuilder<'a> {
4481 SetSupportsTextParamsBuilder {
4482 styleSheetId: styleSheetId,
4483 range: range,
4484 text: text.into(),
4485 }
4486 }
4487 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
4488 pub fn range(&self) -> &SourceRange { &self.range }
4489 pub fn text(&self) -> &str { self.text.as_ref() }
4490}
4491
4492
4493pub struct SetSupportsTextParamsBuilder<'a> {
4494 styleSheetId: crate::dom::StyleSheetId<'a>,
4495 range: SourceRange,
4496 text: Cow<'a, str>,
4497}
4498
4499impl<'a> SetSupportsTextParamsBuilder<'a> {
4500 pub fn build(self) -> SetSupportsTextParams<'a> {
4501 SetSupportsTextParams {
4502 styleSheetId: self.styleSheetId,
4503 range: self.range,
4504 text: self.text,
4505 }
4506 }
4507}
4508
4509#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4512#[serde(rename_all = "camelCase")]
4513pub struct SetSupportsTextReturns<'a> {
4514 supports: CSSSupports<'a>,
4516}
4517
4518impl<'a> SetSupportsTextReturns<'a> {
4519 pub fn builder(supports: CSSSupports<'a>) -> SetSupportsTextReturnsBuilder<'a> {
4520 SetSupportsTextReturnsBuilder {
4521 supports: supports,
4522 }
4523 }
4524 pub fn supports(&self) -> &CSSSupports<'a> { &self.supports }
4525}
4526
4527
4528pub struct SetSupportsTextReturnsBuilder<'a> {
4529 supports: CSSSupports<'a>,
4530}
4531
4532impl<'a> SetSupportsTextReturnsBuilder<'a> {
4533 pub fn build(self) -> SetSupportsTextReturns<'a> {
4534 SetSupportsTextReturns {
4535 supports: self.supports,
4536 }
4537 }
4538}
4539
4540impl<'a> SetSupportsTextParams<'a> { pub const METHOD: &'static str = "CSS.setSupportsText"; }
4541
4542impl<'a> crate::CdpCommand<'a> for SetSupportsTextParams<'a> {
4543 const METHOD: &'static str = "CSS.setSupportsText";
4544 type Response = SetSupportsTextReturns<'a>;
4545}
4546
4547#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4550#[serde(rename_all = "camelCase")]
4551pub struct SetNavigationTextParams<'a> {
4552 styleSheetId: crate::dom::StyleSheetId<'a>,
4553 range: SourceRange,
4554 text: Cow<'a, str>,
4555}
4556
4557impl<'a> SetNavigationTextParams<'a> {
4558 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, range: SourceRange, text: impl Into<Cow<'a, str>>) -> SetNavigationTextParamsBuilder<'a> {
4559 SetNavigationTextParamsBuilder {
4560 styleSheetId: styleSheetId,
4561 range: range,
4562 text: text.into(),
4563 }
4564 }
4565 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
4566 pub fn range(&self) -> &SourceRange { &self.range }
4567 pub fn text(&self) -> &str { self.text.as_ref() }
4568}
4569
4570
4571pub struct SetNavigationTextParamsBuilder<'a> {
4572 styleSheetId: crate::dom::StyleSheetId<'a>,
4573 range: SourceRange,
4574 text: Cow<'a, str>,
4575}
4576
4577impl<'a> SetNavigationTextParamsBuilder<'a> {
4578 pub fn build(self) -> SetNavigationTextParams<'a> {
4579 SetNavigationTextParams {
4580 styleSheetId: self.styleSheetId,
4581 range: self.range,
4582 text: self.text,
4583 }
4584 }
4585}
4586
4587#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4590#[serde(rename_all = "camelCase")]
4591pub struct SetNavigationTextReturns<'a> {
4592 navigation: CSSNavigation<'a>,
4594}
4595
4596impl<'a> SetNavigationTextReturns<'a> {
4597 pub fn builder(navigation: CSSNavigation<'a>) -> SetNavigationTextReturnsBuilder<'a> {
4598 SetNavigationTextReturnsBuilder {
4599 navigation: navigation,
4600 }
4601 }
4602 pub fn navigation(&self) -> &CSSNavigation<'a> { &self.navigation }
4603}
4604
4605
4606pub struct SetNavigationTextReturnsBuilder<'a> {
4607 navigation: CSSNavigation<'a>,
4608}
4609
4610impl<'a> SetNavigationTextReturnsBuilder<'a> {
4611 pub fn build(self) -> SetNavigationTextReturns<'a> {
4612 SetNavigationTextReturns {
4613 navigation: self.navigation,
4614 }
4615 }
4616}
4617
4618impl<'a> SetNavigationTextParams<'a> { pub const METHOD: &'static str = "CSS.setNavigationText"; }
4619
4620impl<'a> crate::CdpCommand<'a> for SetNavigationTextParams<'a> {
4621 const METHOD: &'static str = "CSS.setNavigationText";
4622 type Response = SetNavigationTextReturns<'a>;
4623}
4624
4625#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4628#[serde(rename_all = "camelCase")]
4629pub struct SetScopeTextParams<'a> {
4630 styleSheetId: crate::dom::StyleSheetId<'a>,
4631 range: SourceRange,
4632 text: Cow<'a, str>,
4633}
4634
4635impl<'a> SetScopeTextParams<'a> {
4636 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, range: SourceRange, text: impl Into<Cow<'a, str>>) -> SetScopeTextParamsBuilder<'a> {
4637 SetScopeTextParamsBuilder {
4638 styleSheetId: styleSheetId,
4639 range: range,
4640 text: text.into(),
4641 }
4642 }
4643 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
4644 pub fn range(&self) -> &SourceRange { &self.range }
4645 pub fn text(&self) -> &str { self.text.as_ref() }
4646}
4647
4648
4649pub struct SetScopeTextParamsBuilder<'a> {
4650 styleSheetId: crate::dom::StyleSheetId<'a>,
4651 range: SourceRange,
4652 text: Cow<'a, str>,
4653}
4654
4655impl<'a> SetScopeTextParamsBuilder<'a> {
4656 pub fn build(self) -> SetScopeTextParams<'a> {
4657 SetScopeTextParams {
4658 styleSheetId: self.styleSheetId,
4659 range: self.range,
4660 text: self.text,
4661 }
4662 }
4663}
4664
4665#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4668#[serde(rename_all = "camelCase")]
4669pub struct SetScopeTextReturns<'a> {
4670 scope: CSSScope<'a>,
4672}
4673
4674impl<'a> SetScopeTextReturns<'a> {
4675 pub fn builder(scope: CSSScope<'a>) -> SetScopeTextReturnsBuilder<'a> {
4676 SetScopeTextReturnsBuilder {
4677 scope: scope,
4678 }
4679 }
4680 pub fn scope(&self) -> &CSSScope<'a> { &self.scope }
4681}
4682
4683
4684pub struct SetScopeTextReturnsBuilder<'a> {
4685 scope: CSSScope<'a>,
4686}
4687
4688impl<'a> SetScopeTextReturnsBuilder<'a> {
4689 pub fn build(self) -> SetScopeTextReturns<'a> {
4690 SetScopeTextReturns {
4691 scope: self.scope,
4692 }
4693 }
4694}
4695
4696impl<'a> SetScopeTextParams<'a> { pub const METHOD: &'static str = "CSS.setScopeText"; }
4697
4698impl<'a> crate::CdpCommand<'a> for SetScopeTextParams<'a> {
4699 const METHOD: &'static str = "CSS.setScopeText";
4700 type Response = SetScopeTextReturns<'a>;
4701}
4702
4703#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4706#[serde(rename_all = "camelCase")]
4707pub struct SetRuleSelectorParams<'a> {
4708 styleSheetId: crate::dom::StyleSheetId<'a>,
4709 range: SourceRange,
4710 selector: Cow<'a, str>,
4711}
4712
4713impl<'a> SetRuleSelectorParams<'a> {
4714 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, range: SourceRange, selector: impl Into<Cow<'a, str>>) -> SetRuleSelectorParamsBuilder<'a> {
4715 SetRuleSelectorParamsBuilder {
4716 styleSheetId: styleSheetId,
4717 range: range,
4718 selector: selector.into(),
4719 }
4720 }
4721 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
4722 pub fn range(&self) -> &SourceRange { &self.range }
4723 pub fn selector(&self) -> &str { self.selector.as_ref() }
4724}
4725
4726
4727pub struct SetRuleSelectorParamsBuilder<'a> {
4728 styleSheetId: crate::dom::StyleSheetId<'a>,
4729 range: SourceRange,
4730 selector: Cow<'a, str>,
4731}
4732
4733impl<'a> SetRuleSelectorParamsBuilder<'a> {
4734 pub fn build(self) -> SetRuleSelectorParams<'a> {
4735 SetRuleSelectorParams {
4736 styleSheetId: self.styleSheetId,
4737 range: self.range,
4738 selector: self.selector,
4739 }
4740 }
4741}
4742
4743#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4746#[serde(rename_all = "camelCase")]
4747pub struct SetRuleSelectorReturns<'a> {
4748 selectorList: SelectorList<'a>,
4750}
4751
4752impl<'a> SetRuleSelectorReturns<'a> {
4753 pub fn builder(selectorList: SelectorList<'a>) -> SetRuleSelectorReturnsBuilder<'a> {
4754 SetRuleSelectorReturnsBuilder {
4755 selectorList: selectorList,
4756 }
4757 }
4758 pub fn selectorList(&self) -> &SelectorList<'a> { &self.selectorList }
4759}
4760
4761
4762pub struct SetRuleSelectorReturnsBuilder<'a> {
4763 selectorList: SelectorList<'a>,
4764}
4765
4766impl<'a> SetRuleSelectorReturnsBuilder<'a> {
4767 pub fn build(self) -> SetRuleSelectorReturns<'a> {
4768 SetRuleSelectorReturns {
4769 selectorList: self.selectorList,
4770 }
4771 }
4772}
4773
4774impl<'a> SetRuleSelectorParams<'a> { pub const METHOD: &'static str = "CSS.setRuleSelector"; }
4775
4776impl<'a> crate::CdpCommand<'a> for SetRuleSelectorParams<'a> {
4777 const METHOD: &'static str = "CSS.setRuleSelector";
4778 type Response = SetRuleSelectorReturns<'a>;
4779}
4780
4781#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4784#[serde(rename_all = "camelCase")]
4785pub struct SetStyleSheetTextParams<'a> {
4786 styleSheetId: crate::dom::StyleSheetId<'a>,
4787 text: Cow<'a, str>,
4788}
4789
4790impl<'a> SetStyleSheetTextParams<'a> {
4791 pub fn builder(styleSheetId: crate::dom::StyleSheetId<'a>, text: impl Into<Cow<'a, str>>) -> SetStyleSheetTextParamsBuilder<'a> {
4792 SetStyleSheetTextParamsBuilder {
4793 styleSheetId: styleSheetId,
4794 text: text.into(),
4795 }
4796 }
4797 pub fn styleSheetId(&self) -> &crate::dom::StyleSheetId<'a> { &self.styleSheetId }
4798 pub fn text(&self) -> &str { self.text.as_ref() }
4799}
4800
4801
4802pub struct SetStyleSheetTextParamsBuilder<'a> {
4803 styleSheetId: crate::dom::StyleSheetId<'a>,
4804 text: Cow<'a, str>,
4805}
4806
4807impl<'a> SetStyleSheetTextParamsBuilder<'a> {
4808 pub fn build(self) -> SetStyleSheetTextParams<'a> {
4809 SetStyleSheetTextParams {
4810 styleSheetId: self.styleSheetId,
4811 text: self.text,
4812 }
4813 }
4814}
4815
4816#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4819#[serde(rename_all = "camelCase")]
4820pub struct SetStyleSheetTextReturns<'a> {
4821 #[serde(skip_serializing_if = "Option::is_none")]
4823 sourceMapURL: Option<Cow<'a, str>>,
4824}
4825
4826impl<'a> SetStyleSheetTextReturns<'a> {
4827 pub fn builder() -> SetStyleSheetTextReturnsBuilder<'a> {
4828 SetStyleSheetTextReturnsBuilder {
4829 sourceMapURL: None,
4830 }
4831 }
4832 pub fn sourceMapURL(&self) -> Option<&str> { self.sourceMapURL.as_deref() }
4833}
4834
4835#[derive(Default)]
4836pub struct SetStyleSheetTextReturnsBuilder<'a> {
4837 sourceMapURL: Option<Cow<'a, str>>,
4838}
4839
4840impl<'a> SetStyleSheetTextReturnsBuilder<'a> {
4841 pub fn sourceMapURL(mut self, sourceMapURL: impl Into<Cow<'a, str>>) -> Self { self.sourceMapURL = Some(sourceMapURL.into()); self }
4843 pub fn build(self) -> SetStyleSheetTextReturns<'a> {
4844 SetStyleSheetTextReturns {
4845 sourceMapURL: self.sourceMapURL,
4846 }
4847 }
4848}
4849
4850impl<'a> SetStyleSheetTextParams<'a> { pub const METHOD: &'static str = "CSS.setStyleSheetText"; }
4851
4852impl<'a> crate::CdpCommand<'a> for SetStyleSheetTextParams<'a> {
4853 const METHOD: &'static str = "CSS.setStyleSheetText";
4854 type Response = SetStyleSheetTextReturns<'a>;
4855}
4856
4857#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4860#[serde(rename_all = "camelCase")]
4861pub struct SetStyleTextsParams<'a> {
4862 edits: Vec<StyleDeclarationEdit<'a>>,
4863 #[serde(skip_serializing_if = "Option::is_none")]
4867 nodeForPropertySyntaxValidation: Option<crate::dom::NodeId>,
4868}
4869
4870impl<'a> SetStyleTextsParams<'a> {
4871 pub fn builder(edits: Vec<StyleDeclarationEdit<'a>>) -> SetStyleTextsParamsBuilder<'a> {
4872 SetStyleTextsParamsBuilder {
4873 edits: edits,
4874 nodeForPropertySyntaxValidation: None,
4875 }
4876 }
4877 pub fn edits(&self) -> &[StyleDeclarationEdit<'a>] { &self.edits }
4878 pub fn nodeForPropertySyntaxValidation(&self) -> Option<&crate::dom::NodeId> { self.nodeForPropertySyntaxValidation.as_ref() }
4879}
4880
4881
4882pub struct SetStyleTextsParamsBuilder<'a> {
4883 edits: Vec<StyleDeclarationEdit<'a>>,
4884 nodeForPropertySyntaxValidation: Option<crate::dom::NodeId>,
4885}
4886
4887impl<'a> SetStyleTextsParamsBuilder<'a> {
4888 pub fn nodeForPropertySyntaxValidation(mut self, nodeForPropertySyntaxValidation: crate::dom::NodeId) -> Self { self.nodeForPropertySyntaxValidation = Some(nodeForPropertySyntaxValidation); self }
4892 pub fn build(self) -> SetStyleTextsParams<'a> {
4893 SetStyleTextsParams {
4894 edits: self.edits,
4895 nodeForPropertySyntaxValidation: self.nodeForPropertySyntaxValidation,
4896 }
4897 }
4898}
4899
4900#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4903#[serde(rename_all = "camelCase")]
4904pub struct SetStyleTextsReturns<'a> {
4905 styles: Vec<CSSStyle<'a>>,
4907}
4908
4909impl<'a> SetStyleTextsReturns<'a> {
4910 pub fn builder(styles: Vec<CSSStyle<'a>>) -> SetStyleTextsReturnsBuilder<'a> {
4911 SetStyleTextsReturnsBuilder {
4912 styles: styles,
4913 }
4914 }
4915 pub fn styles(&self) -> &[CSSStyle<'a>] { &self.styles }
4916}
4917
4918
4919pub struct SetStyleTextsReturnsBuilder<'a> {
4920 styles: Vec<CSSStyle<'a>>,
4921}
4922
4923impl<'a> SetStyleTextsReturnsBuilder<'a> {
4924 pub fn build(self) -> SetStyleTextsReturns<'a> {
4925 SetStyleTextsReturns {
4926 styles: self.styles,
4927 }
4928 }
4929}
4930
4931impl<'a> SetStyleTextsParams<'a> { pub const METHOD: &'static str = "CSS.setStyleTexts"; }
4932
4933impl<'a> crate::CdpCommand<'a> for SetStyleTextsParams<'a> {
4934 const METHOD: &'static str = "CSS.setStyleTexts";
4935 type Response = SetStyleTextsReturns<'a>;
4936}
4937
4938#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4939pub struct StartRuleUsageTrackingParams {}
4940
4941impl StartRuleUsageTrackingParams { pub const METHOD: &'static str = "CSS.startRuleUsageTracking"; }
4942
4943impl<'a> crate::CdpCommand<'a> for StartRuleUsageTrackingParams {
4944 const METHOD: &'static str = "CSS.startRuleUsageTracking";
4945 type Response = crate::EmptyReturns;
4946}
4947
4948#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4952#[serde(rename_all = "camelCase")]
4953pub struct StopRuleUsageTrackingReturns<'a> {
4954 ruleUsage: Vec<RuleUsage<'a>>,
4955}
4956
4957impl<'a> StopRuleUsageTrackingReturns<'a> {
4958 pub fn builder(ruleUsage: Vec<RuleUsage<'a>>) -> StopRuleUsageTrackingReturnsBuilder<'a> {
4959 StopRuleUsageTrackingReturnsBuilder {
4960 ruleUsage: ruleUsage,
4961 }
4962 }
4963 pub fn ruleUsage(&self) -> &[RuleUsage<'a>] { &self.ruleUsage }
4964}
4965
4966
4967pub struct StopRuleUsageTrackingReturnsBuilder<'a> {
4968 ruleUsage: Vec<RuleUsage<'a>>,
4969}
4970
4971impl<'a> StopRuleUsageTrackingReturnsBuilder<'a> {
4972 pub fn build(self) -> StopRuleUsageTrackingReturns<'a> {
4973 StopRuleUsageTrackingReturns {
4974 ruleUsage: self.ruleUsage,
4975 }
4976 }
4977}
4978
4979#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4980pub struct StopRuleUsageTrackingParams {}
4981
4982impl StopRuleUsageTrackingParams { pub const METHOD: &'static str = "CSS.stopRuleUsageTracking"; }
4983
4984impl<'a> crate::CdpCommand<'a> for StopRuleUsageTrackingParams {
4985 const METHOD: &'static str = "CSS.stopRuleUsageTracking";
4986 type Response = StopRuleUsageTrackingReturns<'a>;
4987}
4988
4989#[derive(Debug, Clone, Serialize, Deserialize, Default)]
4993#[serde(rename_all = "camelCase")]
4994pub struct TakeCoverageDeltaReturns<'a> {
4995 coverage: Vec<RuleUsage<'a>>,
4996 timestamp: f64,
4998}
4999
5000impl<'a> TakeCoverageDeltaReturns<'a> {
5001 pub fn builder(coverage: Vec<RuleUsage<'a>>, timestamp: f64) -> TakeCoverageDeltaReturnsBuilder<'a> {
5002 TakeCoverageDeltaReturnsBuilder {
5003 coverage: coverage,
5004 timestamp: timestamp,
5005 }
5006 }
5007 pub fn coverage(&self) -> &[RuleUsage<'a>] { &self.coverage }
5008 pub fn timestamp(&self) -> f64 { self.timestamp }
5009}
5010
5011
5012pub struct TakeCoverageDeltaReturnsBuilder<'a> {
5013 coverage: Vec<RuleUsage<'a>>,
5014 timestamp: f64,
5015}
5016
5017impl<'a> TakeCoverageDeltaReturnsBuilder<'a> {
5018 pub fn build(self) -> TakeCoverageDeltaReturns<'a> {
5019 TakeCoverageDeltaReturns {
5020 coverage: self.coverage,
5021 timestamp: self.timestamp,
5022 }
5023 }
5024}
5025
5026#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5027pub struct TakeCoverageDeltaParams {}
5028
5029impl TakeCoverageDeltaParams { pub const METHOD: &'static str = "CSS.takeCoverageDelta"; }
5030
5031impl<'a> crate::CdpCommand<'a> for TakeCoverageDeltaParams {
5032 const METHOD: &'static str = "CSS.takeCoverageDelta";
5033 type Response = TakeCoverageDeltaReturns<'a>;
5034}
5035
5036#[derive(Debug, Clone, Serialize, Deserialize, Default)]
5039#[serde(rename_all = "camelCase")]
5040pub struct SetLocalFontsEnabledParams {
5041 enabled: bool,
5043}
5044
5045impl SetLocalFontsEnabledParams {
5046 pub fn builder(enabled: bool) -> SetLocalFontsEnabledParamsBuilder {
5047 SetLocalFontsEnabledParamsBuilder {
5048 enabled: enabled,
5049 }
5050 }
5051 pub fn enabled(&self) -> bool { self.enabled }
5052}
5053
5054
5055pub struct SetLocalFontsEnabledParamsBuilder {
5056 enabled: bool,
5057}
5058
5059impl SetLocalFontsEnabledParamsBuilder {
5060 pub fn build(self) -> SetLocalFontsEnabledParams {
5061 SetLocalFontsEnabledParams {
5062 enabled: self.enabled,
5063 }
5064 }
5065}
5066
5067impl SetLocalFontsEnabledParams { pub const METHOD: &'static str = "CSS.setLocalFontsEnabled"; }
5068
5069impl<'a> crate::CdpCommand<'a> for SetLocalFontsEnabledParams {
5070 const METHOD: &'static str = "CSS.setLocalFontsEnabled";
5071 type Response = crate::EmptyReturns;
5072}