cdp-driver 0.5.0

Chrome DevTools Protocol (CDP) client for Rust: every command, event and type generated from the schema, with sessions, for browser automation and AI agents
Documentation
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.

//! This domain exposes the current state of the CrashReportContext API.
//!
//! Types, command parameters and event payloads for the `CrashReportContext`
//! domain. The method-name constants for the same domain are in
//! [`crate::methods`].
//!
//! This domain is experimental and may change without notice.

use serde::{Deserialize, Serialize};

/// Key-value pair in CrashReportContext.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct CrashReportContextEntry {
    pub key: String,
    pub value: String,
    /// The ID of the frame where the key-value pair was set.
    #[serde(rename = "frameId")]
    pub frame_id: crate::protocol::page::FrameId,
}

/// Returns all entries in the CrashReportContext across all frames in the
/// page.
///
/// Parameters of `CrashReportContext.getEntries`.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetEntriesParams {}

/// What `CrashReportContext.getEntries` answers with.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct GetEntriesReturns {
    pub entries: Vec<CrashReportContextEntry>,
}

impl crate::typed::Command for GetEntriesParams {
    const METHOD: &'static str = "CrashReportContext.getEntries";
    type Returns = GetEntriesReturns;
}