#[derive(Debug, Clone, serde::Serialize)]
pub struct ActivateTargetParams {
#[serde(rename = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
impl<'de> serde::Deserialize<'de> for ActivateTargetParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ActivateTargetParams;
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 = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ActivateTargetParams {
target_id: fields.target_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ActivateTarget;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ActivateTargetResponse {}
impl<'de> serde::Deserialize<'de> for ActivateTargetResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ActivateTargetResponse;
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(ActivateTargetResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ActivateTarget {
type Params = ActivateTargetParams;
type Response = ActivateTargetResponse;
const METHOD: &'static str = "Target.activateTarget";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct AttachToBrowserTargetParams {}
impl<'de> serde::Deserialize<'de> for AttachToBrowserTargetParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AttachToBrowserTargetParams;
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(AttachToBrowserTargetParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AttachToBrowserTarget;
#[derive(Debug, Clone, serde::Serialize)]
pub struct AttachToBrowserTargetResponse {
#[serde(rename = "sessionId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub session_id: crate::target::types::SessionId,
}
impl<'de> serde::Deserialize<'de> for AttachToBrowserTargetResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AttachToBrowserTargetResponse;
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 = "sessionId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub session_id: crate::target::types::SessionId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AttachToBrowserTargetResponse {
session_id: fields.session_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for AttachToBrowserTarget {
type Params = AttachToBrowserTargetParams;
type Response = AttachToBrowserTargetResponse;
const METHOD: &'static str = "Target.attachToBrowserTarget";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct AttachToTargetParams {
#[serde(rename = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
#[serde(rename = "flatten")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub flatten: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for AttachToTargetParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AttachToTargetParams;
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 = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
#[serde(rename = "flatten")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub flatten: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AttachToTargetParams {
target_id: fields.target_id,
flatten: fields.flatten,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AttachToTarget;
#[derive(Debug, Clone, serde::Serialize)]
pub struct AttachToTargetResponse {
#[serde(rename = "sessionId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub session_id: crate::target::types::SessionId,
}
impl<'de> serde::Deserialize<'de> for AttachToTargetResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AttachToTargetResponse;
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 = "sessionId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub session_id: crate::target::types::SessionId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AttachToTargetResponse {
session_id: fields.session_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for AttachToTarget {
type Params = AttachToTargetParams;
type Response = AttachToTargetResponse;
const METHOD: &'static str = "Target.attachToTarget";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct AutoAttachRelatedParams {
#[serde(rename = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
#[serde(rename = "waitForDebuggerOnStart")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub wait_for_debugger_on_start: bool,
#[serde(rename = "filter")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub filter: Option<crate::target::types::TargetFilter>,
}
impl<'de> serde::Deserialize<'de> for AutoAttachRelatedParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AutoAttachRelatedParams;
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 = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
#[serde(rename = "waitForDebuggerOnStart")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub wait_for_debugger_on_start: bool,
#[serde(rename = "filter")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub filter: Option<crate::target::types::TargetFilter>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AutoAttachRelatedParams {
target_id: fields.target_id,
wait_for_debugger_on_start: fields.wait_for_debugger_on_start,
filter: fields.filter,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AutoAttachRelated;
#[derive(Debug, Clone, serde::Serialize)]
pub struct AutoAttachRelatedResponse {}
impl<'de> serde::Deserialize<'de> for AutoAttachRelatedResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AutoAttachRelatedResponse;
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(AutoAttachRelatedResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for AutoAttachRelated {
type Params = AutoAttachRelatedParams;
type Response = AutoAttachRelatedResponse;
const METHOD: &'static str = "Target.autoAttachRelated";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct CloseTargetParams {
#[serde(rename = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
impl<'de> serde::Deserialize<'de> for CloseTargetParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CloseTargetParams;
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 = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CloseTargetParams {
target_id: fields.target_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct CloseTarget;
#[derive(Debug, Clone, serde::Serialize)]
pub struct CloseTargetResponse {
#[serde(rename = "success")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub success: bool,
}
impl<'de> serde::Deserialize<'de> for CloseTargetResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CloseTargetResponse;
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 = "success")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub success: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CloseTargetResponse {
success: fields.success,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for CloseTarget {
type Params = CloseTargetParams;
type Response = CloseTargetResponse;
const METHOD: &'static str = "Target.closeTarget";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct CreateBrowserContextParams {
#[serde(rename = "disposeOnDetach")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub dispose_on_detach: Option<bool>,
#[serde(rename = "proxyServer")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub proxy_server: Option<String>,
#[serde(rename = "proxyBypassList")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub proxy_bypass_list: Option<String>,
#[serde(rename = "originsWithUniversalNetworkAccess")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub origins_with_universal_network_access: Option<Vec<String>>,
}
impl<'de> serde::Deserialize<'de> for CreateBrowserContextParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CreateBrowserContextParams;
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 = "disposeOnDetach")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub dispose_on_detach: Option<bool>,
#[serde(rename = "proxyServer")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub proxy_server: Option<String>,
#[serde(rename = "proxyBypassList")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub proxy_bypass_list: Option<String>,
#[serde(rename = "originsWithUniversalNetworkAccess")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub origins_with_universal_network_access: Option<Vec<String>>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CreateBrowserContextParams {
dispose_on_detach: fields.dispose_on_detach,
proxy_server: fields.proxy_server,
proxy_bypass_list: fields.proxy_bypass_list,
origins_with_universal_network_access: fields
.origins_with_universal_network_access,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct CreateBrowserContext;
#[derive(Debug, Clone, serde::Serialize)]
pub struct CreateBrowserContextResponse {
#[serde(rename = "browserContextId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub browser_context_id: crate::browser::types::BrowserContextId,
}
impl<'de> serde::Deserialize<'de> for CreateBrowserContextResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CreateBrowserContextResponse;
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 = "browserContextId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub browser_context_id: crate::browser::types::BrowserContextId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CreateBrowserContextResponse {
browser_context_id: fields.browser_context_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for CreateBrowserContext {
type Params = CreateBrowserContextParams;
type Response = CreateBrowserContextResponse;
const METHOD: &'static str = "Target.createBrowserContext";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct CreateTargetParams {
#[serde(rename = "url")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub url: String,
#[serde(rename = "left")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub left: Option<i64>,
#[serde(rename = "top")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub top: Option<i64>,
#[serde(rename = "width")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub width: Option<i64>,
#[serde(rename = "height")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub height: Option<i64>,
#[serde(rename = "windowState")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub window_state: Option<crate::target::types::WindowState>,
#[serde(rename = "browserContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub browser_context_id: Option<crate::browser::types::BrowserContextId>,
#[serde(rename = "enableBeginFrameControl")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub enable_begin_frame_control: Option<bool>,
#[serde(rename = "newWindow")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub new_window: Option<bool>,
#[serde(rename = "background")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub background: Option<bool>,
#[serde(rename = "forTab")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub for_tab: Option<bool>,
#[serde(rename = "hidden")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub hidden: Option<bool>,
#[serde(rename = "focus")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub focus: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for CreateTargetParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CreateTargetParams;
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 = "url")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub url: String,
#[serde(rename = "left")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub left: Option<i64>,
#[serde(rename = "top")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub top: Option<i64>,
#[serde(rename = "width")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub width: Option<i64>,
#[serde(rename = "height")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub height: Option<i64>,
#[serde(rename = "windowState")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub window_state: Option<crate::target::types::WindowState>,
#[serde(rename = "browserContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub browser_context_id: Option<crate::browser::types::BrowserContextId>,
#[serde(rename = "enableBeginFrameControl")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub enable_begin_frame_control: Option<bool>,
#[serde(rename = "newWindow")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub new_window: Option<bool>,
#[serde(rename = "background")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub background: Option<bool>,
#[serde(rename = "forTab")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub for_tab: Option<bool>,
#[serde(rename = "hidden")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub hidden: Option<bool>,
#[serde(rename = "focus")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub focus: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CreateTargetParams {
url: fields.url,
left: fields.left,
top: fields.top,
width: fields.width,
height: fields.height,
window_state: fields.window_state,
browser_context_id: fields.browser_context_id,
enable_begin_frame_control: fields.enable_begin_frame_control,
new_window: fields.new_window,
background: fields.background,
for_tab: fields.for_tab,
hidden: fields.hidden,
focus: fields.focus,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct CreateTarget;
#[derive(Debug, Clone, serde::Serialize)]
pub struct CreateTargetResponse {
#[serde(rename = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
impl<'de> serde::Deserialize<'de> for CreateTargetResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = CreateTargetResponse;
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 = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(CreateTargetResponse {
target_id: fields.target_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for CreateTarget {
type Params = CreateTargetParams;
type Response = CreateTargetResponse;
const METHOD: &'static str = "Target.createTarget";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct DetachFromTargetParams {
#[serde(rename = "sessionId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub session_id: Option<crate::target::types::SessionId>,
#[serde(rename = "targetId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_id: Option<crate::target::types::TargetId>,
}
impl<'de> serde::Deserialize<'de> for DetachFromTargetParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DetachFromTargetParams;
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 = "sessionId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub session_id: Option<crate::target::types::SessionId>,
#[serde(rename = "targetId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_id: Option<crate::target::types::TargetId>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DetachFromTargetParams {
session_id: fields.session_id,
target_id: fields.target_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct DetachFromTarget;
#[derive(Debug, Clone, serde::Serialize)]
pub struct DetachFromTargetResponse {}
impl<'de> serde::Deserialize<'de> for DetachFromTargetResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DetachFromTargetResponse;
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(DetachFromTargetResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for DetachFromTarget {
type Params = DetachFromTargetParams;
type Response = DetachFromTargetResponse;
const METHOD: &'static str = "Target.detachFromTarget";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct DisposeBrowserContextParams {
#[serde(rename = "browserContextId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub browser_context_id: crate::browser::types::BrowserContextId,
}
impl<'de> serde::Deserialize<'de> for DisposeBrowserContextParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisposeBrowserContextParams;
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 = "browserContextId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub browser_context_id: crate::browser::types::BrowserContextId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DisposeBrowserContextParams {
browser_context_id: fields.browser_context_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct DisposeBrowserContext;
#[derive(Debug, Clone, serde::Serialize)]
pub struct DisposeBrowserContextResponse {}
impl<'de> serde::Deserialize<'de> for DisposeBrowserContextResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisposeBrowserContextResponse;
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(DisposeBrowserContextResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for DisposeBrowserContext {
type Params = DisposeBrowserContextParams;
type Response = DisposeBrowserContextResponse;
const METHOD: &'static str = "Target.disposeBrowserContext";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ExposeDevToolsProtocolParams {
#[serde(rename = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
#[serde(rename = "bindingName")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub binding_name: Option<String>,
#[serde(rename = "inheritPermissions")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub inherit_permissions: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for ExposeDevToolsProtocolParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ExposeDevToolsProtocolParams;
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 = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
#[serde(rename = "bindingName")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub binding_name: Option<String>,
#[serde(rename = "inheritPermissions")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub inherit_permissions: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ExposeDevToolsProtocolParams {
target_id: fields.target_id,
binding_name: fields.binding_name,
inherit_permissions: fields.inherit_permissions,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ExposeDevToolsProtocol;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ExposeDevToolsProtocolResponse {}
impl<'de> serde::Deserialize<'de> for ExposeDevToolsProtocolResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ExposeDevToolsProtocolResponse;
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(ExposeDevToolsProtocolResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ExposeDevToolsProtocol {
type Params = ExposeDevToolsProtocolParams;
type Response = ExposeDevToolsProtocolResponse;
const METHOD: &'static str = "Target.exposeDevToolsProtocol";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetBrowserContextsParams {}
impl<'de> serde::Deserialize<'de> for GetBrowserContextsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetBrowserContextsParams;
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(GetBrowserContextsParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetBrowserContexts;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetBrowserContextsResponse {
#[serde(rename = "browserContextIds")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub browser_context_ids: Vec<crate::browser::types::BrowserContextId>,
#[serde(rename = "defaultBrowserContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub default_browser_context_id: Option<crate::browser::types::BrowserContextId>,
}
impl<'de> serde::Deserialize<'de> for GetBrowserContextsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetBrowserContextsResponse;
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 = "browserContextIds")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub browser_context_ids: Vec<crate::browser::types::BrowserContextId>,
#[serde(rename = "defaultBrowserContextId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub default_browser_context_id: Option<crate::browser::types::BrowserContextId>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetBrowserContextsResponse {
browser_context_ids: fields.browser_context_ids,
default_browser_context_id: fields.default_browser_context_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetBrowserContexts {
type Params = GetBrowserContextsParams;
type Response = GetBrowserContextsResponse;
const METHOD: &'static str = "Target.getBrowserContexts";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetDevToolsTargetParams {
#[serde(rename = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
impl<'de> serde::Deserialize<'de> for GetDevToolsTargetParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetDevToolsTargetParams;
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 = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetDevToolsTargetParams {
target_id: fields.target_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetDevToolsTarget;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetDevToolsTargetResponse {
#[serde(rename = "targetId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_id: Option<crate::target::types::TargetId>,
}
impl<'de> serde::Deserialize<'de> for GetDevToolsTargetResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetDevToolsTargetResponse;
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 = "targetId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_id: Option<crate::target::types::TargetId>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetDevToolsTargetResponse {
target_id: fields.target_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetDevToolsTarget {
type Params = GetDevToolsTargetParams;
type Response = GetDevToolsTargetResponse;
const METHOD: &'static str = "Target.getDevToolsTarget";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetTargetInfoParams {
#[serde(rename = "targetId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_id: Option<crate::target::types::TargetId>,
}
impl<'de> serde::Deserialize<'de> for GetTargetInfoParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetTargetInfoParams;
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 = "targetId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_id: Option<crate::target::types::TargetId>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetTargetInfoParams {
target_id: fields.target_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetTargetInfo;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetTargetInfoResponse {
#[serde(rename = "targetInfo")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_info: crate::target::types::TargetInfo,
}
impl<'de> serde::Deserialize<'de> for GetTargetInfoResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetTargetInfoResponse;
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 = "targetInfo")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_info: crate::target::types::TargetInfo,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetTargetInfoResponse {
target_info: fields.target_info,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetTargetInfo {
type Params = GetTargetInfoParams;
type Response = GetTargetInfoResponse;
const METHOD: &'static str = "Target.getTargetInfo";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetTargetsParams {
#[serde(rename = "filter")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub filter: Option<crate::target::types::TargetFilter>,
}
impl<'de> serde::Deserialize<'de> for GetTargetsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetTargetsParams;
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 = "filter")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub filter: Option<crate::target::types::TargetFilter>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetTargetsParams {
filter: fields.filter,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetTargets;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetTargetsResponse {
#[serde(rename = "targetInfos")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_infos: Vec<crate::target::types::TargetInfo>,
}
impl<'de> serde::Deserialize<'de> for GetTargetsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetTargetsResponse;
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 = "targetInfos")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_infos: Vec<crate::target::types::TargetInfo>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetTargetsResponse {
target_infos: fields.target_infos,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetTargets {
type Params = GetTargetsParams;
type Response = GetTargetsResponse;
const METHOD: &'static str = "Target.getTargets";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct OpenDevToolsParams {
#[serde(rename = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
#[serde(rename = "panelId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub panel_id: Option<String>,
}
impl<'de> serde::Deserialize<'de> for OpenDevToolsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = OpenDevToolsParams;
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 = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
#[serde(rename = "panelId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub panel_id: Option<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(OpenDevToolsParams {
target_id: fields.target_id,
panel_id: fields.panel_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct OpenDevTools;
#[derive(Debug, Clone, serde::Serialize)]
pub struct OpenDevToolsResponse {
#[serde(rename = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
impl<'de> serde::Deserialize<'de> for OpenDevToolsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = OpenDevToolsResponse;
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 = "targetId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub target_id: crate::target::types::TargetId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(OpenDevToolsResponse {
target_id: fields.target_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for OpenDevTools {
type Params = OpenDevToolsParams;
type Response = OpenDevToolsResponse;
const METHOD: &'static str = "Target.openDevTools";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SendMessageToTargetParams {
#[serde(rename = "message")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub message: String,
#[serde(rename = "sessionId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub session_id: Option<crate::target::types::SessionId>,
#[serde(rename = "targetId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_id: Option<crate::target::types::TargetId>,
}
impl<'de> serde::Deserialize<'de> for SendMessageToTargetParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SendMessageToTargetParams;
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 = "message")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub message: String,
#[serde(rename = "sessionId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub session_id: Option<crate::target::types::SessionId>,
#[serde(rename = "targetId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_id: Option<crate::target::types::TargetId>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SendMessageToTargetParams {
message: fields.message,
session_id: fields.session_id,
target_id: fields.target_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SendMessageToTarget;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SendMessageToTargetResponse {}
impl<'de> serde::Deserialize<'de> for SendMessageToTargetResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SendMessageToTargetResponse;
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(SendMessageToTargetResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SendMessageToTarget {
type Params = SendMessageToTargetParams;
type Response = SendMessageToTargetResponse;
const METHOD: &'static str = "Target.sendMessageToTarget";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetAutoAttachParams {
#[serde(rename = "autoAttach")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub auto_attach: bool,
#[serde(rename = "waitForDebuggerOnStart")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub wait_for_debugger_on_start: bool,
#[serde(rename = "flatten")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub flatten: Option<bool>,
#[serde(rename = "filter")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub filter: Option<crate::target::types::TargetFilter>,
}
impl<'de> serde::Deserialize<'de> for SetAutoAttachParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetAutoAttachParams;
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 = "autoAttach")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub auto_attach: bool,
#[serde(rename = "waitForDebuggerOnStart")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub wait_for_debugger_on_start: bool,
#[serde(rename = "flatten")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub flatten: Option<bool>,
#[serde(rename = "filter")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub filter: Option<crate::target::types::TargetFilter>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetAutoAttachParams {
auto_attach: fields.auto_attach,
wait_for_debugger_on_start: fields.wait_for_debugger_on_start,
flatten: fields.flatten,
filter: fields.filter,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetAutoAttach;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetAutoAttachResponse {}
impl<'de> serde::Deserialize<'de> for SetAutoAttachResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetAutoAttachResponse;
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(SetAutoAttachResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetAutoAttach {
type Params = SetAutoAttachParams;
type Response = SetAutoAttachResponse;
const METHOD: &'static str = "Target.setAutoAttach";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetDiscoverTargetsParams {
#[serde(rename = "discover")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub discover: bool,
#[serde(rename = "filter")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub filter: Option<crate::target::types::TargetFilter>,
}
impl<'de> serde::Deserialize<'de> for SetDiscoverTargetsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetDiscoverTargetsParams;
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 = "discover")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub discover: bool,
#[serde(rename = "filter")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub filter: Option<crate::target::types::TargetFilter>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetDiscoverTargetsParams {
discover: fields.discover,
filter: fields.filter,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetDiscoverTargets;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetDiscoverTargetsResponse {}
impl<'de> serde::Deserialize<'de> for SetDiscoverTargetsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetDiscoverTargetsResponse;
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(SetDiscoverTargetsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetDiscoverTargets {
type Params = SetDiscoverTargetsParams;
type Response = SetDiscoverTargetsResponse;
const METHOD: &'static str = "Target.setDiscoverTargets";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetRemoteLocationsParams {
#[serde(rename = "locations")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub locations: Vec<crate::target::types::RemoteLocation>,
}
impl<'de> serde::Deserialize<'de> for SetRemoteLocationsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetRemoteLocationsParams;
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 = "locations")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub locations: Vec<crate::target::types::RemoteLocation>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetRemoteLocationsParams {
locations: fields.locations,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetRemoteLocations;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetRemoteLocationsResponse {}
impl<'de> serde::Deserialize<'de> for SetRemoteLocationsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetRemoteLocationsResponse;
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(SetRemoteLocationsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetRemoteLocations {
type Params = SetRemoteLocationsParams;
type Response = SetRemoteLocationsResponse;
const METHOD: &'static str = "Target.setRemoteLocations";
}