#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum ContinueToLocationParamsTargetCallFrames {
Any,
Current,
Unknown(String),
}
impl ContinueToLocationParamsTargetCallFrames {
pub fn as_str(&self) -> &str {
match self {
Self::Any => "any",
Self::Current => "current",
Self::Unknown(value) => value,
}
}
}
impl AsRef<str> for ContinueToLocationParamsTargetCallFrames {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl From<String> for ContinueToLocationParamsTargetCallFrames {
fn from(value: String) -> Self {
match value.as_str() {
"any" => ContinueToLocationParamsTargetCallFrames::Any,
"current" => ContinueToLocationParamsTargetCallFrames::Current,
_ => Self::Unknown(value),
}
}
}
impl serde::Serialize for ContinueToLocationParamsTargetCallFrames {
fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
s.serialize_str(self.as_str())
}
}
impl<'de> serde::Deserialize<'de> for ContinueToLocationParamsTargetCallFrames {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ContinueToLocationParamsTargetCallFrames;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议字符串枚举")
}
fn visit_str<E: serde::de::Error>(self, v: &str) -> Result<Self::Value, E> {
Ok(match v {
"any" => ContinueToLocationParamsTargetCallFrames::Any,
"current" => ContinueToLocationParamsTargetCallFrames::Current,
_ => ContinueToLocationParamsTargetCallFrames::Unknown(v.to_owned()),
})
}
fn visit_string<E: serde::de::Error>(self, v: String) -> Result<Self::Value, E> {
Ok(ContinueToLocationParamsTargetCallFrames::from(v))
}
}
d.deserialize_str(Visitor)
}
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ContinueToLocationParams {
#[serde(rename = "location")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub location: crate::debugger::types::Location,
#[serde(rename = "targetCallFrames")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_call_frames: Option<ContinueToLocationParamsTargetCallFrames>,
}
impl<'de> serde::Deserialize<'de> for ContinueToLocationParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ContinueToLocationParams;
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 = "location")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub location: crate::debugger::types::Location,
#[serde(rename = "targetCallFrames")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub target_call_frames: Option<ContinueToLocationParamsTargetCallFrames>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ContinueToLocationParams {
location: fields.location,
target_call_frames: fields.target_call_frames,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ContinueToLocation;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ContinueToLocationResponse {}
impl<'de> serde::Deserialize<'de> for ContinueToLocationResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ContinueToLocationResponse;
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(ContinueToLocationResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ContinueToLocation {
type Params = ContinueToLocationParams;
type Response = ContinueToLocationResponse;
const METHOD: &'static str = "Debugger.continueToLocation";
}
#[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 = "Debugger.disable";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct DisassembleWasmModuleParams {
#[serde(rename = "scriptId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_id: crate::runtime::types::ScriptId,
}
impl<'de> serde::Deserialize<'de> for DisassembleWasmModuleParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisassembleWasmModuleParams;
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,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DisassembleWasmModuleParams {
script_id: fields.script_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct DisassembleWasmModule;
#[derive(Debug, Clone, serde::Serialize)]
pub struct DisassembleWasmModuleResponse {
#[serde(rename = "streamId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub stream_id: Option<String>,
#[serde(rename = "totalNumberOfLines")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub total_number_of_lines: i64,
#[serde(rename = "functionBodyOffsets")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub function_body_offsets: Vec<i64>,
#[serde(rename = "chunk")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub chunk: crate::debugger::types::WasmDisassemblyChunk,
}
impl<'de> serde::Deserialize<'de> for DisassembleWasmModuleResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = DisassembleWasmModuleResponse;
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 = "streamId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub stream_id: Option<String>,
#[serde(rename = "totalNumberOfLines")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub total_number_of_lines: i64,
#[serde(rename = "functionBodyOffsets")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub function_body_offsets: Vec<i64>,
#[serde(rename = "chunk")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub chunk: crate::debugger::types::WasmDisassemblyChunk,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(DisassembleWasmModuleResponse {
stream_id: fields.stream_id,
total_number_of_lines: fields.total_number_of_lines,
function_body_offsets: fields.function_body_offsets,
chunk: fields.chunk,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for DisassembleWasmModule {
type Params = DisassembleWasmModuleParams;
type Response = DisassembleWasmModuleResponse;
const METHOD: &'static str = "Debugger.disassembleWasmModule";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct EnableParams {
#[serde(rename = "maxScriptsCacheSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_scripts_cache_size: Option<ydp_core::FiniteF64>,
}
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 {
#[serde(rename = "maxScriptsCacheSize")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub max_scripts_cache_size: Option<ydp_core::FiniteF64>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableParams {
max_scripts_cache_size: fields.max_scripts_cache_size,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Enable;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableResponse {
#[serde(rename = "debuggerId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub debugger_id: crate::runtime::types::UniqueDebuggerId,
}
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 {
#[serde(rename = "debuggerId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub debugger_id: crate::runtime::types::UniqueDebuggerId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableResponse {
debugger_id: fields.debugger_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Enable {
type Params = EnableParams;
type Response = EnableResponse;
const METHOD: &'static str = "Debugger.enable";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct EvaluateOnCallFrameParams {
#[serde(rename = "callFrameId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub call_frame_id: crate::debugger::types::CallFrameId,
#[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 = "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 = "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 = "scopeNumber")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub scope_number: Option<i64>,
}
impl<'de> serde::Deserialize<'de> for EvaluateOnCallFrameParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EvaluateOnCallFrameParams;
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 = "callFrameId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub call_frame_id: crate::debugger::types::CallFrameId,
#[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 = "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 = "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 = "scopeNumber")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub scope_number: Option<i64>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EvaluateOnCallFrameParams {
call_frame_id: fields.call_frame_id,
expression: fields.expression,
object_group: fields.object_group,
include_command_line_api: fields.include_command_line_api,
silent: fields.silent,
return_by_value: fields.return_by_value,
generate_preview: fields.generate_preview,
throw_on_side_effect: fields.throw_on_side_effect,
timeout: fields.timeout,
scope_number: fields.scope_number,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct EvaluateOnCallFrame;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EvaluateOnCallFrameResponse {
#[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 EvaluateOnCallFrameResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = EvaluateOnCallFrameResponse;
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(EvaluateOnCallFrameResponse {
result: fields.result,
exception_details: fields.exception_details,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for EvaluateOnCallFrame {
type Params = EvaluateOnCallFrameParams;
type Response = EvaluateOnCallFrameResponse;
const METHOD: &'static str = "Debugger.evaluateOnCallFrame";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetPossibleBreakpointsParams {
#[serde(rename = "start")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub start: crate::debugger::types::Location,
#[serde(rename = "end")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub end: Option<crate::debugger::types::Location>,
#[serde(rename = "restrictToFunction")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub restrict_to_function: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for GetPossibleBreakpointsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetPossibleBreakpointsParams;
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 = "start")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub start: crate::debugger::types::Location,
#[serde(rename = "end")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub end: Option<crate::debugger::types::Location>,
#[serde(rename = "restrictToFunction")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub restrict_to_function: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetPossibleBreakpointsParams {
start: fields.start,
end: fields.end,
restrict_to_function: fields.restrict_to_function,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetPossibleBreakpoints;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetPossibleBreakpointsResponse {
#[serde(rename = "locations")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub locations: Vec<crate::debugger::types::BreakLocation>,
}
impl<'de> serde::Deserialize<'de> for GetPossibleBreakpointsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetPossibleBreakpointsResponse;
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::debugger::types::BreakLocation>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetPossibleBreakpointsResponse {
locations: fields.locations,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetPossibleBreakpoints {
type Params = GetPossibleBreakpointsParams;
type Response = GetPossibleBreakpointsResponse;
const METHOD: &'static str = "Debugger.getPossibleBreakpoints";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetScriptSourceParams {
#[serde(rename = "scriptId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_id: crate::runtime::types::ScriptId,
}
impl<'de> serde::Deserialize<'de> for GetScriptSourceParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetScriptSourceParams;
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,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetScriptSourceParams {
script_id: fields.script_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetScriptSource;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetScriptSourceResponse {
#[serde(rename = "scriptSource")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_source: String,
#[serde(rename = "bytecode")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub bytecode: Option<String>,
}
impl<'de> serde::Deserialize<'de> for GetScriptSourceResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetScriptSourceResponse;
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 = "scriptSource")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_source: String,
#[serde(rename = "bytecode")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub bytecode: Option<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetScriptSourceResponse {
script_source: fields.script_source,
bytecode: fields.bytecode,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetScriptSource {
type Params = GetScriptSourceParams;
type Response = GetScriptSourceResponse;
const METHOD: &'static str = "Debugger.getScriptSource";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetStackTraceParams {
#[serde(rename = "stackTraceId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub stack_trace_id: crate::runtime::types::StackTraceId,
}
impl<'de> serde::Deserialize<'de> for GetStackTraceParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetStackTraceParams;
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 = "stackTraceId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub stack_trace_id: crate::runtime::types::StackTraceId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetStackTraceParams {
stack_trace_id: fields.stack_trace_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetStackTrace;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetStackTraceResponse {
#[serde(rename = "stackTrace")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub stack_trace: crate::runtime::types::StackTrace,
}
impl<'de> serde::Deserialize<'de> for GetStackTraceResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetStackTraceResponse;
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 = "stackTrace")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub stack_trace: crate::runtime::types::StackTrace,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetStackTraceResponse {
stack_trace: fields.stack_trace,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetStackTrace {
type Params = GetStackTraceParams;
type Response = GetStackTraceResponse;
const METHOD: &'static str = "Debugger.getStackTrace";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetWasmBytecodeParams {
#[serde(rename = "scriptId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_id: crate::runtime::types::ScriptId,
}
impl<'de> serde::Deserialize<'de> for GetWasmBytecodeParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetWasmBytecodeParams;
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,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetWasmBytecodeParams {
script_id: fields.script_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetWasmBytecode;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetWasmBytecodeResponse {
#[serde(rename = "bytecode")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub bytecode: String,
}
impl<'de> serde::Deserialize<'de> for GetWasmBytecodeResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetWasmBytecodeResponse;
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 = "bytecode")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub bytecode: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetWasmBytecodeResponse {
bytecode: fields.bytecode,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetWasmBytecode {
type Params = GetWasmBytecodeParams;
type Response = GetWasmBytecodeResponse;
const METHOD: &'static str = "Debugger.getWasmBytecode";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct NextWasmDisassemblyChunkParams {
#[serde(rename = "streamId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub stream_id: String,
}
impl<'de> serde::Deserialize<'de> for NextWasmDisassemblyChunkParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = NextWasmDisassemblyChunkParams;
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 = "streamId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub stream_id: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(NextWasmDisassemblyChunkParams {
stream_id: fields.stream_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct NextWasmDisassemblyChunk;
#[derive(Debug, Clone, serde::Serialize)]
pub struct NextWasmDisassemblyChunkResponse {
#[serde(rename = "chunk")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub chunk: crate::debugger::types::WasmDisassemblyChunk,
}
impl<'de> serde::Deserialize<'de> for NextWasmDisassemblyChunkResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = NextWasmDisassemblyChunkResponse;
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 = "chunk")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub chunk: crate::debugger::types::WasmDisassemblyChunk,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(NextWasmDisassemblyChunkResponse {
chunk: fields.chunk,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for NextWasmDisassemblyChunk {
type Params = NextWasmDisassemblyChunkParams;
type Response = NextWasmDisassemblyChunkResponse;
const METHOD: &'static str = "Debugger.nextWasmDisassemblyChunk";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct PauseParams {}
impl<'de> serde::Deserialize<'de> for PauseParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = PauseParams;
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(PauseParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Pause;
#[derive(Debug, Clone, serde::Serialize)]
pub struct PauseResponse {}
impl<'de> serde::Deserialize<'de> for PauseResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = PauseResponse;
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(PauseResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Pause {
type Params = PauseParams;
type Response = PauseResponse;
const METHOD: &'static str = "Debugger.pause";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct PauseOnAsyncCallParams {
#[serde(rename = "parentStackTraceId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub parent_stack_trace_id: crate::runtime::types::StackTraceId,
}
impl<'de> serde::Deserialize<'de> for PauseOnAsyncCallParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = PauseOnAsyncCallParams;
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 = "parentStackTraceId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub parent_stack_trace_id: crate::runtime::types::StackTraceId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(PauseOnAsyncCallParams {
parent_stack_trace_id: fields.parent_stack_trace_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct PauseOnAsyncCall;
#[derive(Debug, Clone, serde::Serialize)]
pub struct PauseOnAsyncCallResponse {}
impl<'de> serde::Deserialize<'de> for PauseOnAsyncCallResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = PauseOnAsyncCallResponse;
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(PauseOnAsyncCallResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for PauseOnAsyncCall {
type Params = PauseOnAsyncCallParams;
type Response = PauseOnAsyncCallResponse;
const METHOD: &'static str = "Debugger.pauseOnAsyncCall";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveBreakpointParams {
#[serde(rename = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
}
impl<'de> serde::Deserialize<'de> for RemoveBreakpointParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveBreakpointParams;
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 = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RemoveBreakpointParams {
breakpoint_id: fields.breakpoint_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct RemoveBreakpoint;
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveBreakpointResponse {}
impl<'de> serde::Deserialize<'de> for RemoveBreakpointResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveBreakpointResponse;
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(RemoveBreakpointResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for RemoveBreakpoint {
type Params = RemoveBreakpointParams;
type Response = RemoveBreakpointResponse;
const METHOD: &'static str = "Debugger.removeBreakpoint";
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum RestartFrameParamsMode {
StepInto,
Unknown(String),
}
impl RestartFrameParamsMode {
pub fn as_str(&self) -> &str {
match self {
Self::StepInto => "StepInto",
Self::Unknown(value) => value,
}
}
}
impl AsRef<str> for RestartFrameParamsMode {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl From<String> for RestartFrameParamsMode {
fn from(value: String) -> Self {
match value.as_str() {
"StepInto" => RestartFrameParamsMode::StepInto,
_ => Self::Unknown(value),
}
}
}
impl serde::Serialize for RestartFrameParamsMode {
fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
s.serialize_str(self.as_str())
}
}
impl<'de> serde::Deserialize<'de> for RestartFrameParamsMode {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RestartFrameParamsMode;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议字符串枚举")
}
fn visit_str<E: serde::de::Error>(self, v: &str) -> Result<Self::Value, E> {
Ok(match v {
"StepInto" => RestartFrameParamsMode::StepInto,
_ => RestartFrameParamsMode::Unknown(v.to_owned()),
})
}
fn visit_string<E: serde::de::Error>(self, v: String) -> Result<Self::Value, E> {
Ok(RestartFrameParamsMode::from(v))
}
}
d.deserialize_str(Visitor)
}
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct RestartFrameParams {
#[serde(rename = "callFrameId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub call_frame_id: crate::debugger::types::CallFrameId,
#[serde(rename = "mode")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub mode: Option<RestartFrameParamsMode>,
}
impl<'de> serde::Deserialize<'de> for RestartFrameParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RestartFrameParams;
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 = "callFrameId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub call_frame_id: crate::debugger::types::CallFrameId,
#[serde(rename = "mode")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub mode: Option<RestartFrameParamsMode>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RestartFrameParams {
call_frame_id: fields.call_frame_id,
mode: fields.mode,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct RestartFrame;
#[derive(Debug, Clone, serde::Serialize)]
pub struct RestartFrameResponse {
#[serde(rename = "callFrames")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub call_frames: Vec<crate::debugger::types::CallFrame>,
#[serde(rename = "asyncStackTrace")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub async_stack_trace: Option<crate::runtime::types::StackTrace>,
#[serde(rename = "asyncStackTraceId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub async_stack_trace_id: Option<crate::runtime::types::StackTraceId>,
}
impl<'de> serde::Deserialize<'de> for RestartFrameResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RestartFrameResponse;
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 = "callFrames")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub call_frames: Vec<crate::debugger::types::CallFrame>,
#[serde(rename = "asyncStackTrace")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub async_stack_trace: Option<crate::runtime::types::StackTrace>,
#[serde(rename = "asyncStackTraceId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub async_stack_trace_id: Option<crate::runtime::types::StackTraceId>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RestartFrameResponse {
call_frames: fields.call_frames,
async_stack_trace: fields.async_stack_trace,
async_stack_trace_id: fields.async_stack_trace_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for RestartFrame {
type Params = RestartFrameParams;
type Response = RestartFrameResponse;
const METHOD: &'static str = "Debugger.restartFrame";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct ResumeParams {
#[serde(rename = "terminateOnResume")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub terminate_on_resume: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for ResumeParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ResumeParams;
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 = "terminateOnResume")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub terminate_on_resume: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ResumeParams {
terminate_on_resume: fields.terminate_on_resume,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Resume;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ResumeResponse {}
impl<'de> serde::Deserialize<'de> for ResumeResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ResumeResponse;
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(ResumeResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Resume {
type Params = ResumeParams;
type Response = ResumeResponse;
const METHOD: &'static str = "Debugger.resume";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SearchInContentParams {
#[serde(rename = "scriptId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_id: crate::runtime::types::ScriptId,
#[serde(rename = "query")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub query: String,
#[serde(rename = "caseSensitive")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub case_sensitive: Option<bool>,
#[serde(rename = "isRegex")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_regex: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for SearchInContentParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SearchInContentParams;
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 = "query")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub query: String,
#[serde(rename = "caseSensitive")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub case_sensitive: Option<bool>,
#[serde(rename = "isRegex")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub is_regex: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SearchInContentParams {
script_id: fields.script_id,
query: fields.query,
case_sensitive: fields.case_sensitive,
is_regex: fields.is_regex,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SearchInContent;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SearchInContentResponse {
#[serde(rename = "result")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result: Vec<crate::debugger::types::SearchMatch>,
}
impl<'de> serde::Deserialize<'de> for SearchInContentResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SearchInContentResponse;
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::debugger::types::SearchMatch>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SearchInContentResponse {
result: fields.result,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SearchInContent {
type Params = SearchInContentParams;
type Response = SearchInContentResponse;
const METHOD: &'static str = "Debugger.searchInContent";
}
#[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 = "Debugger.setAsyncCallStackDepth";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBlackboxExecutionContextsParams {
#[serde(rename = "uniqueIds")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub unique_ids: Vec<String>,
}
impl<'de> serde::Deserialize<'de> for SetBlackboxExecutionContextsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBlackboxExecutionContextsParams;
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 = "uniqueIds")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub unique_ids: Vec<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBlackboxExecutionContextsParams {
unique_ids: fields.unique_ids,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetBlackboxExecutionContexts;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBlackboxExecutionContextsResponse {}
impl<'de> serde::Deserialize<'de> for SetBlackboxExecutionContextsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBlackboxExecutionContextsResponse;
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(SetBlackboxExecutionContextsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetBlackboxExecutionContexts {
type Params = SetBlackboxExecutionContextsParams;
type Response = SetBlackboxExecutionContextsResponse;
const METHOD: &'static str = "Debugger.setBlackboxExecutionContexts";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBlackboxPatternsParams {
#[serde(rename = "patterns")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub patterns: Vec<String>,
#[serde(rename = "skipAnonymous")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub skip_anonymous: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for SetBlackboxPatternsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBlackboxPatternsParams;
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 = "patterns")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub patterns: Vec<String>,
#[serde(rename = "skipAnonymous")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub skip_anonymous: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBlackboxPatternsParams {
patterns: fields.patterns,
skip_anonymous: fields.skip_anonymous,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetBlackboxPatterns;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBlackboxPatternsResponse {}
impl<'de> serde::Deserialize<'de> for SetBlackboxPatternsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBlackboxPatternsResponse;
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(SetBlackboxPatternsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetBlackboxPatterns {
type Params = SetBlackboxPatternsParams;
type Response = SetBlackboxPatternsResponse;
const METHOD: &'static str = "Debugger.setBlackboxPatterns";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBlackboxedRangesParams {
#[serde(rename = "scriptId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_id: crate::runtime::types::ScriptId,
#[serde(rename = "positions")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub positions: Vec<crate::debugger::types::ScriptPosition>,
}
impl<'de> serde::Deserialize<'de> for SetBlackboxedRangesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBlackboxedRangesParams;
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 = "positions")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub positions: Vec<crate::debugger::types::ScriptPosition>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBlackboxedRangesParams {
script_id: fields.script_id,
positions: fields.positions,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetBlackboxedRanges;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBlackboxedRangesResponse {}
impl<'de> serde::Deserialize<'de> for SetBlackboxedRangesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBlackboxedRangesResponse;
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(SetBlackboxedRangesResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetBlackboxedRanges {
type Params = SetBlackboxedRangesParams;
type Response = SetBlackboxedRangesResponse;
const METHOD: &'static str = "Debugger.setBlackboxedRanges";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBreakpointParams {
#[serde(rename = "location")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub location: crate::debugger::types::Location,
#[serde(rename = "condition")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub condition: Option<String>,
}
impl<'de> serde::Deserialize<'de> for SetBreakpointParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBreakpointParams;
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 = "location")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub location: crate::debugger::types::Location,
#[serde(rename = "condition")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub condition: Option<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBreakpointParams {
location: fields.location,
condition: fields.condition,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetBreakpoint;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBreakpointResponse {
#[serde(rename = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
#[serde(rename = "actualLocation")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub actual_location: crate::debugger::types::Location,
}
impl<'de> serde::Deserialize<'de> for SetBreakpointResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBreakpointResponse;
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 = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
#[serde(rename = "actualLocation")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub actual_location: crate::debugger::types::Location,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBreakpointResponse {
breakpoint_id: fields.breakpoint_id,
actual_location: fields.actual_location,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetBreakpoint {
type Params = SetBreakpointParams;
type Response = SetBreakpointResponse;
const METHOD: &'static str = "Debugger.setBreakpoint";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBreakpointByUrlParams {
#[serde(rename = "lineNumber")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub line_number: i64,
#[serde(rename = "url")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url: Option<String>,
#[serde(rename = "urlRegex")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url_regex: Option<String>,
#[serde(rename = "scriptHash")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub script_hash: Option<String>,
#[serde(rename = "columnNumber")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub column_number: Option<i64>,
#[serde(rename = "condition")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub condition: Option<String>,
}
impl<'de> serde::Deserialize<'de> for SetBreakpointByUrlParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBreakpointByUrlParams;
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 = "lineNumber")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub line_number: i64,
#[serde(rename = "url")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url: Option<String>,
#[serde(rename = "urlRegex")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub url_regex: Option<String>,
#[serde(rename = "scriptHash")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub script_hash: Option<String>,
#[serde(rename = "columnNumber")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub column_number: Option<i64>,
#[serde(rename = "condition")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub condition: Option<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBreakpointByUrlParams {
line_number: fields.line_number,
url: fields.url,
url_regex: fields.url_regex,
script_hash: fields.script_hash,
column_number: fields.column_number,
condition: fields.condition,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetBreakpointByUrl;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBreakpointByUrlResponse {
#[serde(rename = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
#[serde(rename = "locations")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub locations: Vec<crate::debugger::types::Location>,
}
impl<'de> serde::Deserialize<'de> for SetBreakpointByUrlResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBreakpointByUrlResponse;
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 = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
#[serde(rename = "locations")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub locations: Vec<crate::debugger::types::Location>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBreakpointByUrlResponse {
breakpoint_id: fields.breakpoint_id,
locations: fields.locations,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetBreakpointByUrl {
type Params = SetBreakpointByUrlParams;
type Response = SetBreakpointByUrlResponse;
const METHOD: &'static str = "Debugger.setBreakpointByUrl";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBreakpointOnFunctionCallParams {
#[serde(rename = "objectId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub object_id: crate::runtime::types::RemoteObjectId,
#[serde(rename = "condition")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub condition: Option<String>,
}
impl<'de> serde::Deserialize<'de> for SetBreakpointOnFunctionCallParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBreakpointOnFunctionCallParams;
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 = "condition")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub condition: Option<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBreakpointOnFunctionCallParams {
object_id: fields.object_id,
condition: fields.condition,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetBreakpointOnFunctionCall;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBreakpointOnFunctionCallResponse {
#[serde(rename = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
}
impl<'de> serde::Deserialize<'de> for SetBreakpointOnFunctionCallResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBreakpointOnFunctionCallResponse;
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 = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBreakpointOnFunctionCallResponse {
breakpoint_id: fields.breakpoint_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetBreakpointOnFunctionCall {
type Params = SetBreakpointOnFunctionCallParams;
type Response = SetBreakpointOnFunctionCallResponse;
const METHOD: &'static str = "Debugger.setBreakpointOnFunctionCall";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBreakpointsActiveParams {
#[serde(rename = "active")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub active: bool,
}
impl<'de> serde::Deserialize<'de> for SetBreakpointsActiveParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBreakpointsActiveParams;
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 = "active")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub active: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetBreakpointsActiveParams {
active: fields.active,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetBreakpointsActive;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetBreakpointsActiveResponse {}
impl<'de> serde::Deserialize<'de> for SetBreakpointsActiveResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetBreakpointsActiveResponse;
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(SetBreakpointsActiveResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetBreakpointsActive {
type Params = SetBreakpointsActiveParams;
type Response = SetBreakpointsActiveResponse;
const METHOD: &'static str = "Debugger.setBreakpointsActive";
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum SetInstrumentationBreakpointParamsInstrumentation {
BeforeScriptExecution,
BeforeScriptWithSourceMapExecution,
Unknown(String),
}
impl SetInstrumentationBreakpointParamsInstrumentation {
pub fn as_str(&self) -> &str {
match self {
Self::BeforeScriptExecution => "beforeScriptExecution",
Self::BeforeScriptWithSourceMapExecution => "beforeScriptWithSourceMapExecution",
Self::Unknown(value) => value,
}
}
}
impl AsRef<str> for SetInstrumentationBreakpointParamsInstrumentation {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl From<String> for SetInstrumentationBreakpointParamsInstrumentation {
fn from(value: String) -> Self {
match value.as_str() {
"beforeScriptExecution" => {
SetInstrumentationBreakpointParamsInstrumentation::BeforeScriptExecution
}
"beforeScriptWithSourceMapExecution" => {
SetInstrumentationBreakpointParamsInstrumentation::BeforeScriptWithSourceMapExecution
}
_ => Self::Unknown(value),
}
}
}
impl serde::Serialize for SetInstrumentationBreakpointParamsInstrumentation {
fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
s.serialize_str(self.as_str())
}
}
impl<'de> serde::Deserialize<'de> for SetInstrumentationBreakpointParamsInstrumentation {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetInstrumentationBreakpointParamsInstrumentation;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议字符串枚举")
}
fn visit_str<E: serde::de::Error>(self, v: &str) -> Result<Self::Value, E> {
Ok(
match v {
"beforeScriptExecution" => {
SetInstrumentationBreakpointParamsInstrumentation::BeforeScriptExecution
}
"beforeScriptWithSourceMapExecution" => {
SetInstrumentationBreakpointParamsInstrumentation::BeforeScriptWithSourceMapExecution
}
_ => {
SetInstrumentationBreakpointParamsInstrumentation::Unknown(
v.to_owned(),
)
}
},
)
}
fn visit_string<E: serde::de::Error>(self, v: String) -> Result<Self::Value, E> {
Ok(SetInstrumentationBreakpointParamsInstrumentation::from(v))
}
}
d.deserialize_str(Visitor)
}
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetInstrumentationBreakpointParams {
#[serde(rename = "instrumentation")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub instrumentation: SetInstrumentationBreakpointParamsInstrumentation,
}
impl<'de> serde::Deserialize<'de> for SetInstrumentationBreakpointParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetInstrumentationBreakpointParams;
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 = "instrumentation")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub instrumentation: SetInstrumentationBreakpointParamsInstrumentation,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetInstrumentationBreakpointParams {
instrumentation: fields.instrumentation,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetInstrumentationBreakpoint;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetInstrumentationBreakpointResponse {
#[serde(rename = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
}
impl<'de> serde::Deserialize<'de> for SetInstrumentationBreakpointResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetInstrumentationBreakpointResponse;
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 = "breakpointId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub breakpoint_id: crate::debugger::types::BreakpointId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetInstrumentationBreakpointResponse {
breakpoint_id: fields.breakpoint_id,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetInstrumentationBreakpoint {
type Params = SetInstrumentationBreakpointParams;
type Response = SetInstrumentationBreakpointResponse;
const METHOD: &'static str = "Debugger.setInstrumentationBreakpoint";
}
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum SetPauseOnExceptionsParamsState {
None,
Caught,
Uncaught,
All,
Unknown(String),
}
impl SetPauseOnExceptionsParamsState {
pub fn as_str(&self) -> &str {
match self {
Self::None => "none",
Self::Caught => "caught",
Self::Uncaught => "uncaught",
Self::All => "all",
Self::Unknown(value) => value,
}
}
}
impl AsRef<str> for SetPauseOnExceptionsParamsState {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl From<String> for SetPauseOnExceptionsParamsState {
fn from(value: String) -> Self {
match value.as_str() {
"none" => SetPauseOnExceptionsParamsState::None,
"caught" => SetPauseOnExceptionsParamsState::Caught,
"uncaught" => SetPauseOnExceptionsParamsState::Uncaught,
"all" => SetPauseOnExceptionsParamsState::All,
_ => Self::Unknown(value),
}
}
}
impl serde::Serialize for SetPauseOnExceptionsParamsState {
fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
s.serialize_str(self.as_str())
}
}
impl<'de> serde::Deserialize<'de> for SetPauseOnExceptionsParamsState {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetPauseOnExceptionsParamsState;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议字符串枚举")
}
fn visit_str<E: serde::de::Error>(self, v: &str) -> Result<Self::Value, E> {
Ok(match v {
"none" => SetPauseOnExceptionsParamsState::None,
"caught" => SetPauseOnExceptionsParamsState::Caught,
"uncaught" => SetPauseOnExceptionsParamsState::Uncaught,
"all" => SetPauseOnExceptionsParamsState::All,
_ => SetPauseOnExceptionsParamsState::Unknown(v.to_owned()),
})
}
fn visit_string<E: serde::de::Error>(self, v: String) -> Result<Self::Value, E> {
Ok(SetPauseOnExceptionsParamsState::from(v))
}
}
d.deserialize_str(Visitor)
}
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetPauseOnExceptionsParams {
#[serde(rename = "state")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub state: SetPauseOnExceptionsParamsState,
}
impl<'de> serde::Deserialize<'de> for SetPauseOnExceptionsParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetPauseOnExceptionsParams;
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 = "state")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub state: SetPauseOnExceptionsParamsState,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetPauseOnExceptionsParams {
state: fields.state,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetPauseOnExceptions;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetPauseOnExceptionsResponse {}
impl<'de> serde::Deserialize<'de> for SetPauseOnExceptionsResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetPauseOnExceptionsResponse;
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(SetPauseOnExceptionsResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetPauseOnExceptions {
type Params = SetPauseOnExceptionsParams;
type Response = SetPauseOnExceptionsResponse;
const METHOD: &'static str = "Debugger.setPauseOnExceptions";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetReturnValueParams {
#[serde(rename = "newValue")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub new_value: crate::runtime::types::CallArgument,
}
impl<'de> serde::Deserialize<'de> for SetReturnValueParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetReturnValueParams;
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 = "newValue")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub new_value: crate::runtime::types::CallArgument,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetReturnValueParams {
new_value: fields.new_value,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetReturnValue;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetReturnValueResponse {}
impl<'de> serde::Deserialize<'de> for SetReturnValueResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetReturnValueResponse;
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(SetReturnValueResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetReturnValue {
type Params = SetReturnValueParams;
type Response = SetReturnValueResponse;
const METHOD: &'static str = "Debugger.setReturnValue";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetScriptSourceParams {
#[serde(rename = "scriptId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_id: crate::runtime::types::ScriptId,
#[serde(rename = "scriptSource")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_source: String,
#[serde(rename = "dryRun")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub dry_run: Option<bool>,
#[serde(rename = "allowTopFrameEditing")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub allow_top_frame_editing: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for SetScriptSourceParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetScriptSourceParams;
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 = "scriptSource")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub script_source: String,
#[serde(rename = "dryRun")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub dry_run: Option<bool>,
#[serde(rename = "allowTopFrameEditing")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub allow_top_frame_editing: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetScriptSourceParams {
script_id: fields.script_id,
script_source: fields.script_source,
dry_run: fields.dry_run,
allow_top_frame_editing: fields.allow_top_frame_editing,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetScriptSource;
#[derive(Debug, Clone, PartialEq, Eq)]
#[non_exhaustive]
pub enum SetScriptSourceResponseStatus {
Ok,
CompileError,
BlockedByActiveGenerator,
BlockedByActiveFunction,
BlockedByTopLevelEsModuleChange,
Unknown(String),
}
impl SetScriptSourceResponseStatus {
pub fn as_str(&self) -> &str {
match self {
Self::Ok => "Ok",
Self::CompileError => "CompileError",
Self::BlockedByActiveGenerator => "BlockedByActiveGenerator",
Self::BlockedByActiveFunction => "BlockedByActiveFunction",
Self::BlockedByTopLevelEsModuleChange => "BlockedByTopLevelEsModuleChange",
Self::Unknown(value) => value,
}
}
}
impl AsRef<str> for SetScriptSourceResponseStatus {
fn as_ref(&self) -> &str {
self.as_str()
}
}
impl From<String> for SetScriptSourceResponseStatus {
fn from(value: String) -> Self {
match value.as_str() {
"Ok" => SetScriptSourceResponseStatus::Ok,
"CompileError" => SetScriptSourceResponseStatus::CompileError,
"BlockedByActiveGenerator" => SetScriptSourceResponseStatus::BlockedByActiveGenerator,
"BlockedByActiveFunction" => SetScriptSourceResponseStatus::BlockedByActiveFunction,
"BlockedByTopLevelEsModuleChange" => {
SetScriptSourceResponseStatus::BlockedByTopLevelEsModuleChange
}
_ => Self::Unknown(value),
}
}
}
impl serde::Serialize for SetScriptSourceResponseStatus {
fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
s.serialize_str(self.as_str())
}
}
impl<'de> serde::Deserialize<'de> for SetScriptSourceResponseStatus {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetScriptSourceResponseStatus;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议字符串枚举")
}
fn visit_str<E: serde::de::Error>(self, v: &str) -> Result<Self::Value, E> {
Ok(match v {
"Ok" => SetScriptSourceResponseStatus::Ok,
"CompileError" => SetScriptSourceResponseStatus::CompileError,
"BlockedByActiveGenerator" => {
SetScriptSourceResponseStatus::BlockedByActiveGenerator
}
"BlockedByActiveFunction" => {
SetScriptSourceResponseStatus::BlockedByActiveFunction
}
"BlockedByTopLevelEsModuleChange" => {
SetScriptSourceResponseStatus::BlockedByTopLevelEsModuleChange
}
_ => SetScriptSourceResponseStatus::Unknown(v.to_owned()),
})
}
fn visit_string<E: serde::de::Error>(self, v: String) -> Result<Self::Value, E> {
Ok(SetScriptSourceResponseStatus::from(v))
}
}
d.deserialize_str(Visitor)
}
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetScriptSourceResponse {
#[serde(rename = "callFrames")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub call_frames: Option<Vec<crate::debugger::types::CallFrame>>,
#[serde(rename = "stackChanged")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub stack_changed: Option<bool>,
#[serde(rename = "asyncStackTrace")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub async_stack_trace: Option<crate::runtime::types::StackTrace>,
#[serde(rename = "asyncStackTraceId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub async_stack_trace_id: Option<crate::runtime::types::StackTraceId>,
#[serde(rename = "status")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub status: SetScriptSourceResponseStatus,
#[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 SetScriptSourceResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetScriptSourceResponse;
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 = "callFrames")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub call_frames: Option<Vec<crate::debugger::types::CallFrame>>,
#[serde(rename = "stackChanged")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub stack_changed: Option<bool>,
#[serde(rename = "asyncStackTrace")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub async_stack_trace: Option<crate::runtime::types::StackTrace>,
#[serde(rename = "asyncStackTraceId")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub async_stack_trace_id: Option<crate::runtime::types::StackTraceId>,
#[serde(rename = "status")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub status: SetScriptSourceResponseStatus,
#[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(SetScriptSourceResponse {
call_frames: fields.call_frames,
stack_changed: fields.stack_changed,
async_stack_trace: fields.async_stack_trace,
async_stack_trace_id: fields.async_stack_trace_id,
status: fields.status,
exception_details: fields.exception_details,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetScriptSource {
type Params = SetScriptSourceParams;
type Response = SetScriptSourceResponse;
const METHOD: &'static str = "Debugger.setScriptSource";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetSkipAllPausesParams {
#[serde(rename = "skip")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub skip: bool,
}
impl<'de> serde::Deserialize<'de> for SetSkipAllPausesParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetSkipAllPausesParams;
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 = "skip")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub skip: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetSkipAllPausesParams { skip: fields.skip })
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetSkipAllPauses;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetSkipAllPausesResponse {}
impl<'de> serde::Deserialize<'de> for SetSkipAllPausesResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetSkipAllPausesResponse;
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(SetSkipAllPausesResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetSkipAllPauses {
type Params = SetSkipAllPausesParams;
type Response = SetSkipAllPausesResponse;
const METHOD: &'static str = "Debugger.setSkipAllPauses";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetVariableValueParams {
#[serde(rename = "scopeNumber")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub scope_number: i64,
#[serde(rename = "variableName")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub variable_name: String,
#[serde(rename = "newValue")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub new_value: crate::runtime::types::CallArgument,
#[serde(rename = "callFrameId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub call_frame_id: crate::debugger::types::CallFrameId,
}
impl<'de> serde::Deserialize<'de> for SetVariableValueParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetVariableValueParams;
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 = "scopeNumber")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub scope_number: i64,
#[serde(rename = "variableName")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub variable_name: String,
#[serde(rename = "newValue")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub new_value: crate::runtime::types::CallArgument,
#[serde(rename = "callFrameId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub call_frame_id: crate::debugger::types::CallFrameId,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetVariableValueParams {
scope_number: fields.scope_number,
variable_name: fields.variable_name,
new_value: fields.new_value,
call_frame_id: fields.call_frame_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetVariableValue;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetVariableValueResponse {}
impl<'de> serde::Deserialize<'de> for SetVariableValueResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetVariableValueResponse;
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(SetVariableValueResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetVariableValue {
type Params = SetVariableValueParams;
type Response = SetVariableValueResponse;
const METHOD: &'static str = "Debugger.setVariableValue";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct StepIntoParams {
#[serde(rename = "breakOnAsyncCall")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub break_on_async_call: Option<bool>,
#[serde(rename = "skipList")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub skip_list: Option<Vec<crate::debugger::types::LocationRange>>,
}
impl<'de> serde::Deserialize<'de> for StepIntoParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StepIntoParams;
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 = "breakOnAsyncCall")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub break_on_async_call: Option<bool>,
#[serde(rename = "skipList")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub skip_list: Option<Vec<crate::debugger::types::LocationRange>>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(StepIntoParams {
break_on_async_call: fields.break_on_async_call,
skip_list: fields.skip_list,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct StepInto;
#[derive(Debug, Clone, serde::Serialize)]
pub struct StepIntoResponse {}
impl<'de> serde::Deserialize<'de> for StepIntoResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StepIntoResponse;
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(StepIntoResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for StepInto {
type Params = StepIntoParams;
type Response = StepIntoResponse;
const METHOD: &'static str = "Debugger.stepInto";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct StepOutParams {}
impl<'de> serde::Deserialize<'de> for StepOutParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StepOutParams;
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(StepOutParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct StepOut;
#[derive(Debug, Clone, serde::Serialize)]
pub struct StepOutResponse {}
impl<'de> serde::Deserialize<'de> for StepOutResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StepOutResponse;
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(StepOutResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for StepOut {
type Params = StepOutParams;
type Response = StepOutResponse;
const METHOD: &'static str = "Debugger.stepOut";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct StepOverParams {
#[serde(rename = "skipList")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub skip_list: Option<Vec<crate::debugger::types::LocationRange>>,
}
impl<'de> serde::Deserialize<'de> for StepOverParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StepOverParams;
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 = "skipList")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub skip_list: Option<Vec<crate::debugger::types::LocationRange>>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(StepOverParams {
skip_list: fields.skip_list,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct StepOver;
#[derive(Debug, Clone, serde::Serialize)]
pub struct StepOverResponse {}
impl<'de> serde::Deserialize<'de> for StepOverResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StepOverResponse;
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(StepOverResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for StepOver {
type Params = StepOverParams;
type Response = StepOverResponse;
const METHOD: &'static str = "Debugger.stepOver";
}