Skip to main content

CdpCommand

Trait CdpCommand 

Source
pub trait CdpCommand: Serialize {
    type Returns: DeserializeOwned;

    const METHOD: &'static str;
}
Expand description

A typed CDP command.

Self is the request params type (must be Serialize); Returns is the response type returned by Cdp::send / CdpSession::send. METHOD is the wire name, e.g. "Page.navigate".

§Example

use serde::{Deserialize, Serialize};
use thirtyfour::cdp::CdpCommand;

#[derive(Serialize)]
struct GetTitleParams;

#[derive(Deserialize)]
struct GetTitleReturns {
    title: String,
}

impl CdpCommand for GetTitleParams {
    const METHOD: &'static str = "Page.getTitle";
    type Returns = GetTitleReturns;
}

Required Associated Constants§

Source

const METHOD: &'static str

Wire name of the command (e.g. "Page.navigate").

Required Associated Types§

Source

type Returns: DeserializeOwned

Response type. Use Empty for commands that return {}.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl CdpCommand for AddScriptToEvaluateOnNewDocument

Source§

const METHOD: &'static str = "Page.addScriptToEvaluateOnNewDocument"

Source§

type Returns = AddedScript

Source§

impl CdpCommand for AttachToTarget

Source§

const METHOD: &'static str = "Target.attachToTarget"

Source§

type Returns = AttachToTargetResult

Source§

impl CdpCommand for CallFunctionOn

Source§

const METHOD: &'static str = "Runtime.callFunctionOn"

Source§

type Returns = EvaluationResult

Source§

impl CdpCommand for CaptureScreenshot

Source§

const METHOD: &'static str = "Page.captureScreenshot"

Source§

type Returns = ScreenshotData

Source§

impl CdpCommand for Clear

Source§

const METHOD: &'static str = "Log.clear"

Source§

type Returns = Empty

Source§

impl CdpCommand for ClearBrowserCache

Source§

const METHOD: &'static str = "Network.clearBrowserCache"

Source§

type Returns = Empty

Source§

impl CdpCommand for ClearBrowserCookies

Source§

const METHOD: &'static str = "Network.clearBrowserCookies"

Source§

type Returns = Empty

Source§

impl CdpCommand for ClearCookies

Source§

const METHOD: &'static str = "Storage.clearCookies"

Source§

type Returns = Empty

Source§

impl CdpCommand for ClearDataForOrigin

Source§

const METHOD: &'static str = "Storage.clearDataForOrigin"

Source§

type Returns = Empty

Source§

impl CdpCommand for ClearDeviceMetricsOverride

Source§

const METHOD: &'static str = "Emulation.clearDeviceMetricsOverride"

Source§

type Returns = Empty

Source§

impl CdpCommand for Close

Source§

const METHOD: &'static str = "Browser.close"

Source§

type Returns = Empty

Source§

impl CdpCommand for CloseTarget

Source§

const METHOD: &'static str = "Target.closeTarget"

Source§

type Returns = CloseTargetResult

Source§

impl CdpCommand for ContinueRequest

Source§

const METHOD: &'static str = "Fetch.continueRequest"

Source§

type Returns = Empty

Source§

impl CdpCommand for CreateTarget

Source§

const METHOD: &'static str = "Target.createTarget"

Source§

type Returns = CreateTargetResult

Source§

impl CdpCommand for DescribeNode

Source§

const METHOD: &'static str = "DOM.describeNode"

Source§

type Returns = DescribeNodeResult

Source§

impl CdpCommand for DetachFromTarget

Source§

const METHOD: &'static str = "Target.detachFromTarget"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::dom::Disable

Source§

const METHOD: &'static str = "DOM.disable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::fetch::Disable

Source§

const METHOD: &'static str = "Fetch.disable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::log::Disable

Source§

const METHOD: &'static str = "Log.disable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::network::Disable

Source§

const METHOD: &'static str = "Network.disable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::page::Disable

Source§

const METHOD: &'static str = "Page.disable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::performance::Disable

Source§

const METHOD: &'static str = "Performance.disable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::runtime::Disable

Source§

const METHOD: &'static str = "Runtime.disable"

Source§

type Returns = Empty

Source§

impl CdpCommand for DispatchKeyEvent

Source§

const METHOD: &'static str = "Input.dispatchKeyEvent"

Source§

type Returns = Empty

Source§

impl CdpCommand for DispatchMouseEvent

Source§

const METHOD: &'static str = "Input.dispatchMouseEvent"

Source§

type Returns = Empty

Source§

impl CdpCommand for EmulateNetworkConditions

Source§

const METHOD: &'static str = "Network.emulateNetworkConditions"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::dom::Enable

Source§

const METHOD: &'static str = "DOM.enable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::fetch::Enable

Source§

const METHOD: &'static str = "Fetch.enable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::log::Enable

Source§

const METHOD: &'static str = "Log.enable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::network::Enable

Source§

const METHOD: &'static str = "Network.enable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::page::Enable

Source§

const METHOD: &'static str = "Page.enable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::performance::Enable

Source§

const METHOD: &'static str = "Performance.enable"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::runtime::Enable

Source§

const METHOD: &'static str = "Runtime.enable"

Source§

type Returns = Empty

Source§

impl CdpCommand for Evaluate

Source§

const METHOD: &'static str = "Runtime.evaluate"

Source§

type Returns = EvaluationResult

Source§

impl CdpCommand for FailRequest

Source§

const METHOD: &'static str = "Fetch.failRequest"

Source§

type Returns = Empty

Source§

impl CdpCommand for FulfillRequest

Source§

const METHOD: &'static str = "Fetch.fulfillRequest"

Source§

type Returns = Empty

Source§

impl CdpCommand for GetBoxModel

Source§

const METHOD: &'static str = "DOM.getBoxModel"

Source§

type Returns = GetBoxModelResult

Source§

impl CdpCommand for GetDocument

Source§

const METHOD: &'static str = "DOM.getDocument"

Source§

type Returns = GetDocumentResult

Source§

impl CdpCommand for GetMetrics

Source§

const METHOD: &'static str = "Performance.getMetrics"

Source§

type Returns = GetMetricsResult

Source§

impl CdpCommand for GetResponseBody

Source§

const METHOD: &'static str = "Network.getResponseBody"

Source§

type Returns = ResponseBody

Source§

impl CdpCommand for GetTargets

Source§

const METHOD: &'static str = "Target.getTargets"

Source§

type Returns = GetTargetsResult

Source§

impl CdpCommand for GetVersion

Source§

const METHOD: &'static str = "Browser.getVersion"

Source§

type Returns = VersionInfo

Source§

impl CdpCommand for InsertText

Source§

const METHOD: &'static str = "Input.insertText"

Source§

type Returns = Empty

Source§

impl CdpCommand for Navigate

Source§

const METHOD: &'static str = "Page.navigate"

Source§

type Returns = NavigateResult

Source§

impl CdpCommand for PrintToPdf

Source§

const METHOD: &'static str = "Page.printToPDF"

Source§

type Returns = PdfData

Source§

impl CdpCommand for QuerySelector

Source§

const METHOD: &'static str = "DOM.querySelector"

Source§

type Returns = QuerySelectorResult

Source§

impl CdpCommand for QuerySelectorAll

Source§

const METHOD: &'static str = "DOM.querySelectorAll"

Source§

type Returns = QuerySelectorAllResult

Source§

impl CdpCommand for ReleaseObject

Source§

const METHOD: &'static str = "Runtime.releaseObject"

Source§

type Returns = Empty

Source§

impl CdpCommand for ReleaseObjectGroup

Source§

const METHOD: &'static str = "Runtime.releaseObjectGroup"

Source§

type Returns = Empty

Source§

impl CdpCommand for Reload

Source§

const METHOD: &'static str = "Page.reload"

Source§

type Returns = Empty

Source§

impl CdpCommand for RemoveScriptToEvaluateOnNewDocument

Source§

const METHOD: &'static str = "Page.removeScriptToEvaluateOnNewDocument"

Source§

type Returns = Empty

Source§

impl CdpCommand for RequestNode

Source§

const METHOD: &'static str = "DOM.requestNode"

Source§

type Returns = RequestNodeResult

Source§

impl CdpCommand for ResolveNode

Source§

const METHOD: &'static str = "DOM.resolveNode"

Source§

type Returns = ResolveNodeResult

Source§

impl CdpCommand for ScrollIntoViewIfNeeded

Source§

const METHOD: &'static str = "DOM.scrollIntoViewIfNeeded"

Source§

type Returns = Empty

Source§

impl CdpCommand for SetAutoAttach

Source§

const METHOD: &'static str = "Target.setAutoAttach"

Source§

type Returns = Empty

Source§

impl CdpCommand for SetDeviceMetricsOverride

Source§

const METHOD: &'static str = "Emulation.setDeviceMetricsOverride"

Source§

type Returns = Empty

Source§

impl CdpCommand for SetDownloadBehavior

Source§

const METHOD: &'static str = "Browser.setDownloadBehavior"

Source§

type Returns = Empty

Source§

impl CdpCommand for SetEmulatedMedia

Source§

const METHOD: &'static str = "Emulation.setEmulatedMedia"

Source§

type Returns = Empty

Source§

impl CdpCommand for SetExtraHttpHeaders

Source§

const METHOD: &'static str = "Network.setExtraHTTPHeaders"

Source§

type Returns = Empty

Source§

impl CdpCommand for SetGeolocationOverride

Source§

const METHOD: &'static str = "Emulation.setGeolocationOverride"

Source§

type Returns = Empty

Source§

impl CdpCommand for SetLifecycleEventsEnabled

Source§

const METHOD: &'static str = "Page.setLifecycleEventsEnabled"

Source§

type Returns = Empty

Source§

impl CdpCommand for SetLocaleOverride

Source§

const METHOD: &'static str = "Emulation.setLocaleOverride"

Source§

type Returns = Empty

Source§

impl CdpCommand for SetTimezoneOverride

Source§

const METHOD: &'static str = "Emulation.setTimezoneOverride"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::emulation::SetUserAgentOverride

Source§

const METHOD: &'static str = "Emulation.setUserAgentOverride"

Source§

type Returns = Empty

Source§

impl CdpCommand for thirtyfour::cdp::domains::network::SetUserAgentOverride

Source§

const METHOD: &'static str = "Network.setUserAgentOverride"

Source§

type Returns = Empty