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.

//! EventBreakpoints permits setting JavaScript breakpoints on operations and
//! events occurring in native code invoked from JavaScript. Once breakpoint
//! is hit, it is reported through Debugger domain, similarly to regular
//! breakpoints being hit.
//!
//! Types, command parameters and event payloads for the `EventBreakpoints`
//! 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};

/// Sets breakpoint on particular native event.
///
/// Parameters of `EventBreakpoints.setInstrumentationBreakpoint`.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SetInstrumentationBreakpointParams {
    /// Instrumentation name to stop on.
    #[serde(rename = "eventName")]
    pub event_name: String,
}

impl crate::typed::Command for SetInstrumentationBreakpointParams {
    const METHOD: &'static str = "EventBreakpoints.setInstrumentationBreakpoint";
    type Returns = crate::typed::NoReturns;
}

/// Removes breakpoint on particular native event.
///
/// Parameters of `EventBreakpoints.removeInstrumentationBreakpoint`.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct RemoveInstrumentationBreakpointParams {
    /// Instrumentation name to stop on.
    #[serde(rename = "eventName")]
    pub event_name: String,
}

impl crate::typed::Command for RemoveInstrumentationBreakpointParams {
    const METHOD: &'static str = "EventBreakpoints.removeInstrumentationBreakpoint";
    type Returns = crate::typed::NoReturns;
}

/// Removes all breakpoints
///
/// Parameters of `EventBreakpoints.disable`.
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct DisableParams {}

impl crate::typed::Command for DisableParams {
    const METHOD: &'static str = "EventBreakpoints.disable";
    type Returns = crate::typed::NoReturns;
}