#[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 = "SmartCardEmulation.disable";
}
#[derive(Debug, Clone, serde::Serialize, Default)]
pub struct EnableParams {}
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 {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableParams {})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct Enable;
#[derive(Debug, Clone, serde::Serialize)]
pub struct EnableResponse {}
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 {}
let _fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(EnableResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for Enable {
type Params = EnableParams;
type Response = EnableResponse;
const METHOD: &'static str = "SmartCardEmulation.enable";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportBeginTransactionResultParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "handle")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub handle: i64,
}
impl<'de> serde::Deserialize<'de> for ReportBeginTransactionResultParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportBeginTransactionResultParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "handle")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub handle: i64,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportBeginTransactionResultParams {
request_id: fields.request_id,
handle: fields.handle,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportBeginTransactionResult;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportBeginTransactionResultResponse {}
impl<'de> serde::Deserialize<'de> for ReportBeginTransactionResultResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportBeginTransactionResultResponse;
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(ReportBeginTransactionResultResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportBeginTransactionResult {
type Params = ReportBeginTransactionResultParams;
type Response = ReportBeginTransactionResultResponse;
const METHOD: &'static str = "SmartCardEmulation.reportBeginTransactionResult";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportConnectResultParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "handle")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub handle: i64,
#[serde(rename = "activeProtocol")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub active_protocol: Option<crate::smart_card_emulation::types::Protocol>,
}
impl<'de> serde::Deserialize<'de> for ReportConnectResultParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportConnectResultParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "handle")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub handle: i64,
#[serde(rename = "activeProtocol")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub active_protocol: Option<crate::smart_card_emulation::types::Protocol>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportConnectResultParams {
request_id: fields.request_id,
handle: fields.handle,
active_protocol: fields.active_protocol,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportConnectResult;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportConnectResultResponse {}
impl<'de> serde::Deserialize<'de> for ReportConnectResultResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportConnectResultResponse;
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(ReportConnectResultResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportConnectResult {
type Params = ReportConnectResultParams;
type Response = ReportConnectResultResponse;
const METHOD: &'static str = "SmartCardEmulation.reportConnectResult";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportDataResultParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "data")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub data: String,
}
impl<'de> serde::Deserialize<'de> for ReportDataResultParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportDataResultParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "data")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub data: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportDataResultParams {
request_id: fields.request_id,
data: fields.data,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportDataResult;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportDataResultResponse {}
impl<'de> serde::Deserialize<'de> for ReportDataResultResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportDataResultResponse;
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(ReportDataResultResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportDataResult {
type Params = ReportDataResultParams;
type Response = ReportDataResultResponse;
const METHOD: &'static str = "SmartCardEmulation.reportDataResult";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportErrorParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "resultCode")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result_code: crate::smart_card_emulation::types::ResultCode,
}
impl<'de> serde::Deserialize<'de> for ReportErrorParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportErrorParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "resultCode")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub result_code: crate::smart_card_emulation::types::ResultCode,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportErrorParams {
request_id: fields.request_id,
result_code: fields.result_code,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportError;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportErrorResponse {}
impl<'de> serde::Deserialize<'de> for ReportErrorResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportErrorResponse;
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(ReportErrorResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportError {
type Params = ReportErrorParams;
type Response = ReportErrorResponse;
const METHOD: &'static str = "SmartCardEmulation.reportError";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportEstablishContextResultParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "contextId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub context_id: i64,
}
impl<'de> serde::Deserialize<'de> for ReportEstablishContextResultParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportEstablishContextResultParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "contextId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub context_id: i64,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportEstablishContextResultParams {
request_id: fields.request_id,
context_id: fields.context_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportEstablishContextResult;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportEstablishContextResultResponse {}
impl<'de> serde::Deserialize<'de> for ReportEstablishContextResultResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportEstablishContextResultResponse;
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(ReportEstablishContextResultResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportEstablishContextResult {
type Params = ReportEstablishContextResultParams;
type Response = ReportEstablishContextResultResponse;
const METHOD: &'static str = "SmartCardEmulation.reportEstablishContextResult";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportGetStatusChangeResultParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "readerStates")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub reader_states: Vec<crate::smart_card_emulation::types::ReaderStateOut>,
}
impl<'de> serde::Deserialize<'de> for ReportGetStatusChangeResultParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportGetStatusChangeResultParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "readerStates")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub reader_states: Vec<crate::smart_card_emulation::types::ReaderStateOut>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportGetStatusChangeResultParams {
request_id: fields.request_id,
reader_states: fields.reader_states,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportGetStatusChangeResult;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportGetStatusChangeResultResponse {}
impl<'de> serde::Deserialize<'de> for ReportGetStatusChangeResultResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportGetStatusChangeResultResponse;
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(ReportGetStatusChangeResultResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportGetStatusChangeResult {
type Params = ReportGetStatusChangeResultParams;
type Response = ReportGetStatusChangeResultResponse;
const METHOD: &'static str = "SmartCardEmulation.reportGetStatusChangeResult";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportListReadersResultParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "readers")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub readers: Vec<String>,
}
impl<'de> serde::Deserialize<'de> for ReportListReadersResultParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportListReadersResultParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "readers")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub readers: Vec<String>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportListReadersResultParams {
request_id: fields.request_id,
readers: fields.readers,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportListReadersResult;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportListReadersResultResponse {}
impl<'de> serde::Deserialize<'de> for ReportListReadersResultResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportListReadersResultResponse;
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(ReportListReadersResultResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportListReadersResult {
type Params = ReportListReadersResultParams;
type Response = ReportListReadersResultResponse;
const METHOD: &'static str = "SmartCardEmulation.reportListReadersResult";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportPlainResultParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
}
impl<'de> serde::Deserialize<'de> for ReportPlainResultParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportPlainResultParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportPlainResultParams {
request_id: fields.request_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportPlainResult;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportPlainResultResponse {}
impl<'de> serde::Deserialize<'de> for ReportPlainResultResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportPlainResultResponse;
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(ReportPlainResultResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportPlainResult {
type Params = ReportPlainResultParams;
type Response = ReportPlainResultResponse;
const METHOD: &'static str = "SmartCardEmulation.reportPlainResult";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportReleaseContextResultParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
}
impl<'de> serde::Deserialize<'de> for ReportReleaseContextResultParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportReleaseContextResultParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportReleaseContextResultParams {
request_id: fields.request_id,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportReleaseContextResult;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportReleaseContextResultResponse {}
impl<'de> serde::Deserialize<'de> for ReportReleaseContextResultResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportReleaseContextResultResponse;
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(ReportReleaseContextResultResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportReleaseContextResult {
type Params = ReportReleaseContextResultParams;
type Response = ReportReleaseContextResultResponse;
const METHOD: &'static str = "SmartCardEmulation.reportReleaseContextResult";
}
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportStatusResultParams {
#[serde(rename = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "readerName")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub reader_name: String,
#[serde(rename = "state")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub state: crate::smart_card_emulation::types::ConnectionState,
#[serde(rename = "atr")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub atr: String,
#[serde(rename = "protocol")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub protocol: Option<crate::smart_card_emulation::types::Protocol>,
}
impl<'de> serde::Deserialize<'de> for ReportStatusResultParams {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportStatusResultParams;
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 = "requestId")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub request_id: String,
#[serde(rename = "readerName")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub reader_name: String,
#[serde(rename = "state")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub state: crate::smart_card_emulation::types::ConnectionState,
#[serde(rename = "atr")]
#[serde(deserialize_with = "ydp_core::binding_support::required")]
pub atr: String,
#[serde(rename = "protocol")]
#[serde(
default,
deserialize_with = "ydp_core::binding_support::presence",
skip_serializing_if = "Option::is_none"
)]
pub protocol: Option<crate::smart_card_emulation::types::Protocol>,
}
let fields = <Fields as serde::Deserialize>::deserialize(
serde::de::value::MapAccessDeserializer::new(a),
)?;
Ok(ReportStatusResultParams {
request_id: fields.request_id,
reader_name: fields.reader_name,
state: fields.state,
atr: fields.atr,
protocol: fields.protocol,
})
}
}
d.deserialize_map(Visitor)
}
}
#[derive(Debug, Clone, Copy)]
pub struct ReportStatusResult;
#[derive(Debug, Clone, serde::Serialize)]
pub struct ReportStatusResultResponse {}
impl<'de> serde::Deserialize<'de> for ReportStatusResultResponse {
fn deserialize<D: serde::Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
struct Visitor;
impl<'de> serde::de::Visitor<'de> for Visitor {
type Value = ReportStatusResultResponse;
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(ReportStatusResultResponse {})
}
}
d.deserialize_map(Visitor)
}
}
impl ydp_core::Command for ReportStatusResult {
type Params = ReportStatusResultParams;
type Response = ReportStatusResultResponse;
const METHOD: &'static str = "SmartCardEmulation.reportStatusResult";
}