1use serde::{Serialize, Deserialize};
6use serde_json::Value as JsonValue;
7use std::borrow::Cow;
8
9pub type BreakpointId<'a> = Cow<'a, str>;
12
13pub type CallFrameId<'a> = Cow<'a, str>;
16
17#[derive(Debug, Clone, Serialize, Deserialize, Default)]
20#[serde(rename_all = "camelCase")]
21pub struct Location<'a> {
22 #[serde(rename = "scriptId")]
24 script_id: crate::runtime::ScriptId<'a>,
25 #[serde(rename = "lineNumber")]
27 line_number: i64,
28 #[serde(skip_serializing_if = "Option::is_none", rename = "columnNumber")]
30 column_number: Option<i64>,
31}
32
33impl<'a> Location<'a> {
34 pub fn builder(script_id: crate::runtime::ScriptId<'a>, line_number: i64) -> LocationBuilder<'a> {
38 LocationBuilder {
39 script_id: script_id,
40 line_number: line_number,
41 column_number: None,
42 }
43 }
44 pub fn script_id(&self) -> &crate::runtime::ScriptId<'a> { &self.script_id }
46 pub fn line_number(&self) -> i64 { self.line_number }
48 pub fn column_number(&self) -> Option<i64> { self.column_number }
50}
51
52
53pub struct LocationBuilder<'a> {
54 script_id: crate::runtime::ScriptId<'a>,
55 line_number: i64,
56 column_number: Option<i64>,
57}
58
59impl<'a> LocationBuilder<'a> {
60 pub fn column_number(mut self, column_number: i64) -> Self { self.column_number = Some(column_number); self }
62 pub fn build(self) -> Location<'a> {
63 Location {
64 script_id: self.script_id,
65 line_number: self.line_number,
66 column_number: self.column_number,
67 }
68 }
69}
70
71#[derive(Debug, Clone, Serialize, Deserialize, Default)]
74#[serde(rename_all = "camelCase")]
75pub struct ScriptPosition {
76 #[serde(rename = "lineNumber")]
77 line_number: i64,
78 #[serde(rename = "columnNumber")]
79 column_number: i64,
80}
81
82impl ScriptPosition {
83 pub fn builder(line_number: i64, column_number: i64) -> ScriptPositionBuilder {
87 ScriptPositionBuilder {
88 line_number: line_number,
89 column_number: column_number,
90 }
91 }
92 pub fn line_number(&self) -> i64 { self.line_number }
93 pub fn column_number(&self) -> i64 { self.column_number }
94}
95
96
97pub struct ScriptPositionBuilder {
98 line_number: i64,
99 column_number: i64,
100}
101
102impl ScriptPositionBuilder {
103 pub fn build(self) -> ScriptPosition {
104 ScriptPosition {
105 line_number: self.line_number,
106 column_number: self.column_number,
107 }
108 }
109}
110
111#[derive(Debug, Clone, Serialize, Deserialize, Default)]
114#[serde(rename_all = "camelCase")]
115pub struct LocationRange<'a> {
116 #[serde(rename = "scriptId")]
117 script_id: crate::runtime::ScriptId<'a>,
118 start: ScriptPosition,
119 end: ScriptPosition,
120}
121
122impl<'a> LocationRange<'a> {
123 pub fn builder(script_id: crate::runtime::ScriptId<'a>, start: ScriptPosition, end: ScriptPosition) -> LocationRangeBuilder<'a> {
128 LocationRangeBuilder {
129 script_id: script_id,
130 start: start,
131 end: end,
132 }
133 }
134 pub fn script_id(&self) -> &crate::runtime::ScriptId<'a> { &self.script_id }
135 pub fn start(&self) -> &ScriptPosition { &self.start }
136 pub fn end(&self) -> &ScriptPosition { &self.end }
137}
138
139
140pub struct LocationRangeBuilder<'a> {
141 script_id: crate::runtime::ScriptId<'a>,
142 start: ScriptPosition,
143 end: ScriptPosition,
144}
145
146impl<'a> LocationRangeBuilder<'a> {
147 pub fn build(self) -> LocationRange<'a> {
148 LocationRange {
149 script_id: self.script_id,
150 start: self.start,
151 end: self.end,
152 }
153 }
154}
155
156#[derive(Debug, Clone, Serialize, Deserialize, Default)]
159#[serde(rename_all = "camelCase")]
160pub struct CallFrame<'a> {
161 #[serde(rename = "callFrameId")]
163 call_frame_id: CallFrameId<'a>,
164 #[serde(rename = "functionName")]
166 function_name: Cow<'a, str>,
167 #[serde(skip_serializing_if = "Option::is_none", rename = "functionLocation")]
169 function_location: Option<Location<'a>>,
170 location: Location<'a>,
172 url: Cow<'a, str>,
176 #[serde(rename = "scopeChain")]
178 scope_chain: Vec<Scope<'a>>,
179 this: crate::runtime::RemoteObject<'a>,
181 #[serde(skip_serializing_if = "Option::is_none", rename = "returnValue")]
183 return_value: Option<crate::runtime::RemoteObject<'a>>,
184 #[serde(skip_serializing_if = "Option::is_none", rename = "canBeRestarted")]
189 can_be_restarted: Option<bool>,
190}
191
192impl<'a> CallFrame<'a> {
193 pub fn builder(call_frame_id: impl Into<CallFrameId<'a>>, function_name: impl Into<Cow<'a, str>>, location: Location<'a>, url: impl Into<Cow<'a, str>>, scope_chain: Vec<Scope<'a>>, this: crate::runtime::RemoteObject<'a>) -> CallFrameBuilder<'a> {
201 CallFrameBuilder {
202 call_frame_id: call_frame_id.into(),
203 function_name: function_name.into(),
204 function_location: None,
205 location: location,
206 url: url.into(),
207 scope_chain: scope_chain,
208 this: this,
209 return_value: None,
210 can_be_restarted: None,
211 }
212 }
213 pub fn call_frame_id(&self) -> &CallFrameId<'a> { &self.call_frame_id }
215 pub fn function_name(&self) -> &str { self.function_name.as_ref() }
217 pub fn function_location(&self) -> Option<&Location<'a>> { self.function_location.as_ref() }
219 pub fn location(&self) -> &Location<'a> { &self.location }
221 pub fn url(&self) -> &str { self.url.as_ref() }
225 pub fn scope_chain(&self) -> &[Scope<'a>] { &self.scope_chain }
227 pub fn this(&self) -> &crate::runtime::RemoteObject<'a> { &self.this }
229 pub fn return_value(&self) -> Option<&crate::runtime::RemoteObject<'a>> { self.return_value.as_ref() }
231 pub fn can_be_restarted(&self) -> Option<bool> { self.can_be_restarted }
236}
237
238
239pub struct CallFrameBuilder<'a> {
240 call_frame_id: CallFrameId<'a>,
241 function_name: Cow<'a, str>,
242 function_location: Option<Location<'a>>,
243 location: Location<'a>,
244 url: Cow<'a, str>,
245 scope_chain: Vec<Scope<'a>>,
246 this: crate::runtime::RemoteObject<'a>,
247 return_value: Option<crate::runtime::RemoteObject<'a>>,
248 can_be_restarted: Option<bool>,
249}
250
251impl<'a> CallFrameBuilder<'a> {
252 pub fn function_location(mut self, function_location: Location<'a>) -> Self { self.function_location = Some(function_location); self }
254 pub fn return_value(mut self, return_value: crate::runtime::RemoteObject<'a>) -> Self { self.return_value = Some(return_value); self }
256 pub fn can_be_restarted(mut self, can_be_restarted: bool) -> Self { self.can_be_restarted = Some(can_be_restarted); self }
261 pub fn build(self) -> CallFrame<'a> {
262 CallFrame {
263 call_frame_id: self.call_frame_id,
264 function_name: self.function_name,
265 function_location: self.function_location,
266 location: self.location,
267 url: self.url,
268 scope_chain: self.scope_chain,
269 this: self.this,
270 return_value: self.return_value,
271 can_be_restarted: self.can_be_restarted,
272 }
273 }
274}
275
276#[derive(Debug, Clone, Serialize, Deserialize, Default)]
279#[serde(rename_all = "camelCase")]
280pub struct Scope<'a> {
281 #[serde(rename = "type")]
283 type_: Cow<'a, str>,
284 object: crate::runtime::RemoteObject<'a>,
288 #[serde(skip_serializing_if = "Option::is_none")]
289 name: Option<Cow<'a, str>>,
290 #[serde(skip_serializing_if = "Option::is_none", rename = "startLocation")]
292 start_location: Option<Location<'a>>,
293 #[serde(skip_serializing_if = "Option::is_none", rename = "endLocation")]
295 end_location: Option<Location<'a>>,
296}
297
298impl<'a> Scope<'a> {
299 pub fn builder(type_: impl Into<Cow<'a, str>>, object: crate::runtime::RemoteObject<'a>) -> ScopeBuilder<'a> {
303 ScopeBuilder {
304 type_: type_.into(),
305 object: object,
306 name: None,
307 start_location: None,
308 end_location: None,
309 }
310 }
311 pub fn type_(&self) -> &str { self.type_.as_ref() }
313 pub fn object(&self) -> &crate::runtime::RemoteObject<'a> { &self.object }
317 pub fn name(&self) -> Option<&str> { self.name.as_deref() }
318 pub fn start_location(&self) -> Option<&Location<'a>> { self.start_location.as_ref() }
320 pub fn end_location(&self) -> Option<&Location<'a>> { self.end_location.as_ref() }
322}
323
324
325pub struct ScopeBuilder<'a> {
326 type_: Cow<'a, str>,
327 object: crate::runtime::RemoteObject<'a>,
328 name: Option<Cow<'a, str>>,
329 start_location: Option<Location<'a>>,
330 end_location: Option<Location<'a>>,
331}
332
333impl<'a> ScopeBuilder<'a> {
334 pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self { self.name = Some(name.into()); self }
335 pub fn start_location(mut self, start_location: Location<'a>) -> Self { self.start_location = Some(start_location); self }
337 pub fn end_location(mut self, end_location: Location<'a>) -> Self { self.end_location = Some(end_location); self }
339 pub fn build(self) -> Scope<'a> {
340 Scope {
341 type_: self.type_,
342 object: self.object,
343 name: self.name,
344 start_location: self.start_location,
345 end_location: self.end_location,
346 }
347 }
348}
349
350#[derive(Debug, Clone, Serialize, Deserialize, Default)]
353#[serde(rename_all = "camelCase")]
354pub struct SearchMatch<'a> {
355 #[serde(rename = "lineNumber")]
357 line_number: f64,
358 #[serde(rename = "lineContent")]
360 line_content: Cow<'a, str>,
361}
362
363impl<'a> SearchMatch<'a> {
364 pub fn builder(line_number: f64, line_content: impl Into<Cow<'a, str>>) -> SearchMatchBuilder<'a> {
368 SearchMatchBuilder {
369 line_number: line_number,
370 line_content: line_content.into(),
371 }
372 }
373 pub fn line_number(&self) -> f64 { self.line_number }
375 pub fn line_content(&self) -> &str { self.line_content.as_ref() }
377}
378
379
380pub struct SearchMatchBuilder<'a> {
381 line_number: f64,
382 line_content: Cow<'a, str>,
383}
384
385impl<'a> SearchMatchBuilder<'a> {
386 pub fn build(self) -> SearchMatch<'a> {
387 SearchMatch {
388 line_number: self.line_number,
389 line_content: self.line_content,
390 }
391 }
392}
393
394
395#[derive(Debug, Clone, Serialize, Deserialize, Default)]
396#[serde(rename_all = "camelCase")]
397pub struct BreakLocation<'a> {
398 #[serde(rename = "scriptId")]
400 script_id: crate::runtime::ScriptId<'a>,
401 #[serde(rename = "lineNumber")]
403 line_number: i64,
404 #[serde(skip_serializing_if = "Option::is_none", rename = "columnNumber")]
406 column_number: Option<i64>,
407 #[serde(skip_serializing_if = "Option::is_none", rename = "type")]
408 type_: Option<Cow<'a, str>>,
409}
410
411impl<'a> BreakLocation<'a> {
412 pub fn builder(script_id: crate::runtime::ScriptId<'a>, line_number: i64) -> BreakLocationBuilder<'a> {
416 BreakLocationBuilder {
417 script_id: script_id,
418 line_number: line_number,
419 column_number: None,
420 type_: None,
421 }
422 }
423 pub fn script_id(&self) -> &crate::runtime::ScriptId<'a> { &self.script_id }
425 pub fn line_number(&self) -> i64 { self.line_number }
427 pub fn column_number(&self) -> Option<i64> { self.column_number }
429 pub fn type_(&self) -> Option<&str> { self.type_.as_deref() }
430}
431
432
433pub struct BreakLocationBuilder<'a> {
434 script_id: crate::runtime::ScriptId<'a>,
435 line_number: i64,
436 column_number: Option<i64>,
437 type_: Option<Cow<'a, str>>,
438}
439
440impl<'a> BreakLocationBuilder<'a> {
441 pub fn column_number(mut self, column_number: i64) -> Self { self.column_number = Some(column_number); self }
443 pub fn type_(mut self, type_: impl Into<Cow<'a, str>>) -> Self { self.type_ = Some(type_.into()); self }
444 pub fn build(self) -> BreakLocation<'a> {
445 BreakLocation {
446 script_id: self.script_id,
447 line_number: self.line_number,
448 column_number: self.column_number,
449 type_: self.type_,
450 }
451 }
452}
453
454
455#[derive(Debug, Clone, Serialize, Deserialize, Default)]
456#[serde(rename_all = "camelCase")]
457pub struct WasmDisassemblyChunk<'a> {
458 lines: Vec<Cow<'a, str>>,
460 #[serde(rename = "bytecodeOffsets")]
462 bytecode_offsets: Vec<i64>,
463}
464
465impl<'a> WasmDisassemblyChunk<'a> {
466 pub fn builder(lines: Vec<Cow<'a, str>>, bytecode_offsets: Vec<i64>) -> WasmDisassemblyChunkBuilder<'a> {
470 WasmDisassemblyChunkBuilder {
471 lines: lines,
472 bytecode_offsets: bytecode_offsets,
473 }
474 }
475 pub fn lines(&self) -> &[Cow<'a, str>] { &self.lines }
477 pub fn bytecode_offsets(&self) -> &[i64] { &self.bytecode_offsets }
479}
480
481
482pub struct WasmDisassemblyChunkBuilder<'a> {
483 lines: Vec<Cow<'a, str>>,
484 bytecode_offsets: Vec<i64>,
485}
486
487impl<'a> WasmDisassemblyChunkBuilder<'a> {
488 pub fn build(self) -> WasmDisassemblyChunk<'a> {
489 WasmDisassemblyChunk {
490 lines: self.lines,
491 bytecode_offsets: self.bytecode_offsets,
492 }
493 }
494}
495
496#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
499pub enum ScriptLanguage {
500 #[default]
501 #[serde(rename = "JavaScript")]
502 JavaScript,
503 #[serde(rename = "WebAssembly")]
504 WebAssembly,
505}
506
507#[derive(Debug, Clone, Serialize, Deserialize, Default)]
510#[serde(rename_all = "camelCase")]
511pub struct DebugSymbols<'a> {
512 #[serde(rename = "type")]
514 type_: Cow<'a, str>,
515 #[serde(skip_serializing_if = "Option::is_none", rename = "externalURL")]
517 external_url: Option<Cow<'a, str>>,
518}
519
520impl<'a> DebugSymbols<'a> {
521 pub fn builder(type_: impl Into<Cow<'a, str>>) -> DebugSymbolsBuilder<'a> {
524 DebugSymbolsBuilder {
525 type_: type_.into(),
526 external_url: None,
527 }
528 }
529 pub fn type_(&self) -> &str { self.type_.as_ref() }
531 pub fn external_url(&self) -> Option<&str> { self.external_url.as_deref() }
533}
534
535
536pub struct DebugSymbolsBuilder<'a> {
537 type_: Cow<'a, str>,
538 external_url: Option<Cow<'a, str>>,
539}
540
541impl<'a> DebugSymbolsBuilder<'a> {
542 pub fn external_url(mut self, external_url: impl Into<Cow<'a, str>>) -> Self { self.external_url = Some(external_url.into()); self }
544 pub fn build(self) -> DebugSymbols<'a> {
545 DebugSymbols {
546 type_: self.type_,
547 external_url: self.external_url,
548 }
549 }
550}
551
552
553#[derive(Debug, Clone, Serialize, Deserialize, Default)]
554#[serde(rename_all = "camelCase")]
555pub struct ResolvedBreakpoint<'a> {
556 #[serde(rename = "breakpointId")]
558 breakpoint_id: BreakpointId<'a>,
559 location: Location<'a>,
561}
562
563impl<'a> ResolvedBreakpoint<'a> {
564 pub fn builder(breakpoint_id: impl Into<BreakpointId<'a>>, location: Location<'a>) -> ResolvedBreakpointBuilder<'a> {
568 ResolvedBreakpointBuilder {
569 breakpoint_id: breakpoint_id.into(),
570 location: location,
571 }
572 }
573 pub fn breakpoint_id(&self) -> &BreakpointId<'a> { &self.breakpoint_id }
575 pub fn location(&self) -> &Location<'a> { &self.location }
577}
578
579
580pub struct ResolvedBreakpointBuilder<'a> {
581 breakpoint_id: BreakpointId<'a>,
582 location: Location<'a>,
583}
584
585impl<'a> ResolvedBreakpointBuilder<'a> {
586 pub fn build(self) -> ResolvedBreakpoint<'a> {
587 ResolvedBreakpoint {
588 breakpoint_id: self.breakpoint_id,
589 location: self.location,
590 }
591 }
592}
593
594#[derive(Debug, Clone, Serialize, Deserialize, Default)]
597#[serde(rename_all = "camelCase")]
598pub struct ContinueToLocationParams<'a> {
599 location: Location<'a>,
601 #[serde(skip_serializing_if = "Option::is_none", rename = "targetCallFrames")]
602 target_call_frames: Option<Cow<'a, str>>,
603}
604
605impl<'a> ContinueToLocationParams<'a> {
606 pub fn builder(location: Location<'a>) -> ContinueToLocationParamsBuilder<'a> {
609 ContinueToLocationParamsBuilder {
610 location: location,
611 target_call_frames: None,
612 }
613 }
614 pub fn location(&self) -> &Location<'a> { &self.location }
616 pub fn target_call_frames(&self) -> Option<&str> { self.target_call_frames.as_deref() }
617}
618
619
620pub struct ContinueToLocationParamsBuilder<'a> {
621 location: Location<'a>,
622 target_call_frames: Option<Cow<'a, str>>,
623}
624
625impl<'a> ContinueToLocationParamsBuilder<'a> {
626 pub fn target_call_frames(mut self, target_call_frames: impl Into<Cow<'a, str>>) -> Self { self.target_call_frames = Some(target_call_frames.into()); self }
627 pub fn build(self) -> ContinueToLocationParams<'a> {
628 ContinueToLocationParams {
629 location: self.location,
630 target_call_frames: self.target_call_frames,
631 }
632 }
633}
634
635impl<'a> ContinueToLocationParams<'a> { pub const METHOD: &'static str = "Debugger.continueToLocation"; }
636
637impl<'a> crate::CdpCommand<'a> for ContinueToLocationParams<'a> {
638 const METHOD: &'static str = "Debugger.continueToLocation";
639 type Response = crate::EmptyReturns;
640}
641
642#[derive(Debug, Clone, Serialize, Deserialize, Default)]
643pub struct DisableParams {}
644
645impl DisableParams { pub const METHOD: &'static str = "Debugger.disable"; }
646
647impl<'a> crate::CdpCommand<'a> for DisableParams {
648 const METHOD: &'static str = "Debugger.disable";
649 type Response = crate::EmptyReturns;
650}
651
652#[derive(Debug, Clone, Serialize, Deserialize, Default)]
656#[serde(rename_all = "camelCase")]
657pub struct EnableParams {
658 #[serde(skip_serializing_if = "Option::is_none", rename = "maxScriptsCacheSize")]
661 max_scripts_cache_size: Option<f64>,
662}
663
664impl EnableParams {
665 pub fn builder() -> EnableParamsBuilder {
667 EnableParamsBuilder {
668 max_scripts_cache_size: None,
669 }
670 }
671 pub fn max_scripts_cache_size(&self) -> Option<f64> { self.max_scripts_cache_size }
674}
675
676#[derive(Default)]
677pub struct EnableParamsBuilder {
678 max_scripts_cache_size: Option<f64>,
679}
680
681impl EnableParamsBuilder {
682 pub fn max_scripts_cache_size(mut self, max_scripts_cache_size: f64) -> Self { self.max_scripts_cache_size = Some(max_scripts_cache_size); self }
685 pub fn build(self) -> EnableParams {
686 EnableParams {
687 max_scripts_cache_size: self.max_scripts_cache_size,
688 }
689 }
690}
691
692#[derive(Debug, Clone, Serialize, Deserialize, Default)]
696#[serde(rename_all = "camelCase")]
697pub struct EnableReturns<'a> {
698 #[serde(rename = "debuggerId")]
700 debugger_id: crate::runtime::UniqueDebuggerId<'a>,
701}
702
703impl<'a> EnableReturns<'a> {
704 pub fn builder(debugger_id: crate::runtime::UniqueDebuggerId<'a>) -> EnableReturnsBuilder<'a> {
707 EnableReturnsBuilder {
708 debugger_id: debugger_id,
709 }
710 }
711 pub fn debugger_id(&self) -> &crate::runtime::UniqueDebuggerId<'a> { &self.debugger_id }
713}
714
715
716pub struct EnableReturnsBuilder<'a> {
717 debugger_id: crate::runtime::UniqueDebuggerId<'a>,
718}
719
720impl<'a> EnableReturnsBuilder<'a> {
721 pub fn build(self) -> EnableReturns<'a> {
722 EnableReturns {
723 debugger_id: self.debugger_id,
724 }
725 }
726}
727
728impl EnableParams { pub const METHOD: &'static str = "Debugger.enable"; }
729
730impl<'a> crate::CdpCommand<'a> for EnableParams {
731 const METHOD: &'static str = "Debugger.enable";
732 type Response = EnableReturns<'a>;
733}
734
735#[derive(Debug, Clone, Serialize, Deserialize, Default)]
738#[serde(rename_all = "camelCase")]
739pub struct EvaluateOnCallFrameParams<'a> {
740 #[serde(rename = "callFrameId")]
742 call_frame_id: CallFrameId<'a>,
743 expression: Cow<'a, str>,
745 #[serde(skip_serializing_if = "Option::is_none", rename = "objectGroup")]
748 object_group: Option<Cow<'a, str>>,
749 #[serde(skip_serializing_if = "Option::is_none", rename = "includeCommandLineAPI")]
752 include_command_line_api: Option<bool>,
753 #[serde(skip_serializing_if = "Option::is_none")]
756 silent: Option<bool>,
757 #[serde(skip_serializing_if = "Option::is_none", rename = "returnByValue")]
759 return_by_value: Option<bool>,
760 #[serde(skip_serializing_if = "Option::is_none", rename = "generatePreview")]
762 generate_preview: Option<bool>,
763 #[serde(skip_serializing_if = "Option::is_none", rename = "throwOnSideEffect")]
765 throw_on_side_effect: Option<bool>,
766 #[serde(skip_serializing_if = "Option::is_none")]
768 timeout: Option<crate::runtime::TimeDelta>,
769}
770
771impl<'a> EvaluateOnCallFrameParams<'a> {
772 pub fn builder(call_frame_id: impl Into<CallFrameId<'a>>, expression: impl Into<Cow<'a, str>>) -> EvaluateOnCallFrameParamsBuilder<'a> {
776 EvaluateOnCallFrameParamsBuilder {
777 call_frame_id: call_frame_id.into(),
778 expression: expression.into(),
779 object_group: None,
780 include_command_line_api: None,
781 silent: None,
782 return_by_value: None,
783 generate_preview: None,
784 throw_on_side_effect: None,
785 timeout: None,
786 }
787 }
788 pub fn call_frame_id(&self) -> &CallFrameId<'a> { &self.call_frame_id }
790 pub fn expression(&self) -> &str { self.expression.as_ref() }
792 pub fn object_group(&self) -> Option<&str> { self.object_group.as_deref() }
795 pub fn include_command_line_api(&self) -> Option<bool> { self.include_command_line_api }
798 pub fn silent(&self) -> Option<bool> { self.silent }
801 pub fn return_by_value(&self) -> Option<bool> { self.return_by_value }
803 pub fn generate_preview(&self) -> Option<bool> { self.generate_preview }
805 pub fn throw_on_side_effect(&self) -> Option<bool> { self.throw_on_side_effect }
807 pub fn timeout(&self) -> Option<&crate::runtime::TimeDelta> { self.timeout.as_ref() }
809}
810
811
812pub struct EvaluateOnCallFrameParamsBuilder<'a> {
813 call_frame_id: CallFrameId<'a>,
814 expression: Cow<'a, str>,
815 object_group: Option<Cow<'a, str>>,
816 include_command_line_api: Option<bool>,
817 silent: Option<bool>,
818 return_by_value: Option<bool>,
819 generate_preview: Option<bool>,
820 throw_on_side_effect: Option<bool>,
821 timeout: Option<crate::runtime::TimeDelta>,
822}
823
824impl<'a> EvaluateOnCallFrameParamsBuilder<'a> {
825 pub fn object_group(mut self, object_group: impl Into<Cow<'a, str>>) -> Self { self.object_group = Some(object_group.into()); self }
828 pub fn include_command_line_api(mut self, include_command_line_api: bool) -> Self { self.include_command_line_api = Some(include_command_line_api); self }
831 pub fn silent(mut self, silent: bool) -> Self { self.silent = Some(silent); self }
834 pub fn return_by_value(mut self, return_by_value: bool) -> Self { self.return_by_value = Some(return_by_value); self }
836 pub fn generate_preview(mut self, generate_preview: bool) -> Self { self.generate_preview = Some(generate_preview); self }
838 pub fn throw_on_side_effect(mut self, throw_on_side_effect: bool) -> Self { self.throw_on_side_effect = Some(throw_on_side_effect); self }
840 pub fn timeout(mut self, timeout: crate::runtime::TimeDelta) -> Self { self.timeout = Some(timeout); self }
842 pub fn build(self) -> EvaluateOnCallFrameParams<'a> {
843 EvaluateOnCallFrameParams {
844 call_frame_id: self.call_frame_id,
845 expression: self.expression,
846 object_group: self.object_group,
847 include_command_line_api: self.include_command_line_api,
848 silent: self.silent,
849 return_by_value: self.return_by_value,
850 generate_preview: self.generate_preview,
851 throw_on_side_effect: self.throw_on_side_effect,
852 timeout: self.timeout,
853 }
854 }
855}
856
857#[derive(Debug, Clone, Serialize, Deserialize, Default)]
860#[serde(rename_all = "camelCase")]
861pub struct EvaluateOnCallFrameReturns<'a> {
862 result: crate::runtime::RemoteObject<'a>,
864 #[serde(skip_serializing_if = "Option::is_none", rename = "exceptionDetails")]
866 exception_details: Option<crate::runtime::ExceptionDetails<'a>>,
867}
868
869impl<'a> EvaluateOnCallFrameReturns<'a> {
870 pub fn builder(result: crate::runtime::RemoteObject<'a>) -> EvaluateOnCallFrameReturnsBuilder<'a> {
873 EvaluateOnCallFrameReturnsBuilder {
874 result: result,
875 exception_details: None,
876 }
877 }
878 pub fn result(&self) -> &crate::runtime::RemoteObject<'a> { &self.result }
880 pub fn exception_details(&self) -> Option<&crate::runtime::ExceptionDetails<'a>> { self.exception_details.as_ref() }
882}
883
884
885pub struct EvaluateOnCallFrameReturnsBuilder<'a> {
886 result: crate::runtime::RemoteObject<'a>,
887 exception_details: Option<crate::runtime::ExceptionDetails<'a>>,
888}
889
890impl<'a> EvaluateOnCallFrameReturnsBuilder<'a> {
891 pub fn exception_details(mut self, exception_details: crate::runtime::ExceptionDetails<'a>) -> Self { self.exception_details = Some(exception_details); self }
893 pub fn build(self) -> EvaluateOnCallFrameReturns<'a> {
894 EvaluateOnCallFrameReturns {
895 result: self.result,
896 exception_details: self.exception_details,
897 }
898 }
899}
900
901impl<'a> EvaluateOnCallFrameParams<'a> { pub const METHOD: &'static str = "Debugger.evaluateOnCallFrame"; }
902
903impl<'a> crate::CdpCommand<'a> for EvaluateOnCallFrameParams<'a> {
904 const METHOD: &'static str = "Debugger.evaluateOnCallFrame";
905 type Response = EvaluateOnCallFrameReturns<'a>;
906}
907
908#[derive(Debug, Clone, Serialize, Deserialize, Default)]
912#[serde(rename_all = "camelCase")]
913pub struct GetPossibleBreakpointsParams<'a> {
914 start: Location<'a>,
916 #[serde(skip_serializing_if = "Option::is_none")]
919 end: Option<Location<'a>>,
920 #[serde(skip_serializing_if = "Option::is_none", rename = "restrictToFunction")]
922 restrict_to_function: Option<bool>,
923}
924
925impl<'a> GetPossibleBreakpointsParams<'a> {
926 pub fn builder(start: Location<'a>) -> GetPossibleBreakpointsParamsBuilder<'a> {
929 GetPossibleBreakpointsParamsBuilder {
930 start: start,
931 end: None,
932 restrict_to_function: None,
933 }
934 }
935 pub fn start(&self) -> &Location<'a> { &self.start }
937 pub fn end(&self) -> Option<&Location<'a>> { self.end.as_ref() }
940 pub fn restrict_to_function(&self) -> Option<bool> { self.restrict_to_function }
942}
943
944
945pub struct GetPossibleBreakpointsParamsBuilder<'a> {
946 start: Location<'a>,
947 end: Option<Location<'a>>,
948 restrict_to_function: Option<bool>,
949}
950
951impl<'a> GetPossibleBreakpointsParamsBuilder<'a> {
952 pub fn end(mut self, end: Location<'a>) -> Self { self.end = Some(end); self }
955 pub fn restrict_to_function(mut self, restrict_to_function: bool) -> Self { self.restrict_to_function = Some(restrict_to_function); self }
957 pub fn build(self) -> GetPossibleBreakpointsParams<'a> {
958 GetPossibleBreakpointsParams {
959 start: self.start,
960 end: self.end,
961 restrict_to_function: self.restrict_to_function,
962 }
963 }
964}
965
966#[derive(Debug, Clone, Serialize, Deserialize, Default)]
970#[serde(rename_all = "camelCase")]
971pub struct GetPossibleBreakpointsReturns<'a> {
972 locations: Vec<BreakLocation<'a>>,
974}
975
976impl<'a> GetPossibleBreakpointsReturns<'a> {
977 pub fn builder(locations: Vec<BreakLocation<'a>>) -> GetPossibleBreakpointsReturnsBuilder<'a> {
980 GetPossibleBreakpointsReturnsBuilder {
981 locations: locations,
982 }
983 }
984 pub fn locations(&self) -> &[BreakLocation<'a>] { &self.locations }
986}
987
988
989pub struct GetPossibleBreakpointsReturnsBuilder<'a> {
990 locations: Vec<BreakLocation<'a>>,
991}
992
993impl<'a> GetPossibleBreakpointsReturnsBuilder<'a> {
994 pub fn build(self) -> GetPossibleBreakpointsReturns<'a> {
995 GetPossibleBreakpointsReturns {
996 locations: self.locations,
997 }
998 }
999}
1000
1001impl<'a> GetPossibleBreakpointsParams<'a> { pub const METHOD: &'static str = "Debugger.getPossibleBreakpoints"; }
1002
1003impl<'a> crate::CdpCommand<'a> for GetPossibleBreakpointsParams<'a> {
1004 const METHOD: &'static str = "Debugger.getPossibleBreakpoints";
1005 type Response = GetPossibleBreakpointsReturns<'a>;
1006}
1007
1008#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1011#[serde(rename_all = "camelCase")]
1012pub struct GetScriptSourceParams<'a> {
1013 #[serde(rename = "scriptId")]
1015 script_id: crate::runtime::ScriptId<'a>,
1016}
1017
1018impl<'a> GetScriptSourceParams<'a> {
1019 pub fn builder(script_id: crate::runtime::ScriptId<'a>) -> GetScriptSourceParamsBuilder<'a> {
1022 GetScriptSourceParamsBuilder {
1023 script_id: script_id,
1024 }
1025 }
1026 pub fn script_id(&self) -> &crate::runtime::ScriptId<'a> { &self.script_id }
1028}
1029
1030
1031pub struct GetScriptSourceParamsBuilder<'a> {
1032 script_id: crate::runtime::ScriptId<'a>,
1033}
1034
1035impl<'a> GetScriptSourceParamsBuilder<'a> {
1036 pub fn build(self) -> GetScriptSourceParams<'a> {
1037 GetScriptSourceParams {
1038 script_id: self.script_id,
1039 }
1040 }
1041}
1042
1043#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1046#[serde(rename_all = "camelCase")]
1047pub struct GetScriptSourceReturns<'a> {
1048 #[serde(rename = "scriptSource")]
1050 script_source: Cow<'a, str>,
1051 #[serde(skip_serializing_if = "Option::is_none")]
1053 bytecode: Option<Cow<'a, str>>,
1054}
1055
1056impl<'a> GetScriptSourceReturns<'a> {
1057 pub fn builder(script_source: impl Into<Cow<'a, str>>) -> GetScriptSourceReturnsBuilder<'a> {
1060 GetScriptSourceReturnsBuilder {
1061 script_source: script_source.into(),
1062 bytecode: None,
1063 }
1064 }
1065 pub fn script_source(&self) -> &str { self.script_source.as_ref() }
1067 pub fn bytecode(&self) -> Option<&str> { self.bytecode.as_deref() }
1069}
1070
1071
1072pub struct GetScriptSourceReturnsBuilder<'a> {
1073 script_source: Cow<'a, str>,
1074 bytecode: Option<Cow<'a, str>>,
1075}
1076
1077impl<'a> GetScriptSourceReturnsBuilder<'a> {
1078 pub fn bytecode(mut self, bytecode: impl Into<Cow<'a, str>>) -> Self { self.bytecode = Some(bytecode.into()); self }
1080 pub fn build(self) -> GetScriptSourceReturns<'a> {
1081 GetScriptSourceReturns {
1082 script_source: self.script_source,
1083 bytecode: self.bytecode,
1084 }
1085 }
1086}
1087
1088impl<'a> GetScriptSourceParams<'a> { pub const METHOD: &'static str = "Debugger.getScriptSource"; }
1089
1090impl<'a> crate::CdpCommand<'a> for GetScriptSourceParams<'a> {
1091 const METHOD: &'static str = "Debugger.getScriptSource";
1092 type Response = GetScriptSourceReturns<'a>;
1093}
1094
1095
1096#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1097#[serde(rename_all = "camelCase")]
1098pub struct DisassembleWasmModuleParams<'a> {
1099 #[serde(rename = "scriptId")]
1101 script_id: crate::runtime::ScriptId<'a>,
1102}
1103
1104impl<'a> DisassembleWasmModuleParams<'a> {
1105 pub fn builder(script_id: crate::runtime::ScriptId<'a>) -> DisassembleWasmModuleParamsBuilder<'a> {
1108 DisassembleWasmModuleParamsBuilder {
1109 script_id: script_id,
1110 }
1111 }
1112 pub fn script_id(&self) -> &crate::runtime::ScriptId<'a> { &self.script_id }
1114}
1115
1116
1117pub struct DisassembleWasmModuleParamsBuilder<'a> {
1118 script_id: crate::runtime::ScriptId<'a>,
1119}
1120
1121impl<'a> DisassembleWasmModuleParamsBuilder<'a> {
1122 pub fn build(self) -> DisassembleWasmModuleParams<'a> {
1123 DisassembleWasmModuleParams {
1124 script_id: self.script_id,
1125 }
1126 }
1127}
1128
1129
1130#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1131#[serde(rename_all = "camelCase")]
1132pub struct DisassembleWasmModuleReturns<'a> {
1133 #[serde(skip_serializing_if = "Option::is_none", rename = "streamId")]
1136 stream_id: Option<Cow<'a, str>>,
1137 #[serde(rename = "totalNumberOfLines")]
1139 total_number_of_lines: i64,
1140 #[serde(rename = "functionBodyOffsets")]
1143 function_body_offsets: Vec<i64>,
1144 chunk: WasmDisassemblyChunk<'a>,
1146}
1147
1148impl<'a> DisassembleWasmModuleReturns<'a> {
1149 pub fn builder(total_number_of_lines: i64, function_body_offsets: Vec<i64>, chunk: WasmDisassemblyChunk<'a>) -> DisassembleWasmModuleReturnsBuilder<'a> {
1154 DisassembleWasmModuleReturnsBuilder {
1155 stream_id: None,
1156 total_number_of_lines: total_number_of_lines,
1157 function_body_offsets: function_body_offsets,
1158 chunk: chunk,
1159 }
1160 }
1161 pub fn stream_id(&self) -> Option<&str> { self.stream_id.as_deref() }
1164 pub fn total_number_of_lines(&self) -> i64 { self.total_number_of_lines }
1166 pub fn function_body_offsets(&self) -> &[i64] { &self.function_body_offsets }
1169 pub fn chunk(&self) -> &WasmDisassemblyChunk<'a> { &self.chunk }
1171}
1172
1173
1174pub struct DisassembleWasmModuleReturnsBuilder<'a> {
1175 stream_id: Option<Cow<'a, str>>,
1176 total_number_of_lines: i64,
1177 function_body_offsets: Vec<i64>,
1178 chunk: WasmDisassemblyChunk<'a>,
1179}
1180
1181impl<'a> DisassembleWasmModuleReturnsBuilder<'a> {
1182 pub fn stream_id(mut self, stream_id: impl Into<Cow<'a, str>>) -> Self { self.stream_id = Some(stream_id.into()); self }
1185 pub fn build(self) -> DisassembleWasmModuleReturns<'a> {
1186 DisassembleWasmModuleReturns {
1187 stream_id: self.stream_id,
1188 total_number_of_lines: self.total_number_of_lines,
1189 function_body_offsets: self.function_body_offsets,
1190 chunk: self.chunk,
1191 }
1192 }
1193}
1194
1195impl<'a> DisassembleWasmModuleParams<'a> { pub const METHOD: &'static str = "Debugger.disassembleWasmModule"; }
1196
1197impl<'a> crate::CdpCommand<'a> for DisassembleWasmModuleParams<'a> {
1198 const METHOD: &'static str = "Debugger.disassembleWasmModule";
1199 type Response = DisassembleWasmModuleReturns<'a>;
1200}
1201
1202#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1208#[serde(rename_all = "camelCase")]
1209pub struct NextWasmDisassemblyChunkParams<'a> {
1210 #[serde(rename = "streamId")]
1211 stream_id: Cow<'a, str>,
1212}
1213
1214impl<'a> NextWasmDisassemblyChunkParams<'a> {
1215 pub fn builder(stream_id: impl Into<Cow<'a, str>>) -> NextWasmDisassemblyChunkParamsBuilder<'a> {
1218 NextWasmDisassemblyChunkParamsBuilder {
1219 stream_id: stream_id.into(),
1220 }
1221 }
1222 pub fn stream_id(&self) -> &str { self.stream_id.as_ref() }
1223}
1224
1225
1226pub struct NextWasmDisassemblyChunkParamsBuilder<'a> {
1227 stream_id: Cow<'a, str>,
1228}
1229
1230impl<'a> NextWasmDisassemblyChunkParamsBuilder<'a> {
1231 pub fn build(self) -> NextWasmDisassemblyChunkParams<'a> {
1232 NextWasmDisassemblyChunkParams {
1233 stream_id: self.stream_id,
1234 }
1235 }
1236}
1237
1238#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1244#[serde(rename_all = "camelCase")]
1245pub struct NextWasmDisassemblyChunkReturns<'a> {
1246 chunk: WasmDisassemblyChunk<'a>,
1248}
1249
1250impl<'a> NextWasmDisassemblyChunkReturns<'a> {
1251 pub fn builder(chunk: WasmDisassemblyChunk<'a>) -> NextWasmDisassemblyChunkReturnsBuilder<'a> {
1254 NextWasmDisassemblyChunkReturnsBuilder {
1255 chunk: chunk,
1256 }
1257 }
1258 pub fn chunk(&self) -> &WasmDisassemblyChunk<'a> { &self.chunk }
1260}
1261
1262
1263pub struct NextWasmDisassemblyChunkReturnsBuilder<'a> {
1264 chunk: WasmDisassemblyChunk<'a>,
1265}
1266
1267impl<'a> NextWasmDisassemblyChunkReturnsBuilder<'a> {
1268 pub fn build(self) -> NextWasmDisassemblyChunkReturns<'a> {
1269 NextWasmDisassemblyChunkReturns {
1270 chunk: self.chunk,
1271 }
1272 }
1273}
1274
1275impl<'a> NextWasmDisassemblyChunkParams<'a> { pub const METHOD: &'static str = "Debugger.nextWasmDisassemblyChunk"; }
1276
1277impl<'a> crate::CdpCommand<'a> for NextWasmDisassemblyChunkParams<'a> {
1278 const METHOD: &'static str = "Debugger.nextWasmDisassemblyChunk";
1279 type Response = NextWasmDisassemblyChunkReturns<'a>;
1280}
1281
1282#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1285#[serde(rename_all = "camelCase")]
1286pub struct GetWasmBytecodeParams<'a> {
1287 #[serde(rename = "scriptId")]
1289 script_id: crate::runtime::ScriptId<'a>,
1290}
1291
1292impl<'a> GetWasmBytecodeParams<'a> {
1293 pub fn builder(script_id: crate::runtime::ScriptId<'a>) -> GetWasmBytecodeParamsBuilder<'a> {
1296 GetWasmBytecodeParamsBuilder {
1297 script_id: script_id,
1298 }
1299 }
1300 pub fn script_id(&self) -> &crate::runtime::ScriptId<'a> { &self.script_id }
1302}
1303
1304
1305pub struct GetWasmBytecodeParamsBuilder<'a> {
1306 script_id: crate::runtime::ScriptId<'a>,
1307}
1308
1309impl<'a> GetWasmBytecodeParamsBuilder<'a> {
1310 pub fn build(self) -> GetWasmBytecodeParams<'a> {
1311 GetWasmBytecodeParams {
1312 script_id: self.script_id,
1313 }
1314 }
1315}
1316
1317#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1320#[serde(rename_all = "camelCase")]
1321pub struct GetWasmBytecodeReturns<'a> {
1322 bytecode: Cow<'a, str>,
1324}
1325
1326impl<'a> GetWasmBytecodeReturns<'a> {
1327 pub fn builder(bytecode: impl Into<Cow<'a, str>>) -> GetWasmBytecodeReturnsBuilder<'a> {
1330 GetWasmBytecodeReturnsBuilder {
1331 bytecode: bytecode.into(),
1332 }
1333 }
1334 pub fn bytecode(&self) -> &str { self.bytecode.as_ref() }
1336}
1337
1338
1339pub struct GetWasmBytecodeReturnsBuilder<'a> {
1340 bytecode: Cow<'a, str>,
1341}
1342
1343impl<'a> GetWasmBytecodeReturnsBuilder<'a> {
1344 pub fn build(self) -> GetWasmBytecodeReturns<'a> {
1345 GetWasmBytecodeReturns {
1346 bytecode: self.bytecode,
1347 }
1348 }
1349}
1350
1351impl<'a> GetWasmBytecodeParams<'a> { pub const METHOD: &'static str = "Debugger.getWasmBytecode"; }
1352
1353impl<'a> crate::CdpCommand<'a> for GetWasmBytecodeParams<'a> {
1354 const METHOD: &'static str = "Debugger.getWasmBytecode";
1355 type Response = GetWasmBytecodeReturns<'a>;
1356}
1357
1358#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1361#[serde(rename_all = "camelCase")]
1362pub struct GetStackTraceParams<'a> {
1363 #[serde(rename = "stackTraceId")]
1364 stack_trace_id: crate::runtime::StackTraceId<'a>,
1365}
1366
1367impl<'a> GetStackTraceParams<'a> {
1368 pub fn builder(stack_trace_id: crate::runtime::StackTraceId<'a>) -> GetStackTraceParamsBuilder<'a> {
1371 GetStackTraceParamsBuilder {
1372 stack_trace_id: stack_trace_id,
1373 }
1374 }
1375 pub fn stack_trace_id(&self) -> &crate::runtime::StackTraceId<'a> { &self.stack_trace_id }
1376}
1377
1378
1379pub struct GetStackTraceParamsBuilder<'a> {
1380 stack_trace_id: crate::runtime::StackTraceId<'a>,
1381}
1382
1383impl<'a> GetStackTraceParamsBuilder<'a> {
1384 pub fn build(self) -> GetStackTraceParams<'a> {
1385 GetStackTraceParams {
1386 stack_trace_id: self.stack_trace_id,
1387 }
1388 }
1389}
1390
1391#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1394#[serde(rename_all = "camelCase")]
1395pub struct GetStackTraceReturns<'a> {
1396 #[serde(rename = "stackTrace")]
1397 stack_trace: crate::runtime::StackTrace<'a>,
1398}
1399
1400impl<'a> GetStackTraceReturns<'a> {
1401 pub fn builder(stack_trace: crate::runtime::StackTrace<'a>) -> GetStackTraceReturnsBuilder<'a> {
1404 GetStackTraceReturnsBuilder {
1405 stack_trace: stack_trace,
1406 }
1407 }
1408 pub fn stack_trace(&self) -> &crate::runtime::StackTrace<'a> { &self.stack_trace }
1409}
1410
1411
1412pub struct GetStackTraceReturnsBuilder<'a> {
1413 stack_trace: crate::runtime::StackTrace<'a>,
1414}
1415
1416impl<'a> GetStackTraceReturnsBuilder<'a> {
1417 pub fn build(self) -> GetStackTraceReturns<'a> {
1418 GetStackTraceReturns {
1419 stack_trace: self.stack_trace,
1420 }
1421 }
1422}
1423
1424impl<'a> GetStackTraceParams<'a> { pub const METHOD: &'static str = "Debugger.getStackTrace"; }
1425
1426impl<'a> crate::CdpCommand<'a> for GetStackTraceParams<'a> {
1427 const METHOD: &'static str = "Debugger.getStackTrace";
1428 type Response = GetStackTraceReturns<'a>;
1429}
1430
1431#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1432pub struct PauseParams {}
1433
1434impl PauseParams { pub const METHOD: &'static str = "Debugger.pause"; }
1435
1436impl<'a> crate::CdpCommand<'a> for PauseParams {
1437 const METHOD: &'static str = "Debugger.pause";
1438 type Response = crate::EmptyReturns;
1439}
1440
1441
1442#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1443#[serde(rename_all = "camelCase")]
1444pub struct PauseOnAsyncCallParams<'a> {
1445 #[serde(rename = "parentStackTraceId")]
1447 parent_stack_trace_id: crate::runtime::StackTraceId<'a>,
1448}
1449
1450impl<'a> PauseOnAsyncCallParams<'a> {
1451 pub fn builder(parent_stack_trace_id: crate::runtime::StackTraceId<'a>) -> PauseOnAsyncCallParamsBuilder<'a> {
1454 PauseOnAsyncCallParamsBuilder {
1455 parent_stack_trace_id: parent_stack_trace_id,
1456 }
1457 }
1458 pub fn parent_stack_trace_id(&self) -> &crate::runtime::StackTraceId<'a> { &self.parent_stack_trace_id }
1460}
1461
1462
1463pub struct PauseOnAsyncCallParamsBuilder<'a> {
1464 parent_stack_trace_id: crate::runtime::StackTraceId<'a>,
1465}
1466
1467impl<'a> PauseOnAsyncCallParamsBuilder<'a> {
1468 pub fn build(self) -> PauseOnAsyncCallParams<'a> {
1469 PauseOnAsyncCallParams {
1470 parent_stack_trace_id: self.parent_stack_trace_id,
1471 }
1472 }
1473}
1474
1475impl<'a> PauseOnAsyncCallParams<'a> { pub const METHOD: &'static str = "Debugger.pauseOnAsyncCall"; }
1476
1477impl<'a> crate::CdpCommand<'a> for PauseOnAsyncCallParams<'a> {
1478 const METHOD: &'static str = "Debugger.pauseOnAsyncCall";
1479 type Response = crate::EmptyReturns;
1480}
1481
1482#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1485#[serde(rename_all = "camelCase")]
1486pub struct RemoveBreakpointParams<'a> {
1487 #[serde(rename = "breakpointId")]
1488 breakpoint_id: BreakpointId<'a>,
1489}
1490
1491impl<'a> RemoveBreakpointParams<'a> {
1492 pub fn builder(breakpoint_id: impl Into<BreakpointId<'a>>) -> RemoveBreakpointParamsBuilder<'a> {
1495 RemoveBreakpointParamsBuilder {
1496 breakpoint_id: breakpoint_id.into(),
1497 }
1498 }
1499 pub fn breakpoint_id(&self) -> &BreakpointId<'a> { &self.breakpoint_id }
1500}
1501
1502
1503pub struct RemoveBreakpointParamsBuilder<'a> {
1504 breakpoint_id: BreakpointId<'a>,
1505}
1506
1507impl<'a> RemoveBreakpointParamsBuilder<'a> {
1508 pub fn build(self) -> RemoveBreakpointParams<'a> {
1509 RemoveBreakpointParams {
1510 breakpoint_id: self.breakpoint_id,
1511 }
1512 }
1513}
1514
1515impl<'a> RemoveBreakpointParams<'a> { pub const METHOD: &'static str = "Debugger.removeBreakpoint"; }
1516
1517impl<'a> crate::CdpCommand<'a> for RemoveBreakpointParams<'a> {
1518 const METHOD: &'static str = "Debugger.removeBreakpoint";
1519 type Response = crate::EmptyReturns;
1520}
1521
1522#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1537#[serde(rename_all = "camelCase")]
1538pub struct RestartFrameParams<'a> {
1539 #[serde(rename = "callFrameId")]
1541 call_frame_id: CallFrameId<'a>,
1542 #[serde(skip_serializing_if = "Option::is_none")]
1545 mode: Option<Cow<'a, str>>,
1546}
1547
1548impl<'a> RestartFrameParams<'a> {
1549 pub fn builder(call_frame_id: impl Into<CallFrameId<'a>>) -> RestartFrameParamsBuilder<'a> {
1552 RestartFrameParamsBuilder {
1553 call_frame_id: call_frame_id.into(),
1554 mode: None,
1555 }
1556 }
1557 pub fn call_frame_id(&self) -> &CallFrameId<'a> { &self.call_frame_id }
1559 pub fn mode(&self) -> Option<&str> { self.mode.as_deref() }
1562}
1563
1564
1565pub struct RestartFrameParamsBuilder<'a> {
1566 call_frame_id: CallFrameId<'a>,
1567 mode: Option<Cow<'a, str>>,
1568}
1569
1570impl<'a> RestartFrameParamsBuilder<'a> {
1571 pub fn mode(mut self, mode: impl Into<Cow<'a, str>>) -> Self { self.mode = Some(mode.into()); self }
1574 pub fn build(self) -> RestartFrameParams<'a> {
1575 RestartFrameParams {
1576 call_frame_id: self.call_frame_id,
1577 mode: self.mode,
1578 }
1579 }
1580}
1581
1582#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1597#[serde(rename_all = "camelCase")]
1598pub struct RestartFrameReturns<'a> {
1599 #[serde(rename = "callFrames")]
1601 call_frames: Vec<CallFrame<'a>>,
1602 #[serde(skip_serializing_if = "Option::is_none", rename = "asyncStackTrace")]
1604 async_stack_trace: Option<crate::runtime::StackTrace<'a>>,
1605 #[serde(skip_serializing_if = "Option::is_none", rename = "asyncStackTraceId")]
1607 async_stack_trace_id: Option<crate::runtime::StackTraceId<'a>>,
1608}
1609
1610impl<'a> RestartFrameReturns<'a> {
1611 pub fn builder(call_frames: Vec<CallFrame<'a>>) -> RestartFrameReturnsBuilder<'a> {
1614 RestartFrameReturnsBuilder {
1615 call_frames: call_frames,
1616 async_stack_trace: None,
1617 async_stack_trace_id: None,
1618 }
1619 }
1620 pub fn call_frames(&self) -> &[CallFrame<'a>] { &self.call_frames }
1622 pub fn async_stack_trace(&self) -> Option<&crate::runtime::StackTrace<'a>> { self.async_stack_trace.as_ref() }
1624 pub fn async_stack_trace_id(&self) -> Option<&crate::runtime::StackTraceId<'a>> { self.async_stack_trace_id.as_ref() }
1626}
1627
1628
1629pub struct RestartFrameReturnsBuilder<'a> {
1630 call_frames: Vec<CallFrame<'a>>,
1631 async_stack_trace: Option<crate::runtime::StackTrace<'a>>,
1632 async_stack_trace_id: Option<crate::runtime::StackTraceId<'a>>,
1633}
1634
1635impl<'a> RestartFrameReturnsBuilder<'a> {
1636 pub fn async_stack_trace(mut self, async_stack_trace: crate::runtime::StackTrace<'a>) -> Self { self.async_stack_trace = Some(async_stack_trace); self }
1638 pub fn async_stack_trace_id(mut self, async_stack_trace_id: crate::runtime::StackTraceId<'a>) -> Self { self.async_stack_trace_id = Some(async_stack_trace_id); self }
1640 pub fn build(self) -> RestartFrameReturns<'a> {
1641 RestartFrameReturns {
1642 call_frames: self.call_frames,
1643 async_stack_trace: self.async_stack_trace,
1644 async_stack_trace_id: self.async_stack_trace_id,
1645 }
1646 }
1647}
1648
1649impl<'a> RestartFrameParams<'a> { pub const METHOD: &'static str = "Debugger.restartFrame"; }
1650
1651impl<'a> crate::CdpCommand<'a> for RestartFrameParams<'a> {
1652 const METHOD: &'static str = "Debugger.restartFrame";
1653 type Response = RestartFrameReturns<'a>;
1654}
1655
1656#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1659#[serde(rename_all = "camelCase")]
1660pub struct ResumeParams {
1661 #[serde(skip_serializing_if = "Option::is_none", rename = "terminateOnResume")]
1667 terminate_on_resume: Option<bool>,
1668}
1669
1670impl ResumeParams {
1671 pub fn builder() -> ResumeParamsBuilder {
1673 ResumeParamsBuilder {
1674 terminate_on_resume: None,
1675 }
1676 }
1677 pub fn terminate_on_resume(&self) -> Option<bool> { self.terminate_on_resume }
1683}
1684
1685#[derive(Default)]
1686pub struct ResumeParamsBuilder {
1687 terminate_on_resume: Option<bool>,
1688}
1689
1690impl ResumeParamsBuilder {
1691 pub fn terminate_on_resume(mut self, terminate_on_resume: bool) -> Self { self.terminate_on_resume = Some(terminate_on_resume); self }
1697 pub fn build(self) -> ResumeParams {
1698 ResumeParams {
1699 terminate_on_resume: self.terminate_on_resume,
1700 }
1701 }
1702}
1703
1704impl ResumeParams { pub const METHOD: &'static str = "Debugger.resume"; }
1705
1706impl<'a> crate::CdpCommand<'a> for ResumeParams {
1707 const METHOD: &'static str = "Debugger.resume";
1708 type Response = crate::EmptyReturns;
1709}
1710
1711#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1714#[serde(rename_all = "camelCase")]
1715pub struct SearchInContentParams<'a> {
1716 #[serde(rename = "scriptId")]
1718 script_id: crate::runtime::ScriptId<'a>,
1719 query: Cow<'a, str>,
1721 #[serde(skip_serializing_if = "Option::is_none", rename = "caseSensitive")]
1723 case_sensitive: Option<bool>,
1724 #[serde(skip_serializing_if = "Option::is_none", rename = "isRegex")]
1726 is_regex: Option<bool>,
1727}
1728
1729impl<'a> SearchInContentParams<'a> {
1730 pub fn builder(script_id: crate::runtime::ScriptId<'a>, query: impl Into<Cow<'a, str>>) -> SearchInContentParamsBuilder<'a> {
1734 SearchInContentParamsBuilder {
1735 script_id: script_id,
1736 query: query.into(),
1737 case_sensitive: None,
1738 is_regex: None,
1739 }
1740 }
1741 pub fn script_id(&self) -> &crate::runtime::ScriptId<'a> { &self.script_id }
1743 pub fn query(&self) -> &str { self.query.as_ref() }
1745 pub fn case_sensitive(&self) -> Option<bool> { self.case_sensitive }
1747 pub fn is_regex(&self) -> Option<bool> { self.is_regex }
1749}
1750
1751
1752pub struct SearchInContentParamsBuilder<'a> {
1753 script_id: crate::runtime::ScriptId<'a>,
1754 query: Cow<'a, str>,
1755 case_sensitive: Option<bool>,
1756 is_regex: Option<bool>,
1757}
1758
1759impl<'a> SearchInContentParamsBuilder<'a> {
1760 pub fn case_sensitive(mut self, case_sensitive: bool) -> Self { self.case_sensitive = Some(case_sensitive); self }
1762 pub fn is_regex(mut self, is_regex: bool) -> Self { self.is_regex = Some(is_regex); self }
1764 pub fn build(self) -> SearchInContentParams<'a> {
1765 SearchInContentParams {
1766 script_id: self.script_id,
1767 query: self.query,
1768 case_sensitive: self.case_sensitive,
1769 is_regex: self.is_regex,
1770 }
1771 }
1772}
1773
1774#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1777#[serde(rename_all = "camelCase")]
1778pub struct SearchInContentReturns<'a> {
1779 result: Vec<SearchMatch<'a>>,
1781}
1782
1783impl<'a> SearchInContentReturns<'a> {
1784 pub fn builder(result: Vec<SearchMatch<'a>>) -> SearchInContentReturnsBuilder<'a> {
1787 SearchInContentReturnsBuilder {
1788 result: result,
1789 }
1790 }
1791 pub fn result(&self) -> &[SearchMatch<'a>] { &self.result }
1793}
1794
1795
1796pub struct SearchInContentReturnsBuilder<'a> {
1797 result: Vec<SearchMatch<'a>>,
1798}
1799
1800impl<'a> SearchInContentReturnsBuilder<'a> {
1801 pub fn build(self) -> SearchInContentReturns<'a> {
1802 SearchInContentReturns {
1803 result: self.result,
1804 }
1805 }
1806}
1807
1808impl<'a> SearchInContentParams<'a> { pub const METHOD: &'static str = "Debugger.searchInContent"; }
1809
1810impl<'a> crate::CdpCommand<'a> for SearchInContentParams<'a> {
1811 const METHOD: &'static str = "Debugger.searchInContent";
1812 type Response = SearchInContentReturns<'a>;
1813}
1814
1815#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1818#[serde(rename_all = "camelCase")]
1819pub struct SetAsyncCallStackDepthParams {
1820 #[serde(rename = "maxDepth")]
1823 max_depth: i64,
1824}
1825
1826impl SetAsyncCallStackDepthParams {
1827 pub fn builder(max_depth: i64) -> SetAsyncCallStackDepthParamsBuilder {
1830 SetAsyncCallStackDepthParamsBuilder {
1831 max_depth: max_depth,
1832 }
1833 }
1834 pub fn max_depth(&self) -> i64 { self.max_depth }
1837}
1838
1839
1840pub struct SetAsyncCallStackDepthParamsBuilder {
1841 max_depth: i64,
1842}
1843
1844impl SetAsyncCallStackDepthParamsBuilder {
1845 pub fn build(self) -> SetAsyncCallStackDepthParams {
1846 SetAsyncCallStackDepthParams {
1847 max_depth: self.max_depth,
1848 }
1849 }
1850}
1851
1852impl SetAsyncCallStackDepthParams { pub const METHOD: &'static str = "Debugger.setAsyncCallStackDepth"; }
1853
1854impl<'a> crate::CdpCommand<'a> for SetAsyncCallStackDepthParams {
1855 const METHOD: &'static str = "Debugger.setAsyncCallStackDepth";
1856 type Response = crate::EmptyReturns;
1857}
1858
1859#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1864#[serde(rename_all = "camelCase")]
1865pub struct SetBlackboxExecutionContextsParams<'a> {
1866 #[serde(rename = "uniqueIds")]
1868 unique_ids: Vec<Cow<'a, str>>,
1869}
1870
1871impl<'a> SetBlackboxExecutionContextsParams<'a> {
1872 pub fn builder(unique_ids: Vec<Cow<'a, str>>) -> SetBlackboxExecutionContextsParamsBuilder<'a> {
1875 SetBlackboxExecutionContextsParamsBuilder {
1876 unique_ids: unique_ids,
1877 }
1878 }
1879 pub fn unique_ids(&self) -> &[Cow<'a, str>] { &self.unique_ids }
1881}
1882
1883
1884pub struct SetBlackboxExecutionContextsParamsBuilder<'a> {
1885 unique_ids: Vec<Cow<'a, str>>,
1886}
1887
1888impl<'a> SetBlackboxExecutionContextsParamsBuilder<'a> {
1889 pub fn build(self) -> SetBlackboxExecutionContextsParams<'a> {
1890 SetBlackboxExecutionContextsParams {
1891 unique_ids: self.unique_ids,
1892 }
1893 }
1894}
1895
1896impl<'a> SetBlackboxExecutionContextsParams<'a> { pub const METHOD: &'static str = "Debugger.setBlackboxExecutionContexts"; }
1897
1898impl<'a> crate::CdpCommand<'a> for SetBlackboxExecutionContextsParams<'a> {
1899 const METHOD: &'static str = "Debugger.setBlackboxExecutionContexts";
1900 type Response = crate::EmptyReturns;
1901}
1902
1903#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1908#[serde(rename_all = "camelCase")]
1909pub struct SetBlackboxPatternsParams<'a> {
1910 patterns: Vec<Cow<'a, str>>,
1912 #[serde(skip_serializing_if = "Option::is_none", rename = "skipAnonymous")]
1914 skip_anonymous: Option<bool>,
1915}
1916
1917impl<'a> SetBlackboxPatternsParams<'a> {
1918 pub fn builder(patterns: Vec<Cow<'a, str>>) -> SetBlackboxPatternsParamsBuilder<'a> {
1921 SetBlackboxPatternsParamsBuilder {
1922 patterns: patterns,
1923 skip_anonymous: None,
1924 }
1925 }
1926 pub fn patterns(&self) -> &[Cow<'a, str>] { &self.patterns }
1928 pub fn skip_anonymous(&self) -> Option<bool> { self.skip_anonymous }
1930}
1931
1932
1933pub struct SetBlackboxPatternsParamsBuilder<'a> {
1934 patterns: Vec<Cow<'a, str>>,
1935 skip_anonymous: Option<bool>,
1936}
1937
1938impl<'a> SetBlackboxPatternsParamsBuilder<'a> {
1939 pub fn skip_anonymous(mut self, skip_anonymous: bool) -> Self { self.skip_anonymous = Some(skip_anonymous); self }
1941 pub fn build(self) -> SetBlackboxPatternsParams<'a> {
1942 SetBlackboxPatternsParams {
1943 patterns: self.patterns,
1944 skip_anonymous: self.skip_anonymous,
1945 }
1946 }
1947}
1948
1949impl<'a> SetBlackboxPatternsParams<'a> { pub const METHOD: &'static str = "Debugger.setBlackboxPatterns"; }
1950
1951impl<'a> crate::CdpCommand<'a> for SetBlackboxPatternsParams<'a> {
1952 const METHOD: &'static str = "Debugger.setBlackboxPatterns";
1953 type Response = crate::EmptyReturns;
1954}
1955
1956#[derive(Debug, Clone, Serialize, Deserialize, Default)]
1962#[serde(rename_all = "camelCase")]
1963pub struct SetBlackboxedRangesParams<'a> {
1964 #[serde(rename = "scriptId")]
1966 script_id: crate::runtime::ScriptId<'a>,
1967 positions: Vec<ScriptPosition>,
1968}
1969
1970impl<'a> SetBlackboxedRangesParams<'a> {
1971 pub fn builder(script_id: crate::runtime::ScriptId<'a>, positions: Vec<ScriptPosition>) -> SetBlackboxedRangesParamsBuilder<'a> {
1975 SetBlackboxedRangesParamsBuilder {
1976 script_id: script_id,
1977 positions: positions,
1978 }
1979 }
1980 pub fn script_id(&self) -> &crate::runtime::ScriptId<'a> { &self.script_id }
1982 pub fn positions(&self) -> &[ScriptPosition] { &self.positions }
1983}
1984
1985
1986pub struct SetBlackboxedRangesParamsBuilder<'a> {
1987 script_id: crate::runtime::ScriptId<'a>,
1988 positions: Vec<ScriptPosition>,
1989}
1990
1991impl<'a> SetBlackboxedRangesParamsBuilder<'a> {
1992 pub fn build(self) -> SetBlackboxedRangesParams<'a> {
1993 SetBlackboxedRangesParams {
1994 script_id: self.script_id,
1995 positions: self.positions,
1996 }
1997 }
1998}
1999
2000impl<'a> SetBlackboxedRangesParams<'a> { pub const METHOD: &'static str = "Debugger.setBlackboxedRanges"; }
2001
2002impl<'a> crate::CdpCommand<'a> for SetBlackboxedRangesParams<'a> {
2003 const METHOD: &'static str = "Debugger.setBlackboxedRanges";
2004 type Response = crate::EmptyReturns;
2005}
2006
2007#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2010#[serde(rename_all = "camelCase")]
2011pub struct SetBreakpointParams<'a> {
2012 location: Location<'a>,
2014 #[serde(skip_serializing_if = "Option::is_none")]
2017 condition: Option<Cow<'a, str>>,
2018}
2019
2020impl<'a> SetBreakpointParams<'a> {
2021 pub fn builder(location: Location<'a>) -> SetBreakpointParamsBuilder<'a> {
2024 SetBreakpointParamsBuilder {
2025 location: location,
2026 condition: None,
2027 }
2028 }
2029 pub fn location(&self) -> &Location<'a> { &self.location }
2031 pub fn condition(&self) -> Option<&str> { self.condition.as_deref() }
2034}
2035
2036
2037pub struct SetBreakpointParamsBuilder<'a> {
2038 location: Location<'a>,
2039 condition: Option<Cow<'a, str>>,
2040}
2041
2042impl<'a> SetBreakpointParamsBuilder<'a> {
2043 pub fn condition(mut self, condition: impl Into<Cow<'a, str>>) -> Self { self.condition = Some(condition.into()); self }
2046 pub fn build(self) -> SetBreakpointParams<'a> {
2047 SetBreakpointParams {
2048 location: self.location,
2049 condition: self.condition,
2050 }
2051 }
2052}
2053
2054#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2057#[serde(rename_all = "camelCase")]
2058pub struct SetBreakpointReturns<'a> {
2059 #[serde(rename = "breakpointId")]
2061 breakpoint_id: BreakpointId<'a>,
2062 #[serde(rename = "actualLocation")]
2064 actual_location: Location<'a>,
2065}
2066
2067impl<'a> SetBreakpointReturns<'a> {
2068 pub fn builder(breakpoint_id: impl Into<BreakpointId<'a>>, actual_location: Location<'a>) -> SetBreakpointReturnsBuilder<'a> {
2072 SetBreakpointReturnsBuilder {
2073 breakpoint_id: breakpoint_id.into(),
2074 actual_location: actual_location,
2075 }
2076 }
2077 pub fn breakpoint_id(&self) -> &BreakpointId<'a> { &self.breakpoint_id }
2079 pub fn actual_location(&self) -> &Location<'a> { &self.actual_location }
2081}
2082
2083
2084pub struct SetBreakpointReturnsBuilder<'a> {
2085 breakpoint_id: BreakpointId<'a>,
2086 actual_location: Location<'a>,
2087}
2088
2089impl<'a> SetBreakpointReturnsBuilder<'a> {
2090 pub fn build(self) -> SetBreakpointReturns<'a> {
2091 SetBreakpointReturns {
2092 breakpoint_id: self.breakpoint_id,
2093 actual_location: self.actual_location,
2094 }
2095 }
2096}
2097
2098impl<'a> SetBreakpointParams<'a> { pub const METHOD: &'static str = "Debugger.setBreakpoint"; }
2099
2100impl<'a> crate::CdpCommand<'a> for SetBreakpointParams<'a> {
2101 const METHOD: &'static str = "Debugger.setBreakpoint";
2102 type Response = SetBreakpointReturns<'a>;
2103}
2104
2105#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2108#[serde(rename_all = "camelCase")]
2109pub struct SetInstrumentationBreakpointParams<'a> {
2110 instrumentation: Cow<'a, str>,
2112}
2113
2114impl<'a> SetInstrumentationBreakpointParams<'a> {
2115 pub fn builder(instrumentation: impl Into<Cow<'a, str>>) -> SetInstrumentationBreakpointParamsBuilder<'a> {
2118 SetInstrumentationBreakpointParamsBuilder {
2119 instrumentation: instrumentation.into(),
2120 }
2121 }
2122 pub fn instrumentation(&self) -> &str { self.instrumentation.as_ref() }
2124}
2125
2126
2127pub struct SetInstrumentationBreakpointParamsBuilder<'a> {
2128 instrumentation: Cow<'a, str>,
2129}
2130
2131impl<'a> SetInstrumentationBreakpointParamsBuilder<'a> {
2132 pub fn build(self) -> SetInstrumentationBreakpointParams<'a> {
2133 SetInstrumentationBreakpointParams {
2134 instrumentation: self.instrumentation,
2135 }
2136 }
2137}
2138
2139#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2142#[serde(rename_all = "camelCase")]
2143pub struct SetInstrumentationBreakpointReturns<'a> {
2144 #[serde(rename = "breakpointId")]
2146 breakpoint_id: BreakpointId<'a>,
2147}
2148
2149impl<'a> SetInstrumentationBreakpointReturns<'a> {
2150 pub fn builder(breakpoint_id: impl Into<BreakpointId<'a>>) -> SetInstrumentationBreakpointReturnsBuilder<'a> {
2153 SetInstrumentationBreakpointReturnsBuilder {
2154 breakpoint_id: breakpoint_id.into(),
2155 }
2156 }
2157 pub fn breakpoint_id(&self) -> &BreakpointId<'a> { &self.breakpoint_id }
2159}
2160
2161
2162pub struct SetInstrumentationBreakpointReturnsBuilder<'a> {
2163 breakpoint_id: BreakpointId<'a>,
2164}
2165
2166impl<'a> SetInstrumentationBreakpointReturnsBuilder<'a> {
2167 pub fn build(self) -> SetInstrumentationBreakpointReturns<'a> {
2168 SetInstrumentationBreakpointReturns {
2169 breakpoint_id: self.breakpoint_id,
2170 }
2171 }
2172}
2173
2174impl<'a> SetInstrumentationBreakpointParams<'a> { pub const METHOD: &'static str = "Debugger.setInstrumentationBreakpoint"; }
2175
2176impl<'a> crate::CdpCommand<'a> for SetInstrumentationBreakpointParams<'a> {
2177 const METHOD: &'static str = "Debugger.setInstrumentationBreakpoint";
2178 type Response = SetInstrumentationBreakpointReturns<'a>;
2179}
2180
2181#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2187#[serde(rename_all = "camelCase")]
2188pub struct SetBreakpointByUrlParams<'a> {
2189 #[serde(rename = "lineNumber")]
2191 line_number: i64,
2192 #[serde(skip_serializing_if = "Option::is_none")]
2194 url: Option<Cow<'a, str>>,
2195 #[serde(skip_serializing_if = "Option::is_none", rename = "urlRegex")]
2198 url_regex: Option<Cow<'a, str>>,
2199 #[serde(skip_serializing_if = "Option::is_none", rename = "scriptHash")]
2201 script_hash: Option<Cow<'a, str>>,
2202 #[serde(skip_serializing_if = "Option::is_none", rename = "columnNumber")]
2204 column_number: Option<i64>,
2205 #[serde(skip_serializing_if = "Option::is_none")]
2208 condition: Option<Cow<'a, str>>,
2209}
2210
2211impl<'a> SetBreakpointByUrlParams<'a> {
2212 pub fn builder(line_number: i64) -> SetBreakpointByUrlParamsBuilder<'a> {
2215 SetBreakpointByUrlParamsBuilder {
2216 line_number: line_number,
2217 url: None,
2218 url_regex: None,
2219 script_hash: None,
2220 column_number: None,
2221 condition: None,
2222 }
2223 }
2224 pub fn line_number(&self) -> i64 { self.line_number }
2226 pub fn url(&self) -> Option<&str> { self.url.as_deref() }
2228 pub fn url_regex(&self) -> Option<&str> { self.url_regex.as_deref() }
2231 pub fn script_hash(&self) -> Option<&str> { self.script_hash.as_deref() }
2233 pub fn column_number(&self) -> Option<i64> { self.column_number }
2235 pub fn condition(&self) -> Option<&str> { self.condition.as_deref() }
2238}
2239
2240
2241pub struct SetBreakpointByUrlParamsBuilder<'a> {
2242 line_number: i64,
2243 url: Option<Cow<'a, str>>,
2244 url_regex: Option<Cow<'a, str>>,
2245 script_hash: Option<Cow<'a, str>>,
2246 column_number: Option<i64>,
2247 condition: Option<Cow<'a, str>>,
2248}
2249
2250impl<'a> SetBreakpointByUrlParamsBuilder<'a> {
2251 pub fn url(mut self, url: impl Into<Cow<'a, str>>) -> Self { self.url = Some(url.into()); self }
2253 pub fn url_regex(mut self, url_regex: impl Into<Cow<'a, str>>) -> Self { self.url_regex = Some(url_regex.into()); self }
2256 pub fn script_hash(mut self, script_hash: impl Into<Cow<'a, str>>) -> Self { self.script_hash = Some(script_hash.into()); self }
2258 pub fn column_number(mut self, column_number: i64) -> Self { self.column_number = Some(column_number); self }
2260 pub fn condition(mut self, condition: impl Into<Cow<'a, str>>) -> Self { self.condition = Some(condition.into()); self }
2263 pub fn build(self) -> SetBreakpointByUrlParams<'a> {
2264 SetBreakpointByUrlParams {
2265 line_number: self.line_number,
2266 url: self.url,
2267 url_regex: self.url_regex,
2268 script_hash: self.script_hash,
2269 column_number: self.column_number,
2270 condition: self.condition,
2271 }
2272 }
2273}
2274
2275#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2281#[serde(rename_all = "camelCase")]
2282pub struct SetBreakpointByUrlReturns<'a> {
2283 #[serde(rename = "breakpointId")]
2285 breakpoint_id: BreakpointId<'a>,
2286 locations: Vec<Location<'a>>,
2288}
2289
2290impl<'a> SetBreakpointByUrlReturns<'a> {
2291 pub fn builder(breakpoint_id: impl Into<BreakpointId<'a>>, locations: Vec<Location<'a>>) -> SetBreakpointByUrlReturnsBuilder<'a> {
2295 SetBreakpointByUrlReturnsBuilder {
2296 breakpoint_id: breakpoint_id.into(),
2297 locations: locations,
2298 }
2299 }
2300 pub fn breakpoint_id(&self) -> &BreakpointId<'a> { &self.breakpoint_id }
2302 pub fn locations(&self) -> &[Location<'a>] { &self.locations }
2304}
2305
2306
2307pub struct SetBreakpointByUrlReturnsBuilder<'a> {
2308 breakpoint_id: BreakpointId<'a>,
2309 locations: Vec<Location<'a>>,
2310}
2311
2312impl<'a> SetBreakpointByUrlReturnsBuilder<'a> {
2313 pub fn build(self) -> SetBreakpointByUrlReturns<'a> {
2314 SetBreakpointByUrlReturns {
2315 breakpoint_id: self.breakpoint_id,
2316 locations: self.locations,
2317 }
2318 }
2319}
2320
2321impl<'a> SetBreakpointByUrlParams<'a> { pub const METHOD: &'static str = "Debugger.setBreakpointByUrl"; }
2322
2323impl<'a> crate::CdpCommand<'a> for SetBreakpointByUrlParams<'a> {
2324 const METHOD: &'static str = "Debugger.setBreakpointByUrl";
2325 type Response = SetBreakpointByUrlReturns<'a>;
2326}
2327
2328#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2333#[serde(rename_all = "camelCase")]
2334pub struct SetBreakpointOnFunctionCallParams<'a> {
2335 #[serde(rename = "objectId")]
2337 object_id: crate::runtime::RemoteObjectId<'a>,
2338 #[serde(skip_serializing_if = "Option::is_none")]
2341 condition: Option<Cow<'a, str>>,
2342}
2343
2344impl<'a> SetBreakpointOnFunctionCallParams<'a> {
2345 pub fn builder(object_id: crate::runtime::RemoteObjectId<'a>) -> SetBreakpointOnFunctionCallParamsBuilder<'a> {
2348 SetBreakpointOnFunctionCallParamsBuilder {
2349 object_id: object_id,
2350 condition: None,
2351 }
2352 }
2353 pub fn object_id(&self) -> &crate::runtime::RemoteObjectId<'a> { &self.object_id }
2355 pub fn condition(&self) -> Option<&str> { self.condition.as_deref() }
2358}
2359
2360
2361pub struct SetBreakpointOnFunctionCallParamsBuilder<'a> {
2362 object_id: crate::runtime::RemoteObjectId<'a>,
2363 condition: Option<Cow<'a, str>>,
2364}
2365
2366impl<'a> SetBreakpointOnFunctionCallParamsBuilder<'a> {
2367 pub fn condition(mut self, condition: impl Into<Cow<'a, str>>) -> Self { self.condition = Some(condition.into()); self }
2370 pub fn build(self) -> SetBreakpointOnFunctionCallParams<'a> {
2371 SetBreakpointOnFunctionCallParams {
2372 object_id: self.object_id,
2373 condition: self.condition,
2374 }
2375 }
2376}
2377
2378#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2383#[serde(rename_all = "camelCase")]
2384pub struct SetBreakpointOnFunctionCallReturns<'a> {
2385 #[serde(rename = "breakpointId")]
2387 breakpoint_id: BreakpointId<'a>,
2388}
2389
2390impl<'a> SetBreakpointOnFunctionCallReturns<'a> {
2391 pub fn builder(breakpoint_id: impl Into<BreakpointId<'a>>) -> SetBreakpointOnFunctionCallReturnsBuilder<'a> {
2394 SetBreakpointOnFunctionCallReturnsBuilder {
2395 breakpoint_id: breakpoint_id.into(),
2396 }
2397 }
2398 pub fn breakpoint_id(&self) -> &BreakpointId<'a> { &self.breakpoint_id }
2400}
2401
2402
2403pub struct SetBreakpointOnFunctionCallReturnsBuilder<'a> {
2404 breakpoint_id: BreakpointId<'a>,
2405}
2406
2407impl<'a> SetBreakpointOnFunctionCallReturnsBuilder<'a> {
2408 pub fn build(self) -> SetBreakpointOnFunctionCallReturns<'a> {
2409 SetBreakpointOnFunctionCallReturns {
2410 breakpoint_id: self.breakpoint_id,
2411 }
2412 }
2413}
2414
2415impl<'a> SetBreakpointOnFunctionCallParams<'a> { pub const METHOD: &'static str = "Debugger.setBreakpointOnFunctionCall"; }
2416
2417impl<'a> crate::CdpCommand<'a> for SetBreakpointOnFunctionCallParams<'a> {
2418 const METHOD: &'static str = "Debugger.setBreakpointOnFunctionCall";
2419 type Response = SetBreakpointOnFunctionCallReturns<'a>;
2420}
2421
2422#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2425#[serde(rename_all = "camelCase")]
2426pub struct SetBreakpointsActiveParams {
2427 active: bool,
2429}
2430
2431impl SetBreakpointsActiveParams {
2432 pub fn builder(active: bool) -> SetBreakpointsActiveParamsBuilder {
2435 SetBreakpointsActiveParamsBuilder {
2436 active: active,
2437 }
2438 }
2439 pub fn active(&self) -> bool { self.active }
2441}
2442
2443
2444pub struct SetBreakpointsActiveParamsBuilder {
2445 active: bool,
2446}
2447
2448impl SetBreakpointsActiveParamsBuilder {
2449 pub fn build(self) -> SetBreakpointsActiveParams {
2450 SetBreakpointsActiveParams {
2451 active: self.active,
2452 }
2453 }
2454}
2455
2456impl SetBreakpointsActiveParams { pub const METHOD: &'static str = "Debugger.setBreakpointsActive"; }
2457
2458impl<'a> crate::CdpCommand<'a> for SetBreakpointsActiveParams {
2459 const METHOD: &'static str = "Debugger.setBreakpointsActive";
2460 type Response = crate::EmptyReturns;
2461}
2462
2463#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2467#[serde(rename_all = "camelCase")]
2468pub struct SetPauseOnExceptionsParams<'a> {
2469 state: Cow<'a, str>,
2471}
2472
2473impl<'a> SetPauseOnExceptionsParams<'a> {
2474 pub fn builder(state: impl Into<Cow<'a, str>>) -> SetPauseOnExceptionsParamsBuilder<'a> {
2477 SetPauseOnExceptionsParamsBuilder {
2478 state: state.into(),
2479 }
2480 }
2481 pub fn state(&self) -> &str { self.state.as_ref() }
2483}
2484
2485
2486pub struct SetPauseOnExceptionsParamsBuilder<'a> {
2487 state: Cow<'a, str>,
2488}
2489
2490impl<'a> SetPauseOnExceptionsParamsBuilder<'a> {
2491 pub fn build(self) -> SetPauseOnExceptionsParams<'a> {
2492 SetPauseOnExceptionsParams {
2493 state: self.state,
2494 }
2495 }
2496}
2497
2498impl<'a> SetPauseOnExceptionsParams<'a> { pub const METHOD: &'static str = "Debugger.setPauseOnExceptions"; }
2499
2500impl<'a> crate::CdpCommand<'a> for SetPauseOnExceptionsParams<'a> {
2501 const METHOD: &'static str = "Debugger.setPauseOnExceptions";
2502 type Response = crate::EmptyReturns;
2503}
2504
2505#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2508#[serde(rename_all = "camelCase")]
2509pub struct SetReturnValueParams<'a> {
2510 #[serde(rename = "newValue")]
2512 new_value: crate::runtime::CallArgument<'a>,
2513}
2514
2515impl<'a> SetReturnValueParams<'a> {
2516 pub fn builder(new_value: crate::runtime::CallArgument<'a>) -> SetReturnValueParamsBuilder<'a> {
2519 SetReturnValueParamsBuilder {
2520 new_value: new_value,
2521 }
2522 }
2523 pub fn new_value(&self) -> &crate::runtime::CallArgument<'a> { &self.new_value }
2525}
2526
2527
2528pub struct SetReturnValueParamsBuilder<'a> {
2529 new_value: crate::runtime::CallArgument<'a>,
2530}
2531
2532impl<'a> SetReturnValueParamsBuilder<'a> {
2533 pub fn build(self) -> SetReturnValueParams<'a> {
2534 SetReturnValueParams {
2535 new_value: self.new_value,
2536 }
2537 }
2538}
2539
2540impl<'a> SetReturnValueParams<'a> { pub const METHOD: &'static str = "Debugger.setReturnValue"; }
2541
2542impl<'a> crate::CdpCommand<'a> for SetReturnValueParams<'a> {
2543 const METHOD: &'static str = "Debugger.setReturnValue";
2544 type Response = crate::EmptyReturns;
2545}
2546
2547#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2556#[serde(rename_all = "camelCase")]
2557pub struct SetScriptSourceParams<'a> {
2558 #[serde(rename = "scriptId")]
2560 script_id: crate::runtime::ScriptId<'a>,
2561 #[serde(rename = "scriptSource")]
2563 script_source: Cow<'a, str>,
2564 #[serde(skip_serializing_if = "Option::is_none", rename = "dryRun")]
2567 dry_run: Option<bool>,
2568 #[serde(skip_serializing_if = "Option::is_none", rename = "allowTopFrameEditing")]
2571 allow_top_frame_editing: Option<bool>,
2572}
2573
2574impl<'a> SetScriptSourceParams<'a> {
2575 pub fn builder(script_id: crate::runtime::ScriptId<'a>, script_source: impl Into<Cow<'a, str>>) -> SetScriptSourceParamsBuilder<'a> {
2579 SetScriptSourceParamsBuilder {
2580 script_id: script_id,
2581 script_source: script_source.into(),
2582 dry_run: None,
2583 allow_top_frame_editing: None,
2584 }
2585 }
2586 pub fn script_id(&self) -> &crate::runtime::ScriptId<'a> { &self.script_id }
2588 pub fn script_source(&self) -> &str { self.script_source.as_ref() }
2590 pub fn dry_run(&self) -> Option<bool> { self.dry_run }
2593 pub fn allow_top_frame_editing(&self) -> Option<bool> { self.allow_top_frame_editing }
2596}
2597
2598
2599pub struct SetScriptSourceParamsBuilder<'a> {
2600 script_id: crate::runtime::ScriptId<'a>,
2601 script_source: Cow<'a, str>,
2602 dry_run: Option<bool>,
2603 allow_top_frame_editing: Option<bool>,
2604}
2605
2606impl<'a> SetScriptSourceParamsBuilder<'a> {
2607 pub fn dry_run(mut self, dry_run: bool) -> Self { self.dry_run = Some(dry_run); self }
2610 pub fn allow_top_frame_editing(mut self, allow_top_frame_editing: bool) -> Self { self.allow_top_frame_editing = Some(allow_top_frame_editing); self }
2613 pub fn build(self) -> SetScriptSourceParams<'a> {
2614 SetScriptSourceParams {
2615 script_id: self.script_id,
2616 script_source: self.script_source,
2617 dry_run: self.dry_run,
2618 allow_top_frame_editing: self.allow_top_frame_editing,
2619 }
2620 }
2621}
2622
2623#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2632#[serde(rename_all = "camelCase")]
2633pub struct SetScriptSourceReturns<'a> {
2634 #[serde(skip_serializing_if = "Option::is_none", rename = "callFrames")]
2636 call_frames: Option<Vec<CallFrame<'a>>>,
2637 #[serde(skip_serializing_if = "Option::is_none", rename = "stackChanged")]
2639 stack_changed: Option<bool>,
2640 #[serde(skip_serializing_if = "Option::is_none", rename = "asyncStackTrace")]
2642 async_stack_trace: Option<crate::runtime::StackTrace<'a>>,
2643 #[serde(skip_serializing_if = "Option::is_none", rename = "asyncStackTraceId")]
2645 async_stack_trace_id: Option<crate::runtime::StackTraceId<'a>>,
2646 status: Cow<'a, str>,
2650 #[serde(skip_serializing_if = "Option::is_none", rename = "exceptionDetails")]
2652 exception_details: Option<crate::runtime::ExceptionDetails<'a>>,
2653}
2654
2655impl<'a> SetScriptSourceReturns<'a> {
2656 pub fn builder(status: impl Into<Cow<'a, str>>) -> SetScriptSourceReturnsBuilder<'a> {
2659 SetScriptSourceReturnsBuilder {
2660 call_frames: None,
2661 stack_changed: None,
2662 async_stack_trace: None,
2663 async_stack_trace_id: None,
2664 status: status.into(),
2665 exception_details: None,
2666 }
2667 }
2668 pub fn call_frames(&self) -> Option<&[CallFrame<'a>]> { self.call_frames.as_deref() }
2670 pub fn stack_changed(&self) -> Option<bool> { self.stack_changed }
2672 pub fn async_stack_trace(&self) -> Option<&crate::runtime::StackTrace<'a>> { self.async_stack_trace.as_ref() }
2674 pub fn async_stack_trace_id(&self) -> Option<&crate::runtime::StackTraceId<'a>> { self.async_stack_trace_id.as_ref() }
2676 pub fn status(&self) -> &str { self.status.as_ref() }
2680 pub fn exception_details(&self) -> Option<&crate::runtime::ExceptionDetails<'a>> { self.exception_details.as_ref() }
2682}
2683
2684
2685pub struct SetScriptSourceReturnsBuilder<'a> {
2686 call_frames: Option<Vec<CallFrame<'a>>>,
2687 stack_changed: Option<bool>,
2688 async_stack_trace: Option<crate::runtime::StackTrace<'a>>,
2689 async_stack_trace_id: Option<crate::runtime::StackTraceId<'a>>,
2690 status: Cow<'a, str>,
2691 exception_details: Option<crate::runtime::ExceptionDetails<'a>>,
2692}
2693
2694impl<'a> SetScriptSourceReturnsBuilder<'a> {
2695 pub fn call_frames(mut self, call_frames: Vec<CallFrame<'a>>) -> Self { self.call_frames = Some(call_frames); self }
2697 pub fn stack_changed(mut self, stack_changed: bool) -> Self { self.stack_changed = Some(stack_changed); self }
2699 pub fn async_stack_trace(mut self, async_stack_trace: crate::runtime::StackTrace<'a>) -> Self { self.async_stack_trace = Some(async_stack_trace); self }
2701 pub fn async_stack_trace_id(mut self, async_stack_trace_id: crate::runtime::StackTraceId<'a>) -> Self { self.async_stack_trace_id = Some(async_stack_trace_id); self }
2703 pub fn exception_details(mut self, exception_details: crate::runtime::ExceptionDetails<'a>) -> Self { self.exception_details = Some(exception_details); self }
2705 pub fn build(self) -> SetScriptSourceReturns<'a> {
2706 SetScriptSourceReturns {
2707 call_frames: self.call_frames,
2708 stack_changed: self.stack_changed,
2709 async_stack_trace: self.async_stack_trace,
2710 async_stack_trace_id: self.async_stack_trace_id,
2711 status: self.status,
2712 exception_details: self.exception_details,
2713 }
2714 }
2715}
2716
2717impl<'a> SetScriptSourceParams<'a> { pub const METHOD: &'static str = "Debugger.setScriptSource"; }
2718
2719impl<'a> crate::CdpCommand<'a> for SetScriptSourceParams<'a> {
2720 const METHOD: &'static str = "Debugger.setScriptSource";
2721 type Response = SetScriptSourceReturns<'a>;
2722}
2723
2724#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2727#[serde(rename_all = "camelCase")]
2728pub struct SetSkipAllPausesParams {
2729 skip: bool,
2731}
2732
2733impl SetSkipAllPausesParams {
2734 pub fn builder(skip: bool) -> SetSkipAllPausesParamsBuilder {
2737 SetSkipAllPausesParamsBuilder {
2738 skip: skip,
2739 }
2740 }
2741 pub fn skip(&self) -> bool { self.skip }
2743}
2744
2745
2746pub struct SetSkipAllPausesParamsBuilder {
2747 skip: bool,
2748}
2749
2750impl SetSkipAllPausesParamsBuilder {
2751 pub fn build(self) -> SetSkipAllPausesParams {
2752 SetSkipAllPausesParams {
2753 skip: self.skip,
2754 }
2755 }
2756}
2757
2758impl SetSkipAllPausesParams { pub const METHOD: &'static str = "Debugger.setSkipAllPauses"; }
2759
2760impl<'a> crate::CdpCommand<'a> for SetSkipAllPausesParams {
2761 const METHOD: &'static str = "Debugger.setSkipAllPauses";
2762 type Response = crate::EmptyReturns;
2763}
2764
2765#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2769#[serde(rename_all = "camelCase")]
2770pub struct SetVariableValueParams<'a> {
2771 #[serde(rename = "scopeNumber")]
2774 scope_number: i64,
2775 #[serde(rename = "variableName")]
2777 variable_name: Cow<'a, str>,
2778 #[serde(rename = "newValue")]
2780 new_value: crate::runtime::CallArgument<'a>,
2781 #[serde(rename = "callFrameId")]
2783 call_frame_id: CallFrameId<'a>,
2784}
2785
2786impl<'a> SetVariableValueParams<'a> {
2787 pub fn builder(scope_number: i64, variable_name: impl Into<Cow<'a, str>>, new_value: crate::runtime::CallArgument<'a>, call_frame_id: impl Into<CallFrameId<'a>>) -> SetVariableValueParamsBuilder<'a> {
2793 SetVariableValueParamsBuilder {
2794 scope_number: scope_number,
2795 variable_name: variable_name.into(),
2796 new_value: new_value,
2797 call_frame_id: call_frame_id.into(),
2798 }
2799 }
2800 pub fn scope_number(&self) -> i64 { self.scope_number }
2803 pub fn variable_name(&self) -> &str { self.variable_name.as_ref() }
2805 pub fn new_value(&self) -> &crate::runtime::CallArgument<'a> { &self.new_value }
2807 pub fn call_frame_id(&self) -> &CallFrameId<'a> { &self.call_frame_id }
2809}
2810
2811
2812pub struct SetVariableValueParamsBuilder<'a> {
2813 scope_number: i64,
2814 variable_name: Cow<'a, str>,
2815 new_value: crate::runtime::CallArgument<'a>,
2816 call_frame_id: CallFrameId<'a>,
2817}
2818
2819impl<'a> SetVariableValueParamsBuilder<'a> {
2820 pub fn build(self) -> SetVariableValueParams<'a> {
2821 SetVariableValueParams {
2822 scope_number: self.scope_number,
2823 variable_name: self.variable_name,
2824 new_value: self.new_value,
2825 call_frame_id: self.call_frame_id,
2826 }
2827 }
2828}
2829
2830impl<'a> SetVariableValueParams<'a> { pub const METHOD: &'static str = "Debugger.setVariableValue"; }
2831
2832impl<'a> crate::CdpCommand<'a> for SetVariableValueParams<'a> {
2833 const METHOD: &'static str = "Debugger.setVariableValue";
2834 type Response = crate::EmptyReturns;
2835}
2836
2837#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2840#[serde(rename_all = "camelCase")]
2841pub struct StepIntoParams<'a> {
2842 #[serde(skip_serializing_if = "Option::is_none", rename = "breakOnAsyncCall")]
2845 break_on_async_call: Option<bool>,
2846 #[serde(skip_serializing_if = "Option::is_none", rename = "skipList")]
2848 skip_list: Option<Vec<LocationRange<'a>>>,
2849}
2850
2851impl<'a> StepIntoParams<'a> {
2852 pub fn builder() -> StepIntoParamsBuilder<'a> {
2854 StepIntoParamsBuilder {
2855 break_on_async_call: None,
2856 skip_list: None,
2857 }
2858 }
2859 pub fn break_on_async_call(&self) -> Option<bool> { self.break_on_async_call }
2862 pub fn skip_list(&self) -> Option<&[LocationRange<'a>]> { self.skip_list.as_deref() }
2864}
2865
2866#[derive(Default)]
2867pub struct StepIntoParamsBuilder<'a> {
2868 break_on_async_call: Option<bool>,
2869 skip_list: Option<Vec<LocationRange<'a>>>,
2870}
2871
2872impl<'a> StepIntoParamsBuilder<'a> {
2873 pub fn break_on_async_call(mut self, break_on_async_call: bool) -> Self { self.break_on_async_call = Some(break_on_async_call); self }
2876 pub fn skip_list(mut self, skip_list: Vec<LocationRange<'a>>) -> Self { self.skip_list = Some(skip_list); self }
2878 pub fn build(self) -> StepIntoParams<'a> {
2879 StepIntoParams {
2880 break_on_async_call: self.break_on_async_call,
2881 skip_list: self.skip_list,
2882 }
2883 }
2884}
2885
2886impl<'a> StepIntoParams<'a> { pub const METHOD: &'static str = "Debugger.stepInto"; }
2887
2888impl<'a> crate::CdpCommand<'a> for StepIntoParams<'a> {
2889 const METHOD: &'static str = "Debugger.stepInto";
2890 type Response = crate::EmptyReturns;
2891}
2892
2893#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2894pub struct StepOutParams {}
2895
2896impl StepOutParams { pub const METHOD: &'static str = "Debugger.stepOut"; }
2897
2898impl<'a> crate::CdpCommand<'a> for StepOutParams {
2899 const METHOD: &'static str = "Debugger.stepOut";
2900 type Response = crate::EmptyReturns;
2901}
2902
2903#[derive(Debug, Clone, Serialize, Deserialize, Default)]
2906#[serde(rename_all = "camelCase")]
2907pub struct StepOverParams<'a> {
2908 #[serde(skip_serializing_if = "Option::is_none", rename = "skipList")]
2910 skip_list: Option<Vec<LocationRange<'a>>>,
2911}
2912
2913impl<'a> StepOverParams<'a> {
2914 pub fn builder() -> StepOverParamsBuilder<'a> {
2916 StepOverParamsBuilder {
2917 skip_list: None,
2918 }
2919 }
2920 pub fn skip_list(&self) -> Option<&[LocationRange<'a>]> { self.skip_list.as_deref() }
2922}
2923
2924#[derive(Default)]
2925pub struct StepOverParamsBuilder<'a> {
2926 skip_list: Option<Vec<LocationRange<'a>>>,
2927}
2928
2929impl<'a> StepOverParamsBuilder<'a> {
2930 pub fn skip_list(mut self, skip_list: Vec<LocationRange<'a>>) -> Self { self.skip_list = Some(skip_list); self }
2932 pub fn build(self) -> StepOverParams<'a> {
2933 StepOverParams {
2934 skip_list: self.skip_list,
2935 }
2936 }
2937}
2938
2939impl<'a> StepOverParams<'a> { pub const METHOD: &'static str = "Debugger.stepOver"; }
2940
2941impl<'a> crate::CdpCommand<'a> for StepOverParams<'a> {
2942 const METHOD: &'static str = "Debugger.stepOver";
2943 type Response = crate::EmptyReturns;
2944}