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.

//! The `Memory` domain.
//!
//! Method names for the `Memory` domain, for use with
//! [`CdpClient::call`](crate::CdpClient::call).
//!
//! This domain is experimental and may change without notice.

/// Retruns current DOM object counters.
///
/// Returns: `documents`, `nodes`, `jsEventListeners`
pub const GET_DOM_COUNTERS: &str = "Memory.getDOMCounters";

/// Retruns DOM object counters after preparing renderer for leak detection.
///
/// Returns: `counters`
pub const GET_DOM_COUNTERS_FOR_LEAK_DETECTION: &str = "Memory.getDOMCountersForLeakDetection";

/// Prepares for leak detection by terminating workers, stopping
/// spellcheckers, dropping non-essential internal caches, running garbage
/// collections, etc.
pub const PREPARE_FOR_LEAK_DETECTION: &str = "Memory.prepareForLeakDetection";

/// Simulate OomIntervention by purging V8 memory.
pub const FORCIBLY_PURGE_JAVA_SCRIPT_MEMORY: &str = "Memory.forciblyPurgeJavaScriptMemory";

/// Enable/disable suppressing memory pressure notifications in all processes.
///
/// Parameters:
/// - `suppressed`: boolean
pub const SET_PRESSURE_NOTIFICATIONS_SUPPRESSED: &str = "Memory.setPressureNotificationsSuppressed";

/// Simulate a memory pressure notification in all processes.
///
/// Parameters:
/// - `level`: PressureLevel
pub const SIMULATE_PRESSURE_NOTIFICATION: &str = "Memory.simulatePressureNotification";

/// Start collecting native memory profile.
///
/// Parameters:
/// - `samplingInterval`: integer (optional)
/// - `suppressRandomness`: boolean (optional)
pub const START_SAMPLING: &str = "Memory.startSampling";

/// Stop collecting native memory profile.
pub const STOP_SAMPLING: &str = "Memory.stopSampling";

/// Retrieve native memory allocations profile collected since renderer
/// process startup.
///
/// Returns: `profile`
pub const GET_ALL_TIME_SAMPLING_PROFILE: &str = "Memory.getAllTimeSamplingProfile";

/// Retrieve native memory allocations profile collected since browser process
/// startup.
///
/// Returns: `profile`
pub const GET_BROWSER_SAMPLING_PROFILE: &str = "Memory.getBrowserSamplingProfile";

/// Retrieve native memory allocations profile collected since last
/// `startSampling` call.
///
/// Returns: `profile`
pub const GET_SAMPLING_PROFILE: &str = "Memory.getSamplingProfile";