Skip to main content

browser_protocol/crashreportcontext/
mod.rs

1//! This domain exposes the current state of the CrashReportContext API.
2use serde::{Serialize, Deserialize};
3use serde_json::Value as JsonValue;
4
5/// Key-value pair in CrashReportContext.
6
7#[derive(Debug, Clone, Serialize, Deserialize, Default)]
8#[serde(rename_all = "camelCase")]
9pub struct CrashReportContextEntry {
10
11    pub key: String,
12
13    pub value: String,
14    /// The ID of the frame where the key-value pair was set.
15
16    pub frameId: crate::page::FrameId,
17}
18
19/// Returns all entries in the CrashReportContext across all frames in the page.
20
21#[derive(Debug, Clone, Serialize, Deserialize, Default)]
22#[serde(rename_all = "camelCase")]
23pub struct GetEntriesReturns {
24
25    pub entries: Vec<CrashReportContextEntry>,
26}
27
28#[derive(Debug, Clone, Serialize, Deserialize, Default)]
29pub struct GetEntriesParams {}
30
31impl GetEntriesParams { pub const METHOD: &'static str = "CrashReportContext.getEntries"; }
32
33impl crate::CdpCommand for GetEntriesParams {
34    const METHOD: &'static str = "CrashReportContext.getEntries";
35    type Response = GetEntriesReturns;
36}