stellar_xdr/generated/
transaction_result_meta_v1.rs1#[allow(unused_imports, clippy::wildcard_imports)]
2use super::*;
3
4#[cfg_attr(feature = "alloc", derive(Default))]
20#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
21#[cfg_attr(feature = "serde", cfg_eval::cfg_eval)]
22#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23#[cfg_attr(
24 all(feature = "serde", feature = "alloc"),
25 serde_with::serde_as,
26 derive(serde::Serialize, serde::Deserialize),
27 serde(rename_all = "snake_case")
28)]
29#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
30pub struct TransactionResultMetaV1 {
31 pub ext: ExtensionPoint,
32 pub result: TransactionResultPair,
33 pub fee_processing: LedgerEntryChanges,
34 pub tx_apply_processing: TransactionMeta,
35 pub post_tx_apply_fee_processing: LedgerEntryChanges,
36}
37
38impl ReadXdr for TransactionResultMetaV1 {
39 #[cfg(feature = "std")]
40 fn read_xdr<R: Read>(r: &mut Limited<R>) -> Result<Self, Error> {
41 r.with_limited_depth(|r| {
42 Ok(Self {
43 ext: ExtensionPoint::read_xdr(r)?,
44 result: TransactionResultPair::read_xdr(r)?,
45 fee_processing: LedgerEntryChanges::read_xdr(r)?,
46 tx_apply_processing: TransactionMeta::read_xdr(r)?,
47 post_tx_apply_fee_processing: LedgerEntryChanges::read_xdr(r)?,
48 })
49 })
50 }
51}
52
53impl WriteXdr for TransactionResultMetaV1 {
54 #[cfg(feature = "std")]
55 fn write_xdr<W: Write>(&self, w: &mut Limited<W>) -> Result<(), Error> {
56 w.with_limited_depth(|w| {
57 self.ext.write_xdr(w)?;
58 self.result.write_xdr(w)?;
59 self.fee_processing.write_xdr(w)?;
60 self.tx_apply_processing.write_xdr(w)?;
61 self.post_tx_apply_fee_processing.write_xdr(w)?;
62 Ok(())
63 })
64 }
65}