#[derive(Debug, Clone, serde::Serialize)]
pub struct AnimationCanceledParams {
#[serde(rename = "id")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub id: String,
}
impl<'de> serde::Deserialize<'de> for AnimationCanceledParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AnimationCanceledParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "id")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub id: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AnimationCanceledParams { id: fields.id })
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AnimationCanceled;
impl ydp_core::Event for AnimationCanceled {
type Params = AnimationCanceledParams;
const METHOD: &'static str = "Animation.animationCanceled";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct AnimationCreatedParams {
#[serde(rename = "id")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub id: String,
}
impl<'de> serde::Deserialize<'de> for AnimationCreatedParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AnimationCreatedParams;
fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_str("协议 object")
}
fn visit_map<A: serde::de::MapAccess<'de>>(
self,
a: A,
) -> Result<Self::Value, A::Error> {
#[derive(serde::Deserialize)]
struct Fields {
#[serde(rename = "id")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub id: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AnimationCreatedParams { id: fields.id })
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AnimationCreated;
impl ydp_core::Event for AnimationCreated {
type Params = AnimationCreatedParams;
const METHOD: &'static str = "Animation.animationCreated";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct AnimationStartedParams {
#[serde(rename = "animation")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub animation: crate::animation::types::Animation,
}
impl<'de> serde::Deserialize<'de> for AnimationStartedParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AnimationStartedParams;
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 = "animation")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub animation: crate::animation::types::Animation,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AnimationStartedParams {
animation: fields.animation,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AnimationStarted;
impl ydp_core::Event for AnimationStarted {
type Params = AnimationStartedParams;
const METHOD: &'static str = "Animation.animationStarted";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct AnimationUpdatedParams {
#[serde(rename = "animation")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub animation: crate::animation::types::Animation,
}
impl<'de> serde::Deserialize<'de> for AnimationUpdatedParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = AnimationUpdatedParams;
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 = "animation")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub animation: crate::animation::types::Animation,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(AnimationUpdatedParams {
animation: fields.animation,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct AnimationUpdated;
impl ydp_core::Event for AnimationUpdated {
type Params = AnimationUpdatedParams;
const METHOD: &'static str = "Animation.animationUpdated";
}