cdp_driver/protocol/crash_report_context.rs
1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! This domain exposes the current state of the CrashReportContext API.
5//!
6//! Types, command parameters and event payloads for the `CrashReportContext`
7//! domain. The method-name constants for the same domain are in
8//! [`crate::methods`].
9//!
10//! This domain is experimental and may change without notice.
11
12use serde::{Deserialize, Serialize};
13
14/// Key-value pair in CrashReportContext.
15#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
16pub struct CrashReportContextEntry {
17 pub key: String,
18 pub value: String,
19 /// The ID of the frame where the key-value pair was set.
20 #[serde(rename = "frameId")]
21 pub frame_id: crate::protocol::page::FrameId,
22}
23
24/// Returns all entries in the CrashReportContext across all frames in the
25/// page.
26///
27/// Parameters of `CrashReportContext.getEntries`.
28#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
29pub struct GetEntriesParams {}
30
31/// What `CrashReportContext.getEntries` answers with.
32#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
33pub struct GetEntriesReturns {
34 pub entries: Vec<CrashReportContextEntry>,
35}
36
37impl crate::typed::Command for GetEntriesParams {
38 const METHOD: &'static str = "CrashReportContext.getEntries";
39 type Returns = GetEntriesReturns;
40}