Skip to main content

stellar_xdr/generated/
config_setting_contract_execution_lanes_v0.rs

1#[allow(unused_imports, clippy::wildcard_imports)]
2use super::*;
3
4/// ConfigSettingContractExecutionLanesV0 is an XDR Struct defined as:
5///
6/// ```text
7/// struct ConfigSettingContractExecutionLanesV0
8/// {
9///     // maximum number of Soroban transactions per ledger
10///     uint32 ledgerMaxTxCount;
11/// };
12/// ```
13///
14#[cfg_attr(feature = "alloc", derive(Default))]
15#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
16#[cfg_attr(feature = "serde", cfg_eval::cfg_eval)]
17#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18#[cfg_attr(
19    all(feature = "serde", feature = "alloc"),
20    serde_with::serde_as,
21    derive(serde::Serialize, serde::Deserialize),
22    serde(rename_all = "snake_case")
23)]
24#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
25pub struct ConfigSettingContractExecutionLanesV0 {
26    pub ledger_max_tx_count: u32,
27}
28
29impl ReadXdr for ConfigSettingContractExecutionLanesV0 {
30    #[cfg(feature = "std")]
31    fn read_xdr<R: Read>(r: &mut Limited<R>) -> Result<Self, Error> {
32        r.with_limited_depth(|r| {
33            Ok(Self {
34                ledger_max_tx_count: u32::read_xdr(r)?,
35            })
36        })
37    }
38}
39
40impl WriteXdr for ConfigSettingContractExecutionLanesV0 {
41    #[cfg(feature = "std")]
42    fn write_xdr<W: Write>(&self, w: &mut Limited<W>) -> Result<(), Error> {
43        w.with_limited_depth(|w| {
44            self.ledger_max_tx_count.write_xdr(w)?;
45            Ok(())
46        })
47    }
48}