stellar_xdr/generated/
transaction_meta_v4.rs1#[allow(unused_imports, clippy::wildcard_imports)]
2use super::*;
3
4#[cfg_attr(feature = "alloc", derive(Default))]
25#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
26#[cfg_attr(feature = "serde", cfg_eval::cfg_eval)]
27#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28#[cfg_attr(
29 all(feature = "serde", feature = "alloc"),
30 serde_with::serde_as,
31 derive(serde::Serialize, serde::Deserialize),
32 serde(rename_all = "snake_case")
33)]
34#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
35pub struct TransactionMetaV4 {
36 pub ext: ExtensionPoint,
37 pub tx_changes_before: LedgerEntryChanges,
38 pub operations: VecM<OperationMetaV2>,
39 pub tx_changes_after: LedgerEntryChanges,
40 pub soroban_meta: Option<SorobanTransactionMetaV2>,
41 pub events: VecM<TransactionEvent>,
42 pub diagnostic_events: VecM<DiagnosticEvent>,
43}
44
45impl ReadXdr for TransactionMetaV4 {
46 #[cfg(feature = "std")]
47 fn read_xdr<R: Read>(r: &mut Limited<R>) -> Result<Self, Error> {
48 r.with_limited_depth(|r| {
49 Ok(Self {
50 ext: ExtensionPoint::read_xdr(r)?,
51 tx_changes_before: LedgerEntryChanges::read_xdr(r)?,
52 operations: VecM::<OperationMetaV2>::read_xdr(r)?,
53 tx_changes_after: LedgerEntryChanges::read_xdr(r)?,
54 soroban_meta: Option::<SorobanTransactionMetaV2>::read_xdr(r)?,
55 events: VecM::<TransactionEvent>::read_xdr(r)?,
56 diagnostic_events: VecM::<DiagnosticEvent>::read_xdr(r)?,
57 })
58 })
59 }
60}
61
62impl WriteXdr for TransactionMetaV4 {
63 #[cfg(feature = "std")]
64 fn write_xdr<W: Write>(&self, w: &mut Limited<W>) -> Result<(), Error> {
65 w.with_limited_depth(|w| {
66 self.ext.write_xdr(w)?;
67 self.tx_changes_before.write_xdr(w)?;
68 self.operations.write_xdr(w)?;
69 self.tx_changes_after.write_xdr(w)?;
70 self.soroban_meta.write_xdr(w)?;
71 self.events.write_xdr(w)?;
72 self.diagnostic_events.write_xdr(w)?;
73 Ok(())
74 })
75 }
76}