stellar_xdr/generated/
send_more.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 SendMore {
25 pub num_messages: u32,
26}
27
28impl ReadXdr for SendMore {
29 #[cfg(feature = "std")]
30 fn read_xdr<R: Read>(r: &mut Limited<R>) -> Result<Self, Error> {
31 r.with_limited_depth(|r| {
32 Ok(Self {
33 num_messages: u32::read_xdr(r)?,
34 })
35 })
36 }
37}
38
39impl WriteXdr for SendMore {
40 #[cfg(feature = "std")]
41 fn write_xdr<W: Write>(&self, w: &mut Limited<W>) -> Result<(), Error> {
42 w.with_limited_depth(|w| {
43 self.num_messages.write_xdr(w)?;
44 Ok(())
45 })
46 }
47}