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