Skip to main content

Command

Trait Command 

Source
pub trait Command {
    type Params: Serialize;
    type Output;

    const METHOD: &'static str;

    // Required method
    fn decode(response: CdpResponse) -> Result<Self::Output>;
}
Expand description

Typed command interface.

Required Associated Constants§

Source

const METHOD: &'static str

Command method string.

Required Associated Types§

Source

type Params: Serialize

Command parameters.

Source

type Output

Command result.

Required Methods§

Source

fn decode(response: CdpResponse) -> Result<Self::Output>

Decode the protocol response into the typed output.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Command for BrowserGetVersionParams

Source§

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

Source§

type Params = BrowserGetVersionParams

Source§

type Output = BrowserVersion

Source§

impl Command for FetchContinueRequestParams

Source§

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

Source§

type Params = FetchContinueRequestParams

Source§

type Output = ()

Source§

impl Command for FetchEnableParams

Source§

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

Source§

type Params = FetchEnableParams

Source§

type Output = ()

Source§

impl Command for FetchFailRequestParams

Source§

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

Source§

type Params = FetchFailRequestParams

Source§

type Output = ()

Source§

impl Command for FetchFulfillRequestParams

Source§

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

Source§

type Params = FetchFulfillRequestParams

Source§

type Output = ()

Source§

impl Command for FetchGetResponseBodyParams

Source§

impl Command for InputDispatchKeyEventParams

Source§

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

Source§

type Params = InputDispatchKeyEventParams

Source§

type Output = ()

Source§

impl Command for InputInsertTextParams

Source§

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

Source§

type Params = InputInsertTextParams

Source§

type Output = ()

Source§

impl Command for NetworkEnableParams

Source§

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

Source§

type Params = NetworkEnableParams

Source§

type Output = ()

Source§

impl Command for PageCaptureScreenshotParams

Source§

impl Command for PageCreateIsolatedWorldParams

Source§

impl Command for PageEnableParams

Source§

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

Source§

type Params = PageEnableParams

Source§

type Output = ()

Source§

impl Command for PageGetFrameTreeParams

Source§

impl Command for PageNavigateParams

Source§

impl Command for PageSetLifecycleEventsEnabledParams

Source§

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

Source§

type Params = PageSetLifecycleEventsEnabledParams

Source§

type Output = ()

Source§

impl Command for RuntimeCallFunctionOnParams

Source§

impl Command for RuntimeEnableParams

Source§

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

Source§

type Params = RuntimeEnableParams

Source§

type Output = ()

Source§

impl Command for RuntimeEvaluateParams

Source§

impl Command for RuntimeReleaseObjectParams

Source§

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

Source§

type Params = RuntimeReleaseObjectParams

Source§

type Output = ()

Source§

impl Command for TargetAttachToTargetParams

Source§

impl Command for TargetCreateTargetParams

Source§

impl Command for TargetSetAutoAttachParams

Source§

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

Source§

type Params = TargetSetAutoAttachParams

Source§

type Output = ()

Source§

impl Command for TargetSetDiscoverTargetsParams

Source§

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

Source§

type Params = TargetSetDiscoverTargetsParams

Source§

type Output = ()