ydp 0.1.0-alpha.2

A strongly typed, async-only Chrome DevTools Protocol client for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.disable/parameters。
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct DisableParams {}
impl<'de> serde::Deserialize<'de> for DisableParams {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = DisableParams;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(DisableParams {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
///无状态协议 marker;METHOD 保持 wire 名,不启动自动化行为。协议来源:Profiler.command.disable。
#[derive(Debug, Clone, Copy)]
pub struct Disable;
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.disable/returns。
#[derive(Debug, Clone, serde::Serialize)]
pub struct DisableResponse {}
impl<'de> serde::Deserialize<'de> for DisableResponse {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = DisableResponse;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(DisableResponse {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
impl ydp_core::Command for Disable {
    type Params = DisableParams;
    type Response = DisableResponse;
    const METHOD: &'static str = "Profiler.disable";
}
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.enable/parameters。
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct EnableParams {}
impl<'de> serde::Deserialize<'de> for EnableParams {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = EnableParams;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(EnableParams {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
///无状态协议 marker;METHOD 保持 wire 名,不启动自动化行为。协议来源:Profiler.command.enable。
#[derive(Debug, Clone, Copy)]
pub struct Enable;
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.enable/returns。
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableResponse {}
impl<'de> serde::Deserialize<'de> for EnableResponse {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = EnableResponse;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(EnableResponse {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
impl ydp_core::Command for Enable {
    type Params = EnableParams;
    type Response = EnableResponse;
    const METHOD: &'static str = "Profiler.enable";
}
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.getBestEffortCoverage/parameters。
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetBestEffortCoverageParams {}
impl<'de> serde::Deserialize<'de> for GetBestEffortCoverageParams {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = GetBestEffortCoverageParams;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(GetBestEffortCoverageParams {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
///无状态协议 marker;METHOD 保持 wire 名,不启动自动化行为。协议来源:Profiler.command.getBestEffortCoverage。
///
///协议原文:
///
///<pre>Collect coverage data for the current isolate. The coverage data may be incomplete due to
///garbage collection.</pre>
///
///
#[derive(Debug, Clone, Copy)]
pub struct GetBestEffortCoverage;
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.getBestEffortCoverage/returns。
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetBestEffortCoverageResponse {
    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.getBestEffortCoverage/returns/result。
    ///
    ///协议原文:
    ///
    ///<pre>Coverage data for the current isolate.</pre>
    ///
    ///
    #[serde(rename = "result")]
    #[serde(deserialize_with = "ydp_core::binding_support::required")]
    pub result: Vec<crate::profiler::types::ScriptCoverage>,
}
impl<'de> serde::Deserialize<'de> for GetBestEffortCoverageResponse {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = GetBestEffortCoverageResponse;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {
                    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.getBestEffortCoverage/returns/result。
                    ///
                    ///协议原文:
                    ///
                    ///<pre>Coverage data for the current isolate.</pre>
                    ///
                    ///
                    #[serde(rename = "result")]
                    #[serde(deserialize_with = "ydp_core::binding_support::required")]
                    pub result: Vec<crate::profiler::types::ScriptCoverage>,
                }
                let fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(GetBestEffortCoverageResponse {
                    result: fields.result,
                })
            }
        }
        d.deserialize_map(Visitor)
    }
}
impl ydp_core::Command for GetBestEffortCoverage {
    type Params = GetBestEffortCoverageParams;
    type Response = GetBestEffortCoverageResponse;
    const METHOD: &'static str = "Profiler.getBestEffortCoverage";
}
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.setSamplingInterval/parameters。
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetSamplingIntervalParams {
    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.setSamplingInterval/parameters/interval。
    ///
    ///协议原文:
    ///
    ///<pre>New sampling interval in microseconds.</pre>
    ///
    ///
    #[serde(rename = "interval")]
    #[serde(deserialize_with = "ydp_core::binding_support::required")]
    pub interval: i64,
}
impl<'de> serde::Deserialize<'de> for SetSamplingIntervalParams {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = SetSamplingIntervalParams;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {
                    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.setSamplingInterval/parameters/interval。
                    ///
                    ///协议原文:
                    ///
                    ///<pre>New sampling interval in microseconds.</pre>
                    ///
                    ///
                    #[serde(rename = "interval")]
                    #[serde(deserialize_with = "ydp_core::binding_support::required")]
                    pub interval: i64,
                }
                let fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(SetSamplingIntervalParams {
                    interval: fields.interval,
                })
            }
        }
        d.deserialize_map(Visitor)
    }
}
///无状态协议 marker;METHOD 保持 wire 名,不启动自动化行为。协议来源:Profiler.command.setSamplingInterval。
///
///协议原文:
///
///<pre>Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.</pre>
///
///
#[derive(Debug, Clone, Copy)]
pub struct SetSamplingInterval;
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.setSamplingInterval/returns。
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetSamplingIntervalResponse {}
impl<'de> serde::Deserialize<'de> for SetSamplingIntervalResponse {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = SetSamplingIntervalResponse;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(SetSamplingIntervalResponse {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
impl ydp_core::Command for SetSamplingInterval {
    type Params = SetSamplingIntervalParams;
    type Response = SetSamplingIntervalResponse;
    const METHOD: &'static str = "Profiler.setSamplingInterval";
}
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.start/parameters。
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct StartParams {}
impl<'de> serde::Deserialize<'de> for StartParams {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = StartParams;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(StartParams {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
///无状态协议 marker;METHOD 保持 wire 名,不启动自动化行为。协议来源:Profiler.command.start。
#[derive(Debug, Clone, Copy)]
pub struct Start;
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.start/returns。
#[derive(Debug, Clone, serde::Serialize)]
pub struct StartResponse {}
impl<'de> serde::Deserialize<'de> for StartResponse {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = StartResponse;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(StartResponse {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
impl ydp_core::Command for Start {
    type Params = StartParams;
    type Response = StartResponse;
    const METHOD: &'static str = "Profiler.start";
}
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.startPreciseCoverage/parameters。
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct StartPreciseCoverageParams {
    ///可缺失字段;None 编码时省略,存在时按声明类型校验。协议来源:Profiler.command.startPreciseCoverage/parameters/callCount。
    ///
    ///协议原文:
    ///
    ///<pre>Collect accurate call counts beyond simple 'covered' or 'not covered'.</pre>
    ///
    ///
    #[serde(rename = "callCount")]
    #[serde(
        default,
        deserialize_with = "ydp_core::binding_support::presence",
        skip_serializing_if = "Option::is_none"
    )]
    pub call_count: Option<bool>,
    ///可缺失字段;None 编码时省略,存在时按声明类型校验。协议来源:Profiler.command.startPreciseCoverage/parameters/detailed。
    ///
    ///协议原文:
    ///
    ///<pre>Collect block-based coverage.</pre>
    ///
    ///
    #[serde(rename = "detailed")]
    #[serde(
        default,
        deserialize_with = "ydp_core::binding_support::presence",
        skip_serializing_if = "Option::is_none"
    )]
    pub detailed: Option<bool>,
    ///可缺失字段;None 编码时省略,存在时按声明类型校验。协议来源:Profiler.command.startPreciseCoverage/parameters/allowTriggeredUpdates。
    ///
    ///协议原文:
    ///
    ///<pre>Allow the backend to send updates on its own initiative</pre>
    ///
    ///
    #[serde(rename = "allowTriggeredUpdates")]
    #[serde(
        default,
        deserialize_with = "ydp_core::binding_support::presence",
        skip_serializing_if = "Option::is_none"
    )]
    pub allow_triggered_updates: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for StartPreciseCoverageParams {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = StartPreciseCoverageParams;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {
                    ///可缺失字段;None 编码时省略,存在时按声明类型校验。协议来源:Profiler.command.startPreciseCoverage/parameters/callCount。
                    ///
                    ///协议原文:
                    ///
                    ///<pre>Collect accurate call counts beyond simple 'covered' or 'not covered'.</pre>
                    ///
                    ///
                    #[serde(rename = "callCount")]
                    #[serde(
                        default,
                        deserialize_with = "ydp_core::binding_support::presence",
                        skip_serializing_if = "Option::is_none"
                    )]
                    pub call_count: Option<bool>,
                    ///可缺失字段;None 编码时省略,存在时按声明类型校验。协议来源:Profiler.command.startPreciseCoverage/parameters/detailed。
                    ///
                    ///协议原文:
                    ///
                    ///<pre>Collect block-based coverage.</pre>
                    ///
                    ///
                    #[serde(rename = "detailed")]
                    #[serde(
                        default,
                        deserialize_with = "ydp_core::binding_support::presence",
                        skip_serializing_if = "Option::is_none"
                    )]
                    pub detailed: Option<bool>,
                    ///可缺失字段;None 编码时省略,存在时按声明类型校验。协议来源:Profiler.command.startPreciseCoverage/parameters/allowTriggeredUpdates。
                    ///
                    ///协议原文:
                    ///
                    ///<pre>Allow the backend to send updates on its own initiative</pre>
                    ///
                    ///
                    #[serde(rename = "allowTriggeredUpdates")]
                    #[serde(
                        default,
                        deserialize_with = "ydp_core::binding_support::presence",
                        skip_serializing_if = "Option::is_none"
                    )]
                    pub allow_triggered_updates: Option<bool>,
                }
                let fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(StartPreciseCoverageParams {
                    call_count: fields.call_count,
                    detailed: fields.detailed,
                    allow_triggered_updates: fields.allow_triggered_updates,
                })
            }
        }
        d.deserialize_map(Visitor)
    }
}
///无状态协议 marker;METHOD 保持 wire 名,不启动自动化行为。协议来源:Profiler.command.startPreciseCoverage。
///
///协议原文:
///
///<pre>Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code
///coverage may be incomplete. Enabling prevents running optimized code and resets execution
///counters.</pre>
///
///
#[derive(Debug, Clone, Copy)]
pub struct StartPreciseCoverage;
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.startPreciseCoverage/returns。
#[derive(Debug, Clone, serde::Serialize)]
pub struct StartPreciseCoverageResponse {
    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.startPreciseCoverage/returns/timestamp。
    ///
    ///协议原文:
    ///
    ///<pre>Monotonically increasing time (in seconds) when the coverage update was taken in the backend.</pre>
    ///
    ///
    #[serde(rename = "timestamp")]
    #[serde(deserialize_with = "ydp_core::binding_support::required")]
    pub timestamp: ydp_core::FiniteF64,
}
impl<'de> serde::Deserialize<'de> for StartPreciseCoverageResponse {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = StartPreciseCoverageResponse;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {
                    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.startPreciseCoverage/returns/timestamp。
                    ///
                    ///协议原文:
                    ///
                    ///<pre>Monotonically increasing time (in seconds) when the coverage update was taken in the backend.</pre>
                    ///
                    ///
                    #[serde(rename = "timestamp")]
                    #[serde(deserialize_with = "ydp_core::binding_support::required")]
                    pub timestamp: ydp_core::FiniteF64,
                }
                let fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(StartPreciseCoverageResponse {
                    timestamp: fields.timestamp,
                })
            }
        }
        d.deserialize_map(Visitor)
    }
}
impl ydp_core::Command for StartPreciseCoverage {
    type Params = StartPreciseCoverageParams;
    type Response = StartPreciseCoverageResponse;
    const METHOD: &'static str = "Profiler.startPreciseCoverage";
}
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.stop/parameters。
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct StopParams {}
impl<'de> serde::Deserialize<'de> for StopParams {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = StopParams;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(StopParams {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
///无状态协议 marker;METHOD 保持 wire 名,不启动自动化行为。协议来源:Profiler.command.stop。
#[derive(Debug, Clone, Copy)]
pub struct Stop;
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.stop/returns。
#[derive(Debug, Clone, serde::Serialize)]
pub struct StopResponse {
    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.stop/returns/profile。
    ///
    ///协议原文:
    ///
    ///<pre>Recorded profile.</pre>
    ///
    ///
    #[serde(rename = "profile")]
    #[serde(deserialize_with = "ydp_core::binding_support::required")]
    pub profile: crate::profiler::types::Profile,
}
impl<'de> serde::Deserialize<'de> for StopResponse {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = StopResponse;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {
                    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.stop/returns/profile。
                    ///
                    ///协议原文:
                    ///
                    ///<pre>Recorded profile.</pre>
                    ///
                    ///
                    #[serde(rename = "profile")]
                    #[serde(deserialize_with = "ydp_core::binding_support::required")]
                    pub profile: crate::profiler::types::Profile,
                }
                let fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(StopResponse {
                    profile: fields.profile,
                })
            }
        }
        d.deserialize_map(Visitor)
    }
}
impl ydp_core::Command for Stop {
    type Params = StopParams;
    type Response = StopResponse;
    const METHOD: &'static str = "Profiler.stop";
}
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.stopPreciseCoverage/parameters。
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct StopPreciseCoverageParams {}
impl<'de> serde::Deserialize<'de> for StopPreciseCoverageParams {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = StopPreciseCoverageParams;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(StopPreciseCoverageParams {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
///无状态协议 marker;METHOD 保持 wire 名,不启动自动化行为。协议来源:Profiler.command.stopPreciseCoverage。
///
///协议原文:
///
///<pre>Disable precise code coverage. Disabling releases unnecessary execution count records and allows
///executing optimized code.</pre>
///
///
#[derive(Debug, Clone, Copy)]
pub struct StopPreciseCoverage;
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.stopPreciseCoverage/returns。
#[derive(Debug, Clone, serde::Serialize)]
pub struct StopPreciseCoverageResponse {}
impl<'de> serde::Deserialize<'de> for StopPreciseCoverageResponse {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = StopPreciseCoverageResponse;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(StopPreciseCoverageResponse {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
impl ydp_core::Command for StopPreciseCoverage {
    type Params = StopPreciseCoverageParams;
    type Response = StopPreciseCoverageResponse;
    const METHOD: &'static str = "Profiler.stopPreciseCoverage";
}
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.takePreciseCoverage/parameters。
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct TakePreciseCoverageParams {}
impl<'de> serde::Deserialize<'de> for TakePreciseCoverageParams {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = TakePreciseCoverageParams;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {}
                let _fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(TakePreciseCoverageParams {})
            }
        }
        d.deserialize_map(Visitor)
    }
}
///无状态协议 marker;METHOD 保持 wire 名,不启动自动化行为。协议来源:Profiler.command.takePreciseCoverage。
///
///协议原文:
///
///<pre>Collect coverage data for the current isolate, and resets execution counters. Precise code
///coverage needs to have started.</pre>
///
///
#[derive(Debug, Clone, Copy)]
pub struct TakePreciseCoverage;
///拥有型协议数据;Clone 复制字段,未知 object 字段容忍但不保留。协议来源:Profiler.command.takePreciseCoverage/returns。
#[derive(Debug, Clone, serde::Serialize)]
pub struct TakePreciseCoverageResponse {
    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.takePreciseCoverage/returns/result。
    ///
    ///协议原文:
    ///
    ///<pre>Coverage data for the current isolate.</pre>
    ///
    ///
    #[serde(rename = "result")]
    #[serde(deserialize_with = "ydp_core::binding_support::required")]
    pub result: Vec<crate::profiler::types::ScriptCoverage>,
    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.takePreciseCoverage/returns/timestamp。
    ///
    ///协议原文:
    ///
    ///<pre>Monotonically increasing time (in seconds) when the coverage update was taken in the backend.</pre>
    ///
    ///
    #[serde(rename = "timestamp")]
    #[serde(deserialize_with = "ydp_core::binding_support::required")]
    pub timestamp: ydp_core::FiniteF64,
}
impl<'de> serde::Deserialize<'de> for TakePreciseCoverageResponse {
    fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
        struct Visitor;
        impl<'de> serde::de::Visitor<'de> for Visitor {
            type Value = TakePreciseCoverageResponse;
            fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.write_str("协议 object")
            }
            fn visit_map<A: serde::de::MapAccess<'de>>(
                self,
                a: A,
            ) -> Result<Self::Value, A::Error> {
                #[derive(serde::Deserialize)]
                struct Fields {
                    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.takePreciseCoverage/returns/result。
                    ///
                    ///协议原文:
                    ///
                    ///<pre>Coverage data for the current isolate.</pre>
                    ///
                    ///
                    #[serde(rename = "result")]
                    #[serde(deserialize_with = "ydp_core::binding_support::required")]
                    pub result: Vec<crate::profiler::types::ScriptCoverage>,
                    ///必需字段;缺失或类型错误导致解码失败。协议来源:Profiler.command.takePreciseCoverage/returns/timestamp。
                    ///
                    ///协议原文:
                    ///
                    ///<pre>Monotonically increasing time (in seconds) when the coverage update was taken in the backend.</pre>
                    ///
                    ///
                    #[serde(rename = "timestamp")]
                    #[serde(deserialize_with = "ydp_core::binding_support::required")]
                    pub timestamp: ydp_core::FiniteF64,
                }
                let fields = <Fields as serde::Deserialize>::deserialize(
                    serde::de::value::MapAccessDeserializer::new(a),
                )?;
                Ok(TakePreciseCoverageResponse {
                    result: fields.result,
                    timestamp: fields.timestamp,
                })
            }
        }
        d.deserialize_map(Visitor)
    }
}
impl ydp_core::Command for TakePreciseCoverage {
    type Params = TakePreciseCoverageParams;
    type Response = TakePreciseCoverageResponse;
    const METHOD: &'static str = "Profiler.takePreciseCoverage";
}