#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct ForciblyPurgeJavaScriptMemoryParams {}
impl<'de> serde::Deserialize<'de> for ForciblyPurgeJavaScriptMemoryParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ForciblyPurgeJavaScriptMemoryParams;
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(ForciblyPurgeJavaScriptMemoryParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ForciblyPurgeJavaScriptMemory;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ForciblyPurgeJavaScriptMemoryResponse {}
impl<'de> serde::Deserialize<'de> for ForciblyPurgeJavaScriptMemoryResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ForciblyPurgeJavaScriptMemoryResponse;
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(ForciblyPurgeJavaScriptMemoryResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ForciblyPurgeJavaScriptMemory {
type Params = ForciblyPurgeJavaScriptMemoryParams;
type Response = ForciblyPurgeJavaScriptMemoryResponse;
const METHOD: &'static str = "Memory.forciblyPurgeJavaScriptMemory";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetAllTimeSamplingProfileParams {}
impl<'de> serde::Deserialize<'de> for GetAllTimeSamplingProfileParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetAllTimeSamplingProfileParams;
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(GetAllTimeSamplingProfileParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetAllTimeSamplingProfile;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetAllTimeSamplingProfileResponse {
#[serde(rename = "profile")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub profile: crate::memory::types::SamplingProfile,
}
impl<'de> serde::Deserialize<'de> for GetAllTimeSamplingProfileResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetAllTimeSamplingProfileResponse;
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 = "profile")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub profile: crate::memory::types::SamplingProfile,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetAllTimeSamplingProfileResponse {
profile: fields.profile,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetAllTimeSamplingProfile {
type Params = GetAllTimeSamplingProfileParams;
type Response = GetAllTimeSamplingProfileResponse;
const METHOD: &'static str = "Memory.getAllTimeSamplingProfile";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetBrowserSamplingProfileParams {}
impl<'de> serde::Deserialize<'de> for GetBrowserSamplingProfileParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetBrowserSamplingProfileParams;
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(GetBrowserSamplingProfileParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetBrowserSamplingProfile;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetBrowserSamplingProfileResponse {
#[serde(rename = "profile")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub profile: crate::memory::types::SamplingProfile,
}
impl<'de> serde::Deserialize<'de> for GetBrowserSamplingProfileResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetBrowserSamplingProfileResponse;
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 = "profile")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub profile: crate::memory::types::SamplingProfile,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetBrowserSamplingProfileResponse {
profile: fields.profile,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetBrowserSamplingProfile {
type Params = GetBrowserSamplingProfileParams;
type Response = GetBrowserSamplingProfileResponse;
const METHOD: &'static str = "Memory.getBrowserSamplingProfile";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetDomCountersParams {}
impl<'de> serde::Deserialize<'de> for GetDomCountersParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetDomCountersParams;
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(GetDomCountersParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetDomCounters;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetDomCountersResponse {
#[serde(rename = "documents")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub documents: i64,
#[serde(rename = "nodes")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub nodes: i64,
#[serde(rename = "jsEventListeners")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub js_event_listeners: i64,
}
impl<'de> serde::Deserialize<'de> for GetDomCountersResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetDomCountersResponse;
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 = "documents")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub documents: i64,
#[serde(rename = "nodes")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub nodes: i64,
#[serde(rename = "jsEventListeners")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub js_event_listeners: i64,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetDomCountersResponse {
documents: fields.documents,
nodes: fields.nodes,
js_event_listeners: fields.js_event_listeners,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetDomCounters {
type Params = GetDomCountersParams;
type Response = GetDomCountersResponse;
const METHOD: &'static str = "Memory.getDOMCounters";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetDomCountersForLeakDetectionParams {}
impl<'de> serde::Deserialize<'de> for GetDomCountersForLeakDetectionParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetDomCountersForLeakDetectionParams;
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(GetDomCountersForLeakDetectionParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetDomCountersForLeakDetection;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetDomCountersForLeakDetectionResponse {
#[serde(rename = "counters")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub counters: Vec<crate::memory::types::DomCounter>,
}
impl<'de> serde::Deserialize<'de> for GetDomCountersForLeakDetectionResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetDomCountersForLeakDetectionResponse;
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 = "counters")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub counters: Vec<crate::memory::types::DomCounter>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetDomCountersForLeakDetectionResponse {
counters: fields.counters,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetDomCountersForLeakDetection {
type Params = GetDomCountersForLeakDetectionParams;
type Response = GetDomCountersForLeakDetectionResponse;
const METHOD: &'static str = "Memory.getDOMCountersForLeakDetection";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct GetSamplingProfileParams {}
impl<'de> serde::Deserialize<'de> for GetSamplingProfileParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetSamplingProfileParams;
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(GetSamplingProfileParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct GetSamplingProfile;
#[derive(Debug, Clone, serde::Serialize)]
pub struct GetSamplingProfileResponse {
#[serde(rename = "profile")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub profile: crate::memory::types::SamplingProfile,
}
impl<'de> serde::Deserialize<'de> for GetSamplingProfileResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = GetSamplingProfileResponse;
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 = "profile")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub profile: crate::memory::types::SamplingProfile,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(GetSamplingProfileResponse {
profile: fields.profile,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for GetSamplingProfile {
type Params = GetSamplingProfileParams;
type Response = GetSamplingProfileResponse;
const METHOD: &'static str = "Memory.getSamplingProfile";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct PrepareForLeakDetectionParams {}
impl<'de> serde::Deserialize<'de> for PrepareForLeakDetectionParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = PrepareForLeakDetectionParams;
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(PrepareForLeakDetectionParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct PrepareForLeakDetection;
#[derive(Debug, Clone, serde::Serialize)]
pub struct PrepareForLeakDetectionResponse {}
impl<'de> serde::Deserialize<'de> for PrepareForLeakDetectionResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = PrepareForLeakDetectionResponse;
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(PrepareForLeakDetectionResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for PrepareForLeakDetection {
type Params = PrepareForLeakDetectionParams;
type Response = PrepareForLeakDetectionResponse;
const METHOD: &'static str = "Memory.prepareForLeakDetection";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetPressureNotificationsSuppressedParams {
#[serde(rename = "suppressed")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub suppressed: bool,
}
impl<'de> serde::Deserialize<'de> for SetPressureNotificationsSuppressedParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetPressureNotificationsSuppressedParams;
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 = "suppressed")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub suppressed: bool,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SetPressureNotificationsSuppressedParams {
suppressed: fields.suppressed,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SetPressureNotificationsSuppressed;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SetPressureNotificationsSuppressedResponse {}
impl<'de> serde::Deserialize<'de> for SetPressureNotificationsSuppressedResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SetPressureNotificationsSuppressedResponse;
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(SetPressureNotificationsSuppressedResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SetPressureNotificationsSuppressed {
type Params = SetPressureNotificationsSuppressedParams;
type Response = SetPressureNotificationsSuppressedResponse;
const METHOD: &'static str = "Memory.setPressureNotificationsSuppressed";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct SimulatePressureNotificationParams {
#[serde(rename = "level")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub level: crate::memory::types::PressureLevel,
}
impl<'de> serde::Deserialize<'de> for SimulatePressureNotificationParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SimulatePressureNotificationParams;
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 = "level")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub level: crate::memory::types::PressureLevel,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(SimulatePressureNotificationParams {
level: fields.level,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct SimulatePressureNotification;
#[derive(Debug, Clone, serde::Serialize)]
pub struct SimulatePressureNotificationResponse {}
impl<'de> serde::Deserialize<'de> for SimulatePressureNotificationResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = SimulatePressureNotificationResponse;
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(SimulatePressureNotificationResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for SimulatePressureNotification {
type Params = SimulatePressureNotificationParams;
type Response = SimulatePressureNotificationResponse;
const METHOD: &'static str = "Memory.simulatePressureNotification";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct StartSamplingParams {
#[serde(rename = "samplingInterval")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub sampling_interval: Option<i64>,
#[serde(rename = "suppressRandomness")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub suppress_randomness: Option<bool>,
}
impl<'de> serde::Deserialize<'de> for StartSamplingParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StartSamplingParams;
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 = "samplingInterval")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub sampling_interval: Option<i64>,
#[serde(rename = "suppressRandomness")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub suppress_randomness: Option<bool>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(StartSamplingParams {
sampling_interval: fields.sampling_interval,
suppress_randomness: fields.suppress_randomness,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct StartSampling;
#[derive(Debug, Clone, serde::Serialize)]
pub struct StartSamplingResponse {}
impl<'de> serde::Deserialize<'de> for StartSamplingResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StartSamplingResponse;
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(StartSamplingResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for StartSampling {
type Params = StartSamplingParams;
type Response = StartSamplingResponse;
const METHOD: &'static str = "Memory.startSampling";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct StopSamplingParams {}
impl<'de> serde::Deserialize<'de> for StopSamplingParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StopSamplingParams;
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(StopSamplingParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct StopSampling;
#[derive(Debug, Clone, serde::Serialize)]
pub struct StopSamplingResponse {}
impl<'de> serde::Deserialize<'de> for StopSamplingResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = StopSamplingResponse;
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(StopSamplingResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for StopSampling {
type Params = StopSamplingParams;
type Response = StopSamplingResponse;
const METHOD: &'static str = "Memory.stopSampling";
}