#[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 = "EventBreakpoints.disable";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveInstrumentationBreakpointParams {
#[serde(rename = "eventName")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub event_name: String,
}
impl<'de> serde::Deserialize<'de> for RemoveInstrumentationBreakpointParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveInstrumentationBreakpointParams;
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 = "eventName")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub event_name: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(RemoveInstrumentationBreakpointParams {
event_name: fields.event_name,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct RemoveInstrumentationBreakpoint;
#[derive(Debug, Clone, serde::Serialize)]
pub struct RemoveInstrumentationBreakpointResponse {}
impl<'de> serde::Deserialize<'de> for RemoveInstrumentationBreakpointResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = RemoveInstrumentationBreakpointResponse;
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(RemoveInstrumentationBreakpointResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for RemoveInstrumentationBreakpoint {
type Params = RemoveInstrumentationBreakpointParams;
type Response = RemoveInstrumentationBreakpointResponse;
const METHOD: &'static str = "EventBreakpoints.removeInstrumentationBreakpoint";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetInstrumentationBreakpointParams {
#[serde(rename = "eventName")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub event_name: String,
}
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 = "eventName")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub event_name: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetInstrumentationBreakpointParams {
event_name: fields.event_name,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetInstrumentationBreakpoint;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetInstrumentationBreakpointResponse {}
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 {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetInstrumentationBreakpointResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetInstrumentationBreakpoint {
type Params = SetInstrumentationBreakpointParams;
type Response = SetInstrumentationBreakpointResponse;
const METHOD: &'static str = "EventBreakpoints.setInstrumentationBreakpoint";
}