stellar_xdr/generated/
config_setting_contract_historical_data_v0.rs1#[allow(unused_imports, clippy::wildcard_imports)]
2use super::*;
3
4#[cfg_attr(feature = "alloc", derive(Default))]
14#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
15#[cfg_attr(feature = "serde", cfg_eval::cfg_eval)]
16#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17#[cfg_attr(
18 all(feature = "serde", feature = "alloc"),
19 serde_with::serde_as,
20 derive(serde::Serialize, serde::Deserialize),
21 serde(rename_all = "snake_case")
22)]
23#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
24pub struct ConfigSettingContractHistoricalDataV0 {
25 #[cfg_attr(
26 all(feature = "serde", feature = "alloc"),
27 serde_as(as = "NumberOrString")
28 )]
29 pub fee_historical1_kb: i64,
30}
31
32impl ReadXdr for ConfigSettingContractHistoricalDataV0 {
33 #[cfg(feature = "std")]
34 fn read_xdr<R: Read>(r: &mut Limited<R>) -> Result<Self, Error> {
35 r.with_limited_depth(|r| {
36 Ok(Self {
37 fee_historical1_kb: i64::read_xdr(r)?,
38 })
39 })
40 }
41}
42
43impl WriteXdr for ConfigSettingContractHistoricalDataV0 {
44 #[cfg(feature = "std")]
45 fn write_xdr<W: Write>(&self, w: &mut Limited<W>) -> Result<(), Error> {
46 w.with_limited_depth(|w| {
47 self.fee_historical1_kb.write_xdr(w)?;
48 Ok(())
49 })
50 }
51}