#[derive(Debug, Clone, serde::Serialize)]
pub struct AddBindingParams {
#[serde(rename = "name")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub name: String,
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
#[serde(rename = "executionContextName")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_name: Option<String>,
}
impl<'de> serde::Deserialize<'de> for AddBindingParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AddBindingParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "name")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub name: String,
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
#[serde(rename = "executionContextName")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_name: Option<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AddBindingParams {
name: fields.name,
execution_context_id: fields.execution_context_id,
execution_context_name: fields.execution_context_name,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AddBinding;
#[derive(Debug, Clone, serde::Serialize)]
pub struct AddBindingResponse {}
impl<'de> serde::Deserialize<'de> for AddBindingResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AddBindingResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AddBindingResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for AddBinding {
type Params = AddBindingParams;
type Response = AddBindingResponse;
const METHOD: &'static str = "Runtime.addBinding";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct AwaitPromiseParams {
#[serde(rename = "promiseObjectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub promise_object_id: crate::runtime::types::RemoteObjectId,
#[serde(rename = "returnByValue")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub return_by_value: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for AwaitPromiseParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AwaitPromiseParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "promiseObjectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub promise_object_id: crate::runtime::types::RemoteObjectId,
#[serde(rename = "returnByValue")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub return_by_value: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AwaitPromiseParams {
promise_object_id: fields.promise_object_id,
return_by_value: fields.return_by_value,
generate_preview: fields.generate_preview,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AwaitPromise;
#[derive(Debug, Clone, serde::Serialize)]
pub struct AwaitPromiseResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: crate::runtime::types::RemoteObject,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
impl<'de> serde::Deserialize<'de> for AwaitPromiseResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AwaitPromiseResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: crate::runtime::types::RemoteObject,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AwaitPromiseResponse {
result: fields.result,
exception_details: fields.exception_details,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for AwaitPromise {
type Params = AwaitPromiseParams;
type Response = AwaitPromiseResponse;
const METHOD: &'static str = "Runtime.awaitPromise";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct CallFunctionOnParams {
#[serde(rename = "functionDeclaration")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub function_declaration: String,
#[serde(rename = "objectId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_id: Option<crate::runtime::types::RemoteObjectId>,
#[serde(rename = "arguments")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub arguments: Option<Vec<crate::runtime::types::CallArgument>>,
#[serde(rename = "silent")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub silent: Option<bool>,
#[serde(rename = "returnByValue")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub return_by_value: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
#[serde(rename = "userGesture")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub user_gesture: Option<bool>,
#[serde(rename = "awaitPromise")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub await_promise: Option<bool>,
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
#[serde(rename = "objectGroup")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_group: Option<String>,
#[serde(rename = "throwOnSideEffect")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub throw_on_side_effect: Option<bool>,
#[serde(rename = "uniqueContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub unique_context_id: Option<String>,
#[serde(rename = "serializationOptions")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub serialization_options: Option<crate::runtime::types::SerializationOptions>,
}
impl<'de> serde::Deserialize<'de> for CallFunctionOnParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CallFunctionOnParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "functionDeclaration")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub function_declaration: String,
#[serde(rename = "objectId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_id: Option<crate::runtime::types::RemoteObjectId>,
#[serde(rename = "arguments")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub arguments: Option<Vec<crate::runtime::types::CallArgument>>,
#[serde(rename = "silent")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub silent: Option<bool>,
#[serde(rename = "returnByValue")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub return_by_value: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
#[serde(rename = "userGesture")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub user_gesture: Option<bool>,
#[serde(rename = "awaitPromise")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub await_promise: Option<bool>,
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
#[serde(rename = "objectGroup")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_group: Option<String>,
#[serde(rename = "throwOnSideEffect")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub throw_on_side_effect: Option<bool>,
#[serde(rename = "uniqueContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub unique_context_id: Option<String>,
#[serde(rename = "serializationOptions")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub serialization_options: Option<crate::runtime::types::SerializationOptions>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CallFunctionOnParams {
function_declaration: fields.function_declaration,
object_id: fields.object_id,
arguments: fields.arguments,
silent: fields.silent,
return_by_value: fields.return_by_value,
generate_preview: fields.generate_preview,
user_gesture: fields.user_gesture,
await_promise: fields.await_promise,
execution_context_id: fields.execution_context_id,
object_group: fields.object_group,
throw_on_side_effect: fields.throw_on_side_effect,
unique_context_id: fields.unique_context_id,
serialization_options: fields.serialization_options,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct CallFunctionOn;
#[derive(Debug, Clone, serde::Serialize)]
pub struct CallFunctionOnResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: crate::runtime::types::RemoteObject,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
impl<'de> serde::Deserialize<'de> for CallFunctionOnResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CallFunctionOnResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: crate::runtime::types::RemoteObject,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CallFunctionOnResponse {
result: fields.result,
exception_details: fields.exception_details,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for CallFunctionOn {
type Params = CallFunctionOnParams;
type Response = CallFunctionOnResponse;
const METHOD: &'static str = "Runtime.callFunctionOn";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct CompileScriptParams {
#[serde(rename = "expression")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub expression: String,
#[serde(rename = "sourceURL")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub source_url: String,
#[serde(rename = "persistScript")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub persist_script: bool,
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
}
impl<'de> serde::Deserialize<'de> for CompileScriptParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CompileScriptParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "expression")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub expression: String,
#[serde(rename = "sourceURL")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub source_url: String,
#[serde(rename = "persistScript")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub persist_script: bool,
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CompileScriptParams {
expression: fields.expression,
source_url: fields.source_url,
persist_script: fields.persist_script,
execution_context_id: fields.execution_context_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct CompileScript;
#[derive(Debug, Clone, serde::Serialize)]
pub struct CompileScriptResponse {
#[serde(rename = "scriptId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub script_id: Option<crate::runtime::types::ScriptId>,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
impl<'de> serde::Deserialize<'de> for CompileScriptResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CompileScriptResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "scriptId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub script_id: Option<crate::runtime::types::ScriptId>,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CompileScriptResponse {
script_id: fields.script_id,
exception_details: fields.exception_details,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for CompileScript {
type Params = CompileScriptParams;
type Response = CompileScriptResponse;
const METHOD: &'static str = "Runtime.compileScript";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct DisableParams {}
impl<'de> serde::Deserialize<'de> for DisableParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisableParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DisableParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Disable;
#[derive(Debug, Clone, serde::Serialize)]
pub struct DisableResponse {}
impl<'de> serde::Deserialize<'de> for DisableResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisableResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DisableResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Disable {
type Params = DisableParams;
type Response = DisableResponse;
const METHOD: &'static str = "Runtime.disable";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct DiscardConsoleEntriesParams {}
impl<'de> serde::Deserialize<'de> for DiscardConsoleEntriesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DiscardConsoleEntriesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DiscardConsoleEntriesParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct DiscardConsoleEntries;
#[derive(Debug, Clone, serde::Serialize)]
pub struct DiscardConsoleEntriesResponse {}
impl<'de> serde::Deserialize<'de> for DiscardConsoleEntriesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DiscardConsoleEntriesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DiscardConsoleEntriesResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for DiscardConsoleEntries {
type Params = DiscardConsoleEntriesParams;
type Response = DiscardConsoleEntriesResponse;
const METHOD: &'static str = "Runtime.discardConsoleEntries";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct EnableParams {}
impl<'de> serde::Deserialize<'de> for EnableParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Enable;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableResponse {}
impl<'de> serde::Deserialize<'de> for EnableResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EnableResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Enable {
type Params = EnableParams;
type Response = EnableResponse;
const METHOD: &'static str = "Runtime.enable";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct EvaluateParams {
#[serde(rename = "expression")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub expression: String,
#[serde(rename = "objectGroup")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_group: Option<String>,
#[serde(rename = "includeCommandLineAPI")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub include_command_line_api: Option<bool>,
#[serde(rename = "silent")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub silent: Option<bool>,
#[serde(rename = "contextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub context_id: Option<crate::runtime::types::ExecutionContextId>,
#[serde(rename = "returnByValue")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub return_by_value: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
#[serde(rename = "userGesture")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub user_gesture: Option<bool>,
#[serde(rename = "awaitPromise")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub await_promise: Option<bool>,
#[serde(rename = "throwOnSideEffect")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub throw_on_side_effect: Option<bool>,
#[serde(rename = "timeout")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub timeout: Option<crate::runtime::types::TimeDelta>,
#[serde(rename = "disableBreaks")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub disable_breaks: Option<bool>,
#[serde(rename = "replMode")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub repl_mode: Option<bool>,
#[serde(rename = "allowUnsafeEvalBlockedByCSP")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub allow_unsafe_eval_blocked_by_csp: Option<bool>,
#[serde(rename = "uniqueContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub unique_context_id: Option<String>,
#[serde(rename = "serializationOptions")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub serialization_options: Option<crate::runtime::types::SerializationOptions>,
}
impl<'de> serde::Deserialize<'de> for EvaluateParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EvaluateParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "expression")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub expression: String,
#[serde(rename = "objectGroup")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_group: Option<String>,
#[serde(rename = "includeCommandLineAPI")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub include_command_line_api: Option<bool>,
#[serde(rename = "silent")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub silent: Option<bool>,
#[serde(rename = "contextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub context_id: Option<crate::runtime::types::ExecutionContextId>,
#[serde(rename = "returnByValue")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub return_by_value: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
#[serde(rename = "userGesture")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub user_gesture: Option<bool>,
#[serde(rename = "awaitPromise")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub await_promise: Option<bool>,
#[serde(rename = "throwOnSideEffect")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub throw_on_side_effect: Option<bool>,
#[serde(rename = "timeout")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub timeout: Option<crate::runtime::types::TimeDelta>,
#[serde(rename = "disableBreaks")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub disable_breaks: Option<bool>,
#[serde(rename = "replMode")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub repl_mode: Option<bool>,
#[serde(rename = "allowUnsafeEvalBlockedByCSP")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub allow_unsafe_eval_blocked_by_csp: Option<bool>,
#[serde(rename = "uniqueContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub unique_context_id: Option<String>,
#[serde(rename = "serializationOptions")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub serialization_options: Option<crate::runtime::types::SerializationOptions>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EvaluateParams {
expression: fields.expression,
object_group: fields.object_group,
include_command_line_api: fields.include_command_line_api,
silent: fields.silent,
context_id: fields.context_id,
return_by_value: fields.return_by_value,
generate_preview: fields.generate_preview,
user_gesture: fields.user_gesture,
await_promise: fields.await_promise,
throw_on_side_effect: fields.throw_on_side_effect,
timeout: fields.timeout,
disable_breaks: fields.disable_breaks,
repl_mode: fields.repl_mode,
allow_unsafe_eval_blocked_by_csp: fields.allow_unsafe_eval_blocked_by_csp,
unique_context_id: fields.unique_context_id,
serialization_options: fields.serialization_options,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Evaluate;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EvaluateResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: crate::runtime::types::RemoteObject,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
impl<'de> serde::Deserialize<'de> for EvaluateResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EvaluateResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: crate::runtime::types::RemoteObject,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EvaluateResponse {
result: fields.result,
exception_details: fields.exception_details,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Evaluate {
type Params = EvaluateParams;
type Response = EvaluateResponse;
const METHOD: &'static str = "Runtime.evaluate";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetExceptionDetailsParams {
#[serde(rename = "errorObjectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub error_object_id: crate::runtime::types::RemoteObjectId,
}
impl<'de> serde::Deserialize<'de> for GetExceptionDetailsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetExceptionDetailsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "errorObjectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub error_object_id: crate::runtime::types::RemoteObjectId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetExceptionDetailsParams {
error_object_id: fields.error_object_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetExceptionDetails;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetExceptionDetailsResponse {
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
impl<'de> serde::Deserialize<'de> for GetExceptionDetailsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetExceptionDetailsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetExceptionDetailsResponse {
exception_details: fields.exception_details,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetExceptionDetails {
type Params = GetExceptionDetailsParams;
type Response = GetExceptionDetailsResponse;
const METHOD: &'static str = "Runtime.getExceptionDetails";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetHeapUsageParams {}
impl<'de> serde::Deserialize<'de> for GetHeapUsageParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetHeapUsageParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetHeapUsageParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetHeapUsage;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetHeapUsageResponse {
#[serde(rename = "usedSize")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub used_size: ydp_core::FiniteF64,
#[serde(rename = "totalSize")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub total_size: ydp_core::FiniteF64,
#[serde(rename = "embedderHeapUsedSize")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub embedder_heap_used_size: ydp_core::FiniteF64,
#[serde(rename = "backingStorageSize")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub backing_storage_size: ydp_core::FiniteF64,
}
impl<'de> serde::Deserialize<'de> for GetHeapUsageResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetHeapUsageResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "usedSize")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub used_size: ydp_core::FiniteF64,
#[serde(rename = "totalSize")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub total_size: ydp_core::FiniteF64,
#[serde(rename = "embedderHeapUsedSize")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub embedder_heap_used_size: ydp_core::FiniteF64,
#[serde(rename = "backingStorageSize")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub backing_storage_size: ydp_core::FiniteF64,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetHeapUsageResponse {
used_size: fields.used_size,
total_size: fields.total_size,
embedder_heap_used_size: fields.embedder_heap_used_size,
backing_storage_size: fields.backing_storage_size,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetHeapUsage {
type Params = GetHeapUsageParams;
type Response = GetHeapUsageResponse;
const METHOD: &'static str = "Runtime.getHeapUsage";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetIsolateIdParams {}
impl<'de> serde::Deserialize<'de> for GetIsolateIdParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetIsolateIdParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetIsolateIdParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetIsolateId;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetIsolateIdResponse {
#[serde(rename = "id")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub id: String,
}
impl<'de> serde::Deserialize<'de> for GetIsolateIdResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetIsolateIdResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "id")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub id: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetIsolateIdResponse { id: fields.id })
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetIsolateId {
type Params = GetIsolateIdParams;
type Response = GetIsolateIdResponse;
const METHOD: &'static str = "Runtime.getIsolateId";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetPropertiesParams {
#[serde(rename = "objectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub object_id: crate::runtime::types::RemoteObjectId,
#[serde(rename = "ownProperties")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub own_properties: Option<bool>,
#[serde(rename = "accessorPropertiesOnly")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub accessor_properties_only: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
#[serde(rename = "nonIndexedPropertiesOnly")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub non_indexed_properties_only: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for GetPropertiesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetPropertiesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "objectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub object_id: crate::runtime::types::RemoteObjectId,
#[serde(rename = "ownProperties")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub own_properties: Option<bool>,
#[serde(rename = "accessorPropertiesOnly")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub accessor_properties_only: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
#[serde(rename = "nonIndexedPropertiesOnly")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub non_indexed_properties_only: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetPropertiesParams {
object_id: fields.object_id,
own_properties: fields.own_properties,
accessor_properties_only: fields.accessor_properties_only,
generate_preview: fields.generate_preview,
non_indexed_properties_only: fields.non_indexed_properties_only,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetProperties;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetPropertiesResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: Vec<crate::runtime::types::PropertyDescriptor>,
#[serde(rename = "internalProperties")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub internal_properties: Option<Vec<crate::runtime::types::InternalPropertyDescriptor>>,
#[serde(rename = "privateProperties")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub private_properties: Option<Vec<crate::runtime::types::PrivatePropertyDescriptor>>,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
impl<'de> serde::Deserialize<'de> for GetPropertiesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetPropertiesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: Vec<crate::runtime::types::PropertyDescriptor>,
#[serde(rename = "internalProperties")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub internal_properties:
Option<Vec<crate::runtime::types::InternalPropertyDescriptor>>,
#[serde(rename = "privateProperties")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub private_properties:
Option<Vec<crate::runtime::types::PrivatePropertyDescriptor>>,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetPropertiesResponse {
result: fields.result,
internal_properties: fields.internal_properties,
private_properties: fields.private_properties,
exception_details: fields.exception_details,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetProperties {
type Params = GetPropertiesParams;
type Response = GetPropertiesResponse;
const METHOD: &'static str = "Runtime.getProperties";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GlobalLexicalScopeNamesParams {
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
}
impl<'de> serde::Deserialize<'de> for GlobalLexicalScopeNamesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GlobalLexicalScopeNamesParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GlobalLexicalScopeNamesParams {
execution_context_id: fields.execution_context_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GlobalLexicalScopeNames;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GlobalLexicalScopeNamesResponse {
#[serde(rename = "names")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub names: Vec<String>,
}
impl<'de> serde::Deserialize<'de> for GlobalLexicalScopeNamesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GlobalLexicalScopeNamesResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "names")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub names: Vec<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GlobalLexicalScopeNamesResponse {
names: fields.names,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GlobalLexicalScopeNames {
type Params = GlobalLexicalScopeNamesParams;
type Response = GlobalLexicalScopeNamesResponse;
const METHOD: &'static str = "Runtime.globalLexicalScopeNames";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct QueryObjectsParams {
#[serde(rename = "prototypeObjectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub prototype_object_id: crate::runtime::types::RemoteObjectId,
#[serde(rename = "objectGroup")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_group: Option<String>,
}
impl<'de> serde::Deserialize<'de> for QueryObjectsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = QueryObjectsParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "prototypeObjectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub prototype_object_id: crate::runtime::types::RemoteObjectId,
#[serde(rename = "objectGroup")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_group: Option<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(QueryObjectsParams {
prototype_object_id: fields.prototype_object_id,
object_group: fields.object_group,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct QueryObjects;
#[derive(Debug, Clone, serde::Serialize)]
pub struct QueryObjectsResponse {
#[serde(rename = "objects")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub objects: crate::runtime::types::RemoteObject,
}
impl<'de> serde::Deserialize<'de> for QueryObjectsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = QueryObjectsResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "objects")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub objects: crate::runtime::types::RemoteObject,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(QueryObjectsResponse {
objects: fields.objects,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for QueryObjects {
type Params = QueryObjectsParams;
type Response = QueryObjectsResponse;
const METHOD: &'static str = "Runtime.queryObjects";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReleaseObjectParams {
#[serde(rename = "objectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub object_id: crate::runtime::types::RemoteObjectId,
}
impl<'de> serde::Deserialize<'de> for ReleaseObjectParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReleaseObjectParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "objectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub object_id: crate::runtime::types::RemoteObjectId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReleaseObjectParams {
object_id: fields.object_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReleaseObject;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReleaseObjectResponse {}
impl<'de> serde::Deserialize<'de> for ReleaseObjectResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReleaseObjectResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReleaseObjectResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReleaseObject {
type Params = ReleaseObjectParams;
type Response = ReleaseObjectResponse;
const METHOD: &'static str = "Runtime.releaseObject";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReleaseObjectGroupParams {
#[serde(rename = "objectGroup")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub object_group: String,
}
impl<'de> serde::Deserialize<'de> for ReleaseObjectGroupParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReleaseObjectGroupParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "objectGroup")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub object_group: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReleaseObjectGroupParams {
object_group: fields.object_group,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReleaseObjectGroup;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReleaseObjectGroupResponse {}
impl<'de> serde::Deserialize<'de> for ReleaseObjectGroupResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReleaseObjectGroupResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReleaseObjectGroupResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReleaseObjectGroup {
type Params = ReleaseObjectGroupParams;
type Response = ReleaseObjectGroupResponse;
const METHOD: &'static str = "Runtime.releaseObjectGroup";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveBindingParams {
#[serde(rename = "name")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub name: String,
}
impl<'de> serde::Deserialize<'de> for RemoveBindingParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveBindingParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "name")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub name: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RemoveBindingParams { name: fields.name })
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct RemoveBinding;
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveBindingResponse {}
impl<'de> serde::Deserialize<'de> for RemoveBindingResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveBindingResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RemoveBindingResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for RemoveBinding {
type Params = RemoveBindingParams;
type Response = RemoveBindingResponse;
const METHOD: &'static str = "Runtime.removeBinding";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct RunIfWaitingForDebuggerParams {}
impl<'de> serde::Deserialize<'de> for RunIfWaitingForDebuggerParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RunIfWaitingForDebuggerParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RunIfWaitingForDebuggerParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct RunIfWaitingForDebugger;
#[derive(Debug, Clone, serde::Serialize)]
pub struct RunIfWaitingForDebuggerResponse {}
impl<'de> serde::Deserialize<'de> for RunIfWaitingForDebuggerResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RunIfWaitingForDebuggerResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RunIfWaitingForDebuggerResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for RunIfWaitingForDebugger {
type Params = RunIfWaitingForDebuggerParams;
type Response = RunIfWaitingForDebuggerResponse;
const METHOD: &'static str = "Runtime.runIfWaitingForDebugger";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct RunScriptParams {
#[serde(rename = "scriptId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_id: crate::runtime::types::ScriptId,
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
#[serde(rename = "objectGroup")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_group: Option<String>,
#[serde(rename = "silent")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub silent: Option<bool>,
#[serde(rename = "includeCommandLineAPI")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub include_command_line_api: Option<bool>,
#[serde(rename = "returnByValue")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub return_by_value: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
#[serde(rename = "awaitPromise")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub await_promise: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for RunScriptParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RunScriptParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "scriptId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_id: crate::runtime::types::ScriptId,
#[serde(rename = "executionContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub execution_context_id: Option<crate::runtime::types::ExecutionContextId>,
#[serde(rename = "objectGroup")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub object_group: Option<String>,
#[serde(rename = "silent")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub silent: Option<bool>,
#[serde(rename = "includeCommandLineAPI")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub include_command_line_api: Option<bool>,
#[serde(rename = "returnByValue")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub return_by_value: Option<bool>,
#[serde(rename = "generatePreview")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub generate_preview: Option<bool>,
#[serde(rename = "awaitPromise")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub await_promise: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RunScriptParams {
script_id: fields.script_id,
execution_context_id: fields.execution_context_id,
object_group: fields.object_group,
silent: fields.silent,
include_command_line_api: fields.include_command_line_api,
return_by_value: fields.return_by_value,
generate_preview: fields.generate_preview,
await_promise: fields.await_promise,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct RunScript;
#[derive(Debug, Clone, serde::Serialize)]
pub struct RunScriptResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: crate::runtime::types::RemoteObject,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
impl<'de> serde::Deserialize<'de> for RunScriptResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RunScriptResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: crate::runtime::types::RemoteObject,
#[serde(rename = "exceptionDetails")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub exception_details: Option<crate::runtime::types::ExceptionDetails>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RunScriptResponse {
result: fields.result,
exception_details: fields.exception_details,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for RunScript {
type Params = RunScriptParams;
type Response = RunScriptResponse;
const METHOD: &'static str = "Runtime.runScript";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetAsyncCallStackDepthParams {
#[serde(rename = "maxDepth")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub max_depth: i64,
}
impl<'de> serde::Deserialize<'de> for SetAsyncCallStackDepthParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetAsyncCallStackDepthParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "maxDepth")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub max_depth: i64,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetAsyncCallStackDepthParams {
max_depth: fields.max_depth,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetAsyncCallStackDepth;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetAsyncCallStackDepthResponse {}
impl<'de> serde::Deserialize<'de> for SetAsyncCallStackDepthResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetAsyncCallStackDepthResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetAsyncCallStackDepthResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetAsyncCallStackDepth {
type Params = SetAsyncCallStackDepthParams;
type Response = SetAsyncCallStackDepthResponse;
const METHOD: &'static str = "Runtime.setAsyncCallStackDepth";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCustomObjectFormatterEnabledParams {
#[serde(rename = "enabled")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enabled: bool,
}
impl<'de> serde::Deserialize<'de> for SetCustomObjectFormatterEnabledParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCustomObjectFormatterEnabledParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "enabled")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub enabled: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCustomObjectFormatterEnabledParams {
enabled: fields.enabled,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetCustomObjectFormatterEnabled;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetCustomObjectFormatterEnabledResponse {}
impl<'de> serde::Deserialize<'de> for SetCustomObjectFormatterEnabledResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetCustomObjectFormatterEnabledResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetCustomObjectFormatterEnabledResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetCustomObjectFormatterEnabled {
type Params = SetCustomObjectFormatterEnabledParams;
type Response = SetCustomObjectFormatterEnabledResponse;
const METHOD: &'static str = "Runtime.setCustomObjectFormatterEnabled";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetMaxCallStackSizeToCaptureParams {
#[serde(rename = "size")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub size: i64,
}
impl<'de> serde::Deserialize<'de> for SetMaxCallStackSizeToCaptureParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetMaxCallStackSizeToCaptureParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "size")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub size: i64,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetMaxCallStackSizeToCaptureParams { size: fields.size })
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetMaxCallStackSizeToCapture;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetMaxCallStackSizeToCaptureResponse {}
impl<'de> serde::Deserialize<'de> for SetMaxCallStackSizeToCaptureResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetMaxCallStackSizeToCaptureResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetMaxCallStackSizeToCaptureResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetMaxCallStackSizeToCapture {
type Params = SetMaxCallStackSizeToCaptureParams;
type Response = SetMaxCallStackSizeToCaptureResponse;
const METHOD: &'static str = "Runtime.setMaxCallStackSizeToCapture";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct TerminateExecutionParams {}
impl<'de> serde::Deserialize<'de> for TerminateExecutionParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = TerminateExecutionParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(TerminateExecutionParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct TerminateExecution;
#[derive(Debug, Clone, serde::Serialize)]
pub struct TerminateExecutionResponse {}
impl<'de> serde::Deserialize<'de> for TerminateExecutionResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = TerminateExecutionResponse;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(TerminateExecutionResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for TerminateExecution {
type Params = TerminateExecutionParams;
type Response = TerminateExecutionResponse;
const METHOD: &'static str = "Runtime.terminateExecution";
}