From 4b490d6281ad5468c532540d3ab7e17eea20ead3 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Thu, 12 Sep 2024 12:36:09 +0800 Subject: [PATCH 01/14] feat: add support for `no_std` env --- Cargo.lock | 21 +- Cargo.toml | 11 +- Makefile | 7 +- README.md | 5 +- src/curr/generated.rs | 1983 ++++++++++++++++++++-------------------- src/next/generated.rs | 1999 +++++++++++++++++++++-------------------- 6 files changed, 2073 insertions(+), 1953 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d8281753..f0f0acbf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -250,6 +250,20 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + +[[package]] +name = "embedded-io-cursor" +version = "0.0.1" +source = "git+https://github.com/lightsail-network/embedded-io-cursor?rev=0b7ff9270d7ec1d3204375650f04cb0258ac1ada#0b7ff9270d7ec1d3204375650f04cb0258ac1ada" +dependencies = [ + "embedded-io", +] + [[package]] name = "escape-bytes" version = "0.1.1" @@ -523,13 +537,12 @@ dependencies = [ [[package]] name = "stellar-strkey" -version = "0.0.9" +version = "0.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3aa3ed00e70082cb43febc1c2afa5056b9bb3e348bbb43d0cd0aa88a611144" +checksum = "0989c9a05eccbd08b60e603a1c7e3ed3ec92c0de73b8681fc964d272ab2b2697" dependencies = [ "crate-git-revision", "data-encoding", - "thiserror", ] [[package]] @@ -540,6 +553,8 @@ dependencies = [ "base64 0.13.0", "clap", "crate-git-revision", + "embedded-io", + "embedded-io-cursor", "escape-bytes", "hex", "schemars", diff --git a/Cargo.toml b/Cargo.toml index e49d37b0..04e9d032 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,17 +19,20 @@ doctest = false crate-git-revision = "0.0.6" [dependencies] -stellar-strkey = { version = "0.0.9", optional = true } +stellar-strkey = { version = "0.0.11", optional = true } base64 = { version = "0.13.0", optional = true } serde = { version = "1.0.139", features = ["derive"], optional = true } serde_with = { version = "3.0.0", optional = true } escape-bytes = { version = "0.1.1", default-features = false } -hex = { version = "0.4.3", optional = true } -arbitrary = {version = "1.1.3", features = ["derive"], optional = true} +hex = { version = "0.4.3", default-features = false, optional = true } +arbitrary = { version = "1.1.3", features = ["derive"], optional = true } clap = { version = "4.2.4", default-features = false, features = ["std", "derive", "usage", "help"], optional = true } serde_json = { version = "1.0.89", optional = true } thiserror = { version = "1.0.37", optional = true } schemars = { version = "0.8.16", optional = true } +embedded-io = { version = "0.6.1", default-features = false, optional = true } +embedded-io-cursor = { git = "https://github.com/lightsail-network/embedded-io-cursor", rev = "0b7ff9270d7ec1d3204375650f04cb0258ac1ada", default-features = false, features = ["alloc"], optional = true } +# TODO: embedded-io-cursor not published yet. [dev-dependencies] serde_json = "1.0.89" @@ -37,7 +40,7 @@ serde_json = "1.0.89" [features] default = ["std", "curr"] std = ["alloc"] -alloc = ["dep:hex", "dep:stellar-strkey", "escape-bytes/alloc"] +alloc = ["dep:hex", "dep:stellar-strkey", "dep:embedded-io", "dep:embedded-io-cursor", "escape-bytes/alloc", "hex/alloc"] curr = [] next = [] diff --git a/Makefile b/Makefile index df67449a..e84da7be 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ CARGO_HACK_ARGS=--feature-powerset --exclude-features default --group-features b CARGO_DOC_ARGS?=--open -XDRGEN_VERSION=b7bc57ecdd277c9575930d3e17c12dfaa76655fc +# TODO: Update this after https://github.com/stellar/xdrgen/pull/205 is merged +XDRGEN_VERSION=ecf547f1bca98545378e55c7e55aa0ef3cf4e66a # XDRGEN_LOCAL=1 XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId @@ -44,7 +45,7 @@ src/curr/generated.rs: $(sort $(wildcard xdr/curr/*.x)) ifeq ($(XDRGEN_LOCAL),) docker run -i --rm -v $$PWD:/wd -w /wd docker.io/library/ruby:latest /bin/bash -c '\ gem install specific_install -v 0.3.8 && \ - gem specific_install https://github.com/stellar/xdrgen.git -b $(XDRGEN_VERSION) && \ + gem specific_install https://github.com/lightsail-network/xdrgen.git -b $(XDRGEN_VERSION) && \ xdrgen --language rust --namespace generated --output src/curr \ --rust-types-custom-str-impl $(XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR) \ --rust-types-custom-jsonschema-impl '$(XDRGEN_TYPES_CUSTOM_JSONSCHEMA_IMPL_CURR)' \ @@ -69,7 +70,7 @@ src/next/generated.rs: $(sort $(wildcard xdr/next/*.x)) ifeq ($(XDRGEN_LOCAL),) docker run -i --rm -v $$PWD:/wd -w /wd docker.io/library/ruby:latest /bin/bash -c '\ gem install specific_install -v 0.3.8 && \ - gem specific_install https://github.com/stellar/xdrgen.git -b $(XDRGEN_VERSION) && \ + gem specific_install https://github.com/lightsail-network/xdrgen.git -b $(XDRGEN_VERSION) && \ xdrgen --language rust --namespace generated --output src/next \ --rust-types-custom-str-impl $(XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT) \ --rust-types-custom-jsonschema-impl '$(XDRGEN_TYPES_CUSTOM_JSONSCHEMA_IMPL_NEXT)' \ diff --git a/README.md b/README.md index d46cb7ac..24b5395c 100644 --- a/README.md +++ b/README.md @@ -32,14 +32,13 @@ decode), and is the default feature set. 2. `alloc` – The alloc feature uses `Box` and `Vec` types for recursive references and arrays, and is automatically enabled if the std feature is enabled. The default global allocator is used. Support for a custom -allocator will be added in [#39]. No encode or decode capability exists, -only types. Encode and decode capability will be added in [#46]. +allocator will be added in [#39]. Encode or decode capability exists, +but still in an experimental stage, there may be breaking changes at any time. 3. If std or alloc are not enabled recursive and array types requires static lifetime values. No encode or decode capability exists. Encode and decode capability will be added in [#47]. [#39]: https://github.com/stellar/rs-stellar-xdr/issues/39 -[#46]: https://github.com/stellar/rs-stellar-xdr/issues/46 [#47]: https://github.com/stellar/rs-stellar-xdr/issues/47 Ancillary functionality: diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 3d671600..eceae393 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -93,6 +93,7 @@ use alloc::{ borrow::ToOwned, boxed::Box, string::{FromUtf8Error, String}, + vec, vec::Vec, }; #[cfg(feature = "std")] @@ -101,14 +102,17 @@ use std::string::FromUtf8Error; #[cfg(feature = "arbitrary")] use arbitrary::Arbitrary; -// TODO: Add support for read/write xdr fns when std not available. - #[cfg(feature = "std")] use std::{ error, io, io::{BufRead, BufReader, Cursor, Read, Write}, }; +#[cfg(all(not(feature = "std"), feature = "alloc"))] +use embedded_io::{Error as _, ErrorType, Read, Write}; +#[cfg(all(not(feature = "std"), feature = "alloc"))] +use embedded_io_cursor::Cursor; + /// Error contains all errors returned by functions in this crate. It can be /// compared via `PartialEq`, however any contained IO errors will only be /// compared on their `ErrorKind`. @@ -124,6 +128,8 @@ pub enum Error { InvalidHex, #[cfg(feature = "std")] Io(io::Error), + #[cfg(all(not(feature = "std"), feature = "alloc"))] + Io(embedded_io::ErrorKind), DepthLimitExceeded, #[cfg(feature = "serde_json")] Json(serde_json::Error), @@ -140,13 +146,33 @@ impl PartialEq for Error { // case for comparing errors outputted by the XDR library is for // error case testing, and a lack of the ability to compare has a // detrimental affect on failure testing, so this is a tradeoff. - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] (Self::Io(l), Self::Io(r)) => l.kind() == r.kind(), _ => core::mem::discriminant(self) == core::mem::discriminant(other), } } } +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl embedded_io::Error for Error { + fn kind(&self) -> embedded_io::ErrorKind { + match self { + Self::Io(e) => *e, + _ => embedded_io::ErrorKind::Other, + } + } +} + +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl From> for Error { + fn from(value: embedded_io::ReadExactError) -> Self { + match value { + embedded_io::ReadExactError::UnexpectedEof => Error::Io(embedded_io::ErrorKind::Other), + embedded_io::ReadExactError::Other(e) => e, + } + } +} + #[cfg(feature = "std")] impl error::Error for Error { #[must_use] @@ -173,6 +199,8 @@ impl fmt::Display for Error { Error::InvalidHex => write!(f, "hex invalid"), #[cfg(feature = "std")] Error::Io(e) => write!(f, "{e}"), + #[cfg(all(not(feature = "std"), feature = "alloc"))] + Error::Io(_) => write!(f, "io error"), Error::DepthLimitExceeded => write!(f, "depth limit exceeded"), #[cfg(feature = "serde_json")] Error::Json(e) => write!(f, "{e}"), @@ -225,6 +253,11 @@ impl From for () { #[allow(dead_code)] type Result = core::result::Result; +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl ErrorType for Limited { + type Error = Error; +} + /// Name defines types that assign a static name to their value, such as the /// name given to an identifier in an XDR enum, or the name given to the case in /// a union. @@ -258,7 +291,7 @@ where /// `Limits` contains the limits that a limited reader or writer will be /// constrained to. -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] #[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Limits { /// Defines the maximum depth for recursive calls in `Read/WriteXdr` to @@ -275,7 +308,7 @@ pub struct Limits { pub len: usize, } -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] impl Limits { #[must_use] pub fn none() -> Self { @@ -306,13 +339,13 @@ impl Limits { /// /// Intended for use with readers and writers and limiting their reads and /// writes. -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] pub struct Limited { pub inner: L, pub(crate) limits: Limits, } -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] impl Limited { /// Constructs a new `Limited`. /// @@ -365,6 +398,14 @@ impl Read for Limited { } } +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl Read for Limited { + /// Forwards the read operation to the wrapped object. + fn read(&mut self, buf: &mut [u8]) -> core::result::Result { + self.inner.read(buf).map_err(|e| Error::Io(e.kind())) + } +} + #[cfg(feature = "std")] impl BufRead for Limited { /// Forwards the read operation to the wrapped object. @@ -391,6 +432,18 @@ impl Write for Limited { } } +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl Write for Limited { + /// Forwards the write operation to the wrapped object. + fn write(&mut self, buf: &[u8]) -> core::result::Result { + self.inner.write(buf).map_err(|e| Error::Io(e.kind())) + } + + fn flush(&mut self) -> core::result::Result<(), Self::Error> { + self.inner.flush().map_err(|e| Error::Io(e.kind())) + } +} + #[cfg(feature = "std")] pub struct ReadXdrIter { reader: Limited>, @@ -464,7 +517,7 @@ where /// /// Use [`ReadXdR: Read_xdr_to_end`] when the intent is for all bytes in the /// read implementation to be consumed by the read. - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result; /// Construct the type from the XDR bytes base64 encoded. @@ -499,7 +552,7 @@ where /// /// All implementations should continue if the read implementation returns /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr_to_end(r: &mut Limited) -> Result { let s = Self::read_xdr(r)?; // Check that any further reads, such as this read of one byte, read no @@ -539,7 +592,7 @@ where /// /// Use [`ReadXdR: Read_xdr_into_to_end`] when the intent is for all bytes /// in the read implementation to be consumed by the read. - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr_into(&mut self, r: &mut Limited) -> Result<()> { *self = Self::read_xdr(r)?; Ok(()) @@ -563,7 +616,7 @@ where /// /// All implementations should continue if the read implementation returns /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr_into_to_end(&mut self, r: &mut Limited) -> Result<()> { Self::read_xdr_into(self, r)?; // Check that any further reads, such as this read of one byte, read no @@ -612,7 +665,7 @@ where /// /// An error is returned if the bytes are not completely consumed by the /// deserialization. - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn from_xdr(bytes: impl AsRef<[u8]>, limits: Limits) -> Result { let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); let t = Self::read_xdr_to_end(&mut cursor)?; @@ -636,10 +689,10 @@ where } pub trait WriteXdr { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()>; - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn to_xdr(&self, limits: Limits) -> Result> { let mut cursor = Limited::new(Cursor::new(vec![]), limits); self.write_xdr(&mut cursor)?; @@ -661,13 +714,13 @@ pub trait WriteXdr { /// `Pad_len` returns the number of bytes to pad an XDR value of the given /// length to make the final serialized size a multiple of 4. -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] fn pad_len(len: usize) -> usize { (4 - (len % 4)) % 4 } impl ReadXdr for i32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 4]; r.with_limited_depth(|r| { @@ -679,7 +732,7 @@ impl ReadXdr for i32 { } impl WriteXdr for i32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 4] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -690,7 +743,7 @@ impl WriteXdr for i32 { } impl ReadXdr for u32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 4]; r.with_limited_depth(|r| { @@ -702,7 +755,7 @@ impl ReadXdr for u32 { } impl WriteXdr for u32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 4] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -713,7 +766,7 @@ impl WriteXdr for u32 { } impl ReadXdr for i64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 8]; r.with_limited_depth(|r| { @@ -725,7 +778,7 @@ impl ReadXdr for i64 { } impl WriteXdr for i64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 8] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -736,7 +789,7 @@ impl WriteXdr for i64 { } impl ReadXdr for u64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 8]; r.with_limited_depth(|r| { @@ -748,7 +801,7 @@ impl ReadXdr for u64 { } impl WriteXdr for u64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 8] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -759,35 +812,35 @@ impl WriteXdr for u64 { } impl ReadXdr for f32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(_r: &mut Limited) -> Result { todo!() } } impl WriteXdr for f32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { todo!() } } impl ReadXdr for f64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(_r: &mut Limited) -> Result { todo!() } } impl WriteXdr for f64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { todo!() } } impl ReadXdr for bool { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u32::read_xdr(r)?; @@ -798,7 +851,7 @@ impl ReadXdr for bool { } impl WriteXdr for bool { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i = u32::from(*self); // true = 1, false = 0 @@ -808,7 +861,7 @@ impl WriteXdr for bool { } impl ReadXdr for Option { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u32::read_xdr(r)?; @@ -825,7 +878,7 @@ impl ReadXdr for Option { } impl WriteXdr for Option { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { if let Some(t) = self { @@ -840,35 +893,35 @@ impl WriteXdr for Option { } impl ReadXdr for Box { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| Ok(Box::new(T::read_xdr(r)?))) } } impl WriteXdr for Box { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| T::write_xdr(self, w)) } } impl ReadXdr for () { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(_r: &mut Limited) -> Result { Ok(()) } } impl WriteXdr for () { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { Ok(()) } } impl ReadXdr for [u8; N] { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { r.consume_len(N)?; @@ -887,7 +940,7 @@ impl ReadXdr for [u8; N] { } impl WriteXdr for [u8; N] { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { w.consume_len(N)?; @@ -901,7 +954,7 @@ impl WriteXdr for [u8; N] { } impl ReadXdr for [T; N] { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let mut vec = Vec::with_capacity(N); @@ -916,7 +969,7 @@ impl ReadXdr for [T; N] { } impl WriteXdr for [T; N] { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { for t in self { @@ -1275,7 +1328,7 @@ impl<'a, const MAX: u32> TryFrom<&'a VecM> for &'a str { } impl ReadXdr for VecM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -1302,7 +1355,7 @@ impl ReadXdr for VecM { } impl WriteXdr for VecM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -1322,7 +1375,7 @@ impl WriteXdr for VecM { } impl ReadXdr for VecM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len = u32::read_xdr(r)?; @@ -1342,7 +1395,7 @@ impl ReadXdr for VecM { } impl WriteXdr for VecM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -1715,7 +1768,7 @@ impl<'a, const MAX: u32> TryFrom<&'a BytesM> for &'a str { } impl ReadXdr for BytesM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -1742,7 +1795,7 @@ impl ReadXdr for BytesM { } impl WriteXdr for BytesM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -2118,7 +2171,7 @@ impl<'a, const MAX: u32> TryFrom<&'a StringM> for &'a str { } impl ReadXdr for StringM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -2145,7 +2198,7 @@ impl ReadXdr for StringM { } impl WriteXdr for StringM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -2191,7 +2244,7 @@ impl ReadXdr for Frame where T: ReadXdr, { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { // Read the frame header value that contains 1 flag-bit and a 33-bit length. // - The 1 flag bit is 0 when there are more frames for the same record. @@ -2211,10 +2264,8 @@ where } } -#[cfg(all(test, feature = "std"))] +#[cfg(all(test, feature = "alloc"))] mod tests { - use std::io::Cursor; - use super::*; #[test] @@ -2323,7 +2374,7 @@ mod tests { } } -#[cfg(all(test, feature = "std"))] +#[cfg(all(test, feature = "alloc"))] mod test { use super::*; @@ -2876,7 +2927,7 @@ impl AsRef for Value { } impl ReadXdr for Value { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::read_xdr(r)?; @@ -2887,7 +2938,7 @@ impl ReadXdr for Value { } impl WriteXdr for Value { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -2966,7 +3017,7 @@ pub struct ScpBallot { } impl ReadXdr for ScpBallot { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -2978,7 +3029,7 @@ impl ReadXdr for ScpBallot { } impl WriteXdr for ScpBallot { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.counter.write_xdr(w)?; @@ -3087,7 +3138,7 @@ impl From for i32 { } impl ReadXdr for ScpStatementType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -3098,7 +3149,7 @@ impl ReadXdr for ScpStatementType { } impl WriteXdr for ScpStatementType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -3133,7 +3184,7 @@ pub struct ScpNomination { } impl ReadXdr for ScpNomination { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3146,7 +3197,7 @@ impl ReadXdr for ScpNomination { } impl WriteXdr for ScpNomination { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_set_hash.write_xdr(w)?; @@ -3189,7 +3240,7 @@ pub struct ScpStatementPrepare { } impl ReadXdr for ScpStatementPrepare { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3205,7 +3256,7 @@ impl ReadXdr for ScpStatementPrepare { } impl WriteXdr for ScpStatementPrepare { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_set_hash.write_xdr(w)?; @@ -3249,7 +3300,7 @@ pub struct ScpStatementConfirm { } impl ReadXdr for ScpStatementConfirm { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3264,7 +3315,7 @@ impl ReadXdr for ScpStatementConfirm { } impl WriteXdr for ScpStatementConfirm { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ballot.write_xdr(w)?; @@ -3303,7 +3354,7 @@ pub struct ScpStatementExternalize { } impl ReadXdr for ScpStatementExternalize { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3316,7 +3367,7 @@ impl ReadXdr for ScpStatementExternalize { } impl WriteXdr for ScpStatementExternalize { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.commit.write_xdr(w)?; @@ -3439,7 +3490,7 @@ impl Variants for ScpStatementPledges { impl Union for ScpStatementPledges {} impl ReadXdr for ScpStatementPledges { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScpStatementType = ::read_xdr(r)?; @@ -3460,7 +3511,7 @@ impl ReadXdr for ScpStatementPledges { } impl WriteXdr for ScpStatementPledges { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -3534,7 +3585,7 @@ pub struct ScpStatement { } impl ReadXdr for ScpStatement { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3547,7 +3598,7 @@ impl ReadXdr for ScpStatement { } impl WriteXdr for ScpStatement { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.node_id.write_xdr(w)?; @@ -3582,7 +3633,7 @@ pub struct ScpEnvelope { } impl ReadXdr for ScpEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3594,7 +3645,7 @@ impl ReadXdr for ScpEnvelope { } impl WriteXdr for ScpEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.statement.write_xdr(w)?; @@ -3630,7 +3681,7 @@ pub struct ScpQuorumSet { } impl ReadXdr for ScpQuorumSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3643,7 +3694,7 @@ impl ReadXdr for ScpQuorumSet { } impl WriteXdr for ScpQuorumSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.threshold.write_xdr(w)?; @@ -3677,7 +3728,7 @@ pub struct ConfigSettingContractExecutionLanesV0 { } impl ReadXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3688,7 +3739,7 @@ impl ReadXdr for ConfigSettingContractExecutionLanesV0 { } impl WriteXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_tx_count.write_xdr(w)?; @@ -3731,7 +3782,7 @@ pub struct ConfigSettingContractComputeV0 { } impl ReadXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3745,7 +3796,7 @@ impl ReadXdr for ConfigSettingContractComputeV0 { } impl WriteXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_instructions.write_xdr(w)?; @@ -3824,7 +3875,7 @@ pub struct ConfigSettingContractLedgerCostV0 { } impl ReadXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3849,7 +3900,7 @@ impl ReadXdr for ConfigSettingContractLedgerCostV0 { } impl WriteXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_read_ledger_entries.write_xdr(w)?; @@ -3894,7 +3945,7 @@ pub struct ConfigSettingContractHistoricalDataV0 { } impl ReadXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3905,7 +3956,7 @@ impl ReadXdr for ConfigSettingContractHistoricalDataV0 { } impl WriteXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_historical1_kb.write_xdr(w)?; @@ -3940,7 +3991,7 @@ pub struct ConfigSettingContractEventsV0 { } impl ReadXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3952,7 +4003,7 @@ impl ReadXdr for ConfigSettingContractEventsV0 { } impl WriteXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_max_contract_events_size_bytes.write_xdr(w)?; @@ -3992,7 +4043,7 @@ pub struct ConfigSettingContractBandwidthV0 { } impl ReadXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4005,7 +4056,7 @@ impl ReadXdr for ConfigSettingContractBandwidthV0 { } impl WriteXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_txs_size_bytes.write_xdr(w)?; @@ -4581,7 +4632,7 @@ impl From for i32 { } impl ReadXdr for ContractCostType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -4592,7 +4643,7 @@ impl ReadXdr for ContractCostType { } impl WriteXdr for ContractCostType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -4628,7 +4679,7 @@ pub struct ContractCostParamEntry { } impl ReadXdr for ContractCostParamEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4641,7 +4692,7 @@ impl ReadXdr for ContractCostParamEntry { } impl WriteXdr for ContractCostParamEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -4703,7 +4754,7 @@ pub struct StateArchivalSettings { } impl ReadXdr for StateArchivalSettings { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4723,7 +4774,7 @@ impl ReadXdr for StateArchivalSettings { } impl WriteXdr for StateArchivalSettings { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.max_entry_ttl.write_xdr(w)?; @@ -4766,7 +4817,7 @@ pub struct EvictionIterator { } impl ReadXdr for EvictionIterator { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4779,7 +4830,7 @@ impl ReadXdr for EvictionIterator { } impl WriteXdr for EvictionIterator { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.bucket_list_level.write_xdr(w)?; @@ -4838,7 +4889,7 @@ impl AsRef> for ContractCostParams { } impl ReadXdr for ContractCostParams { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -4849,7 +4900,7 @@ impl ReadXdr for ContractCostParams { } impl WriteXdr for ContractCostParams { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -5068,7 +5119,7 @@ impl From for i32 { } impl ReadXdr for ConfigSettingId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5079,7 +5130,7 @@ impl ReadXdr for ConfigSettingId { } impl WriteXdr for ConfigSettingId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5259,7 +5310,7 @@ impl Variants for ConfigSettingEntry { impl Union for ConfigSettingEntry {} impl ReadXdr for ConfigSettingEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ConfigSettingId = ::read_xdr(r)?; @@ -5316,7 +5367,7 @@ impl ReadXdr for ConfigSettingEntry { } impl WriteXdr for ConfigSettingEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -5424,7 +5475,7 @@ impl From for i32 { } impl ReadXdr for ScEnvMetaKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5435,7 +5486,7 @@ impl ReadXdr for ScEnvMetaKind { } impl WriteXdr for ScEnvMetaKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5467,7 +5518,7 @@ pub struct ScEnvMetaEntryInterfaceVersion { } impl ReadXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -5479,7 +5530,7 @@ impl ReadXdr for ScEnvMetaEntryInterfaceVersion { } impl WriteXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.protocol.write_xdr(w)?; @@ -5564,7 +5615,7 @@ impl Variants for ScEnvMetaEntry { impl Union for ScEnvMetaEntry {} impl ReadXdr for ScEnvMetaEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScEnvMetaKind = ::read_xdr(r)?; @@ -5584,7 +5635,7 @@ impl ReadXdr for ScEnvMetaEntry { } impl WriteXdr for ScEnvMetaEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -5621,7 +5672,7 @@ pub struct ScMetaV0 { } impl ReadXdr for ScMetaV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -5633,7 +5684,7 @@ impl ReadXdr for ScMetaV0 { } impl WriteXdr for ScMetaV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -5725,7 +5776,7 @@ impl From for i32 { } impl ReadXdr for ScMetaKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5736,7 +5787,7 @@ impl ReadXdr for ScMetaKind { } impl WriteXdr for ScMetaKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5817,7 +5868,7 @@ impl Variants for ScMetaEntry { impl Union for ScMetaEntry {} impl ReadXdr for ScMetaEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScMetaKind = ::read_xdr(r)?; @@ -5833,7 +5884,7 @@ impl ReadXdr for ScMetaEntry { } impl WriteXdr for ScMetaEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -6090,7 +6141,7 @@ impl From for i32 { } impl ReadXdr for ScSpecType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -6101,7 +6152,7 @@ impl ReadXdr for ScSpecType { } impl WriteXdr for ScSpecType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -6132,7 +6183,7 @@ pub struct ScSpecTypeOption { } impl ReadXdr for ScSpecTypeOption { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6143,7 +6194,7 @@ impl ReadXdr for ScSpecTypeOption { } impl WriteXdr for ScSpecTypeOption { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.value_type.write_xdr(w)?; @@ -6176,7 +6227,7 @@ pub struct ScSpecTypeResult { } impl ReadXdr for ScSpecTypeResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6188,7 +6239,7 @@ impl ReadXdr for ScSpecTypeResult { } impl WriteXdr for ScSpecTypeResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ok_type.write_xdr(w)?; @@ -6220,7 +6271,7 @@ pub struct ScSpecTypeVec { } impl ReadXdr for ScSpecTypeVec { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6231,7 +6282,7 @@ impl ReadXdr for ScSpecTypeVec { } impl WriteXdr for ScSpecTypeVec { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.element_type.write_xdr(w)?; @@ -6264,7 +6315,7 @@ pub struct ScSpecTypeMap { } impl ReadXdr for ScSpecTypeMap { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6276,7 +6327,7 @@ impl ReadXdr for ScSpecTypeMap { } impl WriteXdr for ScSpecTypeMap { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_type.write_xdr(w)?; @@ -6308,7 +6359,7 @@ pub struct ScSpecTypeTuple { } impl ReadXdr for ScSpecTypeTuple { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6319,7 +6370,7 @@ impl ReadXdr for ScSpecTypeTuple { } impl WriteXdr for ScSpecTypeTuple { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.value_types.write_xdr(w)?; @@ -6350,7 +6401,7 @@ pub struct ScSpecTypeBytesN { } impl ReadXdr for ScSpecTypeBytesN { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6361,7 +6412,7 @@ impl ReadXdr for ScSpecTypeBytesN { } impl WriteXdr for ScSpecTypeBytesN { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.n.write_xdr(w)?; @@ -6392,7 +6443,7 @@ pub struct ScSpecTypeUdt { } impl ReadXdr for ScSpecTypeUdt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6403,7 +6454,7 @@ impl ReadXdr for ScSpecTypeUdt { } impl WriteXdr for ScSpecTypeUdt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.name.write_xdr(w)?; @@ -6639,7 +6690,7 @@ impl Variants for ScSpecTypeDef { impl Union for ScSpecTypeDef {} impl ReadXdr for ScSpecTypeDef { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecType = ::read_xdr(r)?; @@ -6679,7 +6730,7 @@ impl ReadXdr for ScSpecTypeDef { } impl WriteXdr for ScSpecTypeDef { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -6742,7 +6793,7 @@ pub struct ScSpecUdtStructFieldV0 { } impl ReadXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6755,7 +6806,7 @@ impl ReadXdr for ScSpecUdtStructFieldV0 { } impl WriteXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6794,7 +6845,7 @@ pub struct ScSpecUdtStructV0 { } impl ReadXdr for ScSpecUdtStructV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6808,7 +6859,7 @@ impl ReadXdr for ScSpecUdtStructV0 { } impl WriteXdr for ScSpecUdtStructV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6844,7 +6895,7 @@ pub struct ScSpecUdtUnionCaseVoidV0 { } impl ReadXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6856,7 +6907,7 @@ impl ReadXdr for ScSpecUdtUnionCaseVoidV0 { } impl WriteXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6892,7 +6943,7 @@ pub struct ScSpecUdtUnionCaseTupleV0 { } impl ReadXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6905,7 +6956,7 @@ impl ReadXdr for ScSpecUdtUnionCaseTupleV0 { } impl WriteXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7005,7 +7056,7 @@ impl From for i32 { } impl ReadXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -7016,7 +7067,7 @@ impl ReadXdr for ScSpecUdtUnionCaseV0Kind { } impl WriteXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -7105,7 +7156,7 @@ impl Variants for ScSpecUdtUnionCaseV0 { impl Union for ScSpecUdtUnionCaseV0 {} impl ReadXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecUdtUnionCaseV0Kind = ::read_xdr(r)?; @@ -7126,7 +7177,7 @@ impl ReadXdr for ScSpecUdtUnionCaseV0 { } impl WriteXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -7168,7 +7219,7 @@ pub struct ScSpecUdtUnionV0 { } impl ReadXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7182,7 +7233,7 @@ impl ReadXdr for ScSpecUdtUnionV0 { } impl WriteXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7220,7 +7271,7 @@ pub struct ScSpecUdtEnumCaseV0 { } impl ReadXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7233,7 +7284,7 @@ impl ReadXdr for ScSpecUdtEnumCaseV0 { } impl WriteXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7272,7 +7323,7 @@ pub struct ScSpecUdtEnumV0 { } impl ReadXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7286,7 +7337,7 @@ impl ReadXdr for ScSpecUdtEnumV0 { } impl WriteXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7324,7 +7375,7 @@ pub struct ScSpecUdtErrorEnumCaseV0 { } impl ReadXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7337,7 +7388,7 @@ impl ReadXdr for ScSpecUdtErrorEnumCaseV0 { } impl WriteXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7376,7 +7427,7 @@ pub struct ScSpecUdtErrorEnumV0 { } impl ReadXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7390,7 +7441,7 @@ impl ReadXdr for ScSpecUdtErrorEnumV0 { } impl WriteXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7428,7 +7479,7 @@ pub struct ScSpecFunctionInputV0 { } impl ReadXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7441,7 +7492,7 @@ impl ReadXdr for ScSpecFunctionInputV0 { } impl WriteXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7480,7 +7531,7 @@ pub struct ScSpecFunctionV0 { } impl ReadXdr for ScSpecFunctionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7494,7 +7545,7 @@ impl ReadXdr for ScSpecFunctionV0 { } impl WriteXdr for ScSpecFunctionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7616,7 +7667,7 @@ impl From for i32 { } impl ReadXdr for ScSpecEntryKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -7627,7 +7678,7 @@ impl ReadXdr for ScSpecEntryKind { } impl WriteXdr for ScSpecEntryKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -7740,7 +7791,7 @@ impl Variants for ScSpecEntry { impl Union for ScSpecEntry {} impl ReadXdr for ScSpecEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecEntryKind = ::read_xdr(r)?; @@ -7762,7 +7813,7 @@ impl ReadXdr for ScSpecEntry { } impl WriteXdr for ScSpecEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -8020,7 +8071,7 @@ impl From for i32 { } impl ReadXdr for ScValType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8031,7 +8082,7 @@ impl ReadXdr for ScValType { } impl WriteXdr for ScValType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8172,7 +8223,7 @@ impl From for i32 { } impl ReadXdr for ScErrorType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8183,7 +8234,7 @@ impl ReadXdr for ScErrorType { } impl WriteXdr for ScErrorType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8332,7 +8383,7 @@ impl From for i32 { } impl ReadXdr for ScErrorCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8343,7 +8394,7 @@ impl ReadXdr for ScErrorCode { } impl WriteXdr for ScErrorCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8475,7 +8526,7 @@ impl Variants for ScError { impl Union for ScError {} impl ReadXdr for ScError { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScErrorType = ::read_xdr(r)?; @@ -8500,7 +8551,7 @@ impl ReadXdr for ScError { } impl WriteXdr for ScError { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -8545,7 +8596,7 @@ pub struct UInt128Parts { } impl ReadXdr for UInt128Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8557,7 +8608,7 @@ impl ReadXdr for UInt128Parts { } impl WriteXdr for UInt128Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi.write_xdr(w)?; @@ -8590,7 +8641,7 @@ pub struct Int128Parts { } impl ReadXdr for Int128Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8602,7 +8653,7 @@ impl ReadXdr for Int128Parts { } impl WriteXdr for Int128Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi.write_xdr(w)?; @@ -8639,7 +8690,7 @@ pub struct UInt256Parts { } impl ReadXdr for UInt256Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8653,7 +8704,7 @@ impl ReadXdr for UInt256Parts { } impl WriteXdr for UInt256Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi_hi.write_xdr(w)?; @@ -8692,7 +8743,7 @@ pub struct Int256Parts { } impl ReadXdr for Int256Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8706,7 +8757,7 @@ impl ReadXdr for Int256Parts { } impl WriteXdr for Int256Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi_hi.write_xdr(w)?; @@ -8807,7 +8858,7 @@ impl From for i32 { } impl ReadXdr for ContractExecutableType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8818,7 +8869,7 @@ impl ReadXdr for ContractExecutableType { } impl WriteXdr for ContractExecutableType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8907,7 +8958,7 @@ impl Variants for ContractExecutable { impl Union for ContractExecutable {} impl ReadXdr for ContractExecutable { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ContractExecutableType = ::read_xdr(r)?; @@ -8924,7 +8975,7 @@ impl ReadXdr for ContractExecutable { } impl WriteXdr for ContractExecutable { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -9024,7 +9075,7 @@ impl From for i32 { } impl ReadXdr for ScAddressType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -9035,7 +9086,7 @@ impl ReadXdr for ScAddressType { } impl WriteXdr for ScAddressType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -9119,7 +9170,7 @@ impl Variants for ScAddress { impl Union for ScAddress {} impl ReadXdr for ScAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScAddressType = ::read_xdr(r)?; @@ -9136,7 +9187,7 @@ impl ReadXdr for ScAddress { } impl WriteXdr for ScAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -9198,7 +9249,7 @@ impl AsRef> for ScVec { } impl ReadXdr for ScVec { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -9209,7 +9260,7 @@ impl ReadXdr for ScVec { } impl WriteXdr for ScVec { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9304,7 +9355,7 @@ impl AsRef> for ScMap { } impl ReadXdr for ScMap { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -9315,7 +9366,7 @@ impl ReadXdr for ScMap { } impl WriteXdr for ScMap { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9410,7 +9461,7 @@ impl AsRef for ScBytes { } impl ReadXdr for ScBytes { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::read_xdr(r)?; @@ -9421,7 +9472,7 @@ impl ReadXdr for ScBytes { } impl WriteXdr for ScBytes { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9516,7 +9567,7 @@ impl AsRef for ScString { } impl ReadXdr for ScString { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::read_xdr(r)?; @@ -9527,7 +9578,7 @@ impl ReadXdr for ScString { } impl WriteXdr for ScString { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9622,7 +9673,7 @@ impl AsRef> for ScSymbol { } impl ReadXdr for ScSymbol { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<32>::read_xdr(r)?; @@ -9633,7 +9684,7 @@ impl ReadXdr for ScSymbol { } impl WriteXdr for ScSymbol { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9709,7 +9760,7 @@ pub struct ScNonceKey { } impl ReadXdr for ScNonceKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -9720,7 +9771,7 @@ impl ReadXdr for ScNonceKey { } impl WriteXdr for ScNonceKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.nonce.write_xdr(w)?; @@ -9752,7 +9803,7 @@ pub struct ScContractInstance { } impl ReadXdr for ScContractInstance { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -9764,7 +9815,7 @@ impl ReadXdr for ScContractInstance { } impl WriteXdr for ScContractInstance { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.executable.write_xdr(w)?; @@ -10011,7 +10062,7 @@ impl Variants for ScVal { impl Union for ScVal {} impl ReadXdr for ScVal { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScValType = ::read_xdr(r)?; @@ -10050,7 +10101,7 @@ impl ReadXdr for ScVal { } impl WriteXdr for ScVal { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10108,7 +10159,7 @@ pub struct ScMapEntry { } impl ReadXdr for ScMapEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10120,7 +10171,7 @@ impl ReadXdr for ScMapEntry { } impl WriteXdr for ScMapEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -10207,7 +10258,7 @@ impl Variants for StoredTransactionSet { impl Union for StoredTransactionSet {} impl ReadXdr for StoredTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -10224,7 +10275,7 @@ impl ReadXdr for StoredTransactionSet { } impl WriteXdr for StoredTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10264,7 +10315,7 @@ pub struct StoredDebugTransactionSet { } impl ReadXdr for StoredDebugTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10277,7 +10328,7 @@ impl ReadXdr for StoredDebugTransactionSet { } impl WriteXdr for StoredDebugTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_set.write_xdr(w)?; @@ -10314,7 +10365,7 @@ pub struct PersistedScpStateV0 { } impl ReadXdr for PersistedScpStateV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10327,7 +10378,7 @@ impl ReadXdr for PersistedScpStateV0 { } impl WriteXdr for PersistedScpStateV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.scp_envelopes.write_xdr(w)?; @@ -10363,7 +10414,7 @@ pub struct PersistedScpStateV1 { } impl ReadXdr for PersistedScpStateV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10375,7 +10426,7 @@ impl ReadXdr for PersistedScpStateV1 { } impl WriteXdr for PersistedScpStateV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.scp_envelopes.write_xdr(w)?; @@ -10462,7 +10513,7 @@ impl Variants for PersistedScpState { impl Union for PersistedScpState {} impl ReadXdr for PersistedScpState { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -10479,7 +10530,7 @@ impl ReadXdr for PersistedScpState { } impl WriteXdr for PersistedScpState { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10590,7 +10641,7 @@ impl AsRef<[u8; 4]> for Thresholds { } impl ReadXdr for Thresholds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -10601,7 +10652,7 @@ impl ReadXdr for Thresholds { } impl WriteXdr for Thresholds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10684,7 +10735,7 @@ impl AsRef> for String32 { } impl ReadXdr for String32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<32>::read_xdr(r)?; @@ -10695,7 +10746,7 @@ impl ReadXdr for String32 { } impl WriteXdr for String32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10790,7 +10841,7 @@ impl AsRef> for String64 { } impl ReadXdr for String64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<64>::read_xdr(r)?; @@ -10801,7 +10852,7 @@ impl ReadXdr for String64 { } impl WriteXdr for String64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10895,7 +10946,7 @@ impl AsRef for SequenceNumber { } impl ReadXdr for SequenceNumber { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = i64::read_xdr(r)?; @@ -10906,7 +10957,7 @@ impl ReadXdr for SequenceNumber { } impl WriteXdr for SequenceNumber { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10952,7 +11003,7 @@ impl AsRef> for DataValue { } impl ReadXdr for DataValue { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64>::read_xdr(r)?; @@ -10963,7 +11014,7 @@ impl ReadXdr for DataValue { } impl WriteXdr for DataValue { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11057,7 +11108,7 @@ impl AsRef for PoolId { } impl ReadXdr for PoolId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = Hash::read_xdr(r)?; @@ -11068,7 +11119,7 @@ impl ReadXdr for PoolId { } impl WriteXdr for PoolId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11121,7 +11172,7 @@ impl AsRef<[u8; 4]> for AssetCode4 { } impl ReadXdr for AssetCode4 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -11132,7 +11183,7 @@ impl ReadXdr for AssetCode4 { } impl WriteXdr for AssetCode4 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11222,7 +11273,7 @@ impl AsRef<[u8; 12]> for AssetCode12 { } impl ReadXdr for AssetCode12 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 12]>::read_xdr(r)?; @@ -11233,7 +11284,7 @@ impl ReadXdr for AssetCode12 { } impl WriteXdr for AssetCode12 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11376,7 +11427,7 @@ impl From for i32 { } impl ReadXdr for AssetType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -11387,7 +11438,7 @@ impl ReadXdr for AssetType { } impl WriteXdr for AssetType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -11474,7 +11525,7 @@ impl Variants for AssetCode { impl Union for AssetCode {} impl ReadXdr for AssetCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -11491,7 +11542,7 @@ impl ReadXdr for AssetCode { } impl WriteXdr for AssetCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -11529,7 +11580,7 @@ pub struct AlphaNum4 { } impl ReadXdr for AlphaNum4 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11541,7 +11592,7 @@ impl ReadXdr for AlphaNum4 { } impl WriteXdr for AlphaNum4 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_code.write_xdr(w)?; @@ -11575,7 +11626,7 @@ pub struct AlphaNum12 { } impl ReadXdr for AlphaNum12 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11587,7 +11638,7 @@ impl ReadXdr for AlphaNum12 { } impl WriteXdr for AlphaNum12 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_code.write_xdr(w)?; @@ -11687,7 +11738,7 @@ impl Variants for Asset { impl Union for Asset {} impl ReadXdr for Asset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -11705,7 +11756,7 @@ impl ReadXdr for Asset { } impl WriteXdr for Asset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -11744,7 +11795,7 @@ pub struct Price { } impl ReadXdr for Price { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11756,7 +11807,7 @@ impl ReadXdr for Price { } impl WriteXdr for Price { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.n.write_xdr(w)?; @@ -11790,7 +11841,7 @@ pub struct Liabilities { } impl ReadXdr for Liabilities { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11802,7 +11853,7 @@ impl ReadXdr for Liabilities { } impl WriteXdr for Liabilities { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.buying.write_xdr(w)?; @@ -11911,7 +11962,7 @@ impl From for i32 { } impl ReadXdr for ThresholdIndexes { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -11922,7 +11973,7 @@ impl ReadXdr for ThresholdIndexes { } impl WriteXdr for ThresholdIndexes { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12071,7 +12122,7 @@ impl From for i32 { } impl ReadXdr for LedgerEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -12082,7 +12133,7 @@ impl ReadXdr for LedgerEntryType { } impl WriteXdr for LedgerEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12115,7 +12166,7 @@ pub struct Signer { } impl ReadXdr for Signer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12127,7 +12178,7 @@ impl ReadXdr for Signer { } impl WriteXdr for Signer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -12251,7 +12302,7 @@ impl From for i32 { } impl ReadXdr for AccountFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -12262,7 +12313,7 @@ impl ReadXdr for AccountFlags { } impl WriteXdr for AccountFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12334,7 +12385,7 @@ impl AsRef> for SponsorshipDescriptor { } impl ReadXdr for SponsorshipDescriptor { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = Option::::read_xdr(r)?; @@ -12345,7 +12396,7 @@ impl ReadXdr for SponsorshipDescriptor { } impl WriteXdr for SponsorshipDescriptor { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -12383,7 +12434,7 @@ pub struct AccountEntryExtensionV3 { } impl ReadXdr for AccountEntryExtensionV3 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12396,7 +12447,7 @@ impl ReadXdr for AccountEntryExtensionV3 { } impl WriteXdr for AccountEntryExtensionV3 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -12484,7 +12535,7 @@ impl Variants for AccountEntryExtensionV2Ext { impl Union for AccountEntryExtensionV2Ext {} impl ReadXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12501,7 +12552,7 @@ impl ReadXdr for AccountEntryExtensionV2Ext { } impl WriteXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12551,7 +12602,7 @@ pub struct AccountEntryExtensionV2 { } impl ReadXdr for AccountEntryExtensionV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12565,7 +12616,7 @@ impl ReadXdr for AccountEntryExtensionV2 { } impl WriteXdr for AccountEntryExtensionV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_sponsored.write_xdr(w)?; @@ -12654,7 +12705,7 @@ impl Variants for AccountEntryExtensionV1Ext { impl Union for AccountEntryExtensionV1Ext {} impl ReadXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12671,7 +12722,7 @@ impl ReadXdr for AccountEntryExtensionV1Ext { } impl WriteXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12717,7 +12768,7 @@ pub struct AccountEntryExtensionV1 { } impl ReadXdr for AccountEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12729,7 +12780,7 @@ impl ReadXdr for AccountEntryExtensionV1 { } impl WriteXdr for AccountEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liabilities.write_xdr(w)?; @@ -12816,7 +12867,7 @@ impl Variants for AccountEntryExt { impl Union for AccountEntryExt {} impl ReadXdr for AccountEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12833,7 +12884,7 @@ impl ReadXdr for AccountEntryExt { } impl WriteXdr for AccountEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12902,7 +12953,7 @@ pub struct AccountEntry { } impl ReadXdr for AccountEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12922,7 +12973,7 @@ impl ReadXdr for AccountEntry { } impl WriteXdr for AccountEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -13043,7 +13094,7 @@ impl From for i32 { } impl ReadXdr for TrustLineFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13054,7 +13105,7 @@ impl ReadXdr for TrustLineFlags { } impl WriteXdr for TrustLineFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -13169,7 +13220,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13180,7 +13231,7 @@ impl ReadXdr for LiquidityPoolType { } impl WriteXdr for LiquidityPoolType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -13287,7 +13338,7 @@ impl Variants for TrustLineAsset { impl Union for TrustLineAsset {} impl ReadXdr for TrustLineAsset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -13306,7 +13357,7 @@ impl ReadXdr for TrustLineAsset { } impl WriteXdr for TrustLineAsset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13394,7 +13445,7 @@ impl Variants for TrustLineEntryExtensionV2Ext { impl Union for TrustLineEntryExtensionV2Ext {} impl ReadXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13410,7 +13461,7 @@ impl ReadXdr for TrustLineEntryExtensionV2Ext { } impl WriteXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13453,7 +13504,7 @@ pub struct TrustLineEntryExtensionV2 { } impl ReadXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13465,7 +13516,7 @@ impl ReadXdr for TrustLineEntryExtensionV2 { } impl WriteXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_use_count.write_xdr(w)?; @@ -13552,7 +13603,7 @@ impl Variants for TrustLineEntryV1Ext { impl Union for TrustLineEntryV1Ext {} impl ReadXdr for TrustLineEntryV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13569,7 +13620,7 @@ impl ReadXdr for TrustLineEntryV1Ext { } impl WriteXdr for TrustLineEntryV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13615,7 +13666,7 @@ pub struct TrustLineEntryV1 { } impl ReadXdr for TrustLineEntryV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13627,7 +13678,7 @@ impl ReadXdr for TrustLineEntryV1 { } impl WriteXdr for TrustLineEntryV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liabilities.write_xdr(w)?; @@ -13726,7 +13777,7 @@ impl Variants for TrustLineEntryExt { impl Union for TrustLineEntryExt {} impl ReadXdr for TrustLineEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13743,7 +13794,7 @@ impl ReadXdr for TrustLineEntryExt { } impl WriteXdr for TrustLineEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13812,7 +13863,7 @@ pub struct TrustLineEntry { } impl ReadXdr for TrustLineEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13828,7 +13879,7 @@ impl ReadXdr for TrustLineEntry { } impl WriteXdr for TrustLineEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -13926,7 +13977,7 @@ impl From for i32 { } impl ReadXdr for OfferEntryFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13937,7 +13988,7 @@ impl ReadXdr for OfferEntryFlags { } impl WriteXdr for OfferEntryFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14026,7 +14077,7 @@ impl Variants for OfferEntryExt { impl Union for OfferEntryExt {} impl ReadXdr for OfferEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -14042,7 +14093,7 @@ impl ReadXdr for OfferEntryExt { } impl WriteXdr for OfferEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14104,7 +14155,7 @@ pub struct OfferEntry { } impl ReadXdr for OfferEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14122,7 +14173,7 @@ impl ReadXdr for OfferEntry { } impl WriteXdr for OfferEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -14210,7 +14261,7 @@ impl Variants for DataEntryExt { impl Union for DataEntryExt {} impl ReadXdr for DataEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -14226,7 +14277,7 @@ impl ReadXdr for DataEntryExt { } impl WriteXdr for DataEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14274,7 +14325,7 @@ pub struct DataEntry { } impl ReadXdr for DataEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14288,7 +14339,7 @@ impl ReadXdr for DataEntry { } impl WriteXdr for DataEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -14416,7 +14467,7 @@ impl From for i32 { } impl ReadXdr for ClaimPredicateType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14427,7 +14478,7 @@ impl ReadXdr for ClaimPredicateType { } impl WriteXdr for ClaimPredicateType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14548,7 +14599,7 @@ impl Variants for ClaimPredicate { impl Union for ClaimPredicate {} impl ReadXdr for ClaimPredicate { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimPredicateType = ::read_xdr(r)?; @@ -14573,7 +14624,7 @@ impl ReadXdr for ClaimPredicate { } impl WriteXdr for ClaimPredicate { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14673,7 +14724,7 @@ impl From for i32 { } impl ReadXdr for ClaimantType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14684,7 +14735,7 @@ impl ReadXdr for ClaimantType { } impl WriteXdr for ClaimantType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14717,7 +14768,7 @@ pub struct ClaimantV0 { } impl ReadXdr for ClaimantV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14729,7 +14780,7 @@ impl ReadXdr for ClaimantV0 { } impl WriteXdr for ClaimantV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -14815,7 +14866,7 @@ impl Variants for Claimant { impl Union for Claimant {} impl ReadXdr for Claimant { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimantType = ::read_xdr(r)?; @@ -14831,7 +14882,7 @@ impl ReadXdr for Claimant { } impl WriteXdr for Claimant { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14927,7 +14978,7 @@ impl From for i32 { } impl ReadXdr for ClaimableBalanceIdType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14938,7 +14989,7 @@ impl ReadXdr for ClaimableBalanceIdType { } impl WriteXdr for ClaimableBalanceIdType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15018,7 +15069,7 @@ impl Variants for ClaimableBalanceId { impl Union for ClaimableBalanceId {} impl ReadXdr for ClaimableBalanceId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimableBalanceIdType = ::read_xdr(r)?; @@ -15036,7 +15087,7 @@ impl ReadXdr for ClaimableBalanceId { } impl WriteXdr for ClaimableBalanceId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15134,7 +15185,7 @@ impl From for i32 { } impl ReadXdr for ClaimableBalanceFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -15145,7 +15196,7 @@ impl ReadXdr for ClaimableBalanceFlags { } impl WriteXdr for ClaimableBalanceFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15234,7 +15285,7 @@ impl Variants for ClaimableBalanceEntryExtensionV1Ext { impl Union for ClaimableBalanceEntryExtensionV1Ext {} impl ReadXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -15250,7 +15301,7 @@ impl ReadXdr for ClaimableBalanceEntryExtensionV1Ext { } impl WriteXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15293,7 +15344,7 @@ pub struct ClaimableBalanceEntryExtensionV1 { } impl ReadXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15305,7 +15356,7 @@ impl ReadXdr for ClaimableBalanceEntryExtensionV1 { } impl WriteXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -15392,7 +15443,7 @@ impl Variants for ClaimableBalanceEntryExt { impl Union for ClaimableBalanceEntryExt {} impl ReadXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -15409,7 +15460,7 @@ impl ReadXdr for ClaimableBalanceEntryExt { } impl WriteXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15469,7 +15520,7 @@ pub struct ClaimableBalanceEntry { } impl ReadXdr for ClaimableBalanceEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15484,7 +15535,7 @@ impl ReadXdr for ClaimableBalanceEntry { } impl WriteXdr for ClaimableBalanceEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -15523,7 +15574,7 @@ pub struct LiquidityPoolConstantProductParameters { } impl ReadXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15536,7 +15587,7 @@ impl ReadXdr for LiquidityPoolConstantProductParameters { } impl WriteXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_a.write_xdr(w)?; @@ -15579,7 +15630,7 @@ pub struct LiquidityPoolEntryConstantProduct { } impl ReadXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15594,7 +15645,7 @@ impl ReadXdr for LiquidityPoolEntryConstantProduct { } impl WriteXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.params.write_xdr(w)?; @@ -15690,7 +15741,7 @@ impl Variants for LiquidityPoolEntryBody { impl Union for LiquidityPoolEntryBody {} impl ReadXdr for LiquidityPoolEntryBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolType = ::read_xdr(r)?; @@ -15710,7 +15761,7 @@ impl ReadXdr for LiquidityPoolEntryBody { } impl WriteXdr for LiquidityPoolEntryBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15762,7 +15813,7 @@ pub struct LiquidityPoolEntry { } impl ReadXdr for LiquidityPoolEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15774,7 +15825,7 @@ impl ReadXdr for LiquidityPoolEntry { } impl WriteXdr for LiquidityPoolEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -15872,7 +15923,7 @@ impl From for i32 { } impl ReadXdr for ContractDataDurability { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -15883,7 +15934,7 @@ impl ReadXdr for ContractDataDurability { } impl WriteXdr for ContractDataDurability { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15922,7 +15973,7 @@ pub struct ContractDataEntry { } impl ReadXdr for ContractDataEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15937,7 +15988,7 @@ impl ReadXdr for ContractDataEntry { } impl WriteXdr for ContractDataEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -15991,7 +16042,7 @@ pub struct ContractCodeCostInputs { } impl ReadXdr for ContractCodeCostInputs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16012,7 +16063,7 @@ impl ReadXdr for ContractCodeCostInputs { } impl WriteXdr for ContractCodeCostInputs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16055,7 +16106,7 @@ pub struct ContractCodeEntryV1 { } impl ReadXdr for ContractCodeEntryV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16067,7 +16118,7 @@ impl ReadXdr for ContractCodeEntryV1 { } impl WriteXdr for ContractCodeEntryV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16158,7 +16209,7 @@ impl Variants for ContractCodeEntryExt { impl Union for ContractCodeEntryExt {} impl ReadXdr for ContractCodeEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16175,7 +16226,7 @@ impl ReadXdr for ContractCodeEntryExt { } impl WriteXdr for ContractCodeEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16225,7 +16276,7 @@ pub struct ContractCodeEntry { } impl ReadXdr for ContractCodeEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16238,7 +16289,7 @@ impl ReadXdr for ContractCodeEntry { } impl WriteXdr for ContractCodeEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16273,7 +16324,7 @@ pub struct TtlEntry { } impl ReadXdr for TtlEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16285,7 +16336,7 @@ impl ReadXdr for TtlEntry { } impl WriteXdr for TtlEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_hash.write_xdr(w)?; @@ -16367,7 +16418,7 @@ impl Variants for LedgerEntryExtensionV1Ext { impl Union for LedgerEntryExtensionV1Ext {} impl ReadXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16383,7 +16434,7 @@ impl ReadXdr for LedgerEntryExtensionV1Ext { } impl WriteXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16426,7 +16477,7 @@ pub struct LedgerEntryExtensionV1 { } impl ReadXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16438,7 +16489,7 @@ impl ReadXdr for LedgerEntryExtensionV1 { } impl WriteXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sponsoring_id.write_xdr(w)?; @@ -16587,7 +16638,7 @@ impl Variants for LedgerEntryData { impl Union for LedgerEntryData {} impl ReadXdr for LedgerEntryData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryType = ::read_xdr(r)?; @@ -16622,7 +16673,7 @@ impl ReadXdr for LedgerEntryData { } impl WriteXdr for LedgerEntryData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16721,7 +16772,7 @@ impl Variants for LedgerEntryExt { impl Union for LedgerEntryExt {} impl ReadXdr for LedgerEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16738,7 +16789,7 @@ impl ReadXdr for LedgerEntryExt { } impl WriteXdr for LedgerEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16811,7 +16862,7 @@ pub struct LedgerEntry { } impl ReadXdr for LedgerEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16824,7 +16875,7 @@ impl ReadXdr for LedgerEntry { } impl WriteXdr for LedgerEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.last_modified_ledger_seq.write_xdr(w)?; @@ -16857,7 +16908,7 @@ pub struct LedgerKeyAccount { } impl ReadXdr for LedgerKeyAccount { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16868,7 +16919,7 @@ impl ReadXdr for LedgerKeyAccount { } impl WriteXdr for LedgerKeyAccount { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -16901,7 +16952,7 @@ pub struct LedgerKeyTrustLine { } impl ReadXdr for LedgerKeyTrustLine { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16913,7 +16964,7 @@ impl ReadXdr for LedgerKeyTrustLine { } impl WriteXdr for LedgerKeyTrustLine { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -16947,7 +16998,7 @@ pub struct LedgerKeyOffer { } impl ReadXdr for LedgerKeyOffer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16959,7 +17010,7 @@ impl ReadXdr for LedgerKeyOffer { } impl WriteXdr for LedgerKeyOffer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -16993,7 +17044,7 @@ pub struct LedgerKeyData { } impl ReadXdr for LedgerKeyData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17005,7 +17056,7 @@ impl ReadXdr for LedgerKeyData { } impl WriteXdr for LedgerKeyData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -17037,7 +17088,7 @@ pub struct LedgerKeyClaimableBalance { } impl ReadXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17048,7 +17099,7 @@ impl ReadXdr for LedgerKeyClaimableBalance { } impl WriteXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -17079,7 +17130,7 @@ pub struct LedgerKeyLiquidityPool { } impl ReadXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17090,7 +17141,7 @@ impl ReadXdr for LedgerKeyLiquidityPool { } impl WriteXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -17125,7 +17176,7 @@ pub struct LedgerKeyContractData { } impl ReadXdr for LedgerKeyContractData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17138,7 +17189,7 @@ impl ReadXdr for LedgerKeyContractData { } impl WriteXdr for LedgerKeyContractData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract.write_xdr(w)?; @@ -17171,7 +17222,7 @@ pub struct LedgerKeyContractCode { } impl ReadXdr for LedgerKeyContractCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17182,7 +17233,7 @@ impl ReadXdr for LedgerKeyContractCode { } impl WriteXdr for LedgerKeyContractCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hash.write_xdr(w)?; @@ -17213,7 +17264,7 @@ pub struct LedgerKeyConfigSetting { } impl ReadXdr for LedgerKeyConfigSetting { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17224,7 +17275,7 @@ impl ReadXdr for LedgerKeyConfigSetting { } impl WriteXdr for LedgerKeyConfigSetting { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.config_setting_id.write_xdr(w)?; @@ -17256,7 +17307,7 @@ pub struct LedgerKeyTtl { } impl ReadXdr for LedgerKeyTtl { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17267,7 +17318,7 @@ impl ReadXdr for LedgerKeyTtl { } impl WriteXdr for LedgerKeyTtl { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_hash.write_xdr(w)?; @@ -17456,7 +17507,7 @@ impl Variants for LedgerKey { impl Union for LedgerKey {} impl ReadXdr for LedgerKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryType = ::read_xdr(r)?; @@ -17491,7 +17542,7 @@ impl ReadXdr for LedgerKey { } impl WriteXdr for LedgerKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -17653,7 +17704,7 @@ impl From for i32 { } impl ReadXdr for EnvelopeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17664,7 +17715,7 @@ impl ReadXdr for EnvelopeType { } impl WriteXdr for EnvelopeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -17767,7 +17818,7 @@ impl From for i32 { } impl ReadXdr for BucketListType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17778,7 +17829,7 @@ impl ReadXdr for BucketListType { } impl WriteXdr for BucketListType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -17889,7 +17940,7 @@ impl From for i32 { } impl ReadXdr for BucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17900,7 +17951,7 @@ impl ReadXdr for BucketEntryType { } impl WriteXdr for BucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18010,7 +18061,7 @@ impl From for i32 { } impl ReadXdr for HotArchiveBucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -18021,7 +18072,7 @@ impl ReadXdr for HotArchiveBucketEntryType { } impl WriteXdr for HotArchiveBucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18140,7 +18191,7 @@ impl From for i32 { } impl ReadXdr for ColdArchiveBucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -18151,7 +18202,7 @@ impl ReadXdr for ColdArchiveBucketEntryType { } impl WriteXdr for ColdArchiveBucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18237,7 +18288,7 @@ impl Variants for BucketMetadataExt { impl Union for BucketMetadataExt {} impl ReadXdr for BucketMetadataExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -18254,7 +18305,7 @@ impl ReadXdr for BucketMetadataExt { } impl WriteXdr for BucketMetadataExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18302,7 +18353,7 @@ pub struct BucketMetadata { } impl ReadXdr for BucketMetadata { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18314,7 +18365,7 @@ impl ReadXdr for BucketMetadata { } impl WriteXdr for BucketMetadata { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -18417,7 +18468,7 @@ impl Variants for BucketEntry { impl Union for BucketEntry {} impl ReadXdr for BucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BucketEntryType = ::read_xdr(r)?; @@ -18436,7 +18487,7 @@ impl ReadXdr for BucketEntry { } impl WriteXdr for BucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18544,7 +18595,7 @@ impl Variants for HotArchiveBucketEntry { impl Union for HotArchiveBucketEntry {} impl ReadXdr for HotArchiveBucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: HotArchiveBucketEntryType = @@ -18566,7 +18617,7 @@ impl ReadXdr for HotArchiveBucketEntry { } impl WriteXdr for HotArchiveBucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18606,7 +18657,7 @@ pub struct ColdArchiveArchivedLeaf { } impl ReadXdr for ColdArchiveArchivedLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18618,7 +18669,7 @@ impl ReadXdr for ColdArchiveArchivedLeaf { } impl WriteXdr for ColdArchiveArchivedLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18652,7 +18703,7 @@ pub struct ColdArchiveDeletedLeaf { } impl ReadXdr for ColdArchiveDeletedLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18664,7 +18715,7 @@ impl ReadXdr for ColdArchiveDeletedLeaf { } impl WriteXdr for ColdArchiveDeletedLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18698,7 +18749,7 @@ pub struct ColdArchiveBoundaryLeaf { } impl ReadXdr for ColdArchiveBoundaryLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18710,7 +18761,7 @@ impl ReadXdr for ColdArchiveBoundaryLeaf { } impl WriteXdr for ColdArchiveBoundaryLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18746,7 +18797,7 @@ pub struct ColdArchiveHashEntry { } impl ReadXdr for ColdArchiveHashEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18759,7 +18810,7 @@ impl ReadXdr for ColdArchiveHashEntry { } impl WriteXdr for ColdArchiveHashEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18874,7 +18925,7 @@ impl Variants for ColdArchiveBucketEntry { impl Union for ColdArchiveBucketEntry {} impl ReadXdr for ColdArchiveBucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ColdArchiveBucketEntryType = @@ -18903,7 +18954,7 @@ impl ReadXdr for ColdArchiveBucketEntry { } impl WriteXdr for ColdArchiveBucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18960,7 +19011,7 @@ impl AsRef> for UpgradeType { } impl ReadXdr for UpgradeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<128>::read_xdr(r)?; @@ -18971,7 +19022,7 @@ impl ReadXdr for UpgradeType { } impl WriteXdr for UpgradeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -19112,7 +19163,7 @@ impl From for i32 { } impl ReadXdr for StellarValueType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -19123,7 +19174,7 @@ impl ReadXdr for StellarValueType { } impl WriteXdr for StellarValueType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -19156,7 +19207,7 @@ pub struct LedgerCloseValueSignature { } impl ReadXdr for LedgerCloseValueSignature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19168,7 +19219,7 @@ impl ReadXdr for LedgerCloseValueSignature { } impl WriteXdr for LedgerCloseValueSignature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.node_id.write_xdr(w)?; @@ -19255,7 +19306,7 @@ impl Variants for StellarValueExt { impl Union for StellarValueExt {} impl ReadXdr for StellarValueExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: StellarValueType = ::read_xdr(r)?; @@ -19272,7 +19323,7 @@ impl ReadXdr for StellarValueExt { } impl WriteXdr for StellarValueExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19329,7 +19380,7 @@ pub struct StellarValue { } impl ReadXdr for StellarValue { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19343,7 +19394,7 @@ impl ReadXdr for StellarValue { } impl WriteXdr for StellarValue { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_set_hash.write_xdr(w)?; @@ -19457,7 +19508,7 @@ impl From for i32 { } impl ReadXdr for LedgerHeaderFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -19468,7 +19519,7 @@ impl ReadXdr for LedgerHeaderFlags { } impl WriteXdr for LedgerHeaderFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -19549,7 +19600,7 @@ impl Variants for LedgerHeaderExtensionV1Ext { impl Union for LedgerHeaderExtensionV1Ext {} impl ReadXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -19565,7 +19616,7 @@ impl ReadXdr for LedgerHeaderExtensionV1Ext { } impl WriteXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19608,7 +19659,7 @@ pub struct LedgerHeaderExtensionV1 { } impl ReadXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19620,7 +19671,7 @@ impl ReadXdr for LedgerHeaderExtensionV1 { } impl WriteXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.flags.write_xdr(w)?; @@ -19707,7 +19758,7 @@ impl Variants for LedgerHeaderExt { impl Union for LedgerHeaderExt {} impl ReadXdr for LedgerHeaderExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -19724,7 +19775,7 @@ impl ReadXdr for LedgerHeaderExt { } impl WriteXdr for LedgerHeaderExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19809,7 +19860,7 @@ pub struct LedgerHeader { } impl ReadXdr for LedgerHeader { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19834,7 +19885,7 @@ impl ReadXdr for LedgerHeader { } impl WriteXdr for LedgerHeader { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -19979,7 +20030,7 @@ impl From for i32 { } impl ReadXdr for LedgerUpgradeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -19990,7 +20041,7 @@ impl ReadXdr for LedgerUpgradeType { } impl WriteXdr for LedgerUpgradeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -20022,7 +20073,7 @@ pub struct ConfigUpgradeSetKey { } impl ReadXdr for ConfigUpgradeSetKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20034,7 +20085,7 @@ impl ReadXdr for ConfigUpgradeSetKey { } impl WriteXdr for ConfigUpgradeSetKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id.write_xdr(w)?; @@ -20165,7 +20216,7 @@ impl Variants for LedgerUpgrade { impl Union for LedgerUpgrade {} impl ReadXdr for LedgerUpgrade { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerUpgradeType = ::read_xdr(r)?; @@ -20189,7 +20240,7 @@ impl ReadXdr for LedgerUpgrade { } impl WriteXdr for LedgerUpgrade { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20229,7 +20280,7 @@ pub struct ConfigUpgradeSet { } impl ReadXdr for ConfigUpgradeSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20240,7 +20291,7 @@ impl ReadXdr for ConfigUpgradeSet { } impl WriteXdr for ConfigUpgradeSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.updated_entry.write_xdr(w)?; @@ -20334,7 +20385,7 @@ impl From for i32 { } impl ReadXdr for TxSetComponentType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -20345,7 +20396,7 @@ impl ReadXdr for TxSetComponentType { } impl WriteXdr for TxSetComponentType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -20378,7 +20429,7 @@ pub struct TxSetComponentTxsMaybeDiscountedFee { } impl ReadXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20390,7 +20441,7 @@ impl ReadXdr for TxSetComponentTxsMaybeDiscountedFee { } impl WriteXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.base_fee.write_xdr(w)?; @@ -20479,7 +20530,7 @@ impl Variants for TxSetComponent { impl Union for TxSetComponent {} impl ReadXdr for TxSetComponent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TxSetComponentType = ::read_xdr(r)?; @@ -20499,7 +20550,7 @@ impl ReadXdr for TxSetComponent { } impl WriteXdr for TxSetComponent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20584,7 +20635,7 @@ impl Variants for TransactionPhase { impl Union for TransactionPhase {} impl ReadXdr for TransactionPhase { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -20600,7 +20651,7 @@ impl ReadXdr for TransactionPhase { } impl WriteXdr for TransactionPhase { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20637,7 +20688,7 @@ pub struct TransactionSet { } impl ReadXdr for TransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20649,7 +20700,7 @@ impl ReadXdr for TransactionSet { } impl WriteXdr for TransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.previous_ledger_hash.write_xdr(w)?; @@ -20683,7 +20734,7 @@ pub struct TransactionSetV1 { } impl ReadXdr for TransactionSetV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20695,7 +20746,7 @@ impl ReadXdr for TransactionSetV1 { } impl WriteXdr for TransactionSetV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.previous_ledger_hash.write_xdr(w)?; @@ -20778,7 +20829,7 @@ impl Variants for GeneralizedTransactionSet { impl Union for GeneralizedTransactionSet {} impl ReadXdr for GeneralizedTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -20794,7 +20845,7 @@ impl ReadXdr for GeneralizedTransactionSet { } impl WriteXdr for GeneralizedTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20831,7 +20882,7 @@ pub struct TransactionResultPair { } impl ReadXdr for TransactionResultPair { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20843,7 +20894,7 @@ impl ReadXdr for TransactionResultPair { } impl WriteXdr for TransactionResultPair { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.transaction_hash.write_xdr(w)?; @@ -20875,7 +20926,7 @@ pub struct TransactionResultSet { } impl ReadXdr for TransactionResultSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20886,7 +20937,7 @@ impl ReadXdr for TransactionResultSet { } impl WriteXdr for TransactionResultSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.results.write_xdr(w)?; @@ -20972,7 +21023,7 @@ impl Variants for TransactionHistoryEntryExt { impl Union for TransactionHistoryEntryExt {} impl ReadXdr for TransactionHistoryEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -20989,7 +21040,7 @@ impl ReadXdr for TransactionHistoryEntryExt { } impl WriteXdr for TransactionHistoryEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21038,7 +21089,7 @@ pub struct TransactionHistoryEntry { } impl ReadXdr for TransactionHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21051,7 +21102,7 @@ impl ReadXdr for TransactionHistoryEntry { } impl WriteXdr for TransactionHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21134,7 +21185,7 @@ impl Variants for TransactionHistoryResultEntryExt { impl Union for TransactionHistoryResultEntryExt {} impl ReadXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21150,7 +21201,7 @@ impl ReadXdr for TransactionHistoryResultEntryExt { } impl WriteXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21196,7 +21247,7 @@ pub struct TransactionHistoryResultEntry { } impl ReadXdr for TransactionHistoryResultEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21209,7 +21260,7 @@ impl ReadXdr for TransactionHistoryResultEntry { } impl WriteXdr for TransactionHistoryResultEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21292,7 +21343,7 @@ impl Variants for LedgerHeaderHistoryEntryExt { impl Union for LedgerHeaderHistoryEntryExt {} impl ReadXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21308,7 +21359,7 @@ impl ReadXdr for LedgerHeaderHistoryEntryExt { } impl WriteXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21354,7 +21405,7 @@ pub struct LedgerHeaderHistoryEntry { } impl ReadXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21367,7 +21418,7 @@ impl ReadXdr for LedgerHeaderHistoryEntry { } impl WriteXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hash.write_xdr(w)?; @@ -21402,7 +21453,7 @@ pub struct LedgerScpMessages { } impl ReadXdr for LedgerScpMessages { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21414,7 +21465,7 @@ impl ReadXdr for LedgerScpMessages { } impl WriteXdr for LedgerScpMessages { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21448,7 +21499,7 @@ pub struct ScpHistoryEntryV0 { } impl ReadXdr for ScpHistoryEntryV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21460,7 +21511,7 @@ impl ReadXdr for ScpHistoryEntryV0 { } impl WriteXdr for ScpHistoryEntryV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_sets.write_xdr(w)?; @@ -21542,7 +21593,7 @@ impl Variants for ScpHistoryEntry { impl Union for ScpHistoryEntry {} impl ReadXdr for ScpHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21558,7 +21609,7 @@ impl ReadXdr for ScpHistoryEntry { } impl WriteXdr for ScpHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21670,7 +21721,7 @@ impl From for i32 { } impl ReadXdr for LedgerEntryChangeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -21681,7 +21732,7 @@ impl ReadXdr for LedgerEntryChangeType { } impl WriteXdr for LedgerEntryChangeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -21782,7 +21833,7 @@ impl Variants for LedgerEntryChange { impl Union for LedgerEntryChange {} impl ReadXdr for LedgerEntryChange { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryChangeType = ::read_xdr(r)?; @@ -21801,7 +21852,7 @@ impl ReadXdr for LedgerEntryChange { } impl WriteXdr for LedgerEntryChange { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21857,7 +21908,7 @@ impl AsRef> for LedgerEntryChanges { } impl ReadXdr for LedgerEntryChanges { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -21868,7 +21919,7 @@ impl ReadXdr for LedgerEntryChanges { } impl WriteXdr for LedgerEntryChanges { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -21945,7 +21996,7 @@ pub struct OperationMeta { } impl ReadXdr for OperationMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21956,7 +22007,7 @@ impl ReadXdr for OperationMeta { } impl WriteXdr for OperationMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.changes.write_xdr(w)?; @@ -21989,7 +22040,7 @@ pub struct TransactionMetaV1 { } impl ReadXdr for TransactionMetaV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22001,7 +22052,7 @@ impl ReadXdr for TransactionMetaV1 { } impl WriteXdr for TransactionMetaV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_changes.write_xdr(w)?; @@ -22039,7 +22090,7 @@ pub struct TransactionMetaV2 { } impl ReadXdr for TransactionMetaV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22052,7 +22103,7 @@ impl ReadXdr for TransactionMetaV2 { } impl WriteXdr for TransactionMetaV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_changes_before.write_xdr(w)?; @@ -22157,7 +22208,7 @@ impl From for i32 { } impl ReadXdr for ContractEventType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -22168,7 +22219,7 @@ impl ReadXdr for ContractEventType { } impl WriteXdr for ContractEventType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -22201,7 +22252,7 @@ pub struct ContractEventV0 { } impl ReadXdr for ContractEventV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22213,7 +22264,7 @@ impl ReadXdr for ContractEventV0 { } impl WriteXdr for ContractEventV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.topics.write_xdr(w)?; @@ -22299,7 +22350,7 @@ impl Variants for ContractEventBody { impl Union for ContractEventBody {} impl ReadXdr for ContractEventBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -22315,7 +22366,7 @@ impl ReadXdr for ContractEventBody { } impl WriteXdr for ContractEventBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22369,7 +22420,7 @@ pub struct ContractEvent { } impl ReadXdr for ContractEvent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22383,7 +22434,7 @@ impl ReadXdr for ContractEvent { } impl WriteXdr for ContractEvent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22419,7 +22470,7 @@ pub struct DiagnosticEvent { } impl ReadXdr for DiagnosticEvent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22431,7 +22482,7 @@ impl ReadXdr for DiagnosticEvent { } impl WriteXdr for DiagnosticEvent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.in_successful_contract_call.write_xdr(w)?; @@ -22481,7 +22532,7 @@ impl AsRef> for DiagnosticEvents { } impl ReadXdr for DiagnosticEvents { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -22492,7 +22543,7 @@ impl ReadXdr for DiagnosticEvents { } impl WriteXdr for DiagnosticEvents { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -22601,7 +22652,7 @@ pub struct SorobanTransactionMetaExtV1 { } impl ReadXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22615,7 +22666,7 @@ impl ReadXdr for SorobanTransactionMetaExtV1 { } impl WriteXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22705,7 +22756,7 @@ impl Variants for SorobanTransactionMetaExt { impl Union for SorobanTransactionMetaExt {} impl ReadXdr for SorobanTransactionMetaExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -22722,7 +22773,7 @@ impl ReadXdr for SorobanTransactionMetaExt { } impl WriteXdr for SorobanTransactionMetaExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22770,7 +22821,7 @@ pub struct SorobanTransactionMeta { } impl ReadXdr for SorobanTransactionMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22784,7 +22835,7 @@ impl ReadXdr for SorobanTransactionMeta { } impl WriteXdr for SorobanTransactionMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22830,7 +22881,7 @@ pub struct TransactionMetaV3 { } impl ReadXdr for TransactionMetaV3 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22845,7 +22896,7 @@ impl ReadXdr for TransactionMetaV3 { } impl WriteXdr for TransactionMetaV3 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22882,7 +22933,7 @@ pub struct InvokeHostFunctionSuccessPreImage { } impl ReadXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22894,7 +22945,7 @@ impl ReadXdr for InvokeHostFunctionSuccessPreImage { } impl WriteXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.return_value.write_xdr(w)?; @@ -22991,7 +23042,7 @@ impl Variants for TransactionMeta { impl Union for TransactionMeta {} impl ReadXdr for TransactionMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23010,7 +23061,7 @@ impl ReadXdr for TransactionMeta { } impl WriteXdr for TransactionMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23052,7 +23103,7 @@ pub struct TransactionResultMeta { } impl ReadXdr for TransactionResultMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23065,7 +23116,7 @@ impl ReadXdr for TransactionResultMeta { } impl WriteXdr for TransactionResultMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.result.write_xdr(w)?; @@ -23100,7 +23151,7 @@ pub struct UpgradeEntryMeta { } impl ReadXdr for UpgradeEntryMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23112,7 +23163,7 @@ impl ReadXdr for UpgradeEntryMeta { } impl WriteXdr for UpgradeEntryMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.upgrade.write_xdr(w)?; @@ -23161,7 +23212,7 @@ pub struct LedgerCloseMetaV0 { } impl ReadXdr for LedgerCloseMetaV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23176,7 +23227,7 @@ impl ReadXdr for LedgerCloseMetaV0 { } impl WriteXdr for LedgerCloseMetaV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_header.write_xdr(w)?; @@ -23213,7 +23264,7 @@ pub struct LedgerCloseMetaExtV1 { } impl ReadXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23225,7 +23276,7 @@ impl ReadXdr for LedgerCloseMetaExtV1 { } impl WriteXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23312,7 +23363,7 @@ impl Variants for LedgerCloseMetaExt { impl Union for LedgerCloseMetaExt {} impl ReadXdr for LedgerCloseMetaExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23329,7 +23380,7 @@ impl ReadXdr for LedgerCloseMetaExt { } impl WriteXdr for LedgerCloseMetaExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23399,7 +23450,7 @@ pub struct LedgerCloseMetaV1 { } impl ReadXdr for LedgerCloseMetaV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23418,7 +23469,7 @@ impl ReadXdr for LedgerCloseMetaV1 { } impl WriteXdr for LedgerCloseMetaV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23512,7 +23563,7 @@ impl Variants for LedgerCloseMeta { impl Union for LedgerCloseMeta {} impl ReadXdr for LedgerCloseMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23529,7 +23580,7 @@ impl ReadXdr for LedgerCloseMeta { } impl WriteXdr for LedgerCloseMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23647,7 +23698,7 @@ impl From for i32 { } impl ReadXdr for ErrorCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -23658,7 +23709,7 @@ impl ReadXdr for ErrorCode { } impl WriteXdr for ErrorCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -23691,7 +23742,7 @@ pub struct SError { } impl ReadXdr for SError { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23703,7 +23754,7 @@ impl ReadXdr for SError { } impl WriteXdr for SError { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.code.write_xdr(w)?; @@ -23735,7 +23786,7 @@ pub struct SendMore { } impl ReadXdr for SendMore { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23746,7 +23797,7 @@ impl ReadXdr for SendMore { } impl WriteXdr for SendMore { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_messages.write_xdr(w)?; @@ -23779,7 +23830,7 @@ pub struct SendMoreExtended { } impl ReadXdr for SendMoreExtended { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23791,7 +23842,7 @@ impl ReadXdr for SendMoreExtended { } impl WriteXdr for SendMoreExtended { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_messages.write_xdr(w)?; @@ -23827,7 +23878,7 @@ pub struct AuthCert { } impl ReadXdr for AuthCert { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23840,7 +23891,7 @@ impl ReadXdr for AuthCert { } impl WriteXdr for AuthCert { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.pubkey.write_xdr(w)?; @@ -23889,7 +23940,7 @@ pub struct Hello { } impl ReadXdr for Hello { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23908,7 +23959,7 @@ impl ReadXdr for Hello { } impl WriteXdr for Hello { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -23955,7 +24006,7 @@ pub struct Auth { } impl ReadXdr for Auth { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23966,7 +24017,7 @@ impl ReadXdr for Auth { } impl WriteXdr for Auth { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.flags.write_xdr(w)?; @@ -24061,7 +24112,7 @@ impl From for i32 { } impl ReadXdr for IpAddrType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24072,7 +24123,7 @@ impl ReadXdr for IpAddrType { } impl WriteXdr for IpAddrType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24158,7 +24209,7 @@ impl Variants for PeerAddressIp { impl Union for PeerAddressIp {} impl ReadXdr for PeerAddressIp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: IpAddrType = ::read_xdr(r)?; @@ -24175,7 +24226,7 @@ impl ReadXdr for PeerAddressIp { } impl WriteXdr for PeerAddressIp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -24222,7 +24273,7 @@ pub struct PeerAddress { } impl ReadXdr for PeerAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24235,7 +24286,7 @@ impl ReadXdr for PeerAddress { } impl WriteXdr for PeerAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ip.write_xdr(w)?; @@ -24481,7 +24532,7 @@ impl From for i32 { } impl ReadXdr for MessageType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24492,7 +24543,7 @@ impl ReadXdr for MessageType { } impl WriteXdr for MessageType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24525,7 +24576,7 @@ pub struct DontHave { } impl ReadXdr for DontHave { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24537,7 +24588,7 @@ impl ReadXdr for DontHave { } impl WriteXdr for DontHave { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.type_.write_xdr(w)?; @@ -24636,7 +24687,7 @@ impl From for i32 { } impl ReadXdr for SurveyMessageCommandType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24647,7 +24698,7 @@ impl ReadXdr for SurveyMessageCommandType { } impl WriteXdr for SurveyMessageCommandType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24750,7 +24801,7 @@ impl From for i32 { } impl ReadXdr for SurveyMessageResponseType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24761,7 +24812,7 @@ impl ReadXdr for SurveyMessageResponseType { } impl WriteXdr for SurveyMessageResponseType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24796,7 +24847,7 @@ pub struct TimeSlicedSurveyStartCollectingMessage { } impl ReadXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24809,7 +24860,7 @@ impl ReadXdr for TimeSlicedSurveyStartCollectingMessage { } impl WriteXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_id.write_xdr(w)?; @@ -24844,7 +24895,7 @@ pub struct SignedTimeSlicedSurveyStartCollectingMessage { } impl ReadXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24856,7 +24907,7 @@ impl ReadXdr for SignedTimeSlicedSurveyStartCollectingMessage { } impl WriteXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.signature.write_xdr(w)?; @@ -24892,7 +24943,7 @@ pub struct TimeSlicedSurveyStopCollectingMessage { } impl ReadXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24905,7 +24956,7 @@ impl ReadXdr for TimeSlicedSurveyStopCollectingMessage { } impl WriteXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_id.write_xdr(w)?; @@ -24940,7 +24991,7 @@ pub struct SignedTimeSlicedSurveyStopCollectingMessage { } impl ReadXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24952,7 +25003,7 @@ impl ReadXdr for SignedTimeSlicedSurveyStopCollectingMessage { } impl WriteXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.signature.write_xdr(w)?; @@ -24992,7 +25043,7 @@ pub struct SurveyRequestMessage { } impl ReadXdr for SurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25007,7 +25058,7 @@ impl ReadXdr for SurveyRequestMessage { } impl WriteXdr for SurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_peer_id.write_xdr(w)?; @@ -25048,7 +25099,7 @@ pub struct TimeSlicedSurveyRequestMessage { } impl ReadXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25062,7 +25113,7 @@ impl ReadXdr for TimeSlicedSurveyRequestMessage { } impl WriteXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request.write_xdr(w)?; @@ -25098,7 +25149,7 @@ pub struct SignedSurveyRequestMessage { } impl ReadXdr for SignedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25110,7 +25161,7 @@ impl ReadXdr for SignedSurveyRequestMessage { } impl WriteXdr for SignedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request_signature.write_xdr(w)?; @@ -25144,7 +25195,7 @@ pub struct SignedTimeSlicedSurveyRequestMessage { } impl ReadXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25156,7 +25207,7 @@ impl ReadXdr for SignedTimeSlicedSurveyRequestMessage { } impl WriteXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request_signature.write_xdr(w)?; @@ -25206,7 +25257,7 @@ impl AsRef> for EncryptedBody { } impl ReadXdr for EncryptedBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64000>::read_xdr(r)?; @@ -25217,7 +25268,7 @@ impl ReadXdr for EncryptedBody { } impl WriteXdr for EncryptedBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25302,7 +25353,7 @@ pub struct SurveyResponseMessage { } impl ReadXdr for SurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25317,7 +25368,7 @@ impl ReadXdr for SurveyResponseMessage { } impl WriteXdr for SurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_peer_id.write_xdr(w)?; @@ -25354,7 +25405,7 @@ pub struct TimeSlicedSurveyResponseMessage { } impl ReadXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25366,7 +25417,7 @@ impl ReadXdr for TimeSlicedSurveyResponseMessage { } impl WriteXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response.write_xdr(w)?; @@ -25400,7 +25451,7 @@ pub struct SignedSurveyResponseMessage { } impl ReadXdr for SignedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25412,7 +25463,7 @@ impl ReadXdr for SignedSurveyResponseMessage { } impl WriteXdr for SignedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response_signature.write_xdr(w)?; @@ -25446,7 +25497,7 @@ pub struct SignedTimeSlicedSurveyResponseMessage { } impl ReadXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25458,7 +25509,7 @@ impl ReadXdr for SignedTimeSlicedSurveyResponseMessage { } impl WriteXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response_signature.write_xdr(w)?; @@ -25520,7 +25571,7 @@ pub struct PeerStats { } impl ReadXdr for PeerStats { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25545,7 +25596,7 @@ impl ReadXdr for PeerStats { } impl WriteXdr for PeerStats { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.id.write_xdr(w)?; @@ -25608,7 +25659,7 @@ impl AsRef> for PeerStatList { } impl ReadXdr for PeerStatList { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -25619,7 +25670,7 @@ impl ReadXdr for PeerStatList { } impl WriteXdr for PeerStatList { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25720,7 +25771,7 @@ pub struct TimeSlicedNodeData { } impl ReadXdr for TimeSlicedNodeData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25740,7 +25791,7 @@ impl ReadXdr for TimeSlicedNodeData { } impl WriteXdr for TimeSlicedNodeData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.added_authenticated_peers.write_xdr(w)?; @@ -25782,7 +25833,7 @@ pub struct TimeSlicedPeerData { } impl ReadXdr for TimeSlicedPeerData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25794,7 +25845,7 @@ impl ReadXdr for TimeSlicedPeerData { } impl WriteXdr for TimeSlicedPeerData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.peer_stats.write_xdr(w)?; @@ -25844,7 +25895,7 @@ impl AsRef> for TimeSlicedPeerDataList { } impl ReadXdr for TimeSlicedPeerDataList { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -25855,7 +25906,7 @@ impl ReadXdr for TimeSlicedPeerDataList { } impl WriteXdr for TimeSlicedPeerDataList { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25939,7 +25990,7 @@ pub struct TopologyResponseBodyV0 { } impl ReadXdr for TopologyResponseBodyV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25953,7 +26004,7 @@ impl ReadXdr for TopologyResponseBodyV0 { } impl WriteXdr for TopologyResponseBodyV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -25999,7 +26050,7 @@ pub struct TopologyResponseBodyV1 { } impl ReadXdr for TopologyResponseBodyV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26015,7 +26066,7 @@ impl ReadXdr for TopologyResponseBodyV1 { } impl WriteXdr for TopologyResponseBodyV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26055,7 +26106,7 @@ pub struct TopologyResponseBodyV2 { } impl ReadXdr for TopologyResponseBodyV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26068,7 +26119,7 @@ impl ReadXdr for TopologyResponseBodyV2 { } impl WriteXdr for TopologyResponseBodyV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26165,7 +26216,7 @@ impl Variants for SurveyResponseBody { impl Union for SurveyResponseBody {} impl ReadXdr for SurveyResponseBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SurveyMessageResponseType = @@ -26184,7 +26235,7 @@ impl ReadXdr for SurveyResponseBody { } impl WriteXdr for SurveyResponseBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -26247,7 +26298,7 @@ impl AsRef> for TxAdvertVector { } impl ReadXdr for TxAdvertVector { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26258,7 +26309,7 @@ impl ReadXdr for TxAdvertVector { } impl WriteXdr for TxAdvertVector { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26335,7 +26386,7 @@ pub struct FloodAdvert { } impl ReadXdr for FloodAdvert { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26346,7 +26397,7 @@ impl ReadXdr for FloodAdvert { } impl WriteXdr for FloodAdvert { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_hashes.write_xdr(w)?; @@ -26403,7 +26454,7 @@ impl AsRef> for TxDemandVector { } impl ReadXdr for TxDemandVector { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26414,7 +26465,7 @@ impl ReadXdr for TxDemandVector { } impl WriteXdr for TxDemandVector { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26491,7 +26542,7 @@ pub struct FloodDemand { } impl ReadXdr for FloodDemand { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26502,7 +26553,7 @@ impl ReadXdr for FloodDemand { } impl WriteXdr for FloodDemand { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_hashes.write_xdr(w)?; @@ -26763,7 +26814,7 @@ impl Variants for StellarMessage { impl Union for StellarMessage {} impl ReadXdr for StellarMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: MessageType = ::read_xdr(r)?; @@ -26822,7 +26873,7 @@ impl ReadXdr for StellarMessage { } impl WriteXdr for StellarMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -26884,7 +26935,7 @@ pub struct AuthenticatedMessageV0 { } impl ReadXdr for AuthenticatedMessageV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26897,7 +26948,7 @@ impl ReadXdr for AuthenticatedMessageV0 { } impl WriteXdr for AuthenticatedMessageV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sequence.write_xdr(w)?; @@ -26985,7 +27036,7 @@ impl Variants for AuthenticatedMessage { impl Union for AuthenticatedMessage {} impl ReadXdr for AuthenticatedMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: u32 = ::read_xdr(r)?; @@ -27001,7 +27052,7 @@ impl ReadXdr for AuthenticatedMessage { } impl WriteXdr for AuthenticatedMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27096,7 +27147,7 @@ impl Variants for LiquidityPoolParameters { impl Union for LiquidityPoolParameters {} impl ReadXdr for LiquidityPoolParameters { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolType = ::read_xdr(r)?; @@ -27116,7 +27167,7 @@ impl ReadXdr for LiquidityPoolParameters { } impl WriteXdr for LiquidityPoolParameters { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27151,7 +27202,7 @@ pub struct MuxedAccountMed25519 { } impl ReadXdr for MuxedAccountMed25519 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27163,7 +27214,7 @@ impl ReadXdr for MuxedAccountMed25519 { } impl WriteXdr for MuxedAccountMed25519 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.id.write_xdr(w)?; @@ -27252,7 +27303,7 @@ impl Variants for MuxedAccount { impl Union for MuxedAccount {} impl ReadXdr for MuxedAccount { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CryptoKeyType = ::read_xdr(r)?; @@ -27271,7 +27322,7 @@ impl ReadXdr for MuxedAccount { } impl WriteXdr for MuxedAccount { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27309,7 +27360,7 @@ pub struct DecoratedSignature { } impl ReadXdr for DecoratedSignature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27321,7 +27372,7 @@ impl ReadXdr for DecoratedSignature { } impl WriteXdr for DecoratedSignature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hint.write_xdr(w)?; @@ -27573,7 +27624,7 @@ impl From for i32 { } impl ReadXdr for OperationType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -27584,7 +27635,7 @@ impl ReadXdr for OperationType { } impl WriteXdr for OperationType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -27617,7 +27668,7 @@ pub struct CreateAccountOp { } impl ReadXdr for CreateAccountOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27629,7 +27680,7 @@ impl ReadXdr for CreateAccountOp { } impl WriteXdr for CreateAccountOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -27665,7 +27716,7 @@ pub struct PaymentOp { } impl ReadXdr for PaymentOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27678,7 +27729,7 @@ impl ReadXdr for PaymentOp { } impl WriteXdr for PaymentOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -27725,7 +27776,7 @@ pub struct PathPaymentStrictReceiveOp { } impl ReadXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27741,7 +27792,7 @@ impl ReadXdr for PathPaymentStrictReceiveOp { } impl WriteXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.send_asset.write_xdr(w)?; @@ -27791,7 +27842,7 @@ pub struct PathPaymentStrictSendOp { } impl ReadXdr for PathPaymentStrictSendOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27807,7 +27858,7 @@ impl ReadXdr for PathPaymentStrictSendOp { } impl WriteXdr for PathPaymentStrictSendOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.send_asset.write_xdr(w)?; @@ -27853,7 +27904,7 @@ pub struct ManageSellOfferOp { } impl ReadXdr for ManageSellOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27868,7 +27919,7 @@ impl ReadXdr for ManageSellOfferOp { } impl WriteXdr for ManageSellOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -27914,7 +27965,7 @@ pub struct ManageBuyOfferOp { } impl ReadXdr for ManageBuyOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27929,7 +27980,7 @@ impl ReadXdr for ManageBuyOfferOp { } impl WriteXdr for ManageBuyOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -27970,7 +28021,7 @@ pub struct CreatePassiveSellOfferOp { } impl ReadXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27984,7 +28035,7 @@ impl ReadXdr for CreatePassiveSellOfferOp { } impl WriteXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -28041,7 +28092,7 @@ pub struct SetOptionsOp { } impl ReadXdr for SetOptionsOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28060,7 +28111,7 @@ impl ReadXdr for SetOptionsOp { } impl WriteXdr for SetOptionsOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inflation_dest.write_xdr(w)?; @@ -28175,7 +28226,7 @@ impl Variants for ChangeTrustAsset { impl Union for ChangeTrustAsset {} impl ReadXdr for ChangeTrustAsset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -28194,7 +28245,7 @@ impl ReadXdr for ChangeTrustAsset { } impl WriteXdr for ChangeTrustAsset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -28236,7 +28287,7 @@ pub struct ChangeTrustOp { } impl ReadXdr for ChangeTrustOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28248,7 +28299,7 @@ impl ReadXdr for ChangeTrustOp { } impl WriteXdr for ChangeTrustOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.line.write_xdr(w)?; @@ -28286,7 +28337,7 @@ pub struct AllowTrustOp { } impl ReadXdr for AllowTrustOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28299,7 +28350,7 @@ impl ReadXdr for AllowTrustOp { } impl WriteXdr for AllowTrustOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.trustor.write_xdr(w)?; @@ -28334,7 +28385,7 @@ pub struct ManageDataOp { } impl ReadXdr for ManageDataOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28346,7 +28397,7 @@ impl ReadXdr for ManageDataOp { } impl WriteXdr for ManageDataOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.data_name.write_xdr(w)?; @@ -28378,7 +28429,7 @@ pub struct BumpSequenceOp { } impl ReadXdr for BumpSequenceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28389,7 +28440,7 @@ impl ReadXdr for BumpSequenceOp { } impl WriteXdr for BumpSequenceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.bump_to.write_xdr(w)?; @@ -28424,7 +28475,7 @@ pub struct CreateClaimableBalanceOp { } impl ReadXdr for CreateClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28437,7 +28488,7 @@ impl ReadXdr for CreateClaimableBalanceOp { } impl WriteXdr for CreateClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset.write_xdr(w)?; @@ -28470,7 +28521,7 @@ pub struct ClaimClaimableBalanceOp { } impl ReadXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28481,7 +28532,7 @@ impl ReadXdr for ClaimClaimableBalanceOp { } impl WriteXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -28512,7 +28563,7 @@ pub struct BeginSponsoringFutureReservesOp { } impl ReadXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28523,7 +28574,7 @@ impl ReadXdr for BeginSponsoringFutureReservesOp { } impl WriteXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sponsored_id.write_xdr(w)?; @@ -28621,7 +28672,7 @@ impl From for i32 { } impl ReadXdr for RevokeSponsorshipType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -28632,7 +28683,7 @@ impl ReadXdr for RevokeSponsorshipType { } impl WriteXdr for RevokeSponsorshipType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -28665,7 +28716,7 @@ pub struct RevokeSponsorshipOpSigner { } impl ReadXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28677,7 +28728,7 @@ impl ReadXdr for RevokeSponsorshipOpSigner { } impl WriteXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -28771,7 +28822,7 @@ impl Variants for RevokeSponsorshipOp { impl Union for RevokeSponsorshipOp {} impl ReadXdr for RevokeSponsorshipOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RevokeSponsorshipType = ::read_xdr(r)?; @@ -28790,7 +28841,7 @@ impl ReadXdr for RevokeSponsorshipOp { } impl WriteXdr for RevokeSponsorshipOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -28830,7 +28881,7 @@ pub struct ClawbackOp { } impl ReadXdr for ClawbackOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28843,7 +28894,7 @@ impl ReadXdr for ClawbackOp { } impl WriteXdr for ClawbackOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset.write_xdr(w)?; @@ -28876,7 +28927,7 @@ pub struct ClawbackClaimableBalanceOp { } impl ReadXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28887,7 +28938,7 @@ impl ReadXdr for ClawbackClaimableBalanceOp { } impl WriteXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -28925,7 +28976,7 @@ pub struct SetTrustLineFlagsOp { } impl ReadXdr for SetTrustLineFlagsOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28939,7 +28990,7 @@ impl ReadXdr for SetTrustLineFlagsOp { } impl WriteXdr for SetTrustLineFlagsOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.trustor.write_xdr(w)?; @@ -28989,7 +29040,7 @@ pub struct LiquidityPoolDepositOp { } impl ReadXdr for LiquidityPoolDepositOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29004,7 +29055,7 @@ impl ReadXdr for LiquidityPoolDepositOp { } impl WriteXdr for LiquidityPoolDepositOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -29045,7 +29096,7 @@ pub struct LiquidityPoolWithdrawOp { } impl ReadXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29059,7 +29110,7 @@ impl ReadXdr for LiquidityPoolWithdrawOp { } impl WriteXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -29175,7 +29226,7 @@ impl From for i32 { } impl ReadXdr for HostFunctionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29186,7 +29237,7 @@ impl ReadXdr for HostFunctionType { } impl WriteXdr for HostFunctionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -29284,7 +29335,7 @@ impl From for i32 { } impl ReadXdr for ContractIdPreimageType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29295,7 +29346,7 @@ impl ReadXdr for ContractIdPreimageType { } impl WriteXdr for ContractIdPreimageType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -29328,7 +29379,7 @@ pub struct ContractIdPreimageFromAddress { } impl ReadXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29340,7 +29391,7 @@ impl ReadXdr for ContractIdPreimageFromAddress { } impl WriteXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.address.write_xdr(w)?; @@ -29434,7 +29485,7 @@ impl Variants for ContractIdPreimage { impl Union for ContractIdPreimage {} impl ReadXdr for ContractIdPreimage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ContractIdPreimageType = ::read_xdr(r)?; @@ -29453,7 +29504,7 @@ impl ReadXdr for ContractIdPreimage { } impl WriteXdr for ContractIdPreimage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -29491,7 +29542,7 @@ pub struct CreateContractArgs { } impl ReadXdr for CreateContractArgs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29503,7 +29554,7 @@ impl ReadXdr for CreateContractArgs { } impl WriteXdr for CreateContractArgs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id_preimage.write_xdr(w)?; @@ -29540,7 +29591,7 @@ pub struct CreateContractArgsV2 { } impl ReadXdr for CreateContractArgsV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29553,7 +29604,7 @@ impl ReadXdr for CreateContractArgsV2 { } impl WriteXdr for CreateContractArgsV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id_preimage.write_xdr(w)?; @@ -29589,7 +29640,7 @@ pub struct InvokeContractArgs { } impl ReadXdr for InvokeContractArgs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29602,7 +29653,7 @@ impl ReadXdr for InvokeContractArgs { } impl WriteXdr for InvokeContractArgs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_address.write_xdr(w)?; @@ -29710,7 +29761,7 @@ impl Variants for HostFunction { impl Union for HostFunction {} impl ReadXdr for HostFunction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: HostFunctionType = ::read_xdr(r)?; @@ -29737,7 +29788,7 @@ impl ReadXdr for HostFunction { } impl WriteXdr for HostFunction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -29851,7 +29902,7 @@ impl From for i32 { } impl ReadXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29862,7 +29913,7 @@ impl ReadXdr for SorobanAuthorizedFunctionType { } impl WriteXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -29971,7 +30022,7 @@ impl Variants for SorobanAuthorizedFunction { impl Union for SorobanAuthorizedFunction {} impl ReadXdr for SorobanAuthorizedFunction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SorobanAuthorizedFunctionType = @@ -29996,7 +30047,7 @@ impl ReadXdr for SorobanAuthorizedFunction { } impl WriteXdr for SorobanAuthorizedFunction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30035,7 +30086,7 @@ pub struct SorobanAuthorizedInvocation { } impl ReadXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30047,7 +30098,7 @@ impl ReadXdr for SorobanAuthorizedInvocation { } impl WriteXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.function.write_xdr(w)?; @@ -30085,7 +30136,7 @@ pub struct SorobanAddressCredentials { } impl ReadXdr for SorobanAddressCredentials { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30099,7 +30150,7 @@ impl ReadXdr for SorobanAddressCredentials { } impl WriteXdr for SorobanAddressCredentials { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.address.write_xdr(w)?; @@ -30200,7 +30251,7 @@ impl From for i32 { } impl ReadXdr for SorobanCredentialsType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -30211,7 +30262,7 @@ impl ReadXdr for SorobanCredentialsType { } impl WriteXdr for SorobanCredentialsType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -30300,7 +30351,7 @@ impl Variants for SorobanCredentials { impl Union for SorobanCredentials {} impl ReadXdr for SorobanCredentials { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SorobanCredentialsType = ::read_xdr(r)?; @@ -30319,7 +30370,7 @@ impl ReadXdr for SorobanCredentials { } impl WriteXdr for SorobanCredentials { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30357,7 +30408,7 @@ pub struct SorobanAuthorizationEntry { } impl ReadXdr for SorobanAuthorizationEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30369,7 +30420,7 @@ impl ReadXdr for SorobanAuthorizationEntry { } impl WriteXdr for SorobanAuthorizationEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.credentials.write_xdr(w)?; @@ -30405,7 +30456,7 @@ pub struct InvokeHostFunctionOp { } impl ReadXdr for InvokeHostFunctionOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30417,7 +30468,7 @@ impl ReadXdr for InvokeHostFunctionOp { } impl WriteXdr for InvokeHostFunctionOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.host_function.write_xdr(w)?; @@ -30451,7 +30502,7 @@ pub struct ExtendFootprintTtlOp { } impl ReadXdr for ExtendFootprintTtlOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30463,7 +30514,7 @@ impl ReadXdr for ExtendFootprintTtlOp { } impl WriteXdr for ExtendFootprintTtlOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -30495,7 +30546,7 @@ pub struct RestoreFootprintOp { } impl ReadXdr for RestoreFootprintOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30506,7 +30557,7 @@ impl ReadXdr for RestoreFootprintOp { } impl WriteXdr for RestoreFootprintOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -30773,7 +30824,7 @@ impl Variants for OperationBody { impl Union for OperationBody {} impl ReadXdr for OperationBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationType = ::read_xdr(r)?; @@ -30849,7 +30900,7 @@ impl ReadXdr for OperationBody { } impl WriteXdr for OperationBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30973,7 +31024,7 @@ pub struct Operation { } impl ReadXdr for Operation { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30985,7 +31036,7 @@ impl ReadXdr for Operation { } impl WriteXdr for Operation { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31021,7 +31072,7 @@ pub struct HashIdPreimageOperationId { } impl ReadXdr for HashIdPreimageOperationId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31034,7 +31085,7 @@ impl ReadXdr for HashIdPreimageOperationId { } impl WriteXdr for HashIdPreimageOperationId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31075,7 +31126,7 @@ pub struct HashIdPreimageRevokeId { } impl ReadXdr for HashIdPreimageRevokeId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31090,7 +31141,7 @@ impl ReadXdr for HashIdPreimageRevokeId { } impl WriteXdr for HashIdPreimageRevokeId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31127,7 +31178,7 @@ pub struct HashIdPreimageContractId { } impl ReadXdr for HashIdPreimageContractId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31139,7 +31190,7 @@ impl ReadXdr for HashIdPreimageContractId { } impl WriteXdr for HashIdPreimageContractId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -31177,7 +31228,7 @@ pub struct HashIdPreimageSorobanAuthorization { } impl ReadXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31191,7 +31242,7 @@ impl ReadXdr for HashIdPreimageSorobanAuthorization { } impl WriteXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -31322,7 +31373,7 @@ impl Variants for HashIdPreimage { impl Union for HashIdPreimage {} impl ReadXdr for HashIdPreimage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -31347,7 +31398,7 @@ impl ReadXdr for HashIdPreimage { } impl WriteXdr for HashIdPreimage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31467,7 +31518,7 @@ impl From for i32 { } impl ReadXdr for MemoType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -31478,7 +31529,7 @@ impl ReadXdr for MemoType { } impl WriteXdr for MemoType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -31585,7 +31636,7 @@ impl Variants for Memo { impl Union for Memo {} impl ReadXdr for Memo { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: MemoType = ::read_xdr(r)?; @@ -31605,7 +31656,7 @@ impl ReadXdr for Memo { } impl WriteXdr for Memo { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31646,7 +31697,7 @@ pub struct TimeBounds { } impl ReadXdr for TimeBounds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31658,7 +31709,7 @@ impl ReadXdr for TimeBounds { } impl WriteXdr for TimeBounds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.min_time.write_xdr(w)?; @@ -31692,7 +31743,7 @@ pub struct LedgerBounds { } impl ReadXdr for LedgerBounds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31704,7 +31755,7 @@ impl ReadXdr for LedgerBounds { } impl WriteXdr for LedgerBounds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.min_ledger.write_xdr(w)?; @@ -31769,7 +31820,7 @@ pub struct PreconditionsV2 { } impl ReadXdr for PreconditionsV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31785,7 +31836,7 @@ impl ReadXdr for PreconditionsV2 { } impl WriteXdr for PreconditionsV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.time_bounds.write_xdr(w)?; @@ -31893,7 +31944,7 @@ impl From for i32 { } impl ReadXdr for PreconditionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -31904,7 +31955,7 @@ impl ReadXdr for PreconditionType { } impl WriteXdr for PreconditionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -31999,7 +32050,7 @@ impl Variants for Preconditions { impl Union for Preconditions {} impl ReadXdr for Preconditions { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PreconditionType = ::read_xdr(r)?; @@ -32017,7 +32068,7 @@ impl ReadXdr for Preconditions { } impl WriteXdr for Preconditions { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32056,7 +32107,7 @@ pub struct LedgerFootprint { } impl ReadXdr for LedgerFootprint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32068,7 +32119,7 @@ impl ReadXdr for LedgerFootprint { } impl WriteXdr for LedgerFootprint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.read_only.write_xdr(w)?; @@ -32167,7 +32218,7 @@ impl From for i32 { } impl ReadXdr for ArchivalProofType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -32178,7 +32229,7 @@ impl ReadXdr for ArchivalProofType { } impl WriteXdr for ArchivalProofType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -32211,7 +32262,7 @@ pub struct ArchivalProofNode { } impl ReadXdr for ArchivalProofNode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32223,7 +32274,7 @@ impl ReadXdr for ArchivalProofNode { } impl WriteXdr for ArchivalProofNode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -32273,7 +32324,7 @@ impl AsRef> for ProofLevel { } impl ReadXdr for ProofLevel { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -32284,7 +32335,7 @@ impl ReadXdr for ProofLevel { } impl WriteXdr for ProofLevel { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -32366,7 +32417,7 @@ pub struct NonexistenceProofBody { } impl ReadXdr for NonexistenceProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32378,7 +32429,7 @@ impl ReadXdr for NonexistenceProofBody { } impl WriteXdr for NonexistenceProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.entries_to_prove.write_xdr(w)?; @@ -32422,7 +32473,7 @@ pub struct ExistenceProofBody { } impl ReadXdr for ExistenceProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32436,7 +32487,7 @@ impl ReadXdr for ExistenceProofBody { } impl WriteXdr for ExistenceProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.keys_to_prove.write_xdr(w)?; @@ -32528,7 +32579,7 @@ impl Variants for ArchivalProofBody { impl Union for ArchivalProofBody {} impl ReadXdr for ArchivalProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ArchivalProofType = ::read_xdr(r)?; @@ -32549,7 +32600,7 @@ impl ReadXdr for ArchivalProofBody { } impl WriteXdr for ArchivalProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32594,7 +32645,7 @@ pub struct ArchivalProof { } impl ReadXdr for ArchivalProof { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32606,7 +32657,7 @@ impl ReadXdr for ArchivalProof { } impl WriteXdr for ArchivalProof { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.epoch.write_xdr(w)?; @@ -32649,7 +32700,7 @@ pub struct SorobanResources { } impl ReadXdr for SorobanResources { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32663,7 +32714,7 @@ impl ReadXdr for SorobanResources { } impl WriteXdr for SorobanResources { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.footprint.write_xdr(w)?; @@ -32710,7 +32761,7 @@ pub struct SorobanTransactionData { } impl ReadXdr for SorobanTransactionData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32723,7 +32774,7 @@ impl ReadXdr for SorobanTransactionData { } impl WriteXdr for SorobanTransactionData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -32806,7 +32857,7 @@ impl Variants for TransactionV0Ext { impl Union for TransactionV0Ext {} impl ReadXdr for TransactionV0Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -32822,7 +32873,7 @@ impl ReadXdr for TransactionV0Ext { } impl WriteXdr for TransactionV0Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32874,7 +32925,7 @@ pub struct TransactionV0 { } impl ReadXdr for TransactionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32891,7 +32942,7 @@ impl ReadXdr for TransactionV0 { } impl WriteXdr for TransactionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account_ed25519.write_xdr(w)?; @@ -32932,7 +32983,7 @@ pub struct TransactionV0Envelope { } impl ReadXdr for TransactionV0Envelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32944,7 +32995,7 @@ impl ReadXdr for TransactionV0Envelope { } impl WriteXdr for TransactionV0Envelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33031,7 +33082,7 @@ impl Variants for TransactionExt { impl Union for TransactionExt {} impl ReadXdr for TransactionExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33048,7 +33099,7 @@ impl ReadXdr for TransactionExt { } impl WriteXdr for TransactionExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33114,7 +33165,7 @@ pub struct Transaction { } impl ReadXdr for Transaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33131,7 +33182,7 @@ impl ReadXdr for Transaction { } impl WriteXdr for Transaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -33172,7 +33223,7 @@ pub struct TransactionV1Envelope { } impl ReadXdr for TransactionV1Envelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33184,7 +33235,7 @@ impl ReadXdr for TransactionV1Envelope { } impl WriteXdr for TransactionV1Envelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33266,7 +33317,7 @@ impl Variants for FeeBumpTransactionInnerTx { impl Union for FeeBumpTransactionInnerTx {} impl ReadXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -33282,7 +33333,7 @@ impl ReadXdr for FeeBumpTransactionInnerTx { } impl WriteXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33367,7 +33418,7 @@ impl Variants for FeeBumpTransactionExt { impl Union for FeeBumpTransactionExt {} impl ReadXdr for FeeBumpTransactionExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33383,7 +33434,7 @@ impl ReadXdr for FeeBumpTransactionExt { } impl WriteXdr for FeeBumpTransactionExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33434,7 +33485,7 @@ pub struct FeeBumpTransaction { } impl ReadXdr for FeeBumpTransaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33448,7 +33499,7 @@ impl ReadXdr for FeeBumpTransaction { } impl WriteXdr for FeeBumpTransaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_source.write_xdr(w)?; @@ -33486,7 +33537,7 @@ pub struct FeeBumpTransactionEnvelope { } impl ReadXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33498,7 +33549,7 @@ impl ReadXdr for FeeBumpTransactionEnvelope { } impl WriteXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33594,7 +33645,7 @@ impl Variants for TransactionEnvelope { impl Union for TransactionEnvelope {} impl ReadXdr for TransactionEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -33614,7 +33665,7 @@ impl ReadXdr for TransactionEnvelope { } impl WriteXdr for TransactionEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33707,7 +33758,7 @@ impl Variants for TransactionSignaturePayloadTaggedTransaction { impl Union for TransactionSignaturePayloadTaggedTransaction {} impl ReadXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -33724,7 +33775,7 @@ impl ReadXdr for TransactionSignaturePayloadTaggedTransaction { } impl WriteXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33770,7 +33821,7 @@ pub struct TransactionSignaturePayload { } impl ReadXdr for TransactionSignaturePayload { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33782,7 +33833,7 @@ impl ReadXdr for TransactionSignaturePayload { } impl WriteXdr for TransactionSignaturePayload { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -33886,7 +33937,7 @@ impl From for i32 { } impl ReadXdr for ClaimAtomType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -33897,7 +33948,7 @@ impl ReadXdr for ClaimAtomType { } impl WriteXdr for ClaimAtomType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -33943,7 +33994,7 @@ pub struct ClaimOfferAtomV0 { } impl ReadXdr for ClaimOfferAtomV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33959,7 +34010,7 @@ impl ReadXdr for ClaimOfferAtomV0 { } impl WriteXdr for ClaimOfferAtomV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_ed25519.write_xdr(w)?; @@ -34010,7 +34061,7 @@ pub struct ClaimOfferAtom { } impl ReadXdr for ClaimOfferAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34026,7 +34077,7 @@ impl ReadXdr for ClaimOfferAtom { } impl WriteXdr for ClaimOfferAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -34074,7 +34125,7 @@ pub struct ClaimLiquidityAtom { } impl ReadXdr for ClaimLiquidityAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34089,7 +34140,7 @@ impl ReadXdr for ClaimLiquidityAtom { } impl WriteXdr for ClaimLiquidityAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -34188,7 +34239,7 @@ impl Variants for ClaimAtom { impl Union for ClaimAtom {} impl ReadXdr for ClaimAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimAtomType = ::read_xdr(r)?; @@ -34208,7 +34259,7 @@ impl ReadXdr for ClaimAtom { } impl WriteXdr for ClaimAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34337,7 +34388,7 @@ impl From for i32 { } impl ReadXdr for CreateAccountResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -34348,7 +34399,7 @@ impl ReadXdr for CreateAccountResultCode { } impl WriteXdr for CreateAccountResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -34458,7 +34509,7 @@ impl Variants for CreateAccountResult { impl Union for CreateAccountResult {} impl ReadXdr for CreateAccountResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CreateAccountResultCode = ::read_xdr(r)?; @@ -34478,7 +34529,7 @@ impl ReadXdr for CreateAccountResult { } impl WriteXdr for CreateAccountResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34638,7 +34689,7 @@ impl From for i32 { } impl ReadXdr for PaymentResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -34649,7 +34700,7 @@ impl ReadXdr for PaymentResultCode { } impl WriteXdr for PaymentResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -34789,7 +34840,7 @@ impl Variants for PaymentResult { impl Union for PaymentResult {} impl ReadXdr for PaymentResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PaymentResultCode = ::read_xdr(r)?; @@ -34814,7 +34865,7 @@ impl ReadXdr for PaymentResult { } impl WriteXdr for PaymentResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35006,7 +35057,7 @@ impl From for i32 { } impl ReadXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35017,7 +35068,7 @@ impl ReadXdr for PathPaymentStrictReceiveResultCode { } impl WriteXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35052,7 +35103,7 @@ pub struct SimplePaymentResult { } impl ReadXdr for SimplePaymentResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35065,7 +35116,7 @@ impl ReadXdr for SimplePaymentResult { } impl WriteXdr for SimplePaymentResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -35100,7 +35151,7 @@ pub struct PathPaymentStrictReceiveResultSuccess { } impl ReadXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35112,7 +35163,7 @@ impl ReadXdr for PathPaymentStrictReceiveResultSuccess { } impl WriteXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers.write_xdr(w)?; @@ -35278,7 +35329,7 @@ impl Variants for PathPaymentStrictReceiveRe impl Union for PathPaymentStrictReceiveResult {} impl ReadXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PathPaymentStrictReceiveResultCode = @@ -35309,7 +35360,7 @@ impl ReadXdr for PathPaymentStrictReceiveResult { } impl WriteXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35503,7 +35554,7 @@ impl From for i32 { } impl ReadXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35514,7 +35565,7 @@ impl ReadXdr for PathPaymentStrictSendResultCode { } impl WriteXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35547,7 +35598,7 @@ pub struct PathPaymentStrictSendResultSuccess { } impl ReadXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35559,7 +35610,7 @@ impl ReadXdr for PathPaymentStrictSendResultSuccess { } impl WriteXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers.write_xdr(w)?; @@ -35724,7 +35775,7 @@ impl Variants for PathPaymentStrictSendResult { impl Union for PathPaymentStrictSendResult {} impl ReadXdr for PathPaymentStrictSendResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PathPaymentStrictSendResultCode = @@ -35755,7 +35806,7 @@ impl ReadXdr for PathPaymentStrictSendResult { } impl WriteXdr for PathPaymentStrictSendResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35948,7 +35999,7 @@ impl From for i32 { } impl ReadXdr for ManageSellOfferResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35959,7 +36010,7 @@ impl ReadXdr for ManageSellOfferResultCode { } impl WriteXdr for ManageSellOfferResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36062,7 +36113,7 @@ impl From for i32 { } impl ReadXdr for ManageOfferEffect { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36073,7 +36124,7 @@ impl ReadXdr for ManageOfferEffect { } impl WriteXdr for ManageOfferEffect { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36167,7 +36218,7 @@ impl Variants for ManageOfferSuccessResultOffer { impl Union for ManageOfferSuccessResultOffer {} impl ReadXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageOfferEffect = ::read_xdr(r)?; @@ -36185,7 +36236,7 @@ impl ReadXdr for ManageOfferSuccessResultOffer { } impl WriteXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36234,7 +36285,7 @@ pub struct ManageOfferSuccessResult { } impl ReadXdr for ManageOfferSuccessResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -36246,7 +36297,7 @@ impl ReadXdr for ManageOfferSuccessResult { } impl WriteXdr for ManageOfferSuccessResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers_claimed.write_xdr(w)?; @@ -36405,7 +36456,7 @@ impl Variants for ManageSellOfferResult { impl Union for ManageSellOfferResult {} impl ReadXdr for ManageSellOfferResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageSellOfferResultCode = @@ -36436,7 +36487,7 @@ impl ReadXdr for ManageSellOfferResult { } impl WriteXdr for ManageSellOfferResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36626,7 +36677,7 @@ impl From for i32 { } impl ReadXdr for ManageBuyOfferResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36637,7 +36688,7 @@ impl ReadXdr for ManageBuyOfferResultCode { } impl WriteXdr for ManageBuyOfferResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36795,7 +36846,7 @@ impl Variants for ManageBuyOfferResult { impl Union for ManageBuyOfferResult {} impl ReadXdr for ManageBuyOfferResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageBuyOfferResultCode = ::read_xdr(r)?; @@ -36825,7 +36876,7 @@ impl ReadXdr for ManageBuyOfferResult { } impl WriteXdr for ManageBuyOfferResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36999,7 +37050,7 @@ impl From for i32 { } impl ReadXdr for SetOptionsResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37010,7 +37061,7 @@ impl ReadXdr for SetOptionsResultCode { } impl WriteXdr for SetOptionsResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37156,7 +37207,7 @@ impl Variants for SetOptionsResult { impl Union for SetOptionsResult {} impl ReadXdr for SetOptionsResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SetOptionsResultCode = ::read_xdr(r)?; @@ -37182,7 +37233,7 @@ impl ReadXdr for SetOptionsResult { } impl WriteXdr for SetOptionsResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37345,7 +37396,7 @@ impl From for i32 { } impl ReadXdr for ChangeTrustResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37356,7 +37407,7 @@ impl ReadXdr for ChangeTrustResultCode { } impl WriteXdr for ChangeTrustResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37490,7 +37541,7 @@ impl Variants for ChangeTrustResult { impl Union for ChangeTrustResult {} impl ReadXdr for ChangeTrustResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ChangeTrustResultCode = ::read_xdr(r)?; @@ -37516,7 +37567,7 @@ impl ReadXdr for ChangeTrustResult { } impl WriteXdr for ChangeTrustResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37663,7 +37714,7 @@ impl From for i32 { } impl ReadXdr for AllowTrustResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37674,7 +37725,7 @@ impl ReadXdr for AllowTrustResultCode { } impl WriteXdr for AllowTrustResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37796,7 +37847,7 @@ impl Variants for AllowTrustResult { impl Union for AllowTrustResult {} impl ReadXdr for AllowTrustResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AllowTrustResultCode = ::read_xdr(r)?; @@ -37818,7 +37869,7 @@ impl ReadXdr for AllowTrustResult { } impl WriteXdr for AllowTrustResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37968,7 +38019,7 @@ impl From for i32 { } impl ReadXdr for AccountMergeResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37979,7 +38030,7 @@ impl ReadXdr for AccountMergeResultCode { } impl WriteXdr for AccountMergeResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38107,7 +38158,7 @@ impl Variants for AccountMergeResult { impl Union for AccountMergeResult {} impl ReadXdr for AccountMergeResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AccountMergeResultCode = ::read_xdr(r)?; @@ -38130,7 +38181,7 @@ impl ReadXdr for AccountMergeResult { } impl WriteXdr for AccountMergeResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38239,7 +38290,7 @@ impl From for i32 { } impl ReadXdr for InflationResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38250,7 +38301,7 @@ impl ReadXdr for InflationResultCode { } impl WriteXdr for InflationResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38283,7 +38334,7 @@ pub struct InflationPayout { } impl ReadXdr for InflationPayout { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -38295,7 +38346,7 @@ impl ReadXdr for InflationPayout { } impl WriteXdr for InflationPayout { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -38383,7 +38434,7 @@ impl Variants for InflationResult { impl Union for InflationResult {} impl ReadXdr for InflationResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: InflationResultCode = ::read_xdr(r)?; @@ -38402,7 +38453,7 @@ impl ReadXdr for InflationResult { } impl WriteXdr for InflationResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38530,7 +38581,7 @@ impl From for i32 { } impl ReadXdr for ManageDataResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38541,7 +38592,7 @@ impl ReadXdr for ManageDataResultCode { } impl WriteXdr for ManageDataResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38651,7 +38702,7 @@ impl Variants for ManageDataResult { impl Union for ManageDataResult {} impl ReadXdr for ManageDataResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageDataResultCode = ::read_xdr(r)?; @@ -38671,7 +38722,7 @@ impl ReadXdr for ManageDataResult { } impl WriteXdr for ManageDataResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38779,7 +38830,7 @@ impl From for i32 { } impl ReadXdr for BumpSequenceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38790,7 +38841,7 @@ impl ReadXdr for BumpSequenceResultCode { } impl WriteXdr for BumpSequenceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38879,7 +38930,7 @@ impl Variants for BumpSequenceResult { impl Union for BumpSequenceResult {} impl ReadXdr for BumpSequenceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BumpSequenceResultCode = ::read_xdr(r)?; @@ -38896,7 +38947,7 @@ impl ReadXdr for BumpSequenceResult { } impl WriteXdr for BumpSequenceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39026,7 +39077,7 @@ impl From for i32 { } impl ReadXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39037,7 +39088,7 @@ impl ReadXdr for CreateClaimableBalanceResultCode { } impl WriteXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39154,7 +39205,7 @@ impl Variants for CreateClaimableBalanceResult impl Union for CreateClaimableBalanceResult {} impl ReadXdr for CreateClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CreateClaimableBalanceResultCode = @@ -39178,7 +39229,7 @@ impl ReadXdr for CreateClaimableBalanceResult { } impl WriteXdr for CreateClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39312,7 +39363,7 @@ impl From for i32 { } impl ReadXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39323,7 +39374,7 @@ impl ReadXdr for ClaimClaimableBalanceResultCode { } impl WriteXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39439,7 +39490,7 @@ impl Variants for ClaimClaimableBalanceResult { impl Union for ClaimClaimableBalanceResult {} impl ReadXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimClaimableBalanceResultCode = @@ -39461,7 +39512,7 @@ impl ReadXdr for ClaimClaimableBalanceResult { } impl WriteXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39582,7 +39633,7 @@ impl From for i32 { } impl ReadXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39593,7 +39644,7 @@ impl ReadXdr for BeginSponsoringFutureReservesResultCode { } impl WriteXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39694,7 +39745,7 @@ impl Variants for BeginSponsoringFuture impl Union for BeginSponsoringFutureReservesResult {} impl ReadXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BeginSponsoringFutureReservesResultCode = @@ -39714,7 +39765,7 @@ impl ReadXdr for BeginSponsoringFutureReservesResult { } impl WriteXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39822,7 +39873,7 @@ impl From for i32 { } impl ReadXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39833,7 +39884,7 @@ impl ReadXdr for EndSponsoringFutureReservesResultCode { } impl WriteXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39923,7 +39974,7 @@ impl Variants for EndSponsoringFutureRese impl Union for EndSponsoringFutureReservesResult {} impl ReadXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EndSponsoringFutureReservesResultCode = @@ -39941,7 +39992,7 @@ impl ReadXdr for EndSponsoringFutureReservesResult { } impl WriteXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40074,7 +40125,7 @@ impl From for i32 { } impl ReadXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40085,7 +40136,7 @@ impl ReadXdr for RevokeSponsorshipResultCode { } impl WriteXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40201,7 +40252,7 @@ impl Variants for RevokeSponsorshipResult { impl Union for RevokeSponsorshipResult {} impl ReadXdr for RevokeSponsorshipResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RevokeSponsorshipResultCode = @@ -40223,7 +40274,7 @@ impl ReadXdr for RevokeSponsorshipResult { } impl WriteXdr for RevokeSponsorshipResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40354,7 +40405,7 @@ impl From for i32 { } impl ReadXdr for ClawbackResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40365,7 +40416,7 @@ impl ReadXdr for ClawbackResultCode { } impl WriteXdr for ClawbackResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40475,7 +40526,7 @@ impl Variants for ClawbackResult { impl Union for ClawbackResult {} impl ReadXdr for ClawbackResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClawbackResultCode = ::read_xdr(r)?; @@ -40495,7 +40546,7 @@ impl ReadXdr for ClawbackResult { } impl WriteXdr for ClawbackResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40615,7 +40666,7 @@ impl From for i32 { } impl ReadXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40626,7 +40677,7 @@ impl ReadXdr for ClawbackClaimableBalanceResultCode { } impl WriteXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40727,7 +40778,7 @@ impl Variants for ClawbackClaimableBalanceRe impl Union for ClawbackClaimableBalanceResult {} impl ReadXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClawbackClaimableBalanceResultCode = @@ -40747,7 +40798,7 @@ impl ReadXdr for ClawbackClaimableBalanceResult { } impl WriteXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40883,7 +40934,7 @@ impl From for i32 { } impl ReadXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40894,7 +40945,7 @@ impl ReadXdr for SetTrustLineFlagsResultCode { } impl WriteXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41010,7 +41061,7 @@ impl Variants for SetTrustLineFlagsResult { impl Union for SetTrustLineFlagsResult {} impl ReadXdr for SetTrustLineFlagsResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SetTrustLineFlagsResultCode = @@ -41032,7 +41083,7 @@ impl ReadXdr for SetTrustLineFlagsResult { } impl WriteXdr for SetTrustLineFlagsResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41185,7 +41236,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41196,7 +41247,7 @@ impl ReadXdr for LiquidityPoolDepositResultCode { } impl WriteXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41324,7 +41375,7 @@ impl Variants for LiquidityPoolDepositResult { impl Union for LiquidityPoolDepositResult {} impl ReadXdr for LiquidityPoolDepositResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolDepositResultCode = @@ -41348,7 +41399,7 @@ impl ReadXdr for LiquidityPoolDepositResult { } impl WriteXdr for LiquidityPoolDepositResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41490,7 +41541,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41501,7 +41552,7 @@ impl ReadXdr for LiquidityPoolWithdrawResultCode { } impl WriteXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41617,7 +41668,7 @@ impl Variants for LiquidityPoolWithdrawResult { impl Union for LiquidityPoolWithdrawResult {} impl ReadXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolWithdrawResultCode = @@ -41639,7 +41690,7 @@ impl ReadXdr for LiquidityPoolWithdrawResult { } impl WriteXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41776,7 +41827,7 @@ impl From for i32 { } impl ReadXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41787,7 +41838,7 @@ impl ReadXdr for InvokeHostFunctionResultCode { } impl WriteXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41905,7 +41956,7 @@ impl Variants for InvokeHostFunctionResult { impl Union for InvokeHostFunctionResult {} impl ReadXdr for InvokeHostFunctionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: InvokeHostFunctionResultCode = @@ -41929,7 +41980,7 @@ impl ReadXdr for InvokeHostFunctionResult { } impl WriteXdr for InvokeHostFunctionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42054,7 +42105,7 @@ impl From for i32 { } impl ReadXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42065,7 +42116,7 @@ impl ReadXdr for ExtendFootprintTtlResultCode { } impl WriteXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42171,7 +42222,7 @@ impl Variants for ExtendFootprintTtlResult { impl Union for ExtendFootprintTtlResult {} impl ReadXdr for ExtendFootprintTtlResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ExtendFootprintTtlResultCode = @@ -42193,7 +42244,7 @@ impl ReadXdr for ExtendFootprintTtlResult { } impl WriteXdr for ExtendFootprintTtlResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42316,7 +42367,7 @@ impl From for i32 { } impl ReadXdr for RestoreFootprintResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42327,7 +42378,7 @@ impl ReadXdr for RestoreFootprintResultCode { } impl WriteXdr for RestoreFootprintResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42433,7 +42484,7 @@ impl Variants for RestoreFootprintResult { impl Union for RestoreFootprintResult {} impl ReadXdr for RestoreFootprintResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RestoreFootprintResultCode = @@ -42455,7 +42506,7 @@ impl ReadXdr for RestoreFootprintResult { } impl WriteXdr for RestoreFootprintResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42594,7 +42645,7 @@ impl From for i32 { } impl ReadXdr for OperationResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42605,7 +42656,7 @@ impl ReadXdr for OperationResultCode { } impl WriteXdr for OperationResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42872,7 +42923,7 @@ impl Variants for OperationResultTr { impl Union for OperationResultTr {} impl ReadXdr for OperationResultTr { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationType = ::read_xdr(r)?; @@ -42952,7 +43003,7 @@ impl ReadXdr for OperationResultTr { } impl WriteXdr for OperationResultTr { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43161,7 +43212,7 @@ impl Variants for OperationResult { impl Union for OperationResult {} impl ReadXdr for OperationResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationResultCode = ::read_xdr(r)?; @@ -43183,7 +43234,7 @@ impl ReadXdr for OperationResult { } impl WriteXdr for OperationResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43400,7 +43451,7 @@ impl From for i32 { } impl ReadXdr for TransactionResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -43411,7 +43462,7 @@ impl ReadXdr for TransactionResultCode { } impl WriteXdr for TransactionResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -43595,7 +43646,7 @@ impl Variants for InnerTransactionResultResult { impl Union for InnerTransactionResultResult {} impl ReadXdr for InnerTransactionResultResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TransactionResultCode = ::read_xdr(r)?; @@ -43631,7 +43682,7 @@ impl ReadXdr for InnerTransactionResultResult { } impl WriteXdr for InnerTransactionResultResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43732,7 +43783,7 @@ impl Variants for InnerTransactionResultExt { impl Union for InnerTransactionResultExt {} impl ReadXdr for InnerTransactionResultExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -43748,7 +43799,7 @@ impl ReadXdr for InnerTransactionResultExt { } impl WriteXdr for InnerTransactionResultExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43820,7 +43871,7 @@ pub struct InnerTransactionResult { } impl ReadXdr for InnerTransactionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -43833,7 +43884,7 @@ impl ReadXdr for InnerTransactionResult { } impl WriteXdr for InnerTransactionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_charged.write_xdr(w)?; @@ -43868,7 +43919,7 @@ pub struct InnerTransactionResultPair { } impl ReadXdr for InnerTransactionResultPair { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -43880,7 +43931,7 @@ impl ReadXdr for InnerTransactionResultPair { } impl WriteXdr for InnerTransactionResultPair { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.transaction_hash.write_xdr(w)?; @@ -44077,7 +44128,7 @@ impl Variants for TransactionResultResult { impl Union for TransactionResultResult {} impl ReadXdr for TransactionResultResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TransactionResultCode = ::read_xdr(r)?; @@ -44119,7 +44170,7 @@ impl ReadXdr for TransactionResultResult { } impl WriteXdr for TransactionResultResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44222,7 +44273,7 @@ impl Variants for TransactionResultExt { impl Union for TransactionResultExt {} impl ReadXdr for TransactionResultExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -44238,7 +44289,7 @@ impl ReadXdr for TransactionResultExt { } impl WriteXdr for TransactionResultExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44311,7 +44362,7 @@ pub struct TransactionResult { } impl ReadXdr for TransactionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -44324,7 +44375,7 @@ impl ReadXdr for TransactionResult { } impl WriteXdr for TransactionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_charged.write_xdr(w)?; @@ -44432,7 +44483,7 @@ impl AsRef<[u8; 32]> for Hash { } impl ReadXdr for Hash { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 32]>::read_xdr(r)?; @@ -44443,7 +44494,7 @@ impl ReadXdr for Hash { } impl WriteXdr for Hash { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44583,7 +44634,7 @@ impl AsRef<[u8; 32]> for Uint256 { } impl ReadXdr for Uint256 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 32]>::read_xdr(r)?; @@ -44594,7 +44645,7 @@ impl ReadXdr for Uint256 { } impl WriteXdr for Uint256 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44708,7 +44759,7 @@ impl AsRef for TimePoint { } impl ReadXdr for TimePoint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u64::read_xdr(r)?; @@ -44719,7 +44770,7 @@ impl ReadXdr for TimePoint { } impl WriteXdr for TimePoint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44764,7 +44815,7 @@ impl AsRef for Duration { } impl ReadXdr for Duration { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u64::read_xdr(r)?; @@ -44775,7 +44826,7 @@ impl ReadXdr for Duration { } impl WriteXdr for Duration { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44853,7 +44904,7 @@ impl Variants for ExtensionPoint { impl Union for ExtensionPoint {} impl ReadXdr for ExtensionPoint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -44869,7 +44920,7 @@ impl ReadXdr for ExtensionPoint { } impl WriteXdr for ExtensionPoint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44994,7 +45045,7 @@ impl From for i32 { } impl ReadXdr for CryptoKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45005,7 +45056,7 @@ impl ReadXdr for CryptoKeyType { } impl WriteXdr for CryptoKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45096,7 +45147,7 @@ impl From for i32 { } impl ReadXdr for PublicKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45107,7 +45158,7 @@ impl ReadXdr for PublicKeyType { } impl WriteXdr for PublicKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45216,7 +45267,7 @@ impl From for i32 { } impl ReadXdr for SignerKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45227,7 +45278,7 @@ impl ReadXdr for SignerKeyType { } impl WriteXdr for SignerKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45306,7 +45357,7 @@ impl Variants for PublicKey { impl Union for PublicKey {} impl ReadXdr for PublicKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PublicKeyType = ::read_xdr(r)?; @@ -45324,7 +45375,7 @@ impl ReadXdr for PublicKey { } impl WriteXdr for PublicKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45361,7 +45412,7 @@ pub struct SignerKeyEd25519SignedPayload { } impl ReadXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -45373,7 +45424,7 @@ impl ReadXdr for SignerKeyEd25519SignedPayload { } impl WriteXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ed25519.write_xdr(w)?; @@ -45482,7 +45533,7 @@ impl Variants for SignerKey { impl Union for SignerKey {} impl ReadXdr for SignerKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SignerKeyType = ::read_xdr(r)?; @@ -45503,7 +45554,7 @@ impl ReadXdr for SignerKey { } impl WriteXdr for SignerKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45559,7 +45610,7 @@ impl AsRef> for Signature { } impl ReadXdr for Signature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64>::read_xdr(r)?; @@ -45570,7 +45621,7 @@ impl ReadXdr for Signature { } impl WriteXdr for Signature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45722,7 +45773,7 @@ impl AsRef<[u8; 4]> for SignatureHint { } impl ReadXdr for SignatureHint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -45733,7 +45784,7 @@ impl ReadXdr for SignatureHint { } impl WriteXdr for SignatureHint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45813,7 +45864,7 @@ impl AsRef for NodeId { } impl ReadXdr for NodeId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = PublicKey::read_xdr(r)?; @@ -45824,7 +45875,7 @@ impl ReadXdr for NodeId { } impl WriteXdr for NodeId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45867,7 +45918,7 @@ impl AsRef for AccountId { } impl ReadXdr for AccountId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = PublicKey::read_xdr(r)?; @@ -45878,7 +45929,7 @@ impl ReadXdr for AccountId { } impl WriteXdr for AccountId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45906,7 +45957,7 @@ pub struct Curve25519Secret { } impl ReadXdr for Curve25519Secret { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -45917,7 +45968,7 @@ impl ReadXdr for Curve25519Secret { } impl WriteXdr for Curve25519Secret { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -45948,7 +45999,7 @@ pub struct Curve25519Public { } impl ReadXdr for Curve25519Public { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -45959,7 +46010,7 @@ impl ReadXdr for Curve25519Public { } impl WriteXdr for Curve25519Public { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -45990,7 +46041,7 @@ pub struct HmacSha256Key { } impl ReadXdr for HmacSha256Key { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46001,7 +46052,7 @@ impl ReadXdr for HmacSha256Key { } impl WriteXdr for HmacSha256Key { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46032,7 +46083,7 @@ pub struct HmacSha256Mac { } impl ReadXdr for HmacSha256Mac { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46043,7 +46094,7 @@ impl ReadXdr for HmacSha256Mac { } impl WriteXdr for HmacSha256Mac { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.mac.write_xdr(w)?; @@ -46074,7 +46125,7 @@ pub struct ShortHashSeed { } impl ReadXdr for ShortHashSeed { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46085,7 +46136,7 @@ impl ReadXdr for ShortHashSeed { } impl WriteXdr for ShortHashSeed { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seed.write_xdr(w)?; @@ -46188,7 +46239,7 @@ impl From for i32 { } impl ReadXdr for BinaryFuseFilterType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -46199,7 +46250,7 @@ impl ReadXdr for BinaryFuseFilterType { } impl WriteXdr for BinaryFuseFilterType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -46252,7 +46303,7 @@ pub struct SerializedBinaryFuseFilter { } impl ReadXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46271,7 +46322,7 @@ impl ReadXdr for SerializedBinaryFuseFilter { } impl WriteXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.type_.write_xdr(w)?; @@ -50743,7 +50794,7 @@ impl Type { "SerializedBinaryFuseFilter", ]; - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] #[allow(clippy::too_many_lines)] pub fn read_xdr(v: TypeVariant, r: &mut Limited) -> Result { match v { @@ -52757,7 +52808,7 @@ impl Type { Ok(t) } - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] pub fn read_xdr_to_end(v: TypeVariant, r: &mut Limited) -> Result { let s = Self::read_xdr(v, r)?; // Check that any further reads, such as this read of one byte, read no @@ -58926,7 +58977,7 @@ impl Type { } } - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] pub fn from_xdr>(v: TypeVariant, bytes: B, limits: Limits) -> Result { let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); let t = Self::read_xdr_to_end(v, &mut cursor)?; @@ -63188,7 +63239,7 @@ impl Variants for Type { } impl WriteXdr for Type { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] #[allow(clippy::too_many_lines)] fn write_xdr(&self, w: &mut Limited) -> Result<()> { match self { diff --git a/src/next/generated.rs b/src/next/generated.rs index 75f77fed..854ebaf4 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -93,6 +93,7 @@ use alloc::{ borrow::ToOwned, boxed::Box, string::{FromUtf8Error, String}, + vec, vec::Vec, }; #[cfg(feature = "std")] @@ -101,14 +102,17 @@ use std::string::FromUtf8Error; #[cfg(feature = "arbitrary")] use arbitrary::Arbitrary; -// TODO: Add support for read/write xdr fns when std not available. - #[cfg(feature = "std")] use std::{ error, io, io::{BufRead, BufReader, Cursor, Read, Write}, }; +#[cfg(all(not(feature = "std"), feature = "alloc"))] +use embedded_io::{Error as _, ErrorType, Read, Write}; +#[cfg(all(not(feature = "std"), feature = "alloc"))] +use embedded_io_cursor::Cursor; + /// Error contains all errors returned by functions in this crate. It can be /// compared via `PartialEq`, however any contained IO errors will only be /// compared on their `ErrorKind`. @@ -124,6 +128,8 @@ pub enum Error { InvalidHex, #[cfg(feature = "std")] Io(io::Error), + #[cfg(all(not(feature = "std"), feature = "alloc"))] + Io(embedded_io::ErrorKind), DepthLimitExceeded, #[cfg(feature = "serde_json")] Json(serde_json::Error), @@ -140,13 +146,33 @@ impl PartialEq for Error { // case for comparing errors outputted by the XDR library is for // error case testing, and a lack of the ability to compare has a // detrimental affect on failure testing, so this is a tradeoff. - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] (Self::Io(l), Self::Io(r)) => l.kind() == r.kind(), _ => core::mem::discriminant(self) == core::mem::discriminant(other), } } } +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl embedded_io::Error for Error { + fn kind(&self) -> embedded_io::ErrorKind { + match self { + Self::Io(e) => *e, + _ => embedded_io::ErrorKind::Other, + } + } +} + +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl From> for Error { + fn from(value: embedded_io::ReadExactError) -> Self { + match value { + embedded_io::ReadExactError::UnexpectedEof => Error::Io(embedded_io::ErrorKind::Other), + embedded_io::ReadExactError::Other(e) => e, + } + } +} + #[cfg(feature = "std")] impl error::Error for Error { #[must_use] @@ -173,6 +199,8 @@ impl fmt::Display for Error { Error::InvalidHex => write!(f, "hex invalid"), #[cfg(feature = "std")] Error::Io(e) => write!(f, "{e}"), + #[cfg(all(not(feature = "std"), feature = "alloc"))] + Error::Io(_) => write!(f, "io error"), Error::DepthLimitExceeded => write!(f, "depth limit exceeded"), #[cfg(feature = "serde_json")] Error::Json(e) => write!(f, "{e}"), @@ -225,6 +253,11 @@ impl From for () { #[allow(dead_code)] type Result = core::result::Result; +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl ErrorType for Limited { + type Error = Error; +} + /// Name defines types that assign a static name to their value, such as the /// name given to an identifier in an XDR enum, or the name given to the case in /// a union. @@ -258,7 +291,7 @@ where /// `Limits` contains the limits that a limited reader or writer will be /// constrained to. -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] #[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Limits { /// Defines the maximum depth for recursive calls in `Read/WriteXdr` to @@ -275,7 +308,7 @@ pub struct Limits { pub len: usize, } -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] impl Limits { #[must_use] pub fn none() -> Self { @@ -306,13 +339,13 @@ impl Limits { /// /// Intended for use with readers and writers and limiting their reads and /// writes. -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] pub struct Limited { pub inner: L, pub(crate) limits: Limits, } -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] impl Limited { /// Constructs a new `Limited`. /// @@ -365,6 +398,14 @@ impl Read for Limited { } } +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl Read for Limited { + /// Forwards the read operation to the wrapped object. + fn read(&mut self, buf: &mut [u8]) -> core::result::Result { + self.inner.read(buf).map_err(|e| Error::Io(e.kind())) + } +} + #[cfg(feature = "std")] impl BufRead for Limited { /// Forwards the read operation to the wrapped object. @@ -391,6 +432,18 @@ impl Write for Limited { } } +#[cfg(all(not(feature = "std"), feature = "alloc"))] +impl Write for Limited { + /// Forwards the write operation to the wrapped object. + fn write(&mut self, buf: &[u8]) -> core::result::Result { + self.inner.write(buf).map_err(|e| Error::Io(e.kind())) + } + + fn flush(&mut self) -> core::result::Result<(), Self::Error> { + self.inner.flush().map_err(|e| Error::Io(e.kind())) + } +} + #[cfg(feature = "std")] pub struct ReadXdrIter { reader: Limited>, @@ -464,7 +517,7 @@ where /// /// Use [`ReadXdR: Read_xdr_to_end`] when the intent is for all bytes in the /// read implementation to be consumed by the read. - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result; /// Construct the type from the XDR bytes base64 encoded. @@ -499,7 +552,7 @@ where /// /// All implementations should continue if the read implementation returns /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr_to_end(r: &mut Limited) -> Result { let s = Self::read_xdr(r)?; // Check that any further reads, such as this read of one byte, read no @@ -539,7 +592,7 @@ where /// /// Use [`ReadXdR: Read_xdr_into_to_end`] when the intent is for all bytes /// in the read implementation to be consumed by the read. - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr_into(&mut self, r: &mut Limited) -> Result<()> { *self = Self::read_xdr(r)?; Ok(()) @@ -563,7 +616,7 @@ where /// /// All implementations should continue if the read implementation returns /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr_into_to_end(&mut self, r: &mut Limited) -> Result<()> { Self::read_xdr_into(self, r)?; // Check that any further reads, such as this read of one byte, read no @@ -612,7 +665,7 @@ where /// /// An error is returned if the bytes are not completely consumed by the /// deserialization. - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn from_xdr(bytes: impl AsRef<[u8]>, limits: Limits) -> Result { let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); let t = Self::read_xdr_to_end(&mut cursor)?; @@ -636,10 +689,10 @@ where } pub trait WriteXdr { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()>; - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn to_xdr(&self, limits: Limits) -> Result> { let mut cursor = Limited::new(Cursor::new(vec![]), limits); self.write_xdr(&mut cursor)?; @@ -661,13 +714,13 @@ pub trait WriteXdr { /// `Pad_len` returns the number of bytes to pad an XDR value of the given /// length to make the final serialized size a multiple of 4. -#[cfg(feature = "std")] +#[cfg(feature = "alloc")] fn pad_len(len: usize) -> usize { (4 - (len % 4)) % 4 } impl ReadXdr for i32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 4]; r.with_limited_depth(|r| { @@ -679,7 +732,7 @@ impl ReadXdr for i32 { } impl WriteXdr for i32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 4] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -690,7 +743,7 @@ impl WriteXdr for i32 { } impl ReadXdr for u32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 4]; r.with_limited_depth(|r| { @@ -702,7 +755,7 @@ impl ReadXdr for u32 { } impl WriteXdr for u32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 4] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -713,7 +766,7 @@ impl WriteXdr for u32 { } impl ReadXdr for i64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 8]; r.with_limited_depth(|r| { @@ -725,7 +778,7 @@ impl ReadXdr for i64 { } impl WriteXdr for i64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 8] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -736,7 +789,7 @@ impl WriteXdr for i64 { } impl ReadXdr for u64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 8]; r.with_limited_depth(|r| { @@ -748,7 +801,7 @@ impl ReadXdr for u64 { } impl WriteXdr for u64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 8] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -759,35 +812,35 @@ impl WriteXdr for u64 { } impl ReadXdr for f32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(_r: &mut Limited) -> Result { todo!() } } impl WriteXdr for f32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { todo!() } } impl ReadXdr for f64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(_r: &mut Limited) -> Result { todo!() } } impl WriteXdr for f64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { todo!() } } impl ReadXdr for bool { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u32::read_xdr(r)?; @@ -798,7 +851,7 @@ impl ReadXdr for bool { } impl WriteXdr for bool { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i = u32::from(*self); // true = 1, false = 0 @@ -808,7 +861,7 @@ impl WriteXdr for bool { } impl ReadXdr for Option { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u32::read_xdr(r)?; @@ -825,7 +878,7 @@ impl ReadXdr for Option { } impl WriteXdr for Option { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { if let Some(t) = self { @@ -840,35 +893,35 @@ impl WriteXdr for Option { } impl ReadXdr for Box { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| Ok(Box::new(T::read_xdr(r)?))) } } impl WriteXdr for Box { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| T::write_xdr(self, w)) } } impl ReadXdr for () { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(_r: &mut Limited) -> Result { Ok(()) } } impl WriteXdr for () { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { Ok(()) } } impl ReadXdr for [u8; N] { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { r.consume_len(N)?; @@ -887,7 +940,7 @@ impl ReadXdr for [u8; N] { } impl WriteXdr for [u8; N] { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { w.consume_len(N)?; @@ -901,7 +954,7 @@ impl WriteXdr for [u8; N] { } impl ReadXdr for [T; N] { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let mut vec = Vec::with_capacity(N); @@ -916,7 +969,7 @@ impl ReadXdr for [T; N] { } impl WriteXdr for [T; N] { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { for t in self { @@ -1275,7 +1328,7 @@ impl<'a, const MAX: u32> TryFrom<&'a VecM> for &'a str { } impl ReadXdr for VecM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -1302,7 +1355,7 @@ impl ReadXdr for VecM { } impl WriteXdr for VecM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -1322,7 +1375,7 @@ impl WriteXdr for VecM { } impl ReadXdr for VecM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len = u32::read_xdr(r)?; @@ -1342,7 +1395,7 @@ impl ReadXdr for VecM { } impl WriteXdr for VecM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -1715,7 +1768,7 @@ impl<'a, const MAX: u32> TryFrom<&'a BytesM> for &'a str { } impl ReadXdr for BytesM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -1742,7 +1795,7 @@ impl ReadXdr for BytesM { } impl WriteXdr for BytesM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -2118,7 +2171,7 @@ impl<'a, const MAX: u32> TryFrom<&'a StringM> for &'a str { } impl ReadXdr for StringM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -2145,7 +2198,7 @@ impl ReadXdr for StringM { } impl WriteXdr for StringM { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -2191,7 +2244,7 @@ impl ReadXdr for Frame where T: ReadXdr, { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { // Read the frame header value that contains 1 flag-bit and a 33-bit length. // - The 1 flag bit is 0 when there are more frames for the same record. @@ -2211,10 +2264,8 @@ where } } -#[cfg(all(test, feature = "std"))] +#[cfg(all(test, feature = "alloc"))] mod tests { - use std::io::Cursor; - use super::*; #[test] @@ -2323,7 +2374,7 @@ mod tests { } } -#[cfg(all(test, feature = "std"))] +#[cfg(all(test, feature = "alloc"))] mod test { use super::*; @@ -2876,7 +2927,7 @@ impl AsRef for Value { } impl ReadXdr for Value { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::read_xdr(r)?; @@ -2887,7 +2938,7 @@ impl ReadXdr for Value { } impl WriteXdr for Value { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -2966,7 +3017,7 @@ pub struct ScpBallot { } impl ReadXdr for ScpBallot { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -2978,7 +3029,7 @@ impl ReadXdr for ScpBallot { } impl WriteXdr for ScpBallot { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.counter.write_xdr(w)?; @@ -3087,7 +3138,7 @@ impl From for i32 { } impl ReadXdr for ScpStatementType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -3098,7 +3149,7 @@ impl ReadXdr for ScpStatementType { } impl WriteXdr for ScpStatementType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -3133,7 +3184,7 @@ pub struct ScpNomination { } impl ReadXdr for ScpNomination { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3146,7 +3197,7 @@ impl ReadXdr for ScpNomination { } impl WriteXdr for ScpNomination { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_set_hash.write_xdr(w)?; @@ -3189,7 +3240,7 @@ pub struct ScpStatementPrepare { } impl ReadXdr for ScpStatementPrepare { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3205,7 +3256,7 @@ impl ReadXdr for ScpStatementPrepare { } impl WriteXdr for ScpStatementPrepare { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_set_hash.write_xdr(w)?; @@ -3249,7 +3300,7 @@ pub struct ScpStatementConfirm { } impl ReadXdr for ScpStatementConfirm { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3264,7 +3315,7 @@ impl ReadXdr for ScpStatementConfirm { } impl WriteXdr for ScpStatementConfirm { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ballot.write_xdr(w)?; @@ -3303,7 +3354,7 @@ pub struct ScpStatementExternalize { } impl ReadXdr for ScpStatementExternalize { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3316,7 +3367,7 @@ impl ReadXdr for ScpStatementExternalize { } impl WriteXdr for ScpStatementExternalize { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.commit.write_xdr(w)?; @@ -3439,7 +3490,7 @@ impl Variants for ScpStatementPledges { impl Union for ScpStatementPledges {} impl ReadXdr for ScpStatementPledges { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScpStatementType = ::read_xdr(r)?; @@ -3460,7 +3511,7 @@ impl ReadXdr for ScpStatementPledges { } impl WriteXdr for ScpStatementPledges { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -3534,7 +3585,7 @@ pub struct ScpStatement { } impl ReadXdr for ScpStatement { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3547,7 +3598,7 @@ impl ReadXdr for ScpStatement { } impl WriteXdr for ScpStatement { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.node_id.write_xdr(w)?; @@ -3582,7 +3633,7 @@ pub struct ScpEnvelope { } impl ReadXdr for ScpEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3594,7 +3645,7 @@ impl ReadXdr for ScpEnvelope { } impl WriteXdr for ScpEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.statement.write_xdr(w)?; @@ -3630,7 +3681,7 @@ pub struct ScpQuorumSet { } impl ReadXdr for ScpQuorumSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3643,7 +3694,7 @@ impl ReadXdr for ScpQuorumSet { } impl WriteXdr for ScpQuorumSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.threshold.write_xdr(w)?; @@ -3677,7 +3728,7 @@ pub struct ConfigSettingContractExecutionLanesV0 { } impl ReadXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3688,7 +3739,7 @@ impl ReadXdr for ConfigSettingContractExecutionLanesV0 { } impl WriteXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_tx_count.write_xdr(w)?; @@ -3731,7 +3782,7 @@ pub struct ConfigSettingContractComputeV0 { } impl ReadXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3745,7 +3796,7 @@ impl ReadXdr for ConfigSettingContractComputeV0 { } impl WriteXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_instructions.write_xdr(w)?; @@ -3785,7 +3836,7 @@ pub struct ConfigSettingContractParallelComputeV0 { } impl ReadXdr for ConfigSettingContractParallelComputeV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3796,7 +3847,7 @@ impl ReadXdr for ConfigSettingContractParallelComputeV0 { } impl WriteXdr for ConfigSettingContractParallelComputeV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_parallel_threads.write_xdr(w)?; @@ -3872,7 +3923,7 @@ pub struct ConfigSettingContractLedgerCostV0 { } impl ReadXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3897,7 +3948,7 @@ impl ReadXdr for ConfigSettingContractLedgerCostV0 { } impl WriteXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_read_ledger_entries.write_xdr(w)?; @@ -3942,7 +3993,7 @@ pub struct ConfigSettingContractHistoricalDataV0 { } impl ReadXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3953,7 +4004,7 @@ impl ReadXdr for ConfigSettingContractHistoricalDataV0 { } impl WriteXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_historical1_kb.write_xdr(w)?; @@ -3988,7 +4039,7 @@ pub struct ConfigSettingContractEventsV0 { } impl ReadXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4000,7 +4051,7 @@ impl ReadXdr for ConfigSettingContractEventsV0 { } impl WriteXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_max_contract_events_size_bytes.write_xdr(w)?; @@ -4040,7 +4091,7 @@ pub struct ConfigSettingContractBandwidthV0 { } impl ReadXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4053,7 +4104,7 @@ impl ReadXdr for ConfigSettingContractBandwidthV0 { } impl WriteXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_txs_size_bytes.write_xdr(w)?; @@ -4629,7 +4680,7 @@ impl From for i32 { } impl ReadXdr for ContractCostType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -4640,7 +4691,7 @@ impl ReadXdr for ContractCostType { } impl WriteXdr for ContractCostType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -4676,7 +4727,7 @@ pub struct ContractCostParamEntry { } impl ReadXdr for ContractCostParamEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4689,7 +4740,7 @@ impl ReadXdr for ContractCostParamEntry { } impl WriteXdr for ContractCostParamEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -4751,7 +4802,7 @@ pub struct StateArchivalSettings { } impl ReadXdr for StateArchivalSettings { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4771,7 +4822,7 @@ impl ReadXdr for StateArchivalSettings { } impl WriteXdr for StateArchivalSettings { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.max_entry_ttl.write_xdr(w)?; @@ -4814,7 +4865,7 @@ pub struct EvictionIterator { } impl ReadXdr for EvictionIterator { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4827,7 +4878,7 @@ impl ReadXdr for EvictionIterator { } impl WriteXdr for EvictionIterator { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.bucket_list_level.write_xdr(w)?; @@ -4886,7 +4937,7 @@ impl AsRef> for ContractCostParams { } impl ReadXdr for ContractCostParams { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -4897,7 +4948,7 @@ impl ReadXdr for ContractCostParams { } impl WriteXdr for ContractCostParams { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -5122,7 +5173,7 @@ impl From for i32 { } impl ReadXdr for ConfigSettingId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5133,7 +5184,7 @@ impl ReadXdr for ConfigSettingId { } impl WriteXdr for ConfigSettingId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5320,7 +5371,7 @@ impl Variants for ConfigSettingEntry { impl Union for ConfigSettingEntry {} impl ReadXdr for ConfigSettingEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ConfigSettingId = ::read_xdr(r)?; @@ -5380,7 +5431,7 @@ impl ReadXdr for ConfigSettingEntry { } impl WriteXdr for ConfigSettingEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -5489,7 +5540,7 @@ impl From for i32 { } impl ReadXdr for ScEnvMetaKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5500,7 +5551,7 @@ impl ReadXdr for ScEnvMetaKind { } impl WriteXdr for ScEnvMetaKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5532,7 +5583,7 @@ pub struct ScEnvMetaEntryInterfaceVersion { } impl ReadXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -5544,7 +5595,7 @@ impl ReadXdr for ScEnvMetaEntryInterfaceVersion { } impl WriteXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.protocol.write_xdr(w)?; @@ -5629,7 +5680,7 @@ impl Variants for ScEnvMetaEntry { impl Union for ScEnvMetaEntry {} impl ReadXdr for ScEnvMetaEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScEnvMetaKind = ::read_xdr(r)?; @@ -5649,7 +5700,7 @@ impl ReadXdr for ScEnvMetaEntry { } impl WriteXdr for ScEnvMetaEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -5686,7 +5737,7 @@ pub struct ScMetaV0 { } impl ReadXdr for ScMetaV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -5698,7 +5749,7 @@ impl ReadXdr for ScMetaV0 { } impl WriteXdr for ScMetaV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -5790,7 +5841,7 @@ impl From for i32 { } impl ReadXdr for ScMetaKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5801,7 +5852,7 @@ impl ReadXdr for ScMetaKind { } impl WriteXdr for ScMetaKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5882,7 +5933,7 @@ impl Variants for ScMetaEntry { impl Union for ScMetaEntry {} impl ReadXdr for ScMetaEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScMetaKind = ::read_xdr(r)?; @@ -5898,7 +5949,7 @@ impl ReadXdr for ScMetaEntry { } impl WriteXdr for ScMetaEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -6155,7 +6206,7 @@ impl From for i32 { } impl ReadXdr for ScSpecType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -6166,7 +6217,7 @@ impl ReadXdr for ScSpecType { } impl WriteXdr for ScSpecType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -6197,7 +6248,7 @@ pub struct ScSpecTypeOption { } impl ReadXdr for ScSpecTypeOption { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6208,7 +6259,7 @@ impl ReadXdr for ScSpecTypeOption { } impl WriteXdr for ScSpecTypeOption { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.value_type.write_xdr(w)?; @@ -6241,7 +6292,7 @@ pub struct ScSpecTypeResult { } impl ReadXdr for ScSpecTypeResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6253,7 +6304,7 @@ impl ReadXdr for ScSpecTypeResult { } impl WriteXdr for ScSpecTypeResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ok_type.write_xdr(w)?; @@ -6285,7 +6336,7 @@ pub struct ScSpecTypeVec { } impl ReadXdr for ScSpecTypeVec { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6296,7 +6347,7 @@ impl ReadXdr for ScSpecTypeVec { } impl WriteXdr for ScSpecTypeVec { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.element_type.write_xdr(w)?; @@ -6329,7 +6380,7 @@ pub struct ScSpecTypeMap { } impl ReadXdr for ScSpecTypeMap { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6341,7 +6392,7 @@ impl ReadXdr for ScSpecTypeMap { } impl WriteXdr for ScSpecTypeMap { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_type.write_xdr(w)?; @@ -6373,7 +6424,7 @@ pub struct ScSpecTypeTuple { } impl ReadXdr for ScSpecTypeTuple { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6384,7 +6435,7 @@ impl ReadXdr for ScSpecTypeTuple { } impl WriteXdr for ScSpecTypeTuple { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.value_types.write_xdr(w)?; @@ -6415,7 +6466,7 @@ pub struct ScSpecTypeBytesN { } impl ReadXdr for ScSpecTypeBytesN { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6426,7 +6477,7 @@ impl ReadXdr for ScSpecTypeBytesN { } impl WriteXdr for ScSpecTypeBytesN { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.n.write_xdr(w)?; @@ -6457,7 +6508,7 @@ pub struct ScSpecTypeUdt { } impl ReadXdr for ScSpecTypeUdt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6468,7 +6519,7 @@ impl ReadXdr for ScSpecTypeUdt { } impl WriteXdr for ScSpecTypeUdt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.name.write_xdr(w)?; @@ -6704,7 +6755,7 @@ impl Variants for ScSpecTypeDef { impl Union for ScSpecTypeDef {} impl ReadXdr for ScSpecTypeDef { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecType = ::read_xdr(r)?; @@ -6744,7 +6795,7 @@ impl ReadXdr for ScSpecTypeDef { } impl WriteXdr for ScSpecTypeDef { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -6807,7 +6858,7 @@ pub struct ScSpecUdtStructFieldV0 { } impl ReadXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6820,7 +6871,7 @@ impl ReadXdr for ScSpecUdtStructFieldV0 { } impl WriteXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6859,7 +6910,7 @@ pub struct ScSpecUdtStructV0 { } impl ReadXdr for ScSpecUdtStructV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6873,7 +6924,7 @@ impl ReadXdr for ScSpecUdtStructV0 { } impl WriteXdr for ScSpecUdtStructV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6909,7 +6960,7 @@ pub struct ScSpecUdtUnionCaseVoidV0 { } impl ReadXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6921,7 +6972,7 @@ impl ReadXdr for ScSpecUdtUnionCaseVoidV0 { } impl WriteXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6957,7 +7008,7 @@ pub struct ScSpecUdtUnionCaseTupleV0 { } impl ReadXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6970,7 +7021,7 @@ impl ReadXdr for ScSpecUdtUnionCaseTupleV0 { } impl WriteXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7070,7 +7121,7 @@ impl From for i32 { } impl ReadXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -7081,7 +7132,7 @@ impl ReadXdr for ScSpecUdtUnionCaseV0Kind { } impl WriteXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -7170,7 +7221,7 @@ impl Variants for ScSpecUdtUnionCaseV0 { impl Union for ScSpecUdtUnionCaseV0 {} impl ReadXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecUdtUnionCaseV0Kind = ::read_xdr(r)?; @@ -7191,7 +7242,7 @@ impl ReadXdr for ScSpecUdtUnionCaseV0 { } impl WriteXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -7233,7 +7284,7 @@ pub struct ScSpecUdtUnionV0 { } impl ReadXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7247,7 +7298,7 @@ impl ReadXdr for ScSpecUdtUnionV0 { } impl WriteXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7285,7 +7336,7 @@ pub struct ScSpecUdtEnumCaseV0 { } impl ReadXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7298,7 +7349,7 @@ impl ReadXdr for ScSpecUdtEnumCaseV0 { } impl WriteXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7337,7 +7388,7 @@ pub struct ScSpecUdtEnumV0 { } impl ReadXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7351,7 +7402,7 @@ impl ReadXdr for ScSpecUdtEnumV0 { } impl WriteXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7389,7 +7440,7 @@ pub struct ScSpecUdtErrorEnumCaseV0 { } impl ReadXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7402,7 +7453,7 @@ impl ReadXdr for ScSpecUdtErrorEnumCaseV0 { } impl WriteXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7441,7 +7492,7 @@ pub struct ScSpecUdtErrorEnumV0 { } impl ReadXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7455,7 +7506,7 @@ impl ReadXdr for ScSpecUdtErrorEnumV0 { } impl WriteXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7493,7 +7544,7 @@ pub struct ScSpecFunctionInputV0 { } impl ReadXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7506,7 +7557,7 @@ impl ReadXdr for ScSpecFunctionInputV0 { } impl WriteXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7545,7 +7596,7 @@ pub struct ScSpecFunctionV0 { } impl ReadXdr for ScSpecFunctionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7559,7 +7610,7 @@ impl ReadXdr for ScSpecFunctionV0 { } impl WriteXdr for ScSpecFunctionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7681,7 +7732,7 @@ impl From for i32 { } impl ReadXdr for ScSpecEntryKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -7692,7 +7743,7 @@ impl ReadXdr for ScSpecEntryKind { } impl WriteXdr for ScSpecEntryKind { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -7805,7 +7856,7 @@ impl Variants for ScSpecEntry { impl Union for ScSpecEntry {} impl ReadXdr for ScSpecEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecEntryKind = ::read_xdr(r)?; @@ -7827,7 +7878,7 @@ impl ReadXdr for ScSpecEntry { } impl WriteXdr for ScSpecEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -8085,7 +8136,7 @@ impl From for i32 { } impl ReadXdr for ScValType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8096,7 +8147,7 @@ impl ReadXdr for ScValType { } impl WriteXdr for ScValType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8237,7 +8288,7 @@ impl From for i32 { } impl ReadXdr for ScErrorType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8248,7 +8299,7 @@ impl ReadXdr for ScErrorType { } impl WriteXdr for ScErrorType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8397,7 +8448,7 @@ impl From for i32 { } impl ReadXdr for ScErrorCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8408,7 +8459,7 @@ impl ReadXdr for ScErrorCode { } impl WriteXdr for ScErrorCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8540,7 +8591,7 @@ impl Variants for ScError { impl Union for ScError {} impl ReadXdr for ScError { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScErrorType = ::read_xdr(r)?; @@ -8565,7 +8616,7 @@ impl ReadXdr for ScError { } impl WriteXdr for ScError { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -8610,7 +8661,7 @@ pub struct UInt128Parts { } impl ReadXdr for UInt128Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8622,7 +8673,7 @@ impl ReadXdr for UInt128Parts { } impl WriteXdr for UInt128Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi.write_xdr(w)?; @@ -8655,7 +8706,7 @@ pub struct Int128Parts { } impl ReadXdr for Int128Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8667,7 +8718,7 @@ impl ReadXdr for Int128Parts { } impl WriteXdr for Int128Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi.write_xdr(w)?; @@ -8704,7 +8755,7 @@ pub struct UInt256Parts { } impl ReadXdr for UInt256Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8718,7 +8769,7 @@ impl ReadXdr for UInt256Parts { } impl WriteXdr for UInt256Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi_hi.write_xdr(w)?; @@ -8757,7 +8808,7 @@ pub struct Int256Parts { } impl ReadXdr for Int256Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8771,7 +8822,7 @@ impl ReadXdr for Int256Parts { } impl WriteXdr for Int256Parts { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi_hi.write_xdr(w)?; @@ -8872,7 +8923,7 @@ impl From for i32 { } impl ReadXdr for ContractExecutableType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8883,7 +8934,7 @@ impl ReadXdr for ContractExecutableType { } impl WriteXdr for ContractExecutableType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8972,7 +9023,7 @@ impl Variants for ContractExecutable { impl Union for ContractExecutable {} impl ReadXdr for ContractExecutable { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ContractExecutableType = ::read_xdr(r)?; @@ -8989,7 +9040,7 @@ impl ReadXdr for ContractExecutable { } impl WriteXdr for ContractExecutable { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -9089,7 +9140,7 @@ impl From for i32 { } impl ReadXdr for ScAddressType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -9100,7 +9151,7 @@ impl ReadXdr for ScAddressType { } impl WriteXdr for ScAddressType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -9184,7 +9235,7 @@ impl Variants for ScAddress { impl Union for ScAddress {} impl ReadXdr for ScAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScAddressType = ::read_xdr(r)?; @@ -9201,7 +9252,7 @@ impl ReadXdr for ScAddress { } impl WriteXdr for ScAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -9263,7 +9314,7 @@ impl AsRef> for ScVec { } impl ReadXdr for ScVec { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -9274,7 +9325,7 @@ impl ReadXdr for ScVec { } impl WriteXdr for ScVec { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9369,7 +9420,7 @@ impl AsRef> for ScMap { } impl ReadXdr for ScMap { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -9380,7 +9431,7 @@ impl ReadXdr for ScMap { } impl WriteXdr for ScMap { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9475,7 +9526,7 @@ impl AsRef for ScBytes { } impl ReadXdr for ScBytes { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::read_xdr(r)?; @@ -9486,7 +9537,7 @@ impl ReadXdr for ScBytes { } impl WriteXdr for ScBytes { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9581,7 +9632,7 @@ impl AsRef for ScString { } impl ReadXdr for ScString { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::read_xdr(r)?; @@ -9592,7 +9643,7 @@ impl ReadXdr for ScString { } impl WriteXdr for ScString { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9687,7 +9738,7 @@ impl AsRef> for ScSymbol { } impl ReadXdr for ScSymbol { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<32>::read_xdr(r)?; @@ -9698,7 +9749,7 @@ impl ReadXdr for ScSymbol { } impl WriteXdr for ScSymbol { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9774,7 +9825,7 @@ pub struct ScNonceKey { } impl ReadXdr for ScNonceKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -9785,7 +9836,7 @@ impl ReadXdr for ScNonceKey { } impl WriteXdr for ScNonceKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.nonce.write_xdr(w)?; @@ -9817,7 +9868,7 @@ pub struct ScContractInstance { } impl ReadXdr for ScContractInstance { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -9829,7 +9880,7 @@ impl ReadXdr for ScContractInstance { } impl WriteXdr for ScContractInstance { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.executable.write_xdr(w)?; @@ -10076,7 +10127,7 @@ impl Variants for ScVal { impl Union for ScVal {} impl ReadXdr for ScVal { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScValType = ::read_xdr(r)?; @@ -10115,7 +10166,7 @@ impl ReadXdr for ScVal { } impl WriteXdr for ScVal { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10173,7 +10224,7 @@ pub struct ScMapEntry { } impl ReadXdr for ScMapEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10185,7 +10236,7 @@ impl ReadXdr for ScMapEntry { } impl WriteXdr for ScMapEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -10272,7 +10323,7 @@ impl Variants for StoredTransactionSet { impl Union for StoredTransactionSet {} impl ReadXdr for StoredTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -10289,7 +10340,7 @@ impl ReadXdr for StoredTransactionSet { } impl WriteXdr for StoredTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10329,7 +10380,7 @@ pub struct StoredDebugTransactionSet { } impl ReadXdr for StoredDebugTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10342,7 +10393,7 @@ impl ReadXdr for StoredDebugTransactionSet { } impl WriteXdr for StoredDebugTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_set.write_xdr(w)?; @@ -10379,7 +10430,7 @@ pub struct PersistedScpStateV0 { } impl ReadXdr for PersistedScpStateV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10392,7 +10443,7 @@ impl ReadXdr for PersistedScpStateV0 { } impl WriteXdr for PersistedScpStateV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.scp_envelopes.write_xdr(w)?; @@ -10428,7 +10479,7 @@ pub struct PersistedScpStateV1 { } impl ReadXdr for PersistedScpStateV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10440,7 +10491,7 @@ impl ReadXdr for PersistedScpStateV1 { } impl WriteXdr for PersistedScpStateV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.scp_envelopes.write_xdr(w)?; @@ -10527,7 +10578,7 @@ impl Variants for PersistedScpState { impl Union for PersistedScpState {} impl ReadXdr for PersistedScpState { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -10544,7 +10595,7 @@ impl ReadXdr for PersistedScpState { } impl WriteXdr for PersistedScpState { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10655,7 +10706,7 @@ impl AsRef<[u8; 4]> for Thresholds { } impl ReadXdr for Thresholds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -10666,7 +10717,7 @@ impl ReadXdr for Thresholds { } impl WriteXdr for Thresholds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10749,7 +10800,7 @@ impl AsRef> for String32 { } impl ReadXdr for String32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<32>::read_xdr(r)?; @@ -10760,7 +10811,7 @@ impl ReadXdr for String32 { } impl WriteXdr for String32 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10855,7 +10906,7 @@ impl AsRef> for String64 { } impl ReadXdr for String64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<64>::read_xdr(r)?; @@ -10866,7 +10917,7 @@ impl ReadXdr for String64 { } impl WriteXdr for String64 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10960,7 +11011,7 @@ impl AsRef for SequenceNumber { } impl ReadXdr for SequenceNumber { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = i64::read_xdr(r)?; @@ -10971,7 +11022,7 @@ impl ReadXdr for SequenceNumber { } impl WriteXdr for SequenceNumber { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11017,7 +11068,7 @@ impl AsRef> for DataValue { } impl ReadXdr for DataValue { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64>::read_xdr(r)?; @@ -11028,7 +11079,7 @@ impl ReadXdr for DataValue { } impl WriteXdr for DataValue { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11122,7 +11173,7 @@ impl AsRef for PoolId { } impl ReadXdr for PoolId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = Hash::read_xdr(r)?; @@ -11133,7 +11184,7 @@ impl ReadXdr for PoolId { } impl WriteXdr for PoolId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11186,7 +11237,7 @@ impl AsRef<[u8; 4]> for AssetCode4 { } impl ReadXdr for AssetCode4 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -11197,7 +11248,7 @@ impl ReadXdr for AssetCode4 { } impl WriteXdr for AssetCode4 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11287,7 +11338,7 @@ impl AsRef<[u8; 12]> for AssetCode12 { } impl ReadXdr for AssetCode12 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 12]>::read_xdr(r)?; @@ -11298,7 +11349,7 @@ impl ReadXdr for AssetCode12 { } impl WriteXdr for AssetCode12 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11441,7 +11492,7 @@ impl From for i32 { } impl ReadXdr for AssetType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -11452,7 +11503,7 @@ impl ReadXdr for AssetType { } impl WriteXdr for AssetType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -11539,7 +11590,7 @@ impl Variants for AssetCode { impl Union for AssetCode {} impl ReadXdr for AssetCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -11556,7 +11607,7 @@ impl ReadXdr for AssetCode { } impl WriteXdr for AssetCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -11594,7 +11645,7 @@ pub struct AlphaNum4 { } impl ReadXdr for AlphaNum4 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11606,7 +11657,7 @@ impl ReadXdr for AlphaNum4 { } impl WriteXdr for AlphaNum4 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_code.write_xdr(w)?; @@ -11640,7 +11691,7 @@ pub struct AlphaNum12 { } impl ReadXdr for AlphaNum12 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11652,7 +11703,7 @@ impl ReadXdr for AlphaNum12 { } impl WriteXdr for AlphaNum12 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_code.write_xdr(w)?; @@ -11752,7 +11803,7 @@ impl Variants for Asset { impl Union for Asset {} impl ReadXdr for Asset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -11770,7 +11821,7 @@ impl ReadXdr for Asset { } impl WriteXdr for Asset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -11809,7 +11860,7 @@ pub struct Price { } impl ReadXdr for Price { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11821,7 +11872,7 @@ impl ReadXdr for Price { } impl WriteXdr for Price { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.n.write_xdr(w)?; @@ -11855,7 +11906,7 @@ pub struct Liabilities { } impl ReadXdr for Liabilities { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11867,7 +11918,7 @@ impl ReadXdr for Liabilities { } impl WriteXdr for Liabilities { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.buying.write_xdr(w)?; @@ -11976,7 +12027,7 @@ impl From for i32 { } impl ReadXdr for ThresholdIndexes { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -11987,7 +12038,7 @@ impl ReadXdr for ThresholdIndexes { } impl WriteXdr for ThresholdIndexes { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12136,7 +12187,7 @@ impl From for i32 { } impl ReadXdr for LedgerEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -12147,7 +12198,7 @@ impl ReadXdr for LedgerEntryType { } impl WriteXdr for LedgerEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12180,7 +12231,7 @@ pub struct Signer { } impl ReadXdr for Signer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12192,7 +12243,7 @@ impl ReadXdr for Signer { } impl WriteXdr for Signer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -12316,7 +12367,7 @@ impl From for i32 { } impl ReadXdr for AccountFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -12327,7 +12378,7 @@ impl ReadXdr for AccountFlags { } impl WriteXdr for AccountFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12399,7 +12450,7 @@ impl AsRef> for SponsorshipDescriptor { } impl ReadXdr for SponsorshipDescriptor { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = Option::::read_xdr(r)?; @@ -12410,7 +12461,7 @@ impl ReadXdr for SponsorshipDescriptor { } impl WriteXdr for SponsorshipDescriptor { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -12448,7 +12499,7 @@ pub struct AccountEntryExtensionV3 { } impl ReadXdr for AccountEntryExtensionV3 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12461,7 +12512,7 @@ impl ReadXdr for AccountEntryExtensionV3 { } impl WriteXdr for AccountEntryExtensionV3 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -12549,7 +12600,7 @@ impl Variants for AccountEntryExtensionV2Ext { impl Union for AccountEntryExtensionV2Ext {} impl ReadXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12566,7 +12617,7 @@ impl ReadXdr for AccountEntryExtensionV2Ext { } impl WriteXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12616,7 +12667,7 @@ pub struct AccountEntryExtensionV2 { } impl ReadXdr for AccountEntryExtensionV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12630,7 +12681,7 @@ impl ReadXdr for AccountEntryExtensionV2 { } impl WriteXdr for AccountEntryExtensionV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_sponsored.write_xdr(w)?; @@ -12719,7 +12770,7 @@ impl Variants for AccountEntryExtensionV1Ext { impl Union for AccountEntryExtensionV1Ext {} impl ReadXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12736,7 +12787,7 @@ impl ReadXdr for AccountEntryExtensionV1Ext { } impl WriteXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12782,7 +12833,7 @@ pub struct AccountEntryExtensionV1 { } impl ReadXdr for AccountEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12794,7 +12845,7 @@ impl ReadXdr for AccountEntryExtensionV1 { } impl WriteXdr for AccountEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liabilities.write_xdr(w)?; @@ -12881,7 +12932,7 @@ impl Variants for AccountEntryExt { impl Union for AccountEntryExt {} impl ReadXdr for AccountEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12898,7 +12949,7 @@ impl ReadXdr for AccountEntryExt { } impl WriteXdr for AccountEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12967,7 +13018,7 @@ pub struct AccountEntry { } impl ReadXdr for AccountEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12987,7 +13038,7 @@ impl ReadXdr for AccountEntry { } impl WriteXdr for AccountEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -13108,7 +13159,7 @@ impl From for i32 { } impl ReadXdr for TrustLineFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13119,7 +13170,7 @@ impl ReadXdr for TrustLineFlags { } impl WriteXdr for TrustLineFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -13234,7 +13285,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13245,7 +13296,7 @@ impl ReadXdr for LiquidityPoolType { } impl WriteXdr for LiquidityPoolType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -13352,7 +13403,7 @@ impl Variants for TrustLineAsset { impl Union for TrustLineAsset {} impl ReadXdr for TrustLineAsset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -13371,7 +13422,7 @@ impl ReadXdr for TrustLineAsset { } impl WriteXdr for TrustLineAsset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13459,7 +13510,7 @@ impl Variants for TrustLineEntryExtensionV2Ext { impl Union for TrustLineEntryExtensionV2Ext {} impl ReadXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13475,7 +13526,7 @@ impl ReadXdr for TrustLineEntryExtensionV2Ext { } impl WriteXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13518,7 +13569,7 @@ pub struct TrustLineEntryExtensionV2 { } impl ReadXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13530,7 +13581,7 @@ impl ReadXdr for TrustLineEntryExtensionV2 { } impl WriteXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_use_count.write_xdr(w)?; @@ -13617,7 +13668,7 @@ impl Variants for TrustLineEntryV1Ext { impl Union for TrustLineEntryV1Ext {} impl ReadXdr for TrustLineEntryV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13634,7 +13685,7 @@ impl ReadXdr for TrustLineEntryV1Ext { } impl WriteXdr for TrustLineEntryV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13680,7 +13731,7 @@ pub struct TrustLineEntryV1 { } impl ReadXdr for TrustLineEntryV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13692,7 +13743,7 @@ impl ReadXdr for TrustLineEntryV1 { } impl WriteXdr for TrustLineEntryV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liabilities.write_xdr(w)?; @@ -13791,7 +13842,7 @@ impl Variants for TrustLineEntryExt { impl Union for TrustLineEntryExt {} impl ReadXdr for TrustLineEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13808,7 +13859,7 @@ impl ReadXdr for TrustLineEntryExt { } impl WriteXdr for TrustLineEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13877,7 +13928,7 @@ pub struct TrustLineEntry { } impl ReadXdr for TrustLineEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13893,7 +13944,7 @@ impl ReadXdr for TrustLineEntry { } impl WriteXdr for TrustLineEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -13991,7 +14042,7 @@ impl From for i32 { } impl ReadXdr for OfferEntryFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14002,7 +14053,7 @@ impl ReadXdr for OfferEntryFlags { } impl WriteXdr for OfferEntryFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14091,7 +14142,7 @@ impl Variants for OfferEntryExt { impl Union for OfferEntryExt {} impl ReadXdr for OfferEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -14107,7 +14158,7 @@ impl ReadXdr for OfferEntryExt { } impl WriteXdr for OfferEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14169,7 +14220,7 @@ pub struct OfferEntry { } impl ReadXdr for OfferEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14187,7 +14238,7 @@ impl ReadXdr for OfferEntry { } impl WriteXdr for OfferEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -14275,7 +14326,7 @@ impl Variants for DataEntryExt { impl Union for DataEntryExt {} impl ReadXdr for DataEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -14291,7 +14342,7 @@ impl ReadXdr for DataEntryExt { } impl WriteXdr for DataEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14339,7 +14390,7 @@ pub struct DataEntry { } impl ReadXdr for DataEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14353,7 +14404,7 @@ impl ReadXdr for DataEntry { } impl WriteXdr for DataEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -14481,7 +14532,7 @@ impl From for i32 { } impl ReadXdr for ClaimPredicateType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14492,7 +14543,7 @@ impl ReadXdr for ClaimPredicateType { } impl WriteXdr for ClaimPredicateType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14613,7 +14664,7 @@ impl Variants for ClaimPredicate { impl Union for ClaimPredicate {} impl ReadXdr for ClaimPredicate { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimPredicateType = ::read_xdr(r)?; @@ -14638,7 +14689,7 @@ impl ReadXdr for ClaimPredicate { } impl WriteXdr for ClaimPredicate { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14738,7 +14789,7 @@ impl From for i32 { } impl ReadXdr for ClaimantType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14749,7 +14800,7 @@ impl ReadXdr for ClaimantType { } impl WriteXdr for ClaimantType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14782,7 +14833,7 @@ pub struct ClaimantV0 { } impl ReadXdr for ClaimantV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14794,7 +14845,7 @@ impl ReadXdr for ClaimantV0 { } impl WriteXdr for ClaimantV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -14880,7 +14931,7 @@ impl Variants for Claimant { impl Union for Claimant {} impl ReadXdr for Claimant { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimantType = ::read_xdr(r)?; @@ -14896,7 +14947,7 @@ impl ReadXdr for Claimant { } impl WriteXdr for Claimant { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14992,7 +15043,7 @@ impl From for i32 { } impl ReadXdr for ClaimableBalanceIdType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -15003,7 +15054,7 @@ impl ReadXdr for ClaimableBalanceIdType { } impl WriteXdr for ClaimableBalanceIdType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15083,7 +15134,7 @@ impl Variants for ClaimableBalanceId { impl Union for ClaimableBalanceId {} impl ReadXdr for ClaimableBalanceId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimableBalanceIdType = ::read_xdr(r)?; @@ -15101,7 +15152,7 @@ impl ReadXdr for ClaimableBalanceId { } impl WriteXdr for ClaimableBalanceId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15199,7 +15250,7 @@ impl From for i32 { } impl ReadXdr for ClaimableBalanceFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -15210,7 +15261,7 @@ impl ReadXdr for ClaimableBalanceFlags { } impl WriteXdr for ClaimableBalanceFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15299,7 +15350,7 @@ impl Variants for ClaimableBalanceEntryExtensionV1Ext { impl Union for ClaimableBalanceEntryExtensionV1Ext {} impl ReadXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -15315,7 +15366,7 @@ impl ReadXdr for ClaimableBalanceEntryExtensionV1Ext { } impl WriteXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15358,7 +15409,7 @@ pub struct ClaimableBalanceEntryExtensionV1 { } impl ReadXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15370,7 +15421,7 @@ impl ReadXdr for ClaimableBalanceEntryExtensionV1 { } impl WriteXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -15457,7 +15508,7 @@ impl Variants for ClaimableBalanceEntryExt { impl Union for ClaimableBalanceEntryExt {} impl ReadXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -15474,7 +15525,7 @@ impl ReadXdr for ClaimableBalanceEntryExt { } impl WriteXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15534,7 +15585,7 @@ pub struct ClaimableBalanceEntry { } impl ReadXdr for ClaimableBalanceEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15549,7 +15600,7 @@ impl ReadXdr for ClaimableBalanceEntry { } impl WriteXdr for ClaimableBalanceEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -15588,7 +15639,7 @@ pub struct LiquidityPoolConstantProductParameters { } impl ReadXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15601,7 +15652,7 @@ impl ReadXdr for LiquidityPoolConstantProductParameters { } impl WriteXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_a.write_xdr(w)?; @@ -15644,7 +15695,7 @@ pub struct LiquidityPoolEntryConstantProduct { } impl ReadXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15659,7 +15710,7 @@ impl ReadXdr for LiquidityPoolEntryConstantProduct { } impl WriteXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.params.write_xdr(w)?; @@ -15755,7 +15806,7 @@ impl Variants for LiquidityPoolEntryBody { impl Union for LiquidityPoolEntryBody {} impl ReadXdr for LiquidityPoolEntryBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolType = ::read_xdr(r)?; @@ -15775,7 +15826,7 @@ impl ReadXdr for LiquidityPoolEntryBody { } impl WriteXdr for LiquidityPoolEntryBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15827,7 +15878,7 @@ pub struct LiquidityPoolEntry { } impl ReadXdr for LiquidityPoolEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15839,7 +15890,7 @@ impl ReadXdr for LiquidityPoolEntry { } impl WriteXdr for LiquidityPoolEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -15937,7 +15988,7 @@ impl From for i32 { } impl ReadXdr for ContractDataDurability { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -15948,7 +15999,7 @@ impl ReadXdr for ContractDataDurability { } impl WriteXdr for ContractDataDurability { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15987,7 +16038,7 @@ pub struct ContractDataEntry { } impl ReadXdr for ContractDataEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16002,7 +16053,7 @@ impl ReadXdr for ContractDataEntry { } impl WriteXdr for ContractDataEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16056,7 +16107,7 @@ pub struct ContractCodeCostInputs { } impl ReadXdr for ContractCodeCostInputs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16077,7 +16128,7 @@ impl ReadXdr for ContractCodeCostInputs { } impl WriteXdr for ContractCodeCostInputs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16120,7 +16171,7 @@ pub struct ContractCodeEntryV1 { } impl ReadXdr for ContractCodeEntryV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16132,7 +16183,7 @@ impl ReadXdr for ContractCodeEntryV1 { } impl WriteXdr for ContractCodeEntryV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16223,7 +16274,7 @@ impl Variants for ContractCodeEntryExt { impl Union for ContractCodeEntryExt {} impl ReadXdr for ContractCodeEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16240,7 +16291,7 @@ impl ReadXdr for ContractCodeEntryExt { } impl WriteXdr for ContractCodeEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16290,7 +16341,7 @@ pub struct ContractCodeEntry { } impl ReadXdr for ContractCodeEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16303,7 +16354,7 @@ impl ReadXdr for ContractCodeEntry { } impl WriteXdr for ContractCodeEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16338,7 +16389,7 @@ pub struct TtlEntry { } impl ReadXdr for TtlEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16350,7 +16401,7 @@ impl ReadXdr for TtlEntry { } impl WriteXdr for TtlEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_hash.write_xdr(w)?; @@ -16432,7 +16483,7 @@ impl Variants for LedgerEntryExtensionV1Ext { impl Union for LedgerEntryExtensionV1Ext {} impl ReadXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16448,7 +16499,7 @@ impl ReadXdr for LedgerEntryExtensionV1Ext { } impl WriteXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16491,7 +16542,7 @@ pub struct LedgerEntryExtensionV1 { } impl ReadXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16503,7 +16554,7 @@ impl ReadXdr for LedgerEntryExtensionV1 { } impl WriteXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sponsoring_id.write_xdr(w)?; @@ -16652,7 +16703,7 @@ impl Variants for LedgerEntryData { impl Union for LedgerEntryData {} impl ReadXdr for LedgerEntryData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryType = ::read_xdr(r)?; @@ -16687,7 +16738,7 @@ impl ReadXdr for LedgerEntryData { } impl WriteXdr for LedgerEntryData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16786,7 +16837,7 @@ impl Variants for LedgerEntryExt { impl Union for LedgerEntryExt {} impl ReadXdr for LedgerEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16803,7 +16854,7 @@ impl ReadXdr for LedgerEntryExt { } impl WriteXdr for LedgerEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16876,7 +16927,7 @@ pub struct LedgerEntry { } impl ReadXdr for LedgerEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16889,7 +16940,7 @@ impl ReadXdr for LedgerEntry { } impl WriteXdr for LedgerEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.last_modified_ledger_seq.write_xdr(w)?; @@ -16922,7 +16973,7 @@ pub struct LedgerKeyAccount { } impl ReadXdr for LedgerKeyAccount { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16933,7 +16984,7 @@ impl ReadXdr for LedgerKeyAccount { } impl WriteXdr for LedgerKeyAccount { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -16966,7 +17017,7 @@ pub struct LedgerKeyTrustLine { } impl ReadXdr for LedgerKeyTrustLine { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16978,7 +17029,7 @@ impl ReadXdr for LedgerKeyTrustLine { } impl WriteXdr for LedgerKeyTrustLine { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -17012,7 +17063,7 @@ pub struct LedgerKeyOffer { } impl ReadXdr for LedgerKeyOffer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17024,7 +17075,7 @@ impl ReadXdr for LedgerKeyOffer { } impl WriteXdr for LedgerKeyOffer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -17058,7 +17109,7 @@ pub struct LedgerKeyData { } impl ReadXdr for LedgerKeyData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17070,7 +17121,7 @@ impl ReadXdr for LedgerKeyData { } impl WriteXdr for LedgerKeyData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -17102,7 +17153,7 @@ pub struct LedgerKeyClaimableBalance { } impl ReadXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17113,7 +17164,7 @@ impl ReadXdr for LedgerKeyClaimableBalance { } impl WriteXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -17144,7 +17195,7 @@ pub struct LedgerKeyLiquidityPool { } impl ReadXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17155,7 +17206,7 @@ impl ReadXdr for LedgerKeyLiquidityPool { } impl WriteXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -17190,7 +17241,7 @@ pub struct LedgerKeyContractData { } impl ReadXdr for LedgerKeyContractData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17203,7 +17254,7 @@ impl ReadXdr for LedgerKeyContractData { } impl WriteXdr for LedgerKeyContractData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract.write_xdr(w)?; @@ -17236,7 +17287,7 @@ pub struct LedgerKeyContractCode { } impl ReadXdr for LedgerKeyContractCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17247,7 +17298,7 @@ impl ReadXdr for LedgerKeyContractCode { } impl WriteXdr for LedgerKeyContractCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hash.write_xdr(w)?; @@ -17278,7 +17329,7 @@ pub struct LedgerKeyConfigSetting { } impl ReadXdr for LedgerKeyConfigSetting { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17289,7 +17340,7 @@ impl ReadXdr for LedgerKeyConfigSetting { } impl WriteXdr for LedgerKeyConfigSetting { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.config_setting_id.write_xdr(w)?; @@ -17321,7 +17372,7 @@ pub struct LedgerKeyTtl { } impl ReadXdr for LedgerKeyTtl { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17332,7 +17383,7 @@ impl ReadXdr for LedgerKeyTtl { } impl WriteXdr for LedgerKeyTtl { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_hash.write_xdr(w)?; @@ -17521,7 +17572,7 @@ impl Variants for LedgerKey { impl Union for LedgerKey {} impl ReadXdr for LedgerKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryType = ::read_xdr(r)?; @@ -17556,7 +17607,7 @@ impl ReadXdr for LedgerKey { } impl WriteXdr for LedgerKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -17718,7 +17769,7 @@ impl From for i32 { } impl ReadXdr for EnvelopeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17729,7 +17780,7 @@ impl ReadXdr for EnvelopeType { } impl WriteXdr for EnvelopeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -17832,7 +17883,7 @@ impl From for i32 { } impl ReadXdr for BucketListType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17843,7 +17894,7 @@ impl ReadXdr for BucketListType { } impl WriteXdr for BucketListType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -17954,7 +18005,7 @@ impl From for i32 { } impl ReadXdr for BucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17965,7 +18016,7 @@ impl ReadXdr for BucketEntryType { } impl WriteXdr for BucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18075,7 +18126,7 @@ impl From for i32 { } impl ReadXdr for HotArchiveBucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -18086,7 +18137,7 @@ impl ReadXdr for HotArchiveBucketEntryType { } impl WriteXdr for HotArchiveBucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18205,7 +18256,7 @@ impl From for i32 { } impl ReadXdr for ColdArchiveBucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -18216,7 +18267,7 @@ impl ReadXdr for ColdArchiveBucketEntryType { } impl WriteXdr for ColdArchiveBucketEntryType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18302,7 +18353,7 @@ impl Variants for BucketMetadataExt { impl Union for BucketMetadataExt {} impl ReadXdr for BucketMetadataExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -18319,7 +18370,7 @@ impl ReadXdr for BucketMetadataExt { } impl WriteXdr for BucketMetadataExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18367,7 +18418,7 @@ pub struct BucketMetadata { } impl ReadXdr for BucketMetadata { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18379,7 +18430,7 @@ impl ReadXdr for BucketMetadata { } impl WriteXdr for BucketMetadata { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -18482,7 +18533,7 @@ impl Variants for BucketEntry { impl Union for BucketEntry {} impl ReadXdr for BucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BucketEntryType = ::read_xdr(r)?; @@ -18501,7 +18552,7 @@ impl ReadXdr for BucketEntry { } impl WriteXdr for BucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18609,7 +18660,7 @@ impl Variants for HotArchiveBucketEntry { impl Union for HotArchiveBucketEntry {} impl ReadXdr for HotArchiveBucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: HotArchiveBucketEntryType = @@ -18631,7 +18682,7 @@ impl ReadXdr for HotArchiveBucketEntry { } impl WriteXdr for HotArchiveBucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18671,7 +18722,7 @@ pub struct ColdArchiveArchivedLeaf { } impl ReadXdr for ColdArchiveArchivedLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18683,7 +18734,7 @@ impl ReadXdr for ColdArchiveArchivedLeaf { } impl WriteXdr for ColdArchiveArchivedLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18717,7 +18768,7 @@ pub struct ColdArchiveDeletedLeaf { } impl ReadXdr for ColdArchiveDeletedLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18729,7 +18780,7 @@ impl ReadXdr for ColdArchiveDeletedLeaf { } impl WriteXdr for ColdArchiveDeletedLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18763,7 +18814,7 @@ pub struct ColdArchiveBoundaryLeaf { } impl ReadXdr for ColdArchiveBoundaryLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18775,7 +18826,7 @@ impl ReadXdr for ColdArchiveBoundaryLeaf { } impl WriteXdr for ColdArchiveBoundaryLeaf { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18811,7 +18862,7 @@ pub struct ColdArchiveHashEntry { } impl ReadXdr for ColdArchiveHashEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18824,7 +18875,7 @@ impl ReadXdr for ColdArchiveHashEntry { } impl WriteXdr for ColdArchiveHashEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18939,7 +18990,7 @@ impl Variants for ColdArchiveBucketEntry { impl Union for ColdArchiveBucketEntry {} impl ReadXdr for ColdArchiveBucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ColdArchiveBucketEntryType = @@ -18968,7 +19019,7 @@ impl ReadXdr for ColdArchiveBucketEntry { } impl WriteXdr for ColdArchiveBucketEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19025,7 +19076,7 @@ impl AsRef> for UpgradeType { } impl ReadXdr for UpgradeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<128>::read_xdr(r)?; @@ -19036,7 +19087,7 @@ impl ReadXdr for UpgradeType { } impl WriteXdr for UpgradeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -19177,7 +19228,7 @@ impl From for i32 { } impl ReadXdr for StellarValueType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -19188,7 +19239,7 @@ impl ReadXdr for StellarValueType { } impl WriteXdr for StellarValueType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -19221,7 +19272,7 @@ pub struct LedgerCloseValueSignature { } impl ReadXdr for LedgerCloseValueSignature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19233,7 +19284,7 @@ impl ReadXdr for LedgerCloseValueSignature { } impl WriteXdr for LedgerCloseValueSignature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.node_id.write_xdr(w)?; @@ -19320,7 +19371,7 @@ impl Variants for StellarValueExt { impl Union for StellarValueExt {} impl ReadXdr for StellarValueExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: StellarValueType = ::read_xdr(r)?; @@ -19337,7 +19388,7 @@ impl ReadXdr for StellarValueExt { } impl WriteXdr for StellarValueExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19394,7 +19445,7 @@ pub struct StellarValue { } impl ReadXdr for StellarValue { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19408,7 +19459,7 @@ impl ReadXdr for StellarValue { } impl WriteXdr for StellarValue { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_set_hash.write_xdr(w)?; @@ -19522,7 +19573,7 @@ impl From for i32 { } impl ReadXdr for LedgerHeaderFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -19533,7 +19584,7 @@ impl ReadXdr for LedgerHeaderFlags { } impl WriteXdr for LedgerHeaderFlags { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -19614,7 +19665,7 @@ impl Variants for LedgerHeaderExtensionV1Ext { impl Union for LedgerHeaderExtensionV1Ext {} impl ReadXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -19630,7 +19681,7 @@ impl ReadXdr for LedgerHeaderExtensionV1Ext { } impl WriteXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19673,7 +19724,7 @@ pub struct LedgerHeaderExtensionV1 { } impl ReadXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19685,7 +19736,7 @@ impl ReadXdr for LedgerHeaderExtensionV1 { } impl WriteXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.flags.write_xdr(w)?; @@ -19772,7 +19823,7 @@ impl Variants for LedgerHeaderExt { impl Union for LedgerHeaderExt {} impl ReadXdr for LedgerHeaderExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -19789,7 +19840,7 @@ impl ReadXdr for LedgerHeaderExt { } impl WriteXdr for LedgerHeaderExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19874,7 +19925,7 @@ pub struct LedgerHeader { } impl ReadXdr for LedgerHeader { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19899,7 +19950,7 @@ impl ReadXdr for LedgerHeader { } impl WriteXdr for LedgerHeader { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -20044,7 +20095,7 @@ impl From for i32 { } impl ReadXdr for LedgerUpgradeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -20055,7 +20106,7 @@ impl ReadXdr for LedgerUpgradeType { } impl WriteXdr for LedgerUpgradeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -20087,7 +20138,7 @@ pub struct ConfigUpgradeSetKey { } impl ReadXdr for ConfigUpgradeSetKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20099,7 +20150,7 @@ impl ReadXdr for ConfigUpgradeSetKey { } impl WriteXdr for ConfigUpgradeSetKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id.write_xdr(w)?; @@ -20230,7 +20281,7 @@ impl Variants for LedgerUpgrade { impl Union for LedgerUpgrade {} impl ReadXdr for LedgerUpgrade { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerUpgradeType = ::read_xdr(r)?; @@ -20254,7 +20305,7 @@ impl ReadXdr for LedgerUpgrade { } impl WriteXdr for LedgerUpgrade { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20294,7 +20345,7 @@ pub struct ConfigUpgradeSet { } impl ReadXdr for ConfigUpgradeSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20305,7 +20356,7 @@ impl ReadXdr for ConfigUpgradeSet { } impl WriteXdr for ConfigUpgradeSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.updated_entry.write_xdr(w)?; @@ -20399,7 +20450,7 @@ impl From for i32 { } impl ReadXdr for TxSetComponentType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -20410,7 +20461,7 @@ impl ReadXdr for TxSetComponentType { } impl WriteXdr for TxSetComponentType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -20459,7 +20510,7 @@ impl AsRef> for TxExecutionThread { } impl ReadXdr for TxExecutionThread { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -20470,7 +20521,7 @@ impl ReadXdr for TxExecutionThread { } impl WriteXdr for TxExecutionThread { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -20565,7 +20616,7 @@ impl AsRef> for ParallelTxExecutionStage { } impl ReadXdr for ParallelTxExecutionStage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -20576,7 +20627,7 @@ impl ReadXdr for ParallelTxExecutionStage { } impl WriteXdr for ParallelTxExecutionStage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -20655,7 +20706,7 @@ pub struct ParallelTxsComponent { } impl ReadXdr for ParallelTxsComponent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20667,7 +20718,7 @@ impl ReadXdr for ParallelTxsComponent { } impl WriteXdr for ParallelTxsComponent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.base_fee.write_xdr(w)?; @@ -20701,7 +20752,7 @@ pub struct TxSetComponentTxsMaybeDiscountedFee { } impl ReadXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20713,7 +20764,7 @@ impl ReadXdr for TxSetComponentTxsMaybeDiscountedFee { } impl WriteXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.base_fee.write_xdr(w)?; @@ -20802,7 +20853,7 @@ impl Variants for TxSetComponent { impl Union for TxSetComponent {} impl ReadXdr for TxSetComponent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TxSetComponentType = ::read_xdr(r)?; @@ -20822,7 +20873,7 @@ impl ReadXdr for TxSetComponent { } impl WriteXdr for TxSetComponent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20912,7 +20963,7 @@ impl Variants for TransactionPhase { impl Union for TransactionPhase {} impl ReadXdr for TransactionPhase { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -20929,7 +20980,7 @@ impl ReadXdr for TransactionPhase { } impl WriteXdr for TransactionPhase { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20967,7 +21018,7 @@ pub struct TransactionSet { } impl ReadXdr for TransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20979,7 +21030,7 @@ impl ReadXdr for TransactionSet { } impl WriteXdr for TransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.previous_ledger_hash.write_xdr(w)?; @@ -21013,7 +21064,7 @@ pub struct TransactionSetV1 { } impl ReadXdr for TransactionSetV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21025,7 +21076,7 @@ impl ReadXdr for TransactionSetV1 { } impl WriteXdr for TransactionSetV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.previous_ledger_hash.write_xdr(w)?; @@ -21108,7 +21159,7 @@ impl Variants for GeneralizedTransactionSet { impl Union for GeneralizedTransactionSet {} impl ReadXdr for GeneralizedTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21124,7 +21175,7 @@ impl ReadXdr for GeneralizedTransactionSet { } impl WriteXdr for GeneralizedTransactionSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21161,7 +21212,7 @@ pub struct TransactionResultPair { } impl ReadXdr for TransactionResultPair { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21173,7 +21224,7 @@ impl ReadXdr for TransactionResultPair { } impl WriteXdr for TransactionResultPair { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.transaction_hash.write_xdr(w)?; @@ -21205,7 +21256,7 @@ pub struct TransactionResultSet { } impl ReadXdr for TransactionResultSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21216,7 +21267,7 @@ impl ReadXdr for TransactionResultSet { } impl WriteXdr for TransactionResultSet { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.results.write_xdr(w)?; @@ -21302,7 +21353,7 @@ impl Variants for TransactionHistoryEntryExt { impl Union for TransactionHistoryEntryExt {} impl ReadXdr for TransactionHistoryEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21319,7 +21370,7 @@ impl ReadXdr for TransactionHistoryEntryExt { } impl WriteXdr for TransactionHistoryEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21368,7 +21419,7 @@ pub struct TransactionHistoryEntry { } impl ReadXdr for TransactionHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21381,7 +21432,7 @@ impl ReadXdr for TransactionHistoryEntry { } impl WriteXdr for TransactionHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21464,7 +21515,7 @@ impl Variants for TransactionHistoryResultEntryExt { impl Union for TransactionHistoryResultEntryExt {} impl ReadXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21480,7 +21531,7 @@ impl ReadXdr for TransactionHistoryResultEntryExt { } impl WriteXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21526,7 +21577,7 @@ pub struct TransactionHistoryResultEntry { } impl ReadXdr for TransactionHistoryResultEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21539,7 +21590,7 @@ impl ReadXdr for TransactionHistoryResultEntry { } impl WriteXdr for TransactionHistoryResultEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21622,7 +21673,7 @@ impl Variants for LedgerHeaderHistoryEntryExt { impl Union for LedgerHeaderHistoryEntryExt {} impl ReadXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21638,7 +21689,7 @@ impl ReadXdr for LedgerHeaderHistoryEntryExt { } impl WriteXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21684,7 +21735,7 @@ pub struct LedgerHeaderHistoryEntry { } impl ReadXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21697,7 +21748,7 @@ impl ReadXdr for LedgerHeaderHistoryEntry { } impl WriteXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hash.write_xdr(w)?; @@ -21732,7 +21783,7 @@ pub struct LedgerScpMessages { } impl ReadXdr for LedgerScpMessages { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21744,7 +21795,7 @@ impl ReadXdr for LedgerScpMessages { } impl WriteXdr for LedgerScpMessages { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21778,7 +21829,7 @@ pub struct ScpHistoryEntryV0 { } impl ReadXdr for ScpHistoryEntryV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21790,7 +21841,7 @@ impl ReadXdr for ScpHistoryEntryV0 { } impl WriteXdr for ScpHistoryEntryV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_sets.write_xdr(w)?; @@ -21872,7 +21923,7 @@ impl Variants for ScpHistoryEntry { impl Union for ScpHistoryEntry {} impl ReadXdr for ScpHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21888,7 +21939,7 @@ impl ReadXdr for ScpHistoryEntry { } impl WriteXdr for ScpHistoryEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22000,7 +22051,7 @@ impl From for i32 { } impl ReadXdr for LedgerEntryChangeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -22011,7 +22062,7 @@ impl ReadXdr for LedgerEntryChangeType { } impl WriteXdr for LedgerEntryChangeType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -22112,7 +22163,7 @@ impl Variants for LedgerEntryChange { impl Union for LedgerEntryChange {} impl ReadXdr for LedgerEntryChange { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryChangeType = ::read_xdr(r)?; @@ -22131,7 +22182,7 @@ impl ReadXdr for LedgerEntryChange { } impl WriteXdr for LedgerEntryChange { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22187,7 +22238,7 @@ impl AsRef> for LedgerEntryChanges { } impl ReadXdr for LedgerEntryChanges { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -22198,7 +22249,7 @@ impl ReadXdr for LedgerEntryChanges { } impl WriteXdr for LedgerEntryChanges { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -22275,7 +22326,7 @@ pub struct OperationMeta { } impl ReadXdr for OperationMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22286,7 +22337,7 @@ impl ReadXdr for OperationMeta { } impl WriteXdr for OperationMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.changes.write_xdr(w)?; @@ -22319,7 +22370,7 @@ pub struct TransactionMetaV1 { } impl ReadXdr for TransactionMetaV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22331,7 +22382,7 @@ impl ReadXdr for TransactionMetaV1 { } impl WriteXdr for TransactionMetaV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_changes.write_xdr(w)?; @@ -22369,7 +22420,7 @@ pub struct TransactionMetaV2 { } impl ReadXdr for TransactionMetaV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22382,7 +22433,7 @@ impl ReadXdr for TransactionMetaV2 { } impl WriteXdr for TransactionMetaV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_changes_before.write_xdr(w)?; @@ -22487,7 +22538,7 @@ impl From for i32 { } impl ReadXdr for ContractEventType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -22498,7 +22549,7 @@ impl ReadXdr for ContractEventType { } impl WriteXdr for ContractEventType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -22531,7 +22582,7 @@ pub struct ContractEventV0 { } impl ReadXdr for ContractEventV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22543,7 +22594,7 @@ impl ReadXdr for ContractEventV0 { } impl WriteXdr for ContractEventV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.topics.write_xdr(w)?; @@ -22629,7 +22680,7 @@ impl Variants for ContractEventBody { impl Union for ContractEventBody {} impl ReadXdr for ContractEventBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -22645,7 +22696,7 @@ impl ReadXdr for ContractEventBody { } impl WriteXdr for ContractEventBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22699,7 +22750,7 @@ pub struct ContractEvent { } impl ReadXdr for ContractEvent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22713,7 +22764,7 @@ impl ReadXdr for ContractEvent { } impl WriteXdr for ContractEvent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22749,7 +22800,7 @@ pub struct DiagnosticEvent { } impl ReadXdr for DiagnosticEvent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22761,7 +22812,7 @@ impl ReadXdr for DiagnosticEvent { } impl WriteXdr for DiagnosticEvent { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.in_successful_contract_call.write_xdr(w)?; @@ -22825,7 +22876,7 @@ pub struct SorobanTransactionMetaExtV1 { } impl ReadXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22839,7 +22890,7 @@ impl ReadXdr for SorobanTransactionMetaExtV1 { } impl WriteXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22929,7 +22980,7 @@ impl Variants for SorobanTransactionMetaExt { impl Union for SorobanTransactionMetaExt {} impl ReadXdr for SorobanTransactionMetaExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -22946,7 +22997,7 @@ impl ReadXdr for SorobanTransactionMetaExt { } impl WriteXdr for SorobanTransactionMetaExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22994,7 +23045,7 @@ pub struct SorobanTransactionMeta { } impl ReadXdr for SorobanTransactionMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23008,7 +23059,7 @@ impl ReadXdr for SorobanTransactionMeta { } impl WriteXdr for SorobanTransactionMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23054,7 +23105,7 @@ pub struct TransactionMetaV3 { } impl ReadXdr for TransactionMetaV3 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23069,7 +23120,7 @@ impl ReadXdr for TransactionMetaV3 { } impl WriteXdr for TransactionMetaV3 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23106,7 +23157,7 @@ pub struct InvokeHostFunctionSuccessPreImage { } impl ReadXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23118,7 +23169,7 @@ impl ReadXdr for InvokeHostFunctionSuccessPreImage { } impl WriteXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.return_value.write_xdr(w)?; @@ -23215,7 +23266,7 @@ impl Variants for TransactionMeta { impl Union for TransactionMeta {} impl ReadXdr for TransactionMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23234,7 +23285,7 @@ impl ReadXdr for TransactionMeta { } impl WriteXdr for TransactionMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23276,7 +23327,7 @@ pub struct TransactionResultMeta { } impl ReadXdr for TransactionResultMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23289,7 +23340,7 @@ impl ReadXdr for TransactionResultMeta { } impl WriteXdr for TransactionResultMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.result.write_xdr(w)?; @@ -23324,7 +23375,7 @@ pub struct UpgradeEntryMeta { } impl ReadXdr for UpgradeEntryMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23336,7 +23387,7 @@ impl ReadXdr for UpgradeEntryMeta { } impl WriteXdr for UpgradeEntryMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.upgrade.write_xdr(w)?; @@ -23385,7 +23436,7 @@ pub struct LedgerCloseMetaV0 { } impl ReadXdr for LedgerCloseMetaV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23400,7 +23451,7 @@ impl ReadXdr for LedgerCloseMetaV0 { } impl WriteXdr for LedgerCloseMetaV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_header.write_xdr(w)?; @@ -23437,7 +23488,7 @@ pub struct LedgerCloseMetaExtV1 { } impl ReadXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23449,7 +23500,7 @@ impl ReadXdr for LedgerCloseMetaExtV1 { } impl WriteXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23536,7 +23587,7 @@ impl Variants for LedgerCloseMetaExt { impl Union for LedgerCloseMetaExt {} impl ReadXdr for LedgerCloseMetaExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23553,7 +23604,7 @@ impl ReadXdr for LedgerCloseMetaExt { } impl WriteXdr for LedgerCloseMetaExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23623,7 +23674,7 @@ pub struct LedgerCloseMetaV1 { } impl ReadXdr for LedgerCloseMetaV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23642,7 +23693,7 @@ impl ReadXdr for LedgerCloseMetaV1 { } impl WriteXdr for LedgerCloseMetaV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23736,7 +23787,7 @@ impl Variants for LedgerCloseMeta { impl Union for LedgerCloseMeta {} impl ReadXdr for LedgerCloseMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23753,7 +23804,7 @@ impl ReadXdr for LedgerCloseMeta { } impl WriteXdr for LedgerCloseMeta { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23871,7 +23922,7 @@ impl From for i32 { } impl ReadXdr for ErrorCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -23882,7 +23933,7 @@ impl ReadXdr for ErrorCode { } impl WriteXdr for ErrorCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -23915,7 +23966,7 @@ pub struct SError { } impl ReadXdr for SError { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23927,7 +23978,7 @@ impl ReadXdr for SError { } impl WriteXdr for SError { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.code.write_xdr(w)?; @@ -23959,7 +24010,7 @@ pub struct SendMore { } impl ReadXdr for SendMore { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23970,7 +24021,7 @@ impl ReadXdr for SendMore { } impl WriteXdr for SendMore { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_messages.write_xdr(w)?; @@ -24003,7 +24054,7 @@ pub struct SendMoreExtended { } impl ReadXdr for SendMoreExtended { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24015,7 +24066,7 @@ impl ReadXdr for SendMoreExtended { } impl WriteXdr for SendMoreExtended { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_messages.write_xdr(w)?; @@ -24051,7 +24102,7 @@ pub struct AuthCert { } impl ReadXdr for AuthCert { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24064,7 +24115,7 @@ impl ReadXdr for AuthCert { } impl WriteXdr for AuthCert { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.pubkey.write_xdr(w)?; @@ -24113,7 +24164,7 @@ pub struct Hello { } impl ReadXdr for Hello { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24132,7 +24183,7 @@ impl ReadXdr for Hello { } impl WriteXdr for Hello { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -24179,7 +24230,7 @@ pub struct Auth { } impl ReadXdr for Auth { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24190,7 +24241,7 @@ impl ReadXdr for Auth { } impl WriteXdr for Auth { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.flags.write_xdr(w)?; @@ -24285,7 +24336,7 @@ impl From for i32 { } impl ReadXdr for IpAddrType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24296,7 +24347,7 @@ impl ReadXdr for IpAddrType { } impl WriteXdr for IpAddrType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24382,7 +24433,7 @@ impl Variants for PeerAddressIp { impl Union for PeerAddressIp {} impl ReadXdr for PeerAddressIp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: IpAddrType = ::read_xdr(r)?; @@ -24399,7 +24450,7 @@ impl ReadXdr for PeerAddressIp { } impl WriteXdr for PeerAddressIp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -24446,7 +24497,7 @@ pub struct PeerAddress { } impl ReadXdr for PeerAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24459,7 +24510,7 @@ impl ReadXdr for PeerAddress { } impl WriteXdr for PeerAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ip.write_xdr(w)?; @@ -24705,7 +24756,7 @@ impl From for i32 { } impl ReadXdr for MessageType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24716,7 +24767,7 @@ impl ReadXdr for MessageType { } impl WriteXdr for MessageType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24749,7 +24800,7 @@ pub struct DontHave { } impl ReadXdr for DontHave { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24761,7 +24812,7 @@ impl ReadXdr for DontHave { } impl WriteXdr for DontHave { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.type_.write_xdr(w)?; @@ -24860,7 +24911,7 @@ impl From for i32 { } impl ReadXdr for SurveyMessageCommandType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24871,7 +24922,7 @@ impl ReadXdr for SurveyMessageCommandType { } impl WriteXdr for SurveyMessageCommandType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24974,7 +25025,7 @@ impl From for i32 { } impl ReadXdr for SurveyMessageResponseType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24985,7 +25036,7 @@ impl ReadXdr for SurveyMessageResponseType { } impl WriteXdr for SurveyMessageResponseType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -25020,7 +25071,7 @@ pub struct TimeSlicedSurveyStartCollectingMessage { } impl ReadXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25033,7 +25084,7 @@ impl ReadXdr for TimeSlicedSurveyStartCollectingMessage { } impl WriteXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_id.write_xdr(w)?; @@ -25068,7 +25119,7 @@ pub struct SignedTimeSlicedSurveyStartCollectingMessage { } impl ReadXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25080,7 +25131,7 @@ impl ReadXdr for SignedTimeSlicedSurveyStartCollectingMessage { } impl WriteXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.signature.write_xdr(w)?; @@ -25116,7 +25167,7 @@ pub struct TimeSlicedSurveyStopCollectingMessage { } impl ReadXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25129,7 +25180,7 @@ impl ReadXdr for TimeSlicedSurveyStopCollectingMessage { } impl WriteXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_id.write_xdr(w)?; @@ -25164,7 +25215,7 @@ pub struct SignedTimeSlicedSurveyStopCollectingMessage { } impl ReadXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25176,7 +25227,7 @@ impl ReadXdr for SignedTimeSlicedSurveyStopCollectingMessage { } impl WriteXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.signature.write_xdr(w)?; @@ -25216,7 +25267,7 @@ pub struct SurveyRequestMessage { } impl ReadXdr for SurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25231,7 +25282,7 @@ impl ReadXdr for SurveyRequestMessage { } impl WriteXdr for SurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_peer_id.write_xdr(w)?; @@ -25272,7 +25323,7 @@ pub struct TimeSlicedSurveyRequestMessage { } impl ReadXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25286,7 +25337,7 @@ impl ReadXdr for TimeSlicedSurveyRequestMessage { } impl WriteXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request.write_xdr(w)?; @@ -25322,7 +25373,7 @@ pub struct SignedSurveyRequestMessage { } impl ReadXdr for SignedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25334,7 +25385,7 @@ impl ReadXdr for SignedSurveyRequestMessage { } impl WriteXdr for SignedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request_signature.write_xdr(w)?; @@ -25368,7 +25419,7 @@ pub struct SignedTimeSlicedSurveyRequestMessage { } impl ReadXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25380,7 +25431,7 @@ impl ReadXdr for SignedTimeSlicedSurveyRequestMessage { } impl WriteXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request_signature.write_xdr(w)?; @@ -25430,7 +25481,7 @@ impl AsRef> for EncryptedBody { } impl ReadXdr for EncryptedBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64000>::read_xdr(r)?; @@ -25441,7 +25492,7 @@ impl ReadXdr for EncryptedBody { } impl WriteXdr for EncryptedBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25526,7 +25577,7 @@ pub struct SurveyResponseMessage { } impl ReadXdr for SurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25541,7 +25592,7 @@ impl ReadXdr for SurveyResponseMessage { } impl WriteXdr for SurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_peer_id.write_xdr(w)?; @@ -25578,7 +25629,7 @@ pub struct TimeSlicedSurveyResponseMessage { } impl ReadXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25590,7 +25641,7 @@ impl ReadXdr for TimeSlicedSurveyResponseMessage { } impl WriteXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response.write_xdr(w)?; @@ -25624,7 +25675,7 @@ pub struct SignedSurveyResponseMessage { } impl ReadXdr for SignedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25636,7 +25687,7 @@ impl ReadXdr for SignedSurveyResponseMessage { } impl WriteXdr for SignedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response_signature.write_xdr(w)?; @@ -25670,7 +25721,7 @@ pub struct SignedTimeSlicedSurveyResponseMessage { } impl ReadXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25682,7 +25733,7 @@ impl ReadXdr for SignedTimeSlicedSurveyResponseMessage { } impl WriteXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response_signature.write_xdr(w)?; @@ -25744,7 +25795,7 @@ pub struct PeerStats { } impl ReadXdr for PeerStats { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25769,7 +25820,7 @@ impl ReadXdr for PeerStats { } impl WriteXdr for PeerStats { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.id.write_xdr(w)?; @@ -25832,7 +25883,7 @@ impl AsRef> for PeerStatList { } impl ReadXdr for PeerStatList { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -25843,7 +25894,7 @@ impl ReadXdr for PeerStatList { } impl WriteXdr for PeerStatList { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25944,7 +25995,7 @@ pub struct TimeSlicedNodeData { } impl ReadXdr for TimeSlicedNodeData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25964,7 +26015,7 @@ impl ReadXdr for TimeSlicedNodeData { } impl WriteXdr for TimeSlicedNodeData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.added_authenticated_peers.write_xdr(w)?; @@ -26006,7 +26057,7 @@ pub struct TimeSlicedPeerData { } impl ReadXdr for TimeSlicedPeerData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26018,7 +26069,7 @@ impl ReadXdr for TimeSlicedPeerData { } impl WriteXdr for TimeSlicedPeerData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.peer_stats.write_xdr(w)?; @@ -26068,7 +26119,7 @@ impl AsRef> for TimeSlicedPeerDataList { } impl ReadXdr for TimeSlicedPeerDataList { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26079,7 +26130,7 @@ impl ReadXdr for TimeSlicedPeerDataList { } impl WriteXdr for TimeSlicedPeerDataList { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26163,7 +26214,7 @@ pub struct TopologyResponseBodyV0 { } impl ReadXdr for TopologyResponseBodyV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26177,7 +26228,7 @@ impl ReadXdr for TopologyResponseBodyV0 { } impl WriteXdr for TopologyResponseBodyV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26223,7 +26274,7 @@ pub struct TopologyResponseBodyV1 { } impl ReadXdr for TopologyResponseBodyV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26239,7 +26290,7 @@ impl ReadXdr for TopologyResponseBodyV1 { } impl WriteXdr for TopologyResponseBodyV1 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26279,7 +26330,7 @@ pub struct TopologyResponseBodyV2 { } impl ReadXdr for TopologyResponseBodyV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26292,7 +26343,7 @@ impl ReadXdr for TopologyResponseBodyV2 { } impl WriteXdr for TopologyResponseBodyV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26389,7 +26440,7 @@ impl Variants for SurveyResponseBody { impl Union for SurveyResponseBody {} impl ReadXdr for SurveyResponseBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SurveyMessageResponseType = @@ -26408,7 +26459,7 @@ impl ReadXdr for SurveyResponseBody { } impl WriteXdr for SurveyResponseBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -26471,7 +26522,7 @@ impl AsRef> for TxAdvertVector { } impl ReadXdr for TxAdvertVector { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26482,7 +26533,7 @@ impl ReadXdr for TxAdvertVector { } impl WriteXdr for TxAdvertVector { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26559,7 +26610,7 @@ pub struct FloodAdvert { } impl ReadXdr for FloodAdvert { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26570,7 +26621,7 @@ impl ReadXdr for FloodAdvert { } impl WriteXdr for FloodAdvert { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_hashes.write_xdr(w)?; @@ -26627,7 +26678,7 @@ impl AsRef> for TxDemandVector { } impl ReadXdr for TxDemandVector { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26638,7 +26689,7 @@ impl ReadXdr for TxDemandVector { } impl WriteXdr for TxDemandVector { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26715,7 +26766,7 @@ pub struct FloodDemand { } impl ReadXdr for FloodDemand { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26726,7 +26777,7 @@ impl ReadXdr for FloodDemand { } impl WriteXdr for FloodDemand { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_hashes.write_xdr(w)?; @@ -26987,7 +27038,7 @@ impl Variants for StellarMessage { impl Union for StellarMessage {} impl ReadXdr for StellarMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: MessageType = ::read_xdr(r)?; @@ -27046,7 +27097,7 @@ impl ReadXdr for StellarMessage { } impl WriteXdr for StellarMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27108,7 +27159,7 @@ pub struct AuthenticatedMessageV0 { } impl ReadXdr for AuthenticatedMessageV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27121,7 +27172,7 @@ impl ReadXdr for AuthenticatedMessageV0 { } impl WriteXdr for AuthenticatedMessageV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sequence.write_xdr(w)?; @@ -27209,7 +27260,7 @@ impl Variants for AuthenticatedMessage { impl Union for AuthenticatedMessage {} impl ReadXdr for AuthenticatedMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: u32 = ::read_xdr(r)?; @@ -27225,7 +27276,7 @@ impl ReadXdr for AuthenticatedMessage { } impl WriteXdr for AuthenticatedMessage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27320,7 +27371,7 @@ impl Variants for LiquidityPoolParameters { impl Union for LiquidityPoolParameters {} impl ReadXdr for LiquidityPoolParameters { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolType = ::read_xdr(r)?; @@ -27340,7 +27391,7 @@ impl ReadXdr for LiquidityPoolParameters { } impl WriteXdr for LiquidityPoolParameters { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27375,7 +27426,7 @@ pub struct MuxedAccountMed25519 { } impl ReadXdr for MuxedAccountMed25519 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27387,7 +27438,7 @@ impl ReadXdr for MuxedAccountMed25519 { } impl WriteXdr for MuxedAccountMed25519 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.id.write_xdr(w)?; @@ -27476,7 +27527,7 @@ impl Variants for MuxedAccount { impl Union for MuxedAccount {} impl ReadXdr for MuxedAccount { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CryptoKeyType = ::read_xdr(r)?; @@ -27495,7 +27546,7 @@ impl ReadXdr for MuxedAccount { } impl WriteXdr for MuxedAccount { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27533,7 +27584,7 @@ pub struct DecoratedSignature { } impl ReadXdr for DecoratedSignature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27545,7 +27596,7 @@ impl ReadXdr for DecoratedSignature { } impl WriteXdr for DecoratedSignature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hint.write_xdr(w)?; @@ -27797,7 +27848,7 @@ impl From for i32 { } impl ReadXdr for OperationType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -27808,7 +27859,7 @@ impl ReadXdr for OperationType { } impl WriteXdr for OperationType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -27841,7 +27892,7 @@ pub struct CreateAccountOp { } impl ReadXdr for CreateAccountOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27853,7 +27904,7 @@ impl ReadXdr for CreateAccountOp { } impl WriteXdr for CreateAccountOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -27889,7 +27940,7 @@ pub struct PaymentOp { } impl ReadXdr for PaymentOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27902,7 +27953,7 @@ impl ReadXdr for PaymentOp { } impl WriteXdr for PaymentOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -27949,7 +28000,7 @@ pub struct PathPaymentStrictReceiveOp { } impl ReadXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27965,7 +28016,7 @@ impl ReadXdr for PathPaymentStrictReceiveOp { } impl WriteXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.send_asset.write_xdr(w)?; @@ -28015,7 +28066,7 @@ pub struct PathPaymentStrictSendOp { } impl ReadXdr for PathPaymentStrictSendOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28031,7 +28082,7 @@ impl ReadXdr for PathPaymentStrictSendOp { } impl WriteXdr for PathPaymentStrictSendOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.send_asset.write_xdr(w)?; @@ -28077,7 +28128,7 @@ pub struct ManageSellOfferOp { } impl ReadXdr for ManageSellOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28092,7 +28143,7 @@ impl ReadXdr for ManageSellOfferOp { } impl WriteXdr for ManageSellOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -28138,7 +28189,7 @@ pub struct ManageBuyOfferOp { } impl ReadXdr for ManageBuyOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28153,7 +28204,7 @@ impl ReadXdr for ManageBuyOfferOp { } impl WriteXdr for ManageBuyOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -28194,7 +28245,7 @@ pub struct CreatePassiveSellOfferOp { } impl ReadXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28208,7 +28259,7 @@ impl ReadXdr for CreatePassiveSellOfferOp { } impl WriteXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -28265,7 +28316,7 @@ pub struct SetOptionsOp { } impl ReadXdr for SetOptionsOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28284,7 +28335,7 @@ impl ReadXdr for SetOptionsOp { } impl WriteXdr for SetOptionsOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inflation_dest.write_xdr(w)?; @@ -28399,7 +28450,7 @@ impl Variants for ChangeTrustAsset { impl Union for ChangeTrustAsset {} impl ReadXdr for ChangeTrustAsset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -28418,7 +28469,7 @@ impl ReadXdr for ChangeTrustAsset { } impl WriteXdr for ChangeTrustAsset { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -28460,7 +28511,7 @@ pub struct ChangeTrustOp { } impl ReadXdr for ChangeTrustOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28472,7 +28523,7 @@ impl ReadXdr for ChangeTrustOp { } impl WriteXdr for ChangeTrustOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.line.write_xdr(w)?; @@ -28510,7 +28561,7 @@ pub struct AllowTrustOp { } impl ReadXdr for AllowTrustOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28523,7 +28574,7 @@ impl ReadXdr for AllowTrustOp { } impl WriteXdr for AllowTrustOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.trustor.write_xdr(w)?; @@ -28558,7 +28609,7 @@ pub struct ManageDataOp { } impl ReadXdr for ManageDataOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28570,7 +28621,7 @@ impl ReadXdr for ManageDataOp { } impl WriteXdr for ManageDataOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.data_name.write_xdr(w)?; @@ -28602,7 +28653,7 @@ pub struct BumpSequenceOp { } impl ReadXdr for BumpSequenceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28613,7 +28664,7 @@ impl ReadXdr for BumpSequenceOp { } impl WriteXdr for BumpSequenceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.bump_to.write_xdr(w)?; @@ -28648,7 +28699,7 @@ pub struct CreateClaimableBalanceOp { } impl ReadXdr for CreateClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28661,7 +28712,7 @@ impl ReadXdr for CreateClaimableBalanceOp { } impl WriteXdr for CreateClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset.write_xdr(w)?; @@ -28694,7 +28745,7 @@ pub struct ClaimClaimableBalanceOp { } impl ReadXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28705,7 +28756,7 @@ impl ReadXdr for ClaimClaimableBalanceOp { } impl WriteXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -28736,7 +28787,7 @@ pub struct BeginSponsoringFutureReservesOp { } impl ReadXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28747,7 +28798,7 @@ impl ReadXdr for BeginSponsoringFutureReservesOp { } impl WriteXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sponsored_id.write_xdr(w)?; @@ -28845,7 +28896,7 @@ impl From for i32 { } impl ReadXdr for RevokeSponsorshipType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -28856,7 +28907,7 @@ impl ReadXdr for RevokeSponsorshipType { } impl WriteXdr for RevokeSponsorshipType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -28889,7 +28940,7 @@ pub struct RevokeSponsorshipOpSigner { } impl ReadXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28901,7 +28952,7 @@ impl ReadXdr for RevokeSponsorshipOpSigner { } impl WriteXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -28995,7 +29046,7 @@ impl Variants for RevokeSponsorshipOp { impl Union for RevokeSponsorshipOp {} impl ReadXdr for RevokeSponsorshipOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RevokeSponsorshipType = ::read_xdr(r)?; @@ -29014,7 +29065,7 @@ impl ReadXdr for RevokeSponsorshipOp { } impl WriteXdr for RevokeSponsorshipOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -29054,7 +29105,7 @@ pub struct ClawbackOp { } impl ReadXdr for ClawbackOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29067,7 +29118,7 @@ impl ReadXdr for ClawbackOp { } impl WriteXdr for ClawbackOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset.write_xdr(w)?; @@ -29100,7 +29151,7 @@ pub struct ClawbackClaimableBalanceOp { } impl ReadXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29111,7 +29162,7 @@ impl ReadXdr for ClawbackClaimableBalanceOp { } impl WriteXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -29149,7 +29200,7 @@ pub struct SetTrustLineFlagsOp { } impl ReadXdr for SetTrustLineFlagsOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29163,7 +29214,7 @@ impl ReadXdr for SetTrustLineFlagsOp { } impl WriteXdr for SetTrustLineFlagsOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.trustor.write_xdr(w)?; @@ -29213,7 +29264,7 @@ pub struct LiquidityPoolDepositOp { } impl ReadXdr for LiquidityPoolDepositOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29228,7 +29279,7 @@ impl ReadXdr for LiquidityPoolDepositOp { } impl WriteXdr for LiquidityPoolDepositOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -29269,7 +29320,7 @@ pub struct LiquidityPoolWithdrawOp { } impl ReadXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29283,7 +29334,7 @@ impl ReadXdr for LiquidityPoolWithdrawOp { } impl WriteXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -29399,7 +29450,7 @@ impl From for i32 { } impl ReadXdr for HostFunctionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29410,7 +29461,7 @@ impl ReadXdr for HostFunctionType { } impl WriteXdr for HostFunctionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -29508,7 +29559,7 @@ impl From for i32 { } impl ReadXdr for ContractIdPreimageType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29519,7 +29570,7 @@ impl ReadXdr for ContractIdPreimageType { } impl WriteXdr for ContractIdPreimageType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -29552,7 +29603,7 @@ pub struct ContractIdPreimageFromAddress { } impl ReadXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29564,7 +29615,7 @@ impl ReadXdr for ContractIdPreimageFromAddress { } impl WriteXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.address.write_xdr(w)?; @@ -29658,7 +29709,7 @@ impl Variants for ContractIdPreimage { impl Union for ContractIdPreimage {} impl ReadXdr for ContractIdPreimage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ContractIdPreimageType = ::read_xdr(r)?; @@ -29677,7 +29728,7 @@ impl ReadXdr for ContractIdPreimage { } impl WriteXdr for ContractIdPreimage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -29715,7 +29766,7 @@ pub struct CreateContractArgs { } impl ReadXdr for CreateContractArgs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29727,7 +29778,7 @@ impl ReadXdr for CreateContractArgs { } impl WriteXdr for CreateContractArgs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id_preimage.write_xdr(w)?; @@ -29764,7 +29815,7 @@ pub struct CreateContractArgsV2 { } impl ReadXdr for CreateContractArgsV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29777,7 +29828,7 @@ impl ReadXdr for CreateContractArgsV2 { } impl WriteXdr for CreateContractArgsV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id_preimage.write_xdr(w)?; @@ -29813,7 +29864,7 @@ pub struct InvokeContractArgs { } impl ReadXdr for InvokeContractArgs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29826,7 +29877,7 @@ impl ReadXdr for InvokeContractArgs { } impl WriteXdr for InvokeContractArgs { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_address.write_xdr(w)?; @@ -29934,7 +29985,7 @@ impl Variants for HostFunction { impl Union for HostFunction {} impl ReadXdr for HostFunction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: HostFunctionType = ::read_xdr(r)?; @@ -29961,7 +30012,7 @@ impl ReadXdr for HostFunction { } impl WriteXdr for HostFunction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30075,7 +30126,7 @@ impl From for i32 { } impl ReadXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -30086,7 +30137,7 @@ impl ReadXdr for SorobanAuthorizedFunctionType { } impl WriteXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -30195,7 +30246,7 @@ impl Variants for SorobanAuthorizedFunction { impl Union for SorobanAuthorizedFunction {} impl ReadXdr for SorobanAuthorizedFunction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SorobanAuthorizedFunctionType = @@ -30220,7 +30271,7 @@ impl ReadXdr for SorobanAuthorizedFunction { } impl WriteXdr for SorobanAuthorizedFunction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30259,7 +30310,7 @@ pub struct SorobanAuthorizedInvocation { } impl ReadXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30271,7 +30322,7 @@ impl ReadXdr for SorobanAuthorizedInvocation { } impl WriteXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.function.write_xdr(w)?; @@ -30309,7 +30360,7 @@ pub struct SorobanAddressCredentials { } impl ReadXdr for SorobanAddressCredentials { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30323,7 +30374,7 @@ impl ReadXdr for SorobanAddressCredentials { } impl WriteXdr for SorobanAddressCredentials { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.address.write_xdr(w)?; @@ -30424,7 +30475,7 @@ impl From for i32 { } impl ReadXdr for SorobanCredentialsType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -30435,7 +30486,7 @@ impl ReadXdr for SorobanCredentialsType { } impl WriteXdr for SorobanCredentialsType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -30524,7 +30575,7 @@ impl Variants for SorobanCredentials { impl Union for SorobanCredentials {} impl ReadXdr for SorobanCredentials { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SorobanCredentialsType = ::read_xdr(r)?; @@ -30543,7 +30594,7 @@ impl ReadXdr for SorobanCredentials { } impl WriteXdr for SorobanCredentials { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30581,7 +30632,7 @@ pub struct SorobanAuthorizationEntry { } impl ReadXdr for SorobanAuthorizationEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30593,7 +30644,7 @@ impl ReadXdr for SorobanAuthorizationEntry { } impl WriteXdr for SorobanAuthorizationEntry { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.credentials.write_xdr(w)?; @@ -30629,7 +30680,7 @@ pub struct InvokeHostFunctionOp { } impl ReadXdr for InvokeHostFunctionOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30641,7 +30692,7 @@ impl ReadXdr for InvokeHostFunctionOp { } impl WriteXdr for InvokeHostFunctionOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.host_function.write_xdr(w)?; @@ -30675,7 +30726,7 @@ pub struct ExtendFootprintTtlOp { } impl ReadXdr for ExtendFootprintTtlOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30687,7 +30738,7 @@ impl ReadXdr for ExtendFootprintTtlOp { } impl WriteXdr for ExtendFootprintTtlOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -30719,7 +30770,7 @@ pub struct RestoreFootprintOp { } impl ReadXdr for RestoreFootprintOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30730,7 +30781,7 @@ impl ReadXdr for RestoreFootprintOp { } impl WriteXdr for RestoreFootprintOp { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -30997,7 +31048,7 @@ impl Variants for OperationBody { impl Union for OperationBody {} impl ReadXdr for OperationBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationType = ::read_xdr(r)?; @@ -31073,7 +31124,7 @@ impl ReadXdr for OperationBody { } impl WriteXdr for OperationBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31197,7 +31248,7 @@ pub struct Operation { } impl ReadXdr for Operation { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31209,7 +31260,7 @@ impl ReadXdr for Operation { } impl WriteXdr for Operation { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31245,7 +31296,7 @@ pub struct HashIdPreimageOperationId { } impl ReadXdr for HashIdPreimageOperationId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31258,7 +31309,7 @@ impl ReadXdr for HashIdPreimageOperationId { } impl WriteXdr for HashIdPreimageOperationId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31299,7 +31350,7 @@ pub struct HashIdPreimageRevokeId { } impl ReadXdr for HashIdPreimageRevokeId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31314,7 +31365,7 @@ impl ReadXdr for HashIdPreimageRevokeId { } impl WriteXdr for HashIdPreimageRevokeId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31351,7 +31402,7 @@ pub struct HashIdPreimageContractId { } impl ReadXdr for HashIdPreimageContractId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31363,7 +31414,7 @@ impl ReadXdr for HashIdPreimageContractId { } impl WriteXdr for HashIdPreimageContractId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -31401,7 +31452,7 @@ pub struct HashIdPreimageSorobanAuthorization { } impl ReadXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31415,7 +31466,7 @@ impl ReadXdr for HashIdPreimageSorobanAuthorization { } impl WriteXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -31546,7 +31597,7 @@ impl Variants for HashIdPreimage { impl Union for HashIdPreimage {} impl ReadXdr for HashIdPreimage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -31571,7 +31622,7 @@ impl ReadXdr for HashIdPreimage { } impl WriteXdr for HashIdPreimage { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31691,7 +31742,7 @@ impl From for i32 { } impl ReadXdr for MemoType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -31702,7 +31753,7 @@ impl ReadXdr for MemoType { } impl WriteXdr for MemoType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -31809,7 +31860,7 @@ impl Variants for Memo { impl Union for Memo {} impl ReadXdr for Memo { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: MemoType = ::read_xdr(r)?; @@ -31829,7 +31880,7 @@ impl ReadXdr for Memo { } impl WriteXdr for Memo { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31870,7 +31921,7 @@ pub struct TimeBounds { } impl ReadXdr for TimeBounds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31882,7 +31933,7 @@ impl ReadXdr for TimeBounds { } impl WriteXdr for TimeBounds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.min_time.write_xdr(w)?; @@ -31916,7 +31967,7 @@ pub struct LedgerBounds { } impl ReadXdr for LedgerBounds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31928,7 +31979,7 @@ impl ReadXdr for LedgerBounds { } impl WriteXdr for LedgerBounds { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.min_ledger.write_xdr(w)?; @@ -31993,7 +32044,7 @@ pub struct PreconditionsV2 { } impl ReadXdr for PreconditionsV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32009,7 +32060,7 @@ impl ReadXdr for PreconditionsV2 { } impl WriteXdr for PreconditionsV2 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.time_bounds.write_xdr(w)?; @@ -32117,7 +32168,7 @@ impl From for i32 { } impl ReadXdr for PreconditionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -32128,7 +32179,7 @@ impl ReadXdr for PreconditionType { } impl WriteXdr for PreconditionType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -32223,7 +32274,7 @@ impl Variants for Preconditions { impl Union for Preconditions {} impl ReadXdr for Preconditions { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PreconditionType = ::read_xdr(r)?; @@ -32241,7 +32292,7 @@ impl ReadXdr for Preconditions { } impl WriteXdr for Preconditions { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32280,7 +32331,7 @@ pub struct LedgerFootprint { } impl ReadXdr for LedgerFootprint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32292,7 +32343,7 @@ impl ReadXdr for LedgerFootprint { } impl WriteXdr for LedgerFootprint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.read_only.write_xdr(w)?; @@ -32391,7 +32442,7 @@ impl From for i32 { } impl ReadXdr for ArchivalProofType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -32402,7 +32453,7 @@ impl ReadXdr for ArchivalProofType { } impl WriteXdr for ArchivalProofType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -32435,7 +32486,7 @@ pub struct ArchivalProofNode { } impl ReadXdr for ArchivalProofNode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32447,7 +32498,7 @@ impl ReadXdr for ArchivalProofNode { } impl WriteXdr for ArchivalProofNode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -32497,7 +32548,7 @@ impl AsRef> for ProofLevel { } impl ReadXdr for ProofLevel { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -32508,7 +32559,7 @@ impl ReadXdr for ProofLevel { } impl WriteXdr for ProofLevel { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -32590,7 +32641,7 @@ pub struct NonexistenceProofBody { } impl ReadXdr for NonexistenceProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32602,7 +32653,7 @@ impl ReadXdr for NonexistenceProofBody { } impl WriteXdr for NonexistenceProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.entries_to_prove.write_xdr(w)?; @@ -32646,7 +32697,7 @@ pub struct ExistenceProofBody { } impl ReadXdr for ExistenceProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32660,7 +32711,7 @@ impl ReadXdr for ExistenceProofBody { } impl WriteXdr for ExistenceProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.keys_to_prove.write_xdr(w)?; @@ -32752,7 +32803,7 @@ impl Variants for ArchivalProofBody { impl Union for ArchivalProofBody {} impl ReadXdr for ArchivalProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ArchivalProofType = ::read_xdr(r)?; @@ -32773,7 +32824,7 @@ impl ReadXdr for ArchivalProofBody { } impl WriteXdr for ArchivalProofBody { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32818,7 +32869,7 @@ pub struct ArchivalProof { } impl ReadXdr for ArchivalProof { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32830,7 +32881,7 @@ impl ReadXdr for ArchivalProof { } impl WriteXdr for ArchivalProof { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.epoch.write_xdr(w)?; @@ -32873,7 +32924,7 @@ pub struct SorobanResources { } impl ReadXdr for SorobanResources { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32887,7 +32938,7 @@ impl ReadXdr for SorobanResources { } impl WriteXdr for SorobanResources { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.footprint.write_xdr(w)?; @@ -32976,7 +33027,7 @@ impl Variants for SorobanTransactionDataExt { impl Union for SorobanTransactionDataExt {} impl ReadXdr for SorobanTransactionDataExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -32993,7 +33044,7 @@ impl ReadXdr for SorobanTransactionDataExt { } impl WriteXdr for SorobanTransactionDataExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33048,7 +33099,7 @@ pub struct SorobanTransactionData { } impl ReadXdr for SorobanTransactionData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33061,7 +33112,7 @@ impl ReadXdr for SorobanTransactionData { } impl WriteXdr for SorobanTransactionData { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -33144,7 +33195,7 @@ impl Variants for TransactionV0Ext { impl Union for TransactionV0Ext {} impl ReadXdr for TransactionV0Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33160,7 +33211,7 @@ impl ReadXdr for TransactionV0Ext { } impl WriteXdr for TransactionV0Ext { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33212,7 +33263,7 @@ pub struct TransactionV0 { } impl ReadXdr for TransactionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33229,7 +33280,7 @@ impl ReadXdr for TransactionV0 { } impl WriteXdr for TransactionV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account_ed25519.write_xdr(w)?; @@ -33270,7 +33321,7 @@ pub struct TransactionV0Envelope { } impl ReadXdr for TransactionV0Envelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33282,7 +33333,7 @@ impl ReadXdr for TransactionV0Envelope { } impl WriteXdr for TransactionV0Envelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33369,7 +33420,7 @@ impl Variants for TransactionExt { impl Union for TransactionExt {} impl ReadXdr for TransactionExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33386,7 +33437,7 @@ impl ReadXdr for TransactionExt { } impl WriteXdr for TransactionExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33452,7 +33503,7 @@ pub struct Transaction { } impl ReadXdr for Transaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33469,7 +33520,7 @@ impl ReadXdr for Transaction { } impl WriteXdr for Transaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -33510,7 +33561,7 @@ pub struct TransactionV1Envelope { } impl ReadXdr for TransactionV1Envelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33522,7 +33573,7 @@ impl ReadXdr for TransactionV1Envelope { } impl WriteXdr for TransactionV1Envelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33604,7 +33655,7 @@ impl Variants for FeeBumpTransactionInnerTx { impl Union for FeeBumpTransactionInnerTx {} impl ReadXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -33620,7 +33671,7 @@ impl ReadXdr for FeeBumpTransactionInnerTx { } impl WriteXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33705,7 +33756,7 @@ impl Variants for FeeBumpTransactionExt { impl Union for FeeBumpTransactionExt {} impl ReadXdr for FeeBumpTransactionExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33721,7 +33772,7 @@ impl ReadXdr for FeeBumpTransactionExt { } impl WriteXdr for FeeBumpTransactionExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33772,7 +33823,7 @@ pub struct FeeBumpTransaction { } impl ReadXdr for FeeBumpTransaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33786,7 +33837,7 @@ impl ReadXdr for FeeBumpTransaction { } impl WriteXdr for FeeBumpTransaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_source.write_xdr(w)?; @@ -33824,7 +33875,7 @@ pub struct FeeBumpTransactionEnvelope { } impl ReadXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33836,7 +33887,7 @@ impl ReadXdr for FeeBumpTransactionEnvelope { } impl WriteXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33932,7 +33983,7 @@ impl Variants for TransactionEnvelope { impl Union for TransactionEnvelope {} impl ReadXdr for TransactionEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -33952,7 +34003,7 @@ impl ReadXdr for TransactionEnvelope { } impl WriteXdr for TransactionEnvelope { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34045,7 +34096,7 @@ impl Variants for TransactionSignaturePayloadTaggedTransaction { impl Union for TransactionSignaturePayloadTaggedTransaction {} impl ReadXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -34062,7 +34113,7 @@ impl ReadXdr for TransactionSignaturePayloadTaggedTransaction { } impl WriteXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34108,7 +34159,7 @@ pub struct TransactionSignaturePayload { } impl ReadXdr for TransactionSignaturePayload { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34120,7 +34171,7 @@ impl ReadXdr for TransactionSignaturePayload { } impl WriteXdr for TransactionSignaturePayload { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -34224,7 +34275,7 @@ impl From for i32 { } impl ReadXdr for ClaimAtomType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -34235,7 +34286,7 @@ impl ReadXdr for ClaimAtomType { } impl WriteXdr for ClaimAtomType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -34281,7 +34332,7 @@ pub struct ClaimOfferAtomV0 { } impl ReadXdr for ClaimOfferAtomV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34297,7 +34348,7 @@ impl ReadXdr for ClaimOfferAtomV0 { } impl WriteXdr for ClaimOfferAtomV0 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_ed25519.write_xdr(w)?; @@ -34348,7 +34399,7 @@ pub struct ClaimOfferAtom { } impl ReadXdr for ClaimOfferAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34364,7 +34415,7 @@ impl ReadXdr for ClaimOfferAtom { } impl WriteXdr for ClaimOfferAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -34412,7 +34463,7 @@ pub struct ClaimLiquidityAtom { } impl ReadXdr for ClaimLiquidityAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34427,7 +34478,7 @@ impl ReadXdr for ClaimLiquidityAtom { } impl WriteXdr for ClaimLiquidityAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -34526,7 +34577,7 @@ impl Variants for ClaimAtom { impl Union for ClaimAtom {} impl ReadXdr for ClaimAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimAtomType = ::read_xdr(r)?; @@ -34546,7 +34597,7 @@ impl ReadXdr for ClaimAtom { } impl WriteXdr for ClaimAtom { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34675,7 +34726,7 @@ impl From for i32 { } impl ReadXdr for CreateAccountResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -34686,7 +34737,7 @@ impl ReadXdr for CreateAccountResultCode { } impl WriteXdr for CreateAccountResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -34796,7 +34847,7 @@ impl Variants for CreateAccountResult { impl Union for CreateAccountResult {} impl ReadXdr for CreateAccountResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CreateAccountResultCode = ::read_xdr(r)?; @@ -34816,7 +34867,7 @@ impl ReadXdr for CreateAccountResult { } impl WriteXdr for CreateAccountResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34976,7 +35027,7 @@ impl From for i32 { } impl ReadXdr for PaymentResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -34987,7 +35038,7 @@ impl ReadXdr for PaymentResultCode { } impl WriteXdr for PaymentResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35127,7 +35178,7 @@ impl Variants for PaymentResult { impl Union for PaymentResult {} impl ReadXdr for PaymentResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PaymentResultCode = ::read_xdr(r)?; @@ -35152,7 +35203,7 @@ impl ReadXdr for PaymentResult { } impl WriteXdr for PaymentResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35344,7 +35395,7 @@ impl From for i32 { } impl ReadXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35355,7 +35406,7 @@ impl ReadXdr for PathPaymentStrictReceiveResultCode { } impl WriteXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35390,7 +35441,7 @@ pub struct SimplePaymentResult { } impl ReadXdr for SimplePaymentResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35403,7 +35454,7 @@ impl ReadXdr for SimplePaymentResult { } impl WriteXdr for SimplePaymentResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -35438,7 +35489,7 @@ pub struct PathPaymentStrictReceiveResultSuccess { } impl ReadXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35450,7 +35501,7 @@ impl ReadXdr for PathPaymentStrictReceiveResultSuccess { } impl WriteXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers.write_xdr(w)?; @@ -35616,7 +35667,7 @@ impl Variants for PathPaymentStrictReceiveRe impl Union for PathPaymentStrictReceiveResult {} impl ReadXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PathPaymentStrictReceiveResultCode = @@ -35647,7 +35698,7 @@ impl ReadXdr for PathPaymentStrictReceiveResult { } impl WriteXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35841,7 +35892,7 @@ impl From for i32 { } impl ReadXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35852,7 +35903,7 @@ impl ReadXdr for PathPaymentStrictSendResultCode { } impl WriteXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35885,7 +35936,7 @@ pub struct PathPaymentStrictSendResultSuccess { } impl ReadXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35897,7 +35948,7 @@ impl ReadXdr for PathPaymentStrictSendResultSuccess { } impl WriteXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers.write_xdr(w)?; @@ -36062,7 +36113,7 @@ impl Variants for PathPaymentStrictSendResult { impl Union for PathPaymentStrictSendResult {} impl ReadXdr for PathPaymentStrictSendResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PathPaymentStrictSendResultCode = @@ -36093,7 +36144,7 @@ impl ReadXdr for PathPaymentStrictSendResult { } impl WriteXdr for PathPaymentStrictSendResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36286,7 +36337,7 @@ impl From for i32 { } impl ReadXdr for ManageSellOfferResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36297,7 +36348,7 @@ impl ReadXdr for ManageSellOfferResultCode { } impl WriteXdr for ManageSellOfferResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36400,7 +36451,7 @@ impl From for i32 { } impl ReadXdr for ManageOfferEffect { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36411,7 +36462,7 @@ impl ReadXdr for ManageOfferEffect { } impl WriteXdr for ManageOfferEffect { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36505,7 +36556,7 @@ impl Variants for ManageOfferSuccessResultOffer { impl Union for ManageOfferSuccessResultOffer {} impl ReadXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageOfferEffect = ::read_xdr(r)?; @@ -36523,7 +36574,7 @@ impl ReadXdr for ManageOfferSuccessResultOffer { } impl WriteXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36572,7 +36623,7 @@ pub struct ManageOfferSuccessResult { } impl ReadXdr for ManageOfferSuccessResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -36584,7 +36635,7 @@ impl ReadXdr for ManageOfferSuccessResult { } impl WriteXdr for ManageOfferSuccessResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers_claimed.write_xdr(w)?; @@ -36743,7 +36794,7 @@ impl Variants for ManageSellOfferResult { impl Union for ManageSellOfferResult {} impl ReadXdr for ManageSellOfferResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageSellOfferResultCode = @@ -36774,7 +36825,7 @@ impl ReadXdr for ManageSellOfferResult { } impl WriteXdr for ManageSellOfferResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36964,7 +37015,7 @@ impl From for i32 { } impl ReadXdr for ManageBuyOfferResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36975,7 +37026,7 @@ impl ReadXdr for ManageBuyOfferResultCode { } impl WriteXdr for ManageBuyOfferResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37133,7 +37184,7 @@ impl Variants for ManageBuyOfferResult { impl Union for ManageBuyOfferResult {} impl ReadXdr for ManageBuyOfferResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageBuyOfferResultCode = ::read_xdr(r)?; @@ -37163,7 +37214,7 @@ impl ReadXdr for ManageBuyOfferResult { } impl WriteXdr for ManageBuyOfferResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37337,7 +37388,7 @@ impl From for i32 { } impl ReadXdr for SetOptionsResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37348,7 +37399,7 @@ impl ReadXdr for SetOptionsResultCode { } impl WriteXdr for SetOptionsResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37494,7 +37545,7 @@ impl Variants for SetOptionsResult { impl Union for SetOptionsResult {} impl ReadXdr for SetOptionsResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SetOptionsResultCode = ::read_xdr(r)?; @@ -37520,7 +37571,7 @@ impl ReadXdr for SetOptionsResult { } impl WriteXdr for SetOptionsResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37683,7 +37734,7 @@ impl From for i32 { } impl ReadXdr for ChangeTrustResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37694,7 +37745,7 @@ impl ReadXdr for ChangeTrustResultCode { } impl WriteXdr for ChangeTrustResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37828,7 +37879,7 @@ impl Variants for ChangeTrustResult { impl Union for ChangeTrustResult {} impl ReadXdr for ChangeTrustResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ChangeTrustResultCode = ::read_xdr(r)?; @@ -37854,7 +37905,7 @@ impl ReadXdr for ChangeTrustResult { } impl WriteXdr for ChangeTrustResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38001,7 +38052,7 @@ impl From for i32 { } impl ReadXdr for AllowTrustResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38012,7 +38063,7 @@ impl ReadXdr for AllowTrustResultCode { } impl WriteXdr for AllowTrustResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38134,7 +38185,7 @@ impl Variants for AllowTrustResult { impl Union for AllowTrustResult {} impl ReadXdr for AllowTrustResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AllowTrustResultCode = ::read_xdr(r)?; @@ -38156,7 +38207,7 @@ impl ReadXdr for AllowTrustResult { } impl WriteXdr for AllowTrustResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38306,7 +38357,7 @@ impl From for i32 { } impl ReadXdr for AccountMergeResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38317,7 +38368,7 @@ impl ReadXdr for AccountMergeResultCode { } impl WriteXdr for AccountMergeResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38445,7 +38496,7 @@ impl Variants for AccountMergeResult { impl Union for AccountMergeResult {} impl ReadXdr for AccountMergeResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AccountMergeResultCode = ::read_xdr(r)?; @@ -38468,7 +38519,7 @@ impl ReadXdr for AccountMergeResult { } impl WriteXdr for AccountMergeResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38577,7 +38628,7 @@ impl From for i32 { } impl ReadXdr for InflationResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38588,7 +38639,7 @@ impl ReadXdr for InflationResultCode { } impl WriteXdr for InflationResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38621,7 +38672,7 @@ pub struct InflationPayout { } impl ReadXdr for InflationPayout { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -38633,7 +38684,7 @@ impl ReadXdr for InflationPayout { } impl WriteXdr for InflationPayout { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -38721,7 +38772,7 @@ impl Variants for InflationResult { impl Union for InflationResult {} impl ReadXdr for InflationResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: InflationResultCode = ::read_xdr(r)?; @@ -38740,7 +38791,7 @@ impl ReadXdr for InflationResult { } impl WriteXdr for InflationResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38868,7 +38919,7 @@ impl From for i32 { } impl ReadXdr for ManageDataResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38879,7 +38930,7 @@ impl ReadXdr for ManageDataResultCode { } impl WriteXdr for ManageDataResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38989,7 +39040,7 @@ impl Variants for ManageDataResult { impl Union for ManageDataResult {} impl ReadXdr for ManageDataResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageDataResultCode = ::read_xdr(r)?; @@ -39009,7 +39060,7 @@ impl ReadXdr for ManageDataResult { } impl WriteXdr for ManageDataResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39117,7 +39168,7 @@ impl From for i32 { } impl ReadXdr for BumpSequenceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39128,7 +39179,7 @@ impl ReadXdr for BumpSequenceResultCode { } impl WriteXdr for BumpSequenceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39217,7 +39268,7 @@ impl Variants for BumpSequenceResult { impl Union for BumpSequenceResult {} impl ReadXdr for BumpSequenceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BumpSequenceResultCode = ::read_xdr(r)?; @@ -39234,7 +39285,7 @@ impl ReadXdr for BumpSequenceResult { } impl WriteXdr for BumpSequenceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39364,7 +39415,7 @@ impl From for i32 { } impl ReadXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39375,7 +39426,7 @@ impl ReadXdr for CreateClaimableBalanceResultCode { } impl WriteXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39492,7 +39543,7 @@ impl Variants for CreateClaimableBalanceResult impl Union for CreateClaimableBalanceResult {} impl ReadXdr for CreateClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CreateClaimableBalanceResultCode = @@ -39516,7 +39567,7 @@ impl ReadXdr for CreateClaimableBalanceResult { } impl WriteXdr for CreateClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39650,7 +39701,7 @@ impl From for i32 { } impl ReadXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39661,7 +39712,7 @@ impl ReadXdr for ClaimClaimableBalanceResultCode { } impl WriteXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39777,7 +39828,7 @@ impl Variants for ClaimClaimableBalanceResult { impl Union for ClaimClaimableBalanceResult {} impl ReadXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimClaimableBalanceResultCode = @@ -39799,7 +39850,7 @@ impl ReadXdr for ClaimClaimableBalanceResult { } impl WriteXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39920,7 +39971,7 @@ impl From for i32 { } impl ReadXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39931,7 +39982,7 @@ impl ReadXdr for BeginSponsoringFutureReservesResultCode { } impl WriteXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40032,7 +40083,7 @@ impl Variants for BeginSponsoringFuture impl Union for BeginSponsoringFutureReservesResult {} impl ReadXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BeginSponsoringFutureReservesResultCode = @@ -40052,7 +40103,7 @@ impl ReadXdr for BeginSponsoringFutureReservesResult { } impl WriteXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40160,7 +40211,7 @@ impl From for i32 { } impl ReadXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40171,7 +40222,7 @@ impl ReadXdr for EndSponsoringFutureReservesResultCode { } impl WriteXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40261,7 +40312,7 @@ impl Variants for EndSponsoringFutureRese impl Union for EndSponsoringFutureReservesResult {} impl ReadXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EndSponsoringFutureReservesResultCode = @@ -40279,7 +40330,7 @@ impl ReadXdr for EndSponsoringFutureReservesResult { } impl WriteXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40412,7 +40463,7 @@ impl From for i32 { } impl ReadXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40423,7 +40474,7 @@ impl ReadXdr for RevokeSponsorshipResultCode { } impl WriteXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40539,7 +40590,7 @@ impl Variants for RevokeSponsorshipResult { impl Union for RevokeSponsorshipResult {} impl ReadXdr for RevokeSponsorshipResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RevokeSponsorshipResultCode = @@ -40561,7 +40612,7 @@ impl ReadXdr for RevokeSponsorshipResult { } impl WriteXdr for RevokeSponsorshipResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40692,7 +40743,7 @@ impl From for i32 { } impl ReadXdr for ClawbackResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40703,7 +40754,7 @@ impl ReadXdr for ClawbackResultCode { } impl WriteXdr for ClawbackResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40813,7 +40864,7 @@ impl Variants for ClawbackResult { impl Union for ClawbackResult {} impl ReadXdr for ClawbackResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClawbackResultCode = ::read_xdr(r)?; @@ -40833,7 +40884,7 @@ impl ReadXdr for ClawbackResult { } impl WriteXdr for ClawbackResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40953,7 +41004,7 @@ impl From for i32 { } impl ReadXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40964,7 +41015,7 @@ impl ReadXdr for ClawbackClaimableBalanceResultCode { } impl WriteXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41065,7 +41116,7 @@ impl Variants for ClawbackClaimableBalanceRe impl Union for ClawbackClaimableBalanceResult {} impl ReadXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClawbackClaimableBalanceResultCode = @@ -41085,7 +41136,7 @@ impl ReadXdr for ClawbackClaimableBalanceResult { } impl WriteXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41221,7 +41272,7 @@ impl From for i32 { } impl ReadXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41232,7 +41283,7 @@ impl ReadXdr for SetTrustLineFlagsResultCode { } impl WriteXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41348,7 +41399,7 @@ impl Variants for SetTrustLineFlagsResult { impl Union for SetTrustLineFlagsResult {} impl ReadXdr for SetTrustLineFlagsResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SetTrustLineFlagsResultCode = @@ -41370,7 +41421,7 @@ impl ReadXdr for SetTrustLineFlagsResult { } impl WriteXdr for SetTrustLineFlagsResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41523,7 +41574,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41534,7 +41585,7 @@ impl ReadXdr for LiquidityPoolDepositResultCode { } impl WriteXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41662,7 +41713,7 @@ impl Variants for LiquidityPoolDepositResult { impl Union for LiquidityPoolDepositResult {} impl ReadXdr for LiquidityPoolDepositResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolDepositResultCode = @@ -41686,7 +41737,7 @@ impl ReadXdr for LiquidityPoolDepositResult { } impl WriteXdr for LiquidityPoolDepositResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41828,7 +41879,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41839,7 +41890,7 @@ impl ReadXdr for LiquidityPoolWithdrawResultCode { } impl WriteXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41955,7 +42006,7 @@ impl Variants for LiquidityPoolWithdrawResult { impl Union for LiquidityPoolWithdrawResult {} impl ReadXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolWithdrawResultCode = @@ -41977,7 +42028,7 @@ impl ReadXdr for LiquidityPoolWithdrawResult { } impl WriteXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42114,7 +42165,7 @@ impl From for i32 { } impl ReadXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42125,7 +42176,7 @@ impl ReadXdr for InvokeHostFunctionResultCode { } impl WriteXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42243,7 +42294,7 @@ impl Variants for InvokeHostFunctionResult { impl Union for InvokeHostFunctionResult {} impl ReadXdr for InvokeHostFunctionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: InvokeHostFunctionResultCode = @@ -42267,7 +42318,7 @@ impl ReadXdr for InvokeHostFunctionResult { } impl WriteXdr for InvokeHostFunctionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42392,7 +42443,7 @@ impl From for i32 { } impl ReadXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42403,7 +42454,7 @@ impl ReadXdr for ExtendFootprintTtlResultCode { } impl WriteXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42509,7 +42560,7 @@ impl Variants for ExtendFootprintTtlResult { impl Union for ExtendFootprintTtlResult {} impl ReadXdr for ExtendFootprintTtlResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ExtendFootprintTtlResultCode = @@ -42531,7 +42582,7 @@ impl ReadXdr for ExtendFootprintTtlResult { } impl WriteXdr for ExtendFootprintTtlResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42654,7 +42705,7 @@ impl From for i32 { } impl ReadXdr for RestoreFootprintResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42665,7 +42716,7 @@ impl ReadXdr for RestoreFootprintResultCode { } impl WriteXdr for RestoreFootprintResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42771,7 +42822,7 @@ impl Variants for RestoreFootprintResult { impl Union for RestoreFootprintResult {} impl ReadXdr for RestoreFootprintResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RestoreFootprintResultCode = @@ -42793,7 +42844,7 @@ impl ReadXdr for RestoreFootprintResult { } impl WriteXdr for RestoreFootprintResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42932,7 +42983,7 @@ impl From for i32 { } impl ReadXdr for OperationResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42943,7 +42994,7 @@ impl ReadXdr for OperationResultCode { } impl WriteXdr for OperationResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -43210,7 +43261,7 @@ impl Variants for OperationResultTr { impl Union for OperationResultTr {} impl ReadXdr for OperationResultTr { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationType = ::read_xdr(r)?; @@ -43290,7 +43341,7 @@ impl ReadXdr for OperationResultTr { } impl WriteXdr for OperationResultTr { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43499,7 +43550,7 @@ impl Variants for OperationResult { impl Union for OperationResult {} impl ReadXdr for OperationResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationResultCode = ::read_xdr(r)?; @@ -43521,7 +43572,7 @@ impl ReadXdr for OperationResult { } impl WriteXdr for OperationResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43738,7 +43789,7 @@ impl From for i32 { } impl ReadXdr for TransactionResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -43749,7 +43800,7 @@ impl ReadXdr for TransactionResultCode { } impl WriteXdr for TransactionResultCode { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -43933,7 +43984,7 @@ impl Variants for InnerTransactionResultResult { impl Union for InnerTransactionResultResult {} impl ReadXdr for InnerTransactionResultResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TransactionResultCode = ::read_xdr(r)?; @@ -43969,7 +44020,7 @@ impl ReadXdr for InnerTransactionResultResult { } impl WriteXdr for InnerTransactionResultResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44070,7 +44121,7 @@ impl Variants for InnerTransactionResultExt { impl Union for InnerTransactionResultExt {} impl ReadXdr for InnerTransactionResultExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -44086,7 +44137,7 @@ impl ReadXdr for InnerTransactionResultExt { } impl WriteXdr for InnerTransactionResultExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44158,7 +44209,7 @@ pub struct InnerTransactionResult { } impl ReadXdr for InnerTransactionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -44171,7 +44222,7 @@ impl ReadXdr for InnerTransactionResult { } impl WriteXdr for InnerTransactionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_charged.write_xdr(w)?; @@ -44206,7 +44257,7 @@ pub struct InnerTransactionResultPair { } impl ReadXdr for InnerTransactionResultPair { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -44218,7 +44269,7 @@ impl ReadXdr for InnerTransactionResultPair { } impl WriteXdr for InnerTransactionResultPair { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.transaction_hash.write_xdr(w)?; @@ -44415,7 +44466,7 @@ impl Variants for TransactionResultResult { impl Union for TransactionResultResult {} impl ReadXdr for TransactionResultResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TransactionResultCode = ::read_xdr(r)?; @@ -44457,7 +44508,7 @@ impl ReadXdr for TransactionResultResult { } impl WriteXdr for TransactionResultResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44560,7 +44611,7 @@ impl Variants for TransactionResultExt { impl Union for TransactionResultExt {} impl ReadXdr for TransactionResultExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -44576,7 +44627,7 @@ impl ReadXdr for TransactionResultExt { } impl WriteXdr for TransactionResultExt { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44649,7 +44700,7 @@ pub struct TransactionResult { } impl ReadXdr for TransactionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -44662,7 +44713,7 @@ impl ReadXdr for TransactionResult { } impl WriteXdr for TransactionResult { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_charged.write_xdr(w)?; @@ -44770,7 +44821,7 @@ impl AsRef<[u8; 32]> for Hash { } impl ReadXdr for Hash { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 32]>::read_xdr(r)?; @@ -44781,7 +44832,7 @@ impl ReadXdr for Hash { } impl WriteXdr for Hash { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44921,7 +44972,7 @@ impl AsRef<[u8; 32]> for Uint256 { } impl ReadXdr for Uint256 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 32]>::read_xdr(r)?; @@ -44932,7 +44983,7 @@ impl ReadXdr for Uint256 { } impl WriteXdr for Uint256 { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45046,7 +45097,7 @@ impl AsRef for TimePoint { } impl ReadXdr for TimePoint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u64::read_xdr(r)?; @@ -45057,7 +45108,7 @@ impl ReadXdr for TimePoint { } impl WriteXdr for TimePoint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45102,7 +45153,7 @@ impl AsRef for Duration { } impl ReadXdr for Duration { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u64::read_xdr(r)?; @@ -45113,7 +45164,7 @@ impl ReadXdr for Duration { } impl WriteXdr for Duration { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45191,7 +45242,7 @@ impl Variants for ExtensionPoint { impl Union for ExtensionPoint {} impl ReadXdr for ExtensionPoint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -45207,7 +45258,7 @@ impl ReadXdr for ExtensionPoint { } impl WriteXdr for ExtensionPoint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45332,7 +45383,7 @@ impl From for i32 { } impl ReadXdr for CryptoKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45343,7 +45394,7 @@ impl ReadXdr for CryptoKeyType { } impl WriteXdr for CryptoKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45434,7 +45485,7 @@ impl From for i32 { } impl ReadXdr for PublicKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45445,7 +45496,7 @@ impl ReadXdr for PublicKeyType { } impl WriteXdr for PublicKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45554,7 +45605,7 @@ impl From for i32 { } impl ReadXdr for SignerKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45565,7 +45616,7 @@ impl ReadXdr for SignerKeyType { } impl WriteXdr for SignerKeyType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45644,7 +45695,7 @@ impl Variants for PublicKey { impl Union for PublicKey {} impl ReadXdr for PublicKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PublicKeyType = ::read_xdr(r)?; @@ -45662,7 +45713,7 @@ impl ReadXdr for PublicKey { } impl WriteXdr for PublicKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45699,7 +45750,7 @@ pub struct SignerKeyEd25519SignedPayload { } impl ReadXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -45711,7 +45762,7 @@ impl ReadXdr for SignerKeyEd25519SignedPayload { } impl WriteXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ed25519.write_xdr(w)?; @@ -45820,7 +45871,7 @@ impl Variants for SignerKey { impl Union for SignerKey {} impl ReadXdr for SignerKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SignerKeyType = ::read_xdr(r)?; @@ -45841,7 +45892,7 @@ impl ReadXdr for SignerKey { } impl WriteXdr for SignerKey { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45897,7 +45948,7 @@ impl AsRef> for Signature { } impl ReadXdr for Signature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64>::read_xdr(r)?; @@ -45908,7 +45959,7 @@ impl ReadXdr for Signature { } impl WriteXdr for Signature { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -46060,7 +46111,7 @@ impl AsRef<[u8; 4]> for SignatureHint { } impl ReadXdr for SignatureHint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -46071,7 +46122,7 @@ impl ReadXdr for SignatureHint { } impl WriteXdr for SignatureHint { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -46151,7 +46202,7 @@ impl AsRef for NodeId { } impl ReadXdr for NodeId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = PublicKey::read_xdr(r)?; @@ -46162,7 +46213,7 @@ impl ReadXdr for NodeId { } impl WriteXdr for NodeId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -46205,7 +46256,7 @@ impl AsRef for AccountId { } impl ReadXdr for AccountId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = PublicKey::read_xdr(r)?; @@ -46216,7 +46267,7 @@ impl ReadXdr for AccountId { } impl WriteXdr for AccountId { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -46244,7 +46295,7 @@ pub struct Curve25519Secret { } impl ReadXdr for Curve25519Secret { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46255,7 +46306,7 @@ impl ReadXdr for Curve25519Secret { } impl WriteXdr for Curve25519Secret { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46286,7 +46337,7 @@ pub struct Curve25519Public { } impl ReadXdr for Curve25519Public { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46297,7 +46348,7 @@ impl ReadXdr for Curve25519Public { } impl WriteXdr for Curve25519Public { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46328,7 +46379,7 @@ pub struct HmacSha256Key { } impl ReadXdr for HmacSha256Key { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46339,7 +46390,7 @@ impl ReadXdr for HmacSha256Key { } impl WriteXdr for HmacSha256Key { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46370,7 +46421,7 @@ pub struct HmacSha256Mac { } impl ReadXdr for HmacSha256Mac { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46381,7 +46432,7 @@ impl ReadXdr for HmacSha256Mac { } impl WriteXdr for HmacSha256Mac { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.mac.write_xdr(w)?; @@ -46412,7 +46463,7 @@ pub struct ShortHashSeed { } impl ReadXdr for ShortHashSeed { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46423,7 +46474,7 @@ impl ReadXdr for ShortHashSeed { } impl WriteXdr for ShortHashSeed { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seed.write_xdr(w)?; @@ -46526,7 +46577,7 @@ impl From for i32 { } impl ReadXdr for BinaryFuseFilterType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -46537,7 +46588,7 @@ impl ReadXdr for BinaryFuseFilterType { } impl WriteXdr for BinaryFuseFilterType { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -46590,7 +46641,7 @@ pub struct SerializedBinaryFuseFilter { } impl ReadXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46609,7 +46660,7 @@ impl ReadXdr for SerializedBinaryFuseFilter { } impl WriteXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.type_.write_xdr(w)?; @@ -51127,7 +51178,7 @@ impl Type { "SerializedBinaryFuseFilter", ]; - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] #[allow(clippy::too_many_lines)] pub fn read_xdr(v: TypeVariant, r: &mut Limited) -> Result { match v { @@ -53161,7 +53212,7 @@ impl Type { Ok(t) } - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] pub fn read_xdr_to_end(v: TypeVariant, r: &mut Limited) -> Result { let s = Self::read_xdr(v, r)?; // Check that any further reads, such as this read of one byte, read no @@ -59393,7 +59444,7 @@ impl Type { } } - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] pub fn from_xdr>(v: TypeVariant, bytes: B, limits: Limits) -> Result { let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); let t = Self::read_xdr_to_end(v, &mut cursor)?; @@ -63697,7 +63748,7 @@ impl Variants for Type { } impl WriteXdr for Type { - #[cfg(feature = "std")] + #[cfg(feature = "alloc")] #[allow(clippy::too_many_lines)] fn write_xdr(&self, w: &mut Limited) -> Result<()> { match self { From c88ef94fcdf88497f6e77b14adf59fe8b7bb0867 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Thu, 12 Sep 2024 14:52:26 +0800 Subject: [PATCH 02/14] feat: add support for `no_std` env --- Cargo.lock | 8 ++++---- Cargo.toml | 8 +++----- Makefile | 2 +- src/curr/generated.rs | 22 +++++++++++----------- src/next/generated.rs | 22 +++++++++++----------- 5 files changed, 30 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f0f0acbf..399ccf6b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -257,9 +257,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" [[package]] -name = "embedded-io-cursor" +name = "embedded-io-extras" version = "0.0.1" -source = "git+https://github.com/lightsail-network/embedded-io-cursor?rev=0b7ff9270d7ec1d3204375650f04cb0258ac1ada#0b7ff9270d7ec1d3204375650f04cb0258ac1ada" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c151a27502f81447537f6dd1a11fe1162b66ebd4a27da09003f976de9af41fe" dependencies = [ "embedded-io", ] @@ -553,8 +554,7 @@ dependencies = [ "base64 0.13.0", "clap", "crate-git-revision", - "embedded-io", - "embedded-io-cursor", + "embedded-io-extras", "escape-bytes", "hex", "schemars", diff --git a/Cargo.toml b/Cargo.toml index 04e9d032..8b036c9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Stellar Development Foundation "] license = "Apache-2.0" version = "22.0.0" edition = "2021" -rust-version = "1.74.0" +rust-version = "1.81.0" [[bin]] name = "stellar-xdr" @@ -30,9 +30,7 @@ clap = { version = "4.2.4", default-features = false, features = ["std", "derive serde_json = { version = "1.0.89", optional = true } thiserror = { version = "1.0.37", optional = true } schemars = { version = "0.8.16", optional = true } -embedded-io = { version = "0.6.1", default-features = false, optional = true } -embedded-io-cursor = { git = "https://github.com/lightsail-network/embedded-io-cursor", rev = "0b7ff9270d7ec1d3204375650f04cb0258ac1ada", default-features = false, features = ["alloc"], optional = true } -# TODO: embedded-io-cursor not published yet. +embedded-io-extras = { version = "0.0.1", default-features = false, features = ["alloc"], optional = true } [dev-dependencies] serde_json = "1.0.89" @@ -40,7 +38,7 @@ serde_json = "1.0.89" [features] default = ["std", "curr"] std = ["alloc"] -alloc = ["dep:hex", "dep:stellar-strkey", "dep:embedded-io", "dep:embedded-io-cursor", "escape-bytes/alloc", "hex/alloc"] +alloc = ["dep:hex", "dep:stellar-strkey", "dep:embedded-io-extras", "escape-bytes/alloc", "hex/alloc"] curr = [] next = [] diff --git a/Makefile b/Makefile index e84da7be..40467731 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CARGO_HACK_ARGS=--feature-powerset --exclude-features default --group-features b CARGO_DOC_ARGS?=--open # TODO: Update this after https://github.com/stellar/xdrgen/pull/205 is merged -XDRGEN_VERSION=ecf547f1bca98545378e55c7e55aa0ef3cf4e66a +XDRGEN_VERSION=3bac661688af0615a7192271b79ced8cd30e9dd4 # XDRGEN_LOCAL=1 XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId diff --git a/src/curr/generated.rs b/src/curr/generated.rs index eceae393..6136d639 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -109,9 +109,7 @@ use std::{ }; #[cfg(all(not(feature = "std"), feature = "alloc"))] -use embedded_io::{Error as _, ErrorType, Read, Write}; -#[cfg(all(not(feature = "std"), feature = "alloc"))] -use embedded_io_cursor::Cursor; +use embedded_io_extras::{Cursor, Error as _, ErrorType, Read, Write}; /// Error contains all errors returned by functions in this crate. It can be /// compared via `PartialEq`, however any contained IO errors will only be @@ -129,7 +127,7 @@ pub enum Error { #[cfg(feature = "std")] Io(io::Error), #[cfg(all(not(feature = "std"), feature = "alloc"))] - Io(embedded_io::ErrorKind), + Io(embedded_io_extras::ErrorKind), DepthLimitExceeded, #[cfg(feature = "serde_json")] Json(serde_json::Error), @@ -154,21 +152,23 @@ impl PartialEq for Error { } #[cfg(all(not(feature = "std"), feature = "alloc"))] -impl embedded_io::Error for Error { - fn kind(&self) -> embedded_io::ErrorKind { +impl embedded_io_extras::Error for Error { + fn kind(&self) -> embedded_io_extras::ErrorKind { match self { Self::Io(e) => *e, - _ => embedded_io::ErrorKind::Other, + _ => embedded_io_extras::ErrorKind::Other, } } } #[cfg(all(not(feature = "std"), feature = "alloc"))] -impl From> for Error { - fn from(value: embedded_io::ReadExactError) -> Self { +impl From> for Error { + fn from(value: embedded_io_extras::ReadExactError) -> Self { match value { - embedded_io::ReadExactError::UnexpectedEof => Error::Io(embedded_io::ErrorKind::Other), - embedded_io::ReadExactError::Other(e) => e, + embedded_io_extras::ReadExactError::UnexpectedEof => { + Error::Io(embedded_io_extras::ErrorKind::Other) + } + embedded_io_extras::ReadExactError::Other(e) => e, } } } diff --git a/src/next/generated.rs b/src/next/generated.rs index 854ebaf4..f226e787 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -109,9 +109,7 @@ use std::{ }; #[cfg(all(not(feature = "std"), feature = "alloc"))] -use embedded_io::{Error as _, ErrorType, Read, Write}; -#[cfg(all(not(feature = "std"), feature = "alloc"))] -use embedded_io_cursor::Cursor; +use embedded_io_extras::{Cursor, Error as _, ErrorType, Read, Write}; /// Error contains all errors returned by functions in this crate. It can be /// compared via `PartialEq`, however any contained IO errors will only be @@ -129,7 +127,7 @@ pub enum Error { #[cfg(feature = "std")] Io(io::Error), #[cfg(all(not(feature = "std"), feature = "alloc"))] - Io(embedded_io::ErrorKind), + Io(embedded_io_extras::ErrorKind), DepthLimitExceeded, #[cfg(feature = "serde_json")] Json(serde_json::Error), @@ -154,21 +152,23 @@ impl PartialEq for Error { } #[cfg(all(not(feature = "std"), feature = "alloc"))] -impl embedded_io::Error for Error { - fn kind(&self) -> embedded_io::ErrorKind { +impl embedded_io_extras::Error for Error { + fn kind(&self) -> embedded_io_extras::ErrorKind { match self { Self::Io(e) => *e, - _ => embedded_io::ErrorKind::Other, + _ => embedded_io_extras::ErrorKind::Other, } } } #[cfg(all(not(feature = "std"), feature = "alloc"))] -impl From> for Error { - fn from(value: embedded_io::ReadExactError) -> Self { +impl From> for Error { + fn from(value: embedded_io_extras::ReadExactError) -> Self { match value { - embedded_io::ReadExactError::UnexpectedEof => Error::Io(embedded_io::ErrorKind::Other), - embedded_io::ReadExactError::Other(e) => e, + embedded_io_extras::ReadExactError::UnexpectedEof => { + Error::Io(embedded_io_extras::ErrorKind::Other) + } + embedded_io_extras::ReadExactError::Other(e) => e, } } } From 27e63d446f51d446be0457b22e0e57b4aa8141ec Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Thu, 12 Sep 2024 15:02:20 +0800 Subject: [PATCH 03/14] update README.md --- README.md | 4 ++-- src/lib.rs | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 24b5395c..512ee130 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ decode), and is the default feature set. 2. `alloc` – The alloc feature uses `Box` and `Vec` types for recursive references and arrays, and is automatically enabled if the std feature is enabled. The default global allocator is used. Support for a custom -allocator will be added in [#39]. Encode or decode capability exists, -but still in an experimental stage, there may be breaking changes at any time. +allocator will be added in [#39]. Encode or decode capability exists, but +still in an experimental stage, there may be breaking changes at any time. 3. If std or alloc are not enabled recursive and array types requires static lifetime values. No encode or decode capability exists. Encode and decode capability will be added in [#47]. diff --git a/src/lib.rs b/src/lib.rs index 60583ea1..e4742606 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,14 +38,13 @@ //! 2. `alloc` – The alloc feature uses `Box` and `Vec` types for recursive //! references and arrays, and is automatically enabled if the std feature is //! enabled. The default global allocator is used. Support for a custom -//! allocator will be added in [#39]. No encode or decode capability exists, -//! only types. Encode and decode capability will be added in [#46]. +//! allocator will be added in [#39]. Encode or decode capability exists, but +//! still in an experimental stage, there may be breaking changes at any time. //! 3. If std or alloc are not enabled recursive and array types requires static //! lifetime values. No encode or decode capability exists. Encode and decode //! capability will be added in [#47]. //! //! [#39]: https://github.com/stellar/rs-stellar-xdr/issues/39 -//! [#46]: https://github.com/stellar/rs-stellar-xdr/issues/46 //! [#47]: https://github.com/stellar/rs-stellar-xdr/issues/47 //! //! Ancillary functionality: From 25eaa79cb2b96fdf73f4d5fcf492f13ecd2a9dc1 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Thu, 12 Sep 2024 15:33:43 +0800 Subject: [PATCH 04/14] Make clippy happy --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e4742606..5b59acbe 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,8 @@ // auto-generated docs. #![allow(clippy::tabs_in_doc_comments)] #![allow(clippy::doc_markdown)] - +// TODO: Make clippy happy +#![allow(clippy::doc_lazy_continuation)] //! Library and CLI containing types and functionality for working with Stellar //! XDR. //! From 6e4735cdde03134d31fad5e76eafbc7e304062f6 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Thu, 12 Sep 2024 16:02:47 +0800 Subject: [PATCH 05/14] clippy::needless_question_mark --- Makefile | 2 +- src/curr/generated.rs | 6 +++++- src/next/generated.rs | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 40467731..1a9d5311 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CARGO_HACK_ARGS=--feature-powerset --exclude-features default --group-features b CARGO_DOC_ARGS?=--open # TODO: Update this after https://github.com/stellar/xdrgen/pull/205 is merged -XDRGEN_VERSION=3bac661688af0615a7192271b79ced8cd30e9dd4 +XDRGEN_VERSION=4b8eb266204b26be267f8e420808f9b1af8df98e # XDRGEN_LOCAL=1 XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 6136d639..e0182b9c 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -12,7 +12,11 @@ // xdr/curr/Stellar-transaction.x // xdr/curr/Stellar-types.x -#![allow(clippy::missing_errors_doc, clippy::unreadable_literal)] +#![allow( + clippy::missing_errors_doc, + clippy::unreadable_literal, + clippy::needless_question_mark +)] /// `XDR_FILES_SHA256` is a list of pairs of source files and their SHA256 hashes. pub const XDR_FILES_SHA256: [(&str, &str); 12] = [ diff --git a/src/next/generated.rs b/src/next/generated.rs index f226e787..7a60a41d 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -12,7 +12,11 @@ // xdr/next/Stellar-transaction.x // xdr/next/Stellar-types.x -#![allow(clippy::missing_errors_doc, clippy::unreadable_literal)] +#![allow( + clippy::missing_errors_doc, + clippy::unreadable_literal, + clippy::needless_question_mark +)] /// `XDR_FILES_SHA256` is a list of pairs of source files and their SHA256 hashes. pub const XDR_FILES_SHA256: [(&str, &str); 12] = [ From 67759216f1f2c494935e35e6f266e6f362cd37c6 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Thu, 12 Sep 2024 16:15:39 +0800 Subject: [PATCH 06/14] update XDRGEN_VERSION --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1a9d5311..f205b272 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CARGO_HACK_ARGS=--feature-powerset --exclude-features default --group-features b CARGO_DOC_ARGS?=--open # TODO: Update this after https://github.com/stellar/xdrgen/pull/205 is merged -XDRGEN_VERSION=4b8eb266204b26be267f8e420808f9b1af8df98e +XDRGEN_VERSION=c63cda9c87779e9ddd9be343b8fcac24117a8f22 # XDRGEN_LOCAL=1 XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId From 23edd62bcac9ef5d5ed75cf974cb4cbfedf0d7b3 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Sat, 21 Sep 2024 10:53:15 +0800 Subject: [PATCH 07/14] regenerate XDR --- Cargo.lock | 4 +- Cargo.toml | 5 +- Makefile | 2 +- src/curr/generated.rs | 2154 ++++++++++++++++++++++------------------ src/next/generated.rs | 2170 ++++++++++++++++++++++------------------- 5 files changed, 2382 insertions(+), 1953 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 399ccf6b..e3cd6e12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -258,9 +258,9 @@ checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" [[package]] name = "embedded-io-extras" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c151a27502f81447537f6dd1a11fe1162b66ebd4a27da09003f976de9af41fe" +checksum = "c2f31813223d8ced7a76dcd83823400f0c40c0390439fa6467f6edcd67b2a036" dependencies = [ "embedded-io", ] diff --git a/Cargo.toml b/Cargo.toml index 8b036c9a..232512cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,7 +30,7 @@ clap = { version = "4.2.4", default-features = false, features = ["std", "derive serde_json = { version = "1.0.89", optional = true } thiserror = { version = "1.0.37", optional = true } schemars = { version = "0.8.16", optional = true } -embedded-io-extras = { version = "0.0.1", default-features = false, features = ["alloc"], optional = true } +embedded-io-extras = { version = "0.0.2", default-features = false, optional = true } [dev-dependencies] serde_json = "1.0.89" @@ -38,7 +38,8 @@ serde_json = "1.0.89" [features] default = ["std", "curr"] std = ["alloc"] -alloc = ["dep:hex", "dep:stellar-strkey", "dep:embedded-io-extras", "escape-bytes/alloc", "hex/alloc"] +embedded_io = ["alloc", "dep:embedded-io-extras"] +alloc = ["dep:hex", "dep:stellar-strkey", "escape-bytes/alloc", "hex/alloc", "embedded-io-extras/alloc"] curr = [] next = [] diff --git a/Makefile b/Makefile index f205b272..a9799097 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CARGO_HACK_ARGS=--feature-powerset --exclude-features default --group-features b CARGO_DOC_ARGS?=--open # TODO: Update this after https://github.com/stellar/xdrgen/pull/205 is merged -XDRGEN_VERSION=c63cda9c87779e9ddd9be343b8fcac24117a8f22 +XDRGEN_VERSION=d7b6f935e7c026901a7d9958e5700a8caca344f8 # XDRGEN_LOCAL=1 XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId diff --git a/src/curr/generated.rs b/src/curr/generated.rs index e0182b9c..62d3baa9 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -112,7 +112,7 @@ use std::{ io::{BufRead, BufReader, Cursor, Read, Write}, }; -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] use embedded_io_extras::{Cursor, Error as _, ErrorType, Read, Write}; /// Error contains all errors returned by functions in this crate. It can be @@ -130,7 +130,7 @@ pub enum Error { InvalidHex, #[cfg(feature = "std")] Io(io::Error), - #[cfg(all(not(feature = "std"), feature = "alloc"))] + #[cfg(feature = "embedded_io")] Io(embedded_io_extras::ErrorKind), DepthLimitExceeded, #[cfg(feature = "serde_json")] @@ -148,14 +148,14 @@ impl PartialEq for Error { // case for comparing errors outputted by the XDR library is for // error case testing, and a lack of the ability to compare has a // detrimental affect on failure testing, so this is a tradeoff. - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] (Self::Io(l), Self::Io(r)) => l.kind() == r.kind(), _ => core::mem::discriminant(self) == core::mem::discriminant(other), } } } -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl embedded_io_extras::Error for Error { fn kind(&self) -> embedded_io_extras::ErrorKind { match self { @@ -165,10 +165,11 @@ impl embedded_io_extras::Error for Error { } } -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl From> for Error { fn from(value: embedded_io_extras::ReadExactError) -> Self { match value { + // TODO: maybe we should map the error to a more specific error? embedded_io_extras::ReadExactError::UnexpectedEof => { Error::Io(embedded_io_extras::ErrorKind::Other) } @@ -203,7 +204,7 @@ impl fmt::Display for Error { Error::InvalidHex => write!(f, "hex invalid"), #[cfg(feature = "std")] Error::Io(e) => write!(f, "{e}"), - #[cfg(all(not(feature = "std"), feature = "alloc"))] + #[cfg(feature = "embedded_io")] Error::Io(_) => write!(f, "io error"), Error::DepthLimitExceeded => write!(f, "depth limit exceeded"), #[cfg(feature = "serde_json")] @@ -257,7 +258,7 @@ impl From for () { #[allow(dead_code)] type Result = core::result::Result; -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl ErrorType for Limited { type Error = Error; } @@ -295,7 +296,7 @@ where /// `Limits` contains the limits that a limited reader or writer will be /// constrained to. -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] #[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Limits { /// Defines the maximum depth for recursive calls in `Read/WriteXdr` to @@ -312,7 +313,7 @@ pub struct Limits { pub len: usize, } -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] impl Limits { #[must_use] pub fn none() -> Self { @@ -343,13 +344,13 @@ impl Limits { /// /// Intended for use with readers and writers and limiting their reads and /// writes. -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] pub struct Limited { pub inner: L, pub(crate) limits: Limits, } -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] impl Limited { /// Constructs a new `Limited`. /// @@ -402,7 +403,7 @@ impl Read for Limited { } } -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl Read for Limited { /// Forwards the read operation to the wrapped object. fn read(&mut self, buf: &mut [u8]) -> core::result::Result { @@ -436,7 +437,7 @@ impl Write for Limited { } } -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl Write for Limited { /// Forwards the write operation to the wrapped object. fn write(&mut self, buf: &[u8]) -> core::result::Result { @@ -521,7 +522,7 @@ where /// /// Use [`ReadXdR: Read_xdr_to_end`] when the intent is for all bytes in the /// read implementation to be consumed by the read. - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result; /// Construct the type from the XDR bytes base64 encoded. @@ -556,7 +557,7 @@ where /// /// All implementations should continue if the read implementation returns /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr_to_end(r: &mut Limited) -> Result { let s = Self::read_xdr(r)?; // Check that any further reads, such as this read of one byte, read no @@ -596,7 +597,7 @@ where /// /// Use [`ReadXdR: Read_xdr_into_to_end`] when the intent is for all bytes /// in the read implementation to be consumed by the read. - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr_into(&mut self, r: &mut Limited) -> Result<()> { *self = Self::read_xdr(r)?; Ok(()) @@ -620,7 +621,7 @@ where /// /// All implementations should continue if the read implementation returns /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr_into_to_end(&mut self, r: &mut Limited) -> Result<()> { Self::read_xdr_into(self, r)?; // Check that any further reads, such as this read of one byte, read no @@ -669,7 +670,7 @@ where /// /// An error is returned if the bytes are not completely consumed by the /// deserialization. - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn from_xdr(bytes: impl AsRef<[u8]>, limits: Limits) -> Result { let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); let t = Self::read_xdr_to_end(&mut cursor)?; @@ -693,10 +694,10 @@ where } pub trait WriteXdr { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()>; - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn to_xdr(&self, limits: Limits) -> Result> { let mut cursor = Limited::new(Cursor::new(vec![]), limits); self.write_xdr(&mut cursor)?; @@ -718,13 +719,13 @@ pub trait WriteXdr { /// `Pad_len` returns the number of bytes to pad an XDR value of the given /// length to make the final serialized size a multiple of 4. -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] fn pad_len(len: usize) -> usize { (4 - (len % 4)) % 4 } impl ReadXdr for i32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 4]; r.with_limited_depth(|r| { @@ -736,7 +737,7 @@ impl ReadXdr for i32 { } impl WriteXdr for i32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 4] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -747,7 +748,7 @@ impl WriteXdr for i32 { } impl ReadXdr for u32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 4]; r.with_limited_depth(|r| { @@ -759,7 +760,7 @@ impl ReadXdr for u32 { } impl WriteXdr for u32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 4] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -770,7 +771,7 @@ impl WriteXdr for u32 { } impl ReadXdr for i64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 8]; r.with_limited_depth(|r| { @@ -782,7 +783,7 @@ impl ReadXdr for i64 { } impl WriteXdr for i64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 8] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -793,7 +794,7 @@ impl WriteXdr for i64 { } impl ReadXdr for u64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 8]; r.with_limited_depth(|r| { @@ -805,7 +806,7 @@ impl ReadXdr for u64 { } impl WriteXdr for u64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 8] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -816,35 +817,35 @@ impl WriteXdr for u64 { } impl ReadXdr for f32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(_r: &mut Limited) -> Result { todo!() } } impl WriteXdr for f32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { todo!() } } impl ReadXdr for f64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(_r: &mut Limited) -> Result { todo!() } } impl WriteXdr for f64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { todo!() } } impl ReadXdr for bool { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u32::read_xdr(r)?; @@ -855,7 +856,7 @@ impl ReadXdr for bool { } impl WriteXdr for bool { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i = u32::from(*self); // true = 1, false = 0 @@ -865,7 +866,7 @@ impl WriteXdr for bool { } impl ReadXdr for Option { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u32::read_xdr(r)?; @@ -882,7 +883,7 @@ impl ReadXdr for Option { } impl WriteXdr for Option { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { if let Some(t) = self { @@ -897,35 +898,35 @@ impl WriteXdr for Option { } impl ReadXdr for Box { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| Ok(Box::new(T::read_xdr(r)?))) } } impl WriteXdr for Box { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| T::write_xdr(self, w)) } } impl ReadXdr for () { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(_r: &mut Limited) -> Result { Ok(()) } } impl WriteXdr for () { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { Ok(()) } } impl ReadXdr for [u8; N] { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { r.consume_len(N)?; @@ -944,7 +945,7 @@ impl ReadXdr for [u8; N] { } impl WriteXdr for [u8; N] { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { w.consume_len(N)?; @@ -958,7 +959,7 @@ impl WriteXdr for [u8; N] { } impl ReadXdr for [T; N] { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let mut vec = Vec::with_capacity(N); @@ -973,7 +974,7 @@ impl ReadXdr for [T; N] { } impl WriteXdr for [T; N] { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { for t in self { @@ -1332,7 +1333,7 @@ impl<'a, const MAX: u32> TryFrom<&'a VecM> for &'a str { } impl ReadXdr for VecM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -1359,7 +1360,7 @@ impl ReadXdr for VecM { } impl WriteXdr for VecM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -1379,7 +1380,7 @@ impl WriteXdr for VecM { } impl ReadXdr for VecM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len = u32::read_xdr(r)?; @@ -1399,7 +1400,7 @@ impl ReadXdr for VecM { } impl WriteXdr for VecM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -1772,7 +1773,7 @@ impl<'a, const MAX: u32> TryFrom<&'a BytesM> for &'a str { } impl ReadXdr for BytesM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -1799,7 +1800,7 @@ impl ReadXdr for BytesM { } impl WriteXdr for BytesM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -2175,7 +2176,7 @@ impl<'a, const MAX: u32> TryFrom<&'a StringM> for &'a str { } impl ReadXdr for StringM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -2202,7 +2203,7 @@ impl ReadXdr for StringM { } impl WriteXdr for StringM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -2248,7 +2249,7 @@ impl ReadXdr for Frame where T: ReadXdr, { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { // Read the frame header value that contains 1 flag-bit and a 33-bit length. // - The 1 flag bit is 0 when there are more frames for the same record. @@ -2268,7 +2269,7 @@ where } } -#[cfg(all(test, feature = "alloc"))] +#[cfg(all(test, any(feature = "std", feature = "embedded_io")))] mod tests { use super::*; @@ -2378,7 +2379,7 @@ mod tests { } } -#[cfg(all(test, feature = "alloc"))] +#[cfg(all(test, any(feature = "std", feature = "embedded_io")))] mod test { use super::*; @@ -2891,6 +2892,219 @@ mod test { } } +#[cfg(all(test, any(feature = "std", feature = "embedded_io")))] +mod test_io { + // We will use different IO libraries according to the feature, + // we hope the selected IO library can work as expected + + use super::*; + + #[test] + fn test_read_exact_success() { + let data = b"The quick brown fox jumps over the lazy dog."; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 19]; // Exactly the length of "The quick brown fox" + + // Attempt to read exactly 19 bytes + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"The quick brown fox"); + assert_eq!(cursor.position(), 19); + } + + #[test] + fn test_read_exact_less_than_available() { + let data = b"Hello, Rust!"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 5]; + + // Attempt to read 5 bytes from the start + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"Hello"); + assert_eq!(cursor.position(), 5); + } + + #[test] + fn test_read_exact_exact_eof() { + let data = b"Data"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 4]; + + // Attempt to read exactly 4 bytes, which is the entire buffer + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"Data"); + assert_eq!(cursor.position(), 4); + + // Further attempt to read should fail with EOF + let mut buffer_eof = [0u8; 1]; + let result = cursor.read_exact(&mut buffer_eof); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + assert_eq!(cursor.position(), 4); // Position should remain at EOF + } + + #[test] + fn test_read_exact_past_eof() { + let data = b"Short"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 10]; // Requesting more bytes than available + + // Attempt to read 10 bytes from a 5-byte buffer + let result = cursor.read_exact(&mut buffer); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + assert_eq!(cursor.position(), 5); // Position should move to EOF + } + + #[test] + fn test_read_exact_empty_buffer() { + let data = b"Non-empty"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 0]; // Zero-length buffer + + // Attempt to read zero bytes + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(cursor.position(), 0); // Position should remain unchanged + } + + #[test] + fn test_read_exact_from_empty_cursor() { + let data: &[u8] = b""; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 5]; + + // Attempt to read from an empty cursor + let result = cursor.read_exact(&mut buffer); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + assert_eq!(cursor.position(), 0); // Position remains at 0 + } + + #[test] + fn test_read_exact_multiple_reads() { + let data = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + let mut cursor = Cursor::new(data); + + let mut buffer1 = [0u8; 10]; + let mut buffer2 = [0u8; 10]; + let mut buffer3 = [0u8; 10]; // Only 6 bytes left + + // First read: 10 bytes + assert!(cursor.read_exact(&mut buffer1).is_ok()); + assert_eq!(&buffer1, b"ABCDEFGHIJ"); + assert_eq!(cursor.position(), 10); + + // Second read: 10 bytes + assert!(cursor.read_exact(&mut buffer2).is_ok()); + assert_eq!(&buffer2, b"KLMNOPQRST"); + assert_eq!(cursor.position(), 20); + + // Third read: Attempt to read 10 bytes, but only 6 are available + let result = cursor.read_exact(&mut buffer3); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + // read_exact makes no promises about the content of the buffer on error + // assert_eq!(&buffer3[..6], b"UVWXYZ"); + assert_eq!(cursor.position(), 26); // Position should be at EOF + } + + #[test] + fn test_cursor_read_exact_after_eof() { + let data = b"End"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 3]; + + // First read: read the entire buffer + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"End"); + assert_eq!(cursor.position(), 3); + + // Second read: attempt to read again, should fail + let mut buffer_eof = [0u8; 1]; + let result = cursor.read_exact(&mut buffer_eof); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + assert_eq!(cursor.position(), 3); // Position remains at EOF + } + + #[test] + fn test_slice_read_exact_success() { + let data = b"SliceReadTest"; + let mut slice = &data[..]; + let mut buffer = [0u8; 13]; // Exact length + + // Using Read trait directly on slice + assert!(slice.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"SliceReadTest"); + } + + #[test] + fn test_slice_read_exact_partial() { + let data = b"SlicePartial"; + let mut slice = &data[..]; + let mut buffer = [0u8; 20]; // Request more bytes than available + + // Using Read trait directly on slice + let result = slice.read_exact(&mut buffer); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + // read_exact makes no promises about the content of the buffer on error + } +} + /// Value is an XDR Typedef defines as: /// /// ```text @@ -2931,7 +3145,7 @@ impl AsRef for Value { } impl ReadXdr for Value { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::read_xdr(r)?; @@ -2942,7 +3156,7 @@ impl ReadXdr for Value { } impl WriteXdr for Value { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -3021,7 +3235,7 @@ pub struct ScpBallot { } impl ReadXdr for ScpBallot { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3033,7 +3247,7 @@ impl ReadXdr for ScpBallot { } impl WriteXdr for ScpBallot { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.counter.write_xdr(w)?; @@ -3142,7 +3356,7 @@ impl From for i32 { } impl ReadXdr for ScpStatementType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -3153,7 +3367,7 @@ impl ReadXdr for ScpStatementType { } impl WriteXdr for ScpStatementType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -3188,7 +3402,7 @@ pub struct ScpNomination { } impl ReadXdr for ScpNomination { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3201,7 +3415,7 @@ impl ReadXdr for ScpNomination { } impl WriteXdr for ScpNomination { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_set_hash.write_xdr(w)?; @@ -3244,7 +3458,7 @@ pub struct ScpStatementPrepare { } impl ReadXdr for ScpStatementPrepare { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3260,7 +3474,7 @@ impl ReadXdr for ScpStatementPrepare { } impl WriteXdr for ScpStatementPrepare { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_set_hash.write_xdr(w)?; @@ -3304,7 +3518,7 @@ pub struct ScpStatementConfirm { } impl ReadXdr for ScpStatementConfirm { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3319,7 +3533,7 @@ impl ReadXdr for ScpStatementConfirm { } impl WriteXdr for ScpStatementConfirm { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ballot.write_xdr(w)?; @@ -3358,7 +3572,7 @@ pub struct ScpStatementExternalize { } impl ReadXdr for ScpStatementExternalize { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3371,7 +3585,7 @@ impl ReadXdr for ScpStatementExternalize { } impl WriteXdr for ScpStatementExternalize { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.commit.write_xdr(w)?; @@ -3494,7 +3708,7 @@ impl Variants for ScpStatementPledges { impl Union for ScpStatementPledges {} impl ReadXdr for ScpStatementPledges { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScpStatementType = ::read_xdr(r)?; @@ -3515,7 +3729,7 @@ impl ReadXdr for ScpStatementPledges { } impl WriteXdr for ScpStatementPledges { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -3589,7 +3803,7 @@ pub struct ScpStatement { } impl ReadXdr for ScpStatement { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3602,7 +3816,7 @@ impl ReadXdr for ScpStatement { } impl WriteXdr for ScpStatement { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.node_id.write_xdr(w)?; @@ -3637,7 +3851,7 @@ pub struct ScpEnvelope { } impl ReadXdr for ScpEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3649,7 +3863,7 @@ impl ReadXdr for ScpEnvelope { } impl WriteXdr for ScpEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.statement.write_xdr(w)?; @@ -3685,7 +3899,7 @@ pub struct ScpQuorumSet { } impl ReadXdr for ScpQuorumSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3698,7 +3912,7 @@ impl ReadXdr for ScpQuorumSet { } impl WriteXdr for ScpQuorumSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.threshold.write_xdr(w)?; @@ -3732,7 +3946,7 @@ pub struct ConfigSettingContractExecutionLanesV0 { } impl ReadXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3743,7 +3957,7 @@ impl ReadXdr for ConfigSettingContractExecutionLanesV0 { } impl WriteXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_tx_count.write_xdr(w)?; @@ -3786,7 +4000,7 @@ pub struct ConfigSettingContractComputeV0 { } impl ReadXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3800,7 +4014,7 @@ impl ReadXdr for ConfigSettingContractComputeV0 { } impl WriteXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_instructions.write_xdr(w)?; @@ -3879,7 +4093,7 @@ pub struct ConfigSettingContractLedgerCostV0 { } impl ReadXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3904,7 +4118,7 @@ impl ReadXdr for ConfigSettingContractLedgerCostV0 { } impl WriteXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_read_ledger_entries.write_xdr(w)?; @@ -3949,7 +4163,7 @@ pub struct ConfigSettingContractHistoricalDataV0 { } impl ReadXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3960,7 +4174,7 @@ impl ReadXdr for ConfigSettingContractHistoricalDataV0 { } impl WriteXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_historical1_kb.write_xdr(w)?; @@ -3995,7 +4209,7 @@ pub struct ConfigSettingContractEventsV0 { } impl ReadXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4007,7 +4221,7 @@ impl ReadXdr for ConfigSettingContractEventsV0 { } impl WriteXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_max_contract_events_size_bytes.write_xdr(w)?; @@ -4047,7 +4261,7 @@ pub struct ConfigSettingContractBandwidthV0 { } impl ReadXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4060,7 +4274,7 @@ impl ReadXdr for ConfigSettingContractBandwidthV0 { } impl WriteXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_txs_size_bytes.write_xdr(w)?; @@ -4636,7 +4850,7 @@ impl From for i32 { } impl ReadXdr for ContractCostType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -4647,7 +4861,7 @@ impl ReadXdr for ContractCostType { } impl WriteXdr for ContractCostType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -4683,7 +4897,7 @@ pub struct ContractCostParamEntry { } impl ReadXdr for ContractCostParamEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4696,7 +4910,7 @@ impl ReadXdr for ContractCostParamEntry { } impl WriteXdr for ContractCostParamEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -4758,7 +4972,7 @@ pub struct StateArchivalSettings { } impl ReadXdr for StateArchivalSettings { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4778,7 +4992,7 @@ impl ReadXdr for StateArchivalSettings { } impl WriteXdr for StateArchivalSettings { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.max_entry_ttl.write_xdr(w)?; @@ -4821,7 +5035,7 @@ pub struct EvictionIterator { } impl ReadXdr for EvictionIterator { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4834,7 +5048,7 @@ impl ReadXdr for EvictionIterator { } impl WriteXdr for EvictionIterator { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.bucket_list_level.write_xdr(w)?; @@ -4893,7 +5107,7 @@ impl AsRef> for ContractCostParams { } impl ReadXdr for ContractCostParams { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -4904,7 +5118,7 @@ impl ReadXdr for ContractCostParams { } impl WriteXdr for ContractCostParams { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -5123,7 +5337,7 @@ impl From for i32 { } impl ReadXdr for ConfigSettingId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5134,7 +5348,7 @@ impl ReadXdr for ConfigSettingId { } impl WriteXdr for ConfigSettingId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5314,7 +5528,7 @@ impl Variants for ConfigSettingEntry { impl Union for ConfigSettingEntry {} impl ReadXdr for ConfigSettingEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ConfigSettingId = ::read_xdr(r)?; @@ -5371,7 +5585,7 @@ impl ReadXdr for ConfigSettingEntry { } impl WriteXdr for ConfigSettingEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -5479,7 +5693,7 @@ impl From for i32 { } impl ReadXdr for ScEnvMetaKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5490,7 +5704,7 @@ impl ReadXdr for ScEnvMetaKind { } impl WriteXdr for ScEnvMetaKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5522,7 +5736,7 @@ pub struct ScEnvMetaEntryInterfaceVersion { } impl ReadXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -5534,7 +5748,7 @@ impl ReadXdr for ScEnvMetaEntryInterfaceVersion { } impl WriteXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.protocol.write_xdr(w)?; @@ -5619,7 +5833,7 @@ impl Variants for ScEnvMetaEntry { impl Union for ScEnvMetaEntry {} impl ReadXdr for ScEnvMetaEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScEnvMetaKind = ::read_xdr(r)?; @@ -5639,7 +5853,7 @@ impl ReadXdr for ScEnvMetaEntry { } impl WriteXdr for ScEnvMetaEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -5676,7 +5890,7 @@ pub struct ScMetaV0 { } impl ReadXdr for ScMetaV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -5688,7 +5902,7 @@ impl ReadXdr for ScMetaV0 { } impl WriteXdr for ScMetaV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -5780,7 +5994,7 @@ impl From for i32 { } impl ReadXdr for ScMetaKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5791,7 +6005,7 @@ impl ReadXdr for ScMetaKind { } impl WriteXdr for ScMetaKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5872,7 +6086,7 @@ impl Variants for ScMetaEntry { impl Union for ScMetaEntry {} impl ReadXdr for ScMetaEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScMetaKind = ::read_xdr(r)?; @@ -5888,7 +6102,7 @@ impl ReadXdr for ScMetaEntry { } impl WriteXdr for ScMetaEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -6145,7 +6359,7 @@ impl From for i32 { } impl ReadXdr for ScSpecType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -6156,7 +6370,7 @@ impl ReadXdr for ScSpecType { } impl WriteXdr for ScSpecType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -6187,7 +6401,7 @@ pub struct ScSpecTypeOption { } impl ReadXdr for ScSpecTypeOption { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6198,7 +6412,7 @@ impl ReadXdr for ScSpecTypeOption { } impl WriteXdr for ScSpecTypeOption { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.value_type.write_xdr(w)?; @@ -6231,7 +6445,7 @@ pub struct ScSpecTypeResult { } impl ReadXdr for ScSpecTypeResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6243,7 +6457,7 @@ impl ReadXdr for ScSpecTypeResult { } impl WriteXdr for ScSpecTypeResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ok_type.write_xdr(w)?; @@ -6275,7 +6489,7 @@ pub struct ScSpecTypeVec { } impl ReadXdr for ScSpecTypeVec { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6286,7 +6500,7 @@ impl ReadXdr for ScSpecTypeVec { } impl WriteXdr for ScSpecTypeVec { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.element_type.write_xdr(w)?; @@ -6319,7 +6533,7 @@ pub struct ScSpecTypeMap { } impl ReadXdr for ScSpecTypeMap { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6331,7 +6545,7 @@ impl ReadXdr for ScSpecTypeMap { } impl WriteXdr for ScSpecTypeMap { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_type.write_xdr(w)?; @@ -6363,7 +6577,7 @@ pub struct ScSpecTypeTuple { } impl ReadXdr for ScSpecTypeTuple { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6374,7 +6588,7 @@ impl ReadXdr for ScSpecTypeTuple { } impl WriteXdr for ScSpecTypeTuple { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.value_types.write_xdr(w)?; @@ -6405,7 +6619,7 @@ pub struct ScSpecTypeBytesN { } impl ReadXdr for ScSpecTypeBytesN { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6416,7 +6630,7 @@ impl ReadXdr for ScSpecTypeBytesN { } impl WriteXdr for ScSpecTypeBytesN { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.n.write_xdr(w)?; @@ -6447,7 +6661,7 @@ pub struct ScSpecTypeUdt { } impl ReadXdr for ScSpecTypeUdt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6458,7 +6672,7 @@ impl ReadXdr for ScSpecTypeUdt { } impl WriteXdr for ScSpecTypeUdt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.name.write_xdr(w)?; @@ -6694,7 +6908,7 @@ impl Variants for ScSpecTypeDef { impl Union for ScSpecTypeDef {} impl ReadXdr for ScSpecTypeDef { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecType = ::read_xdr(r)?; @@ -6734,7 +6948,7 @@ impl ReadXdr for ScSpecTypeDef { } impl WriteXdr for ScSpecTypeDef { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -6797,7 +7011,7 @@ pub struct ScSpecUdtStructFieldV0 { } impl ReadXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6810,7 +7024,7 @@ impl ReadXdr for ScSpecUdtStructFieldV0 { } impl WriteXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6849,7 +7063,7 @@ pub struct ScSpecUdtStructV0 { } impl ReadXdr for ScSpecUdtStructV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6863,7 +7077,7 @@ impl ReadXdr for ScSpecUdtStructV0 { } impl WriteXdr for ScSpecUdtStructV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6899,7 +7113,7 @@ pub struct ScSpecUdtUnionCaseVoidV0 { } impl ReadXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6911,7 +7125,7 @@ impl ReadXdr for ScSpecUdtUnionCaseVoidV0 { } impl WriteXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6947,7 +7161,7 @@ pub struct ScSpecUdtUnionCaseTupleV0 { } impl ReadXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6960,7 +7174,7 @@ impl ReadXdr for ScSpecUdtUnionCaseTupleV0 { } impl WriteXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7060,7 +7274,7 @@ impl From for i32 { } impl ReadXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -7071,7 +7285,7 @@ impl ReadXdr for ScSpecUdtUnionCaseV0Kind { } impl WriteXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -7160,7 +7374,7 @@ impl Variants for ScSpecUdtUnionCaseV0 { impl Union for ScSpecUdtUnionCaseV0 {} impl ReadXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecUdtUnionCaseV0Kind = ::read_xdr(r)?; @@ -7181,7 +7395,7 @@ impl ReadXdr for ScSpecUdtUnionCaseV0 { } impl WriteXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -7223,7 +7437,7 @@ pub struct ScSpecUdtUnionV0 { } impl ReadXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7237,7 +7451,7 @@ impl ReadXdr for ScSpecUdtUnionV0 { } impl WriteXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7275,7 +7489,7 @@ pub struct ScSpecUdtEnumCaseV0 { } impl ReadXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7288,7 +7502,7 @@ impl ReadXdr for ScSpecUdtEnumCaseV0 { } impl WriteXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7327,7 +7541,7 @@ pub struct ScSpecUdtEnumV0 { } impl ReadXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7341,7 +7555,7 @@ impl ReadXdr for ScSpecUdtEnumV0 { } impl WriteXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7379,7 +7593,7 @@ pub struct ScSpecUdtErrorEnumCaseV0 { } impl ReadXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7392,7 +7606,7 @@ impl ReadXdr for ScSpecUdtErrorEnumCaseV0 { } impl WriteXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7431,7 +7645,7 @@ pub struct ScSpecUdtErrorEnumV0 { } impl ReadXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7445,7 +7659,7 @@ impl ReadXdr for ScSpecUdtErrorEnumV0 { } impl WriteXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7483,7 +7697,7 @@ pub struct ScSpecFunctionInputV0 { } impl ReadXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7496,7 +7710,7 @@ impl ReadXdr for ScSpecFunctionInputV0 { } impl WriteXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7535,7 +7749,7 @@ pub struct ScSpecFunctionV0 { } impl ReadXdr for ScSpecFunctionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7549,7 +7763,7 @@ impl ReadXdr for ScSpecFunctionV0 { } impl WriteXdr for ScSpecFunctionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7671,7 +7885,7 @@ impl From for i32 { } impl ReadXdr for ScSpecEntryKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -7682,7 +7896,7 @@ impl ReadXdr for ScSpecEntryKind { } impl WriteXdr for ScSpecEntryKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -7795,7 +8009,7 @@ impl Variants for ScSpecEntry { impl Union for ScSpecEntry {} impl ReadXdr for ScSpecEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecEntryKind = ::read_xdr(r)?; @@ -7817,7 +8031,7 @@ impl ReadXdr for ScSpecEntry { } impl WriteXdr for ScSpecEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -8075,7 +8289,7 @@ impl From for i32 { } impl ReadXdr for ScValType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8086,7 +8300,7 @@ impl ReadXdr for ScValType { } impl WriteXdr for ScValType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8227,7 +8441,7 @@ impl From for i32 { } impl ReadXdr for ScErrorType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8238,7 +8452,7 @@ impl ReadXdr for ScErrorType { } impl WriteXdr for ScErrorType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8387,7 +8601,7 @@ impl From for i32 { } impl ReadXdr for ScErrorCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8398,7 +8612,7 @@ impl ReadXdr for ScErrorCode { } impl WriteXdr for ScErrorCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8530,7 +8744,7 @@ impl Variants for ScError { impl Union for ScError {} impl ReadXdr for ScError { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScErrorType = ::read_xdr(r)?; @@ -8555,7 +8769,7 @@ impl ReadXdr for ScError { } impl WriteXdr for ScError { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -8600,7 +8814,7 @@ pub struct UInt128Parts { } impl ReadXdr for UInt128Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8612,7 +8826,7 @@ impl ReadXdr for UInt128Parts { } impl WriteXdr for UInt128Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi.write_xdr(w)?; @@ -8645,7 +8859,7 @@ pub struct Int128Parts { } impl ReadXdr for Int128Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8657,7 +8871,7 @@ impl ReadXdr for Int128Parts { } impl WriteXdr for Int128Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi.write_xdr(w)?; @@ -8694,7 +8908,7 @@ pub struct UInt256Parts { } impl ReadXdr for UInt256Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8708,7 +8922,7 @@ impl ReadXdr for UInt256Parts { } impl WriteXdr for UInt256Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi_hi.write_xdr(w)?; @@ -8747,7 +8961,7 @@ pub struct Int256Parts { } impl ReadXdr for Int256Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8761,7 +8975,7 @@ impl ReadXdr for Int256Parts { } impl WriteXdr for Int256Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi_hi.write_xdr(w)?; @@ -8862,7 +9076,7 @@ impl From for i32 { } impl ReadXdr for ContractExecutableType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8873,7 +9087,7 @@ impl ReadXdr for ContractExecutableType { } impl WriteXdr for ContractExecutableType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8962,7 +9176,7 @@ impl Variants for ContractExecutable { impl Union for ContractExecutable {} impl ReadXdr for ContractExecutable { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ContractExecutableType = ::read_xdr(r)?; @@ -8979,7 +9193,7 @@ impl ReadXdr for ContractExecutable { } impl WriteXdr for ContractExecutable { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -9079,7 +9293,7 @@ impl From for i32 { } impl ReadXdr for ScAddressType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -9090,7 +9304,7 @@ impl ReadXdr for ScAddressType { } impl WriteXdr for ScAddressType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -9174,7 +9388,7 @@ impl Variants for ScAddress { impl Union for ScAddress {} impl ReadXdr for ScAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScAddressType = ::read_xdr(r)?; @@ -9191,7 +9405,7 @@ impl ReadXdr for ScAddress { } impl WriteXdr for ScAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -9253,7 +9467,7 @@ impl AsRef> for ScVec { } impl ReadXdr for ScVec { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -9264,7 +9478,7 @@ impl ReadXdr for ScVec { } impl WriteXdr for ScVec { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9359,7 +9573,7 @@ impl AsRef> for ScMap { } impl ReadXdr for ScMap { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -9370,7 +9584,7 @@ impl ReadXdr for ScMap { } impl WriteXdr for ScMap { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9465,7 +9679,7 @@ impl AsRef for ScBytes { } impl ReadXdr for ScBytes { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::read_xdr(r)?; @@ -9476,7 +9690,7 @@ impl ReadXdr for ScBytes { } impl WriteXdr for ScBytes { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9571,7 +9785,7 @@ impl AsRef for ScString { } impl ReadXdr for ScString { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::read_xdr(r)?; @@ -9582,7 +9796,7 @@ impl ReadXdr for ScString { } impl WriteXdr for ScString { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9677,7 +9891,7 @@ impl AsRef> for ScSymbol { } impl ReadXdr for ScSymbol { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<32>::read_xdr(r)?; @@ -9688,7 +9902,7 @@ impl ReadXdr for ScSymbol { } impl WriteXdr for ScSymbol { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9764,7 +9978,7 @@ pub struct ScNonceKey { } impl ReadXdr for ScNonceKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -9775,7 +9989,7 @@ impl ReadXdr for ScNonceKey { } impl WriteXdr for ScNonceKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.nonce.write_xdr(w)?; @@ -9807,7 +10021,7 @@ pub struct ScContractInstance { } impl ReadXdr for ScContractInstance { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -9819,7 +10033,7 @@ impl ReadXdr for ScContractInstance { } impl WriteXdr for ScContractInstance { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.executable.write_xdr(w)?; @@ -10066,7 +10280,7 @@ impl Variants for ScVal { impl Union for ScVal {} impl ReadXdr for ScVal { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScValType = ::read_xdr(r)?; @@ -10105,7 +10319,7 @@ impl ReadXdr for ScVal { } impl WriteXdr for ScVal { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10163,7 +10377,7 @@ pub struct ScMapEntry { } impl ReadXdr for ScMapEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10175,7 +10389,7 @@ impl ReadXdr for ScMapEntry { } impl WriteXdr for ScMapEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -10262,7 +10476,7 @@ impl Variants for StoredTransactionSet { impl Union for StoredTransactionSet {} impl ReadXdr for StoredTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -10279,7 +10493,7 @@ impl ReadXdr for StoredTransactionSet { } impl WriteXdr for StoredTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10319,7 +10533,7 @@ pub struct StoredDebugTransactionSet { } impl ReadXdr for StoredDebugTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10332,7 +10546,7 @@ impl ReadXdr for StoredDebugTransactionSet { } impl WriteXdr for StoredDebugTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_set.write_xdr(w)?; @@ -10369,7 +10583,7 @@ pub struct PersistedScpStateV0 { } impl ReadXdr for PersistedScpStateV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10382,7 +10596,7 @@ impl ReadXdr for PersistedScpStateV0 { } impl WriteXdr for PersistedScpStateV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.scp_envelopes.write_xdr(w)?; @@ -10418,7 +10632,7 @@ pub struct PersistedScpStateV1 { } impl ReadXdr for PersistedScpStateV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10430,7 +10644,7 @@ impl ReadXdr for PersistedScpStateV1 { } impl WriteXdr for PersistedScpStateV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.scp_envelopes.write_xdr(w)?; @@ -10517,7 +10731,7 @@ impl Variants for PersistedScpState { impl Union for PersistedScpState {} impl ReadXdr for PersistedScpState { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -10534,7 +10748,7 @@ impl ReadXdr for PersistedScpState { } impl WriteXdr for PersistedScpState { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10645,7 +10859,7 @@ impl AsRef<[u8; 4]> for Thresholds { } impl ReadXdr for Thresholds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -10656,7 +10870,7 @@ impl ReadXdr for Thresholds { } impl WriteXdr for Thresholds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10739,7 +10953,7 @@ impl AsRef> for String32 { } impl ReadXdr for String32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<32>::read_xdr(r)?; @@ -10750,7 +10964,7 @@ impl ReadXdr for String32 { } impl WriteXdr for String32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10845,7 +11059,7 @@ impl AsRef> for String64 { } impl ReadXdr for String64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<64>::read_xdr(r)?; @@ -10856,7 +11070,7 @@ impl ReadXdr for String64 { } impl WriteXdr for String64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10950,7 +11164,7 @@ impl AsRef for SequenceNumber { } impl ReadXdr for SequenceNumber { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = i64::read_xdr(r)?; @@ -10961,7 +11175,7 @@ impl ReadXdr for SequenceNumber { } impl WriteXdr for SequenceNumber { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11007,7 +11221,7 @@ impl AsRef> for DataValue { } impl ReadXdr for DataValue { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64>::read_xdr(r)?; @@ -11018,7 +11232,7 @@ impl ReadXdr for DataValue { } impl WriteXdr for DataValue { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11112,7 +11326,7 @@ impl AsRef for PoolId { } impl ReadXdr for PoolId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = Hash::read_xdr(r)?; @@ -11123,7 +11337,7 @@ impl ReadXdr for PoolId { } impl WriteXdr for PoolId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11176,7 +11390,7 @@ impl AsRef<[u8; 4]> for AssetCode4 { } impl ReadXdr for AssetCode4 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -11187,7 +11401,7 @@ impl ReadXdr for AssetCode4 { } impl WriteXdr for AssetCode4 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11277,7 +11491,7 @@ impl AsRef<[u8; 12]> for AssetCode12 { } impl ReadXdr for AssetCode12 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 12]>::read_xdr(r)?; @@ -11288,7 +11502,7 @@ impl ReadXdr for AssetCode12 { } impl WriteXdr for AssetCode12 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11431,7 +11645,7 @@ impl From for i32 { } impl ReadXdr for AssetType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -11442,7 +11656,7 @@ impl ReadXdr for AssetType { } impl WriteXdr for AssetType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -11529,7 +11743,7 @@ impl Variants for AssetCode { impl Union for AssetCode {} impl ReadXdr for AssetCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -11546,7 +11760,7 @@ impl ReadXdr for AssetCode { } impl WriteXdr for AssetCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -11584,7 +11798,7 @@ pub struct AlphaNum4 { } impl ReadXdr for AlphaNum4 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11596,7 +11810,7 @@ impl ReadXdr for AlphaNum4 { } impl WriteXdr for AlphaNum4 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_code.write_xdr(w)?; @@ -11630,7 +11844,7 @@ pub struct AlphaNum12 { } impl ReadXdr for AlphaNum12 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11642,7 +11856,7 @@ impl ReadXdr for AlphaNum12 { } impl WriteXdr for AlphaNum12 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_code.write_xdr(w)?; @@ -11742,7 +11956,7 @@ impl Variants for Asset { impl Union for Asset {} impl ReadXdr for Asset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -11760,7 +11974,7 @@ impl ReadXdr for Asset { } impl WriteXdr for Asset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -11799,7 +12013,7 @@ pub struct Price { } impl ReadXdr for Price { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11811,7 +12025,7 @@ impl ReadXdr for Price { } impl WriteXdr for Price { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.n.write_xdr(w)?; @@ -11845,7 +12059,7 @@ pub struct Liabilities { } impl ReadXdr for Liabilities { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11857,7 +12071,7 @@ impl ReadXdr for Liabilities { } impl WriteXdr for Liabilities { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.buying.write_xdr(w)?; @@ -11966,7 +12180,7 @@ impl From for i32 { } impl ReadXdr for ThresholdIndexes { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -11977,7 +12191,7 @@ impl ReadXdr for ThresholdIndexes { } impl WriteXdr for ThresholdIndexes { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12126,7 +12340,7 @@ impl From for i32 { } impl ReadXdr for LedgerEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -12137,7 +12351,7 @@ impl ReadXdr for LedgerEntryType { } impl WriteXdr for LedgerEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12170,7 +12384,7 @@ pub struct Signer { } impl ReadXdr for Signer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12182,7 +12396,7 @@ impl ReadXdr for Signer { } impl WriteXdr for Signer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -12306,7 +12520,7 @@ impl From for i32 { } impl ReadXdr for AccountFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -12317,7 +12531,7 @@ impl ReadXdr for AccountFlags { } impl WriteXdr for AccountFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12389,7 +12603,7 @@ impl AsRef> for SponsorshipDescriptor { } impl ReadXdr for SponsorshipDescriptor { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = Option::::read_xdr(r)?; @@ -12400,7 +12614,7 @@ impl ReadXdr for SponsorshipDescriptor { } impl WriteXdr for SponsorshipDescriptor { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -12438,7 +12652,7 @@ pub struct AccountEntryExtensionV3 { } impl ReadXdr for AccountEntryExtensionV3 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12451,7 +12665,7 @@ impl ReadXdr for AccountEntryExtensionV3 { } impl WriteXdr for AccountEntryExtensionV3 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -12539,7 +12753,7 @@ impl Variants for AccountEntryExtensionV2Ext { impl Union for AccountEntryExtensionV2Ext {} impl ReadXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12556,7 +12770,7 @@ impl ReadXdr for AccountEntryExtensionV2Ext { } impl WriteXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12606,7 +12820,7 @@ pub struct AccountEntryExtensionV2 { } impl ReadXdr for AccountEntryExtensionV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12620,7 +12834,7 @@ impl ReadXdr for AccountEntryExtensionV2 { } impl WriteXdr for AccountEntryExtensionV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_sponsored.write_xdr(w)?; @@ -12709,7 +12923,7 @@ impl Variants for AccountEntryExtensionV1Ext { impl Union for AccountEntryExtensionV1Ext {} impl ReadXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12726,7 +12940,7 @@ impl ReadXdr for AccountEntryExtensionV1Ext { } impl WriteXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12772,7 +12986,7 @@ pub struct AccountEntryExtensionV1 { } impl ReadXdr for AccountEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12784,7 +12998,7 @@ impl ReadXdr for AccountEntryExtensionV1 { } impl WriteXdr for AccountEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liabilities.write_xdr(w)?; @@ -12871,7 +13085,7 @@ impl Variants for AccountEntryExt { impl Union for AccountEntryExt {} impl ReadXdr for AccountEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12888,7 +13102,7 @@ impl ReadXdr for AccountEntryExt { } impl WriteXdr for AccountEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12957,7 +13171,7 @@ pub struct AccountEntry { } impl ReadXdr for AccountEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12977,7 +13191,7 @@ impl ReadXdr for AccountEntry { } impl WriteXdr for AccountEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -13098,7 +13312,7 @@ impl From for i32 { } impl ReadXdr for TrustLineFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13109,7 +13323,7 @@ impl ReadXdr for TrustLineFlags { } impl WriteXdr for TrustLineFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -13224,7 +13438,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13235,7 +13449,7 @@ impl ReadXdr for LiquidityPoolType { } impl WriteXdr for LiquidityPoolType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -13342,7 +13556,7 @@ impl Variants for TrustLineAsset { impl Union for TrustLineAsset {} impl ReadXdr for TrustLineAsset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -13361,7 +13575,7 @@ impl ReadXdr for TrustLineAsset { } impl WriteXdr for TrustLineAsset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13449,7 +13663,7 @@ impl Variants for TrustLineEntryExtensionV2Ext { impl Union for TrustLineEntryExtensionV2Ext {} impl ReadXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13465,7 +13679,7 @@ impl ReadXdr for TrustLineEntryExtensionV2Ext { } impl WriteXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13508,7 +13722,7 @@ pub struct TrustLineEntryExtensionV2 { } impl ReadXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13520,7 +13734,7 @@ impl ReadXdr for TrustLineEntryExtensionV2 { } impl WriteXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_use_count.write_xdr(w)?; @@ -13607,7 +13821,7 @@ impl Variants for TrustLineEntryV1Ext { impl Union for TrustLineEntryV1Ext {} impl ReadXdr for TrustLineEntryV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13624,7 +13838,7 @@ impl ReadXdr for TrustLineEntryV1Ext { } impl WriteXdr for TrustLineEntryV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13670,7 +13884,7 @@ pub struct TrustLineEntryV1 { } impl ReadXdr for TrustLineEntryV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13682,7 +13896,7 @@ impl ReadXdr for TrustLineEntryV1 { } impl WriteXdr for TrustLineEntryV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liabilities.write_xdr(w)?; @@ -13781,7 +13995,7 @@ impl Variants for TrustLineEntryExt { impl Union for TrustLineEntryExt {} impl ReadXdr for TrustLineEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13798,7 +14012,7 @@ impl ReadXdr for TrustLineEntryExt { } impl WriteXdr for TrustLineEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13867,7 +14081,7 @@ pub struct TrustLineEntry { } impl ReadXdr for TrustLineEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13883,7 +14097,7 @@ impl ReadXdr for TrustLineEntry { } impl WriteXdr for TrustLineEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -13981,7 +14195,7 @@ impl From for i32 { } impl ReadXdr for OfferEntryFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13992,7 +14206,7 @@ impl ReadXdr for OfferEntryFlags { } impl WriteXdr for OfferEntryFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14081,7 +14295,7 @@ impl Variants for OfferEntryExt { impl Union for OfferEntryExt {} impl ReadXdr for OfferEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -14097,7 +14311,7 @@ impl ReadXdr for OfferEntryExt { } impl WriteXdr for OfferEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14159,7 +14373,7 @@ pub struct OfferEntry { } impl ReadXdr for OfferEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14177,7 +14391,7 @@ impl ReadXdr for OfferEntry { } impl WriteXdr for OfferEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -14265,7 +14479,7 @@ impl Variants for DataEntryExt { impl Union for DataEntryExt {} impl ReadXdr for DataEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -14281,7 +14495,7 @@ impl ReadXdr for DataEntryExt { } impl WriteXdr for DataEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14329,7 +14543,7 @@ pub struct DataEntry { } impl ReadXdr for DataEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14343,7 +14557,7 @@ impl ReadXdr for DataEntry { } impl WriteXdr for DataEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -14471,7 +14685,7 @@ impl From for i32 { } impl ReadXdr for ClaimPredicateType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14482,7 +14696,7 @@ impl ReadXdr for ClaimPredicateType { } impl WriteXdr for ClaimPredicateType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14603,7 +14817,7 @@ impl Variants for ClaimPredicate { impl Union for ClaimPredicate {} impl ReadXdr for ClaimPredicate { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimPredicateType = ::read_xdr(r)?; @@ -14628,7 +14842,7 @@ impl ReadXdr for ClaimPredicate { } impl WriteXdr for ClaimPredicate { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14728,7 +14942,7 @@ impl From for i32 { } impl ReadXdr for ClaimantType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14739,7 +14953,7 @@ impl ReadXdr for ClaimantType { } impl WriteXdr for ClaimantType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14772,7 +14986,7 @@ pub struct ClaimantV0 { } impl ReadXdr for ClaimantV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14784,7 +14998,7 @@ impl ReadXdr for ClaimantV0 { } impl WriteXdr for ClaimantV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -14870,7 +15084,7 @@ impl Variants for Claimant { impl Union for Claimant {} impl ReadXdr for Claimant { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimantType = ::read_xdr(r)?; @@ -14886,7 +15100,7 @@ impl ReadXdr for Claimant { } impl WriteXdr for Claimant { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14982,7 +15196,7 @@ impl From for i32 { } impl ReadXdr for ClaimableBalanceIdType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14993,7 +15207,7 @@ impl ReadXdr for ClaimableBalanceIdType { } impl WriteXdr for ClaimableBalanceIdType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15073,7 +15287,7 @@ impl Variants for ClaimableBalanceId { impl Union for ClaimableBalanceId {} impl ReadXdr for ClaimableBalanceId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimableBalanceIdType = ::read_xdr(r)?; @@ -15091,7 +15305,7 @@ impl ReadXdr for ClaimableBalanceId { } impl WriteXdr for ClaimableBalanceId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15189,7 +15403,7 @@ impl From for i32 { } impl ReadXdr for ClaimableBalanceFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -15200,7 +15414,7 @@ impl ReadXdr for ClaimableBalanceFlags { } impl WriteXdr for ClaimableBalanceFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15289,7 +15503,7 @@ impl Variants for ClaimableBalanceEntryExtensionV1Ext { impl Union for ClaimableBalanceEntryExtensionV1Ext {} impl ReadXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -15305,7 +15519,7 @@ impl ReadXdr for ClaimableBalanceEntryExtensionV1Ext { } impl WriteXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15348,7 +15562,7 @@ pub struct ClaimableBalanceEntryExtensionV1 { } impl ReadXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15360,7 +15574,7 @@ impl ReadXdr for ClaimableBalanceEntryExtensionV1 { } impl WriteXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -15447,7 +15661,7 @@ impl Variants for ClaimableBalanceEntryExt { impl Union for ClaimableBalanceEntryExt {} impl ReadXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -15464,7 +15678,7 @@ impl ReadXdr for ClaimableBalanceEntryExt { } impl WriteXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15524,7 +15738,7 @@ pub struct ClaimableBalanceEntry { } impl ReadXdr for ClaimableBalanceEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15539,7 +15753,7 @@ impl ReadXdr for ClaimableBalanceEntry { } impl WriteXdr for ClaimableBalanceEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -15578,7 +15792,7 @@ pub struct LiquidityPoolConstantProductParameters { } impl ReadXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15591,7 +15805,7 @@ impl ReadXdr for LiquidityPoolConstantProductParameters { } impl WriteXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_a.write_xdr(w)?; @@ -15634,7 +15848,7 @@ pub struct LiquidityPoolEntryConstantProduct { } impl ReadXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15649,7 +15863,7 @@ impl ReadXdr for LiquidityPoolEntryConstantProduct { } impl WriteXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.params.write_xdr(w)?; @@ -15745,7 +15959,7 @@ impl Variants for LiquidityPoolEntryBody { impl Union for LiquidityPoolEntryBody {} impl ReadXdr for LiquidityPoolEntryBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolType = ::read_xdr(r)?; @@ -15765,7 +15979,7 @@ impl ReadXdr for LiquidityPoolEntryBody { } impl WriteXdr for LiquidityPoolEntryBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15817,7 +16031,7 @@ pub struct LiquidityPoolEntry { } impl ReadXdr for LiquidityPoolEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15829,7 +16043,7 @@ impl ReadXdr for LiquidityPoolEntry { } impl WriteXdr for LiquidityPoolEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -15927,7 +16141,7 @@ impl From for i32 { } impl ReadXdr for ContractDataDurability { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -15938,7 +16152,7 @@ impl ReadXdr for ContractDataDurability { } impl WriteXdr for ContractDataDurability { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15977,7 +16191,7 @@ pub struct ContractDataEntry { } impl ReadXdr for ContractDataEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15992,7 +16206,7 @@ impl ReadXdr for ContractDataEntry { } impl WriteXdr for ContractDataEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16046,7 +16260,7 @@ pub struct ContractCodeCostInputs { } impl ReadXdr for ContractCodeCostInputs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16067,7 +16281,7 @@ impl ReadXdr for ContractCodeCostInputs { } impl WriteXdr for ContractCodeCostInputs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16110,7 +16324,7 @@ pub struct ContractCodeEntryV1 { } impl ReadXdr for ContractCodeEntryV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16122,7 +16336,7 @@ impl ReadXdr for ContractCodeEntryV1 { } impl WriteXdr for ContractCodeEntryV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16213,7 +16427,7 @@ impl Variants for ContractCodeEntryExt { impl Union for ContractCodeEntryExt {} impl ReadXdr for ContractCodeEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16230,7 +16444,7 @@ impl ReadXdr for ContractCodeEntryExt { } impl WriteXdr for ContractCodeEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16280,7 +16494,7 @@ pub struct ContractCodeEntry { } impl ReadXdr for ContractCodeEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16293,7 +16507,7 @@ impl ReadXdr for ContractCodeEntry { } impl WriteXdr for ContractCodeEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16328,7 +16542,7 @@ pub struct TtlEntry { } impl ReadXdr for TtlEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16340,7 +16554,7 @@ impl ReadXdr for TtlEntry { } impl WriteXdr for TtlEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_hash.write_xdr(w)?; @@ -16422,7 +16636,7 @@ impl Variants for LedgerEntryExtensionV1Ext { impl Union for LedgerEntryExtensionV1Ext {} impl ReadXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16438,7 +16652,7 @@ impl ReadXdr for LedgerEntryExtensionV1Ext { } impl WriteXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16481,7 +16695,7 @@ pub struct LedgerEntryExtensionV1 { } impl ReadXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16493,7 +16707,7 @@ impl ReadXdr for LedgerEntryExtensionV1 { } impl WriteXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sponsoring_id.write_xdr(w)?; @@ -16642,7 +16856,7 @@ impl Variants for LedgerEntryData { impl Union for LedgerEntryData {} impl ReadXdr for LedgerEntryData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryType = ::read_xdr(r)?; @@ -16677,7 +16891,7 @@ impl ReadXdr for LedgerEntryData { } impl WriteXdr for LedgerEntryData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16776,7 +16990,7 @@ impl Variants for LedgerEntryExt { impl Union for LedgerEntryExt {} impl ReadXdr for LedgerEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16793,7 +17007,7 @@ impl ReadXdr for LedgerEntryExt { } impl WriteXdr for LedgerEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16866,7 +17080,7 @@ pub struct LedgerEntry { } impl ReadXdr for LedgerEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16879,7 +17093,7 @@ impl ReadXdr for LedgerEntry { } impl WriteXdr for LedgerEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.last_modified_ledger_seq.write_xdr(w)?; @@ -16912,7 +17126,7 @@ pub struct LedgerKeyAccount { } impl ReadXdr for LedgerKeyAccount { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16923,7 +17137,7 @@ impl ReadXdr for LedgerKeyAccount { } impl WriteXdr for LedgerKeyAccount { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -16956,7 +17170,7 @@ pub struct LedgerKeyTrustLine { } impl ReadXdr for LedgerKeyTrustLine { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16968,7 +17182,7 @@ impl ReadXdr for LedgerKeyTrustLine { } impl WriteXdr for LedgerKeyTrustLine { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -17002,7 +17216,7 @@ pub struct LedgerKeyOffer { } impl ReadXdr for LedgerKeyOffer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17014,7 +17228,7 @@ impl ReadXdr for LedgerKeyOffer { } impl WriteXdr for LedgerKeyOffer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -17048,7 +17262,7 @@ pub struct LedgerKeyData { } impl ReadXdr for LedgerKeyData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17060,7 +17274,7 @@ impl ReadXdr for LedgerKeyData { } impl WriteXdr for LedgerKeyData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -17092,7 +17306,7 @@ pub struct LedgerKeyClaimableBalance { } impl ReadXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17103,7 +17317,7 @@ impl ReadXdr for LedgerKeyClaimableBalance { } impl WriteXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -17134,7 +17348,7 @@ pub struct LedgerKeyLiquidityPool { } impl ReadXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17145,7 +17359,7 @@ impl ReadXdr for LedgerKeyLiquidityPool { } impl WriteXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -17180,7 +17394,7 @@ pub struct LedgerKeyContractData { } impl ReadXdr for LedgerKeyContractData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17193,7 +17407,7 @@ impl ReadXdr for LedgerKeyContractData { } impl WriteXdr for LedgerKeyContractData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract.write_xdr(w)?; @@ -17226,7 +17440,7 @@ pub struct LedgerKeyContractCode { } impl ReadXdr for LedgerKeyContractCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17237,7 +17451,7 @@ impl ReadXdr for LedgerKeyContractCode { } impl WriteXdr for LedgerKeyContractCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hash.write_xdr(w)?; @@ -17268,7 +17482,7 @@ pub struct LedgerKeyConfigSetting { } impl ReadXdr for LedgerKeyConfigSetting { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17279,7 +17493,7 @@ impl ReadXdr for LedgerKeyConfigSetting { } impl WriteXdr for LedgerKeyConfigSetting { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.config_setting_id.write_xdr(w)?; @@ -17311,7 +17525,7 @@ pub struct LedgerKeyTtl { } impl ReadXdr for LedgerKeyTtl { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17322,7 +17536,7 @@ impl ReadXdr for LedgerKeyTtl { } impl WriteXdr for LedgerKeyTtl { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_hash.write_xdr(w)?; @@ -17511,7 +17725,7 @@ impl Variants for LedgerKey { impl Union for LedgerKey {} impl ReadXdr for LedgerKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryType = ::read_xdr(r)?; @@ -17546,7 +17760,7 @@ impl ReadXdr for LedgerKey { } impl WriteXdr for LedgerKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -17708,7 +17922,7 @@ impl From for i32 { } impl ReadXdr for EnvelopeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17719,7 +17933,7 @@ impl ReadXdr for EnvelopeType { } impl WriteXdr for EnvelopeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -17822,7 +18036,7 @@ impl From for i32 { } impl ReadXdr for BucketListType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17833,7 +18047,7 @@ impl ReadXdr for BucketListType { } impl WriteXdr for BucketListType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -17944,7 +18158,7 @@ impl From for i32 { } impl ReadXdr for BucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17955,7 +18169,7 @@ impl ReadXdr for BucketEntryType { } impl WriteXdr for BucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18065,7 +18279,7 @@ impl From for i32 { } impl ReadXdr for HotArchiveBucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -18076,7 +18290,7 @@ impl ReadXdr for HotArchiveBucketEntryType { } impl WriteXdr for HotArchiveBucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18195,7 +18409,7 @@ impl From for i32 { } impl ReadXdr for ColdArchiveBucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -18206,7 +18420,7 @@ impl ReadXdr for ColdArchiveBucketEntryType { } impl WriteXdr for ColdArchiveBucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18292,7 +18506,7 @@ impl Variants for BucketMetadataExt { impl Union for BucketMetadataExt {} impl ReadXdr for BucketMetadataExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -18309,7 +18523,7 @@ impl ReadXdr for BucketMetadataExt { } impl WriteXdr for BucketMetadataExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18357,7 +18571,7 @@ pub struct BucketMetadata { } impl ReadXdr for BucketMetadata { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18369,7 +18583,7 @@ impl ReadXdr for BucketMetadata { } impl WriteXdr for BucketMetadata { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -18472,7 +18686,7 @@ impl Variants for BucketEntry { impl Union for BucketEntry {} impl ReadXdr for BucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BucketEntryType = ::read_xdr(r)?; @@ -18491,7 +18705,7 @@ impl ReadXdr for BucketEntry { } impl WriteXdr for BucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18599,7 +18813,7 @@ impl Variants for HotArchiveBucketEntry { impl Union for HotArchiveBucketEntry {} impl ReadXdr for HotArchiveBucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: HotArchiveBucketEntryType = @@ -18621,7 +18835,7 @@ impl ReadXdr for HotArchiveBucketEntry { } impl WriteXdr for HotArchiveBucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18661,7 +18875,7 @@ pub struct ColdArchiveArchivedLeaf { } impl ReadXdr for ColdArchiveArchivedLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18673,7 +18887,7 @@ impl ReadXdr for ColdArchiveArchivedLeaf { } impl WriteXdr for ColdArchiveArchivedLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18707,7 +18921,7 @@ pub struct ColdArchiveDeletedLeaf { } impl ReadXdr for ColdArchiveDeletedLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18719,7 +18933,7 @@ impl ReadXdr for ColdArchiveDeletedLeaf { } impl WriteXdr for ColdArchiveDeletedLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18753,7 +18967,7 @@ pub struct ColdArchiveBoundaryLeaf { } impl ReadXdr for ColdArchiveBoundaryLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18765,7 +18979,7 @@ impl ReadXdr for ColdArchiveBoundaryLeaf { } impl WriteXdr for ColdArchiveBoundaryLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18801,7 +19015,7 @@ pub struct ColdArchiveHashEntry { } impl ReadXdr for ColdArchiveHashEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18814,7 +19028,7 @@ impl ReadXdr for ColdArchiveHashEntry { } impl WriteXdr for ColdArchiveHashEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18929,7 +19143,7 @@ impl Variants for ColdArchiveBucketEntry { impl Union for ColdArchiveBucketEntry {} impl ReadXdr for ColdArchiveBucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ColdArchiveBucketEntryType = @@ -18958,7 +19172,7 @@ impl ReadXdr for ColdArchiveBucketEntry { } impl WriteXdr for ColdArchiveBucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19015,7 +19229,7 @@ impl AsRef> for UpgradeType { } impl ReadXdr for UpgradeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<128>::read_xdr(r)?; @@ -19026,7 +19240,7 @@ impl ReadXdr for UpgradeType { } impl WriteXdr for UpgradeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -19167,7 +19381,7 @@ impl From for i32 { } impl ReadXdr for StellarValueType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -19178,7 +19392,7 @@ impl ReadXdr for StellarValueType { } impl WriteXdr for StellarValueType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -19211,7 +19425,7 @@ pub struct LedgerCloseValueSignature { } impl ReadXdr for LedgerCloseValueSignature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19223,7 +19437,7 @@ impl ReadXdr for LedgerCloseValueSignature { } impl WriteXdr for LedgerCloseValueSignature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.node_id.write_xdr(w)?; @@ -19310,7 +19524,7 @@ impl Variants for StellarValueExt { impl Union for StellarValueExt {} impl ReadXdr for StellarValueExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: StellarValueType = ::read_xdr(r)?; @@ -19327,7 +19541,7 @@ impl ReadXdr for StellarValueExt { } impl WriteXdr for StellarValueExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19384,7 +19598,7 @@ pub struct StellarValue { } impl ReadXdr for StellarValue { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19398,7 +19612,7 @@ impl ReadXdr for StellarValue { } impl WriteXdr for StellarValue { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_set_hash.write_xdr(w)?; @@ -19512,7 +19726,7 @@ impl From for i32 { } impl ReadXdr for LedgerHeaderFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -19523,7 +19737,7 @@ impl ReadXdr for LedgerHeaderFlags { } impl WriteXdr for LedgerHeaderFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -19604,7 +19818,7 @@ impl Variants for LedgerHeaderExtensionV1Ext { impl Union for LedgerHeaderExtensionV1Ext {} impl ReadXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -19620,7 +19834,7 @@ impl ReadXdr for LedgerHeaderExtensionV1Ext { } impl WriteXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19663,7 +19877,7 @@ pub struct LedgerHeaderExtensionV1 { } impl ReadXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19675,7 +19889,7 @@ impl ReadXdr for LedgerHeaderExtensionV1 { } impl WriteXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.flags.write_xdr(w)?; @@ -19762,7 +19976,7 @@ impl Variants for LedgerHeaderExt { impl Union for LedgerHeaderExt {} impl ReadXdr for LedgerHeaderExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -19779,7 +19993,7 @@ impl ReadXdr for LedgerHeaderExt { } impl WriteXdr for LedgerHeaderExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19864,7 +20078,7 @@ pub struct LedgerHeader { } impl ReadXdr for LedgerHeader { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19889,7 +20103,7 @@ impl ReadXdr for LedgerHeader { } impl WriteXdr for LedgerHeader { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -20034,7 +20248,7 @@ impl From for i32 { } impl ReadXdr for LedgerUpgradeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -20045,7 +20259,7 @@ impl ReadXdr for LedgerUpgradeType { } impl WriteXdr for LedgerUpgradeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -20077,7 +20291,7 @@ pub struct ConfigUpgradeSetKey { } impl ReadXdr for ConfigUpgradeSetKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20089,7 +20303,7 @@ impl ReadXdr for ConfigUpgradeSetKey { } impl WriteXdr for ConfigUpgradeSetKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id.write_xdr(w)?; @@ -20220,7 +20434,7 @@ impl Variants for LedgerUpgrade { impl Union for LedgerUpgrade {} impl ReadXdr for LedgerUpgrade { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerUpgradeType = ::read_xdr(r)?; @@ -20244,7 +20458,7 @@ impl ReadXdr for LedgerUpgrade { } impl WriteXdr for LedgerUpgrade { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20284,7 +20498,7 @@ pub struct ConfigUpgradeSet { } impl ReadXdr for ConfigUpgradeSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20295,7 +20509,7 @@ impl ReadXdr for ConfigUpgradeSet { } impl WriteXdr for ConfigUpgradeSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.updated_entry.write_xdr(w)?; @@ -20389,7 +20603,7 @@ impl From for i32 { } impl ReadXdr for TxSetComponentType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -20400,7 +20614,7 @@ impl ReadXdr for TxSetComponentType { } impl WriteXdr for TxSetComponentType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -20433,7 +20647,7 @@ pub struct TxSetComponentTxsMaybeDiscountedFee { } impl ReadXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20445,7 +20659,7 @@ impl ReadXdr for TxSetComponentTxsMaybeDiscountedFee { } impl WriteXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.base_fee.write_xdr(w)?; @@ -20534,7 +20748,7 @@ impl Variants for TxSetComponent { impl Union for TxSetComponent {} impl ReadXdr for TxSetComponent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TxSetComponentType = ::read_xdr(r)?; @@ -20554,7 +20768,7 @@ impl ReadXdr for TxSetComponent { } impl WriteXdr for TxSetComponent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20639,7 +20853,7 @@ impl Variants for TransactionPhase { impl Union for TransactionPhase {} impl ReadXdr for TransactionPhase { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -20655,7 +20869,7 @@ impl ReadXdr for TransactionPhase { } impl WriteXdr for TransactionPhase { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20692,7 +20906,7 @@ pub struct TransactionSet { } impl ReadXdr for TransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20704,7 +20918,7 @@ impl ReadXdr for TransactionSet { } impl WriteXdr for TransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.previous_ledger_hash.write_xdr(w)?; @@ -20738,7 +20952,7 @@ pub struct TransactionSetV1 { } impl ReadXdr for TransactionSetV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20750,7 +20964,7 @@ impl ReadXdr for TransactionSetV1 { } impl WriteXdr for TransactionSetV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.previous_ledger_hash.write_xdr(w)?; @@ -20833,7 +21047,7 @@ impl Variants for GeneralizedTransactionSet { impl Union for GeneralizedTransactionSet {} impl ReadXdr for GeneralizedTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -20849,7 +21063,7 @@ impl ReadXdr for GeneralizedTransactionSet { } impl WriteXdr for GeneralizedTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20886,7 +21100,7 @@ pub struct TransactionResultPair { } impl ReadXdr for TransactionResultPair { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20898,7 +21112,7 @@ impl ReadXdr for TransactionResultPair { } impl WriteXdr for TransactionResultPair { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.transaction_hash.write_xdr(w)?; @@ -20930,7 +21144,7 @@ pub struct TransactionResultSet { } impl ReadXdr for TransactionResultSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20941,7 +21155,7 @@ impl ReadXdr for TransactionResultSet { } impl WriteXdr for TransactionResultSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.results.write_xdr(w)?; @@ -21027,7 +21241,7 @@ impl Variants for TransactionHistoryEntryExt { impl Union for TransactionHistoryEntryExt {} impl ReadXdr for TransactionHistoryEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21044,7 +21258,7 @@ impl ReadXdr for TransactionHistoryEntryExt { } impl WriteXdr for TransactionHistoryEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21093,7 +21307,7 @@ pub struct TransactionHistoryEntry { } impl ReadXdr for TransactionHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21106,7 +21320,7 @@ impl ReadXdr for TransactionHistoryEntry { } impl WriteXdr for TransactionHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21189,7 +21403,7 @@ impl Variants for TransactionHistoryResultEntryExt { impl Union for TransactionHistoryResultEntryExt {} impl ReadXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21205,7 +21419,7 @@ impl ReadXdr for TransactionHistoryResultEntryExt { } impl WriteXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21251,7 +21465,7 @@ pub struct TransactionHistoryResultEntry { } impl ReadXdr for TransactionHistoryResultEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21264,7 +21478,7 @@ impl ReadXdr for TransactionHistoryResultEntry { } impl WriteXdr for TransactionHistoryResultEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21347,7 +21561,7 @@ impl Variants for LedgerHeaderHistoryEntryExt { impl Union for LedgerHeaderHistoryEntryExt {} impl ReadXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21363,7 +21577,7 @@ impl ReadXdr for LedgerHeaderHistoryEntryExt { } impl WriteXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21409,7 +21623,7 @@ pub struct LedgerHeaderHistoryEntry { } impl ReadXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21422,7 +21636,7 @@ impl ReadXdr for LedgerHeaderHistoryEntry { } impl WriteXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hash.write_xdr(w)?; @@ -21457,7 +21671,7 @@ pub struct LedgerScpMessages { } impl ReadXdr for LedgerScpMessages { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21469,7 +21683,7 @@ impl ReadXdr for LedgerScpMessages { } impl WriteXdr for LedgerScpMessages { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21503,7 +21717,7 @@ pub struct ScpHistoryEntryV0 { } impl ReadXdr for ScpHistoryEntryV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21515,7 +21729,7 @@ impl ReadXdr for ScpHistoryEntryV0 { } impl WriteXdr for ScpHistoryEntryV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_sets.write_xdr(w)?; @@ -21597,7 +21811,7 @@ impl Variants for ScpHistoryEntry { impl Union for ScpHistoryEntry {} impl ReadXdr for ScpHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21613,7 +21827,7 @@ impl ReadXdr for ScpHistoryEntry { } impl WriteXdr for ScpHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21725,7 +21939,7 @@ impl From for i32 { } impl ReadXdr for LedgerEntryChangeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -21736,7 +21950,7 @@ impl ReadXdr for LedgerEntryChangeType { } impl WriteXdr for LedgerEntryChangeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -21837,7 +22051,7 @@ impl Variants for LedgerEntryChange { impl Union for LedgerEntryChange {} impl ReadXdr for LedgerEntryChange { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryChangeType = ::read_xdr(r)?; @@ -21856,7 +22070,7 @@ impl ReadXdr for LedgerEntryChange { } impl WriteXdr for LedgerEntryChange { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21912,7 +22126,7 @@ impl AsRef> for LedgerEntryChanges { } impl ReadXdr for LedgerEntryChanges { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -21923,7 +22137,7 @@ impl ReadXdr for LedgerEntryChanges { } impl WriteXdr for LedgerEntryChanges { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -22000,7 +22214,7 @@ pub struct OperationMeta { } impl ReadXdr for OperationMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22011,7 +22225,7 @@ impl ReadXdr for OperationMeta { } impl WriteXdr for OperationMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.changes.write_xdr(w)?; @@ -22044,7 +22258,7 @@ pub struct TransactionMetaV1 { } impl ReadXdr for TransactionMetaV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22056,7 +22270,7 @@ impl ReadXdr for TransactionMetaV1 { } impl WriteXdr for TransactionMetaV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_changes.write_xdr(w)?; @@ -22094,7 +22308,7 @@ pub struct TransactionMetaV2 { } impl ReadXdr for TransactionMetaV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22107,7 +22321,7 @@ impl ReadXdr for TransactionMetaV2 { } impl WriteXdr for TransactionMetaV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_changes_before.write_xdr(w)?; @@ -22212,7 +22426,7 @@ impl From for i32 { } impl ReadXdr for ContractEventType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -22223,7 +22437,7 @@ impl ReadXdr for ContractEventType { } impl WriteXdr for ContractEventType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -22256,7 +22470,7 @@ pub struct ContractEventV0 { } impl ReadXdr for ContractEventV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22268,7 +22482,7 @@ impl ReadXdr for ContractEventV0 { } impl WriteXdr for ContractEventV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.topics.write_xdr(w)?; @@ -22354,7 +22568,7 @@ impl Variants for ContractEventBody { impl Union for ContractEventBody {} impl ReadXdr for ContractEventBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -22370,7 +22584,7 @@ impl ReadXdr for ContractEventBody { } impl WriteXdr for ContractEventBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22424,7 +22638,7 @@ pub struct ContractEvent { } impl ReadXdr for ContractEvent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22438,7 +22652,7 @@ impl ReadXdr for ContractEvent { } impl WriteXdr for ContractEvent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22474,7 +22688,7 @@ pub struct DiagnosticEvent { } impl ReadXdr for DiagnosticEvent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22486,7 +22700,7 @@ impl ReadXdr for DiagnosticEvent { } impl WriteXdr for DiagnosticEvent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.in_successful_contract_call.write_xdr(w)?; @@ -22536,7 +22750,7 @@ impl AsRef> for DiagnosticEvents { } impl ReadXdr for DiagnosticEvents { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -22547,7 +22761,7 @@ impl ReadXdr for DiagnosticEvents { } impl WriteXdr for DiagnosticEvents { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -22656,7 +22870,7 @@ pub struct SorobanTransactionMetaExtV1 { } impl ReadXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22670,7 +22884,7 @@ impl ReadXdr for SorobanTransactionMetaExtV1 { } impl WriteXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22760,7 +22974,7 @@ impl Variants for SorobanTransactionMetaExt { impl Union for SorobanTransactionMetaExt {} impl ReadXdr for SorobanTransactionMetaExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -22777,7 +22991,7 @@ impl ReadXdr for SorobanTransactionMetaExt { } impl WriteXdr for SorobanTransactionMetaExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22825,7 +23039,7 @@ pub struct SorobanTransactionMeta { } impl ReadXdr for SorobanTransactionMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22839,7 +23053,7 @@ impl ReadXdr for SorobanTransactionMeta { } impl WriteXdr for SorobanTransactionMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22885,7 +23099,7 @@ pub struct TransactionMetaV3 { } impl ReadXdr for TransactionMetaV3 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22900,7 +23114,7 @@ impl ReadXdr for TransactionMetaV3 { } impl WriteXdr for TransactionMetaV3 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22937,7 +23151,7 @@ pub struct InvokeHostFunctionSuccessPreImage { } impl ReadXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22949,7 +23163,7 @@ impl ReadXdr for InvokeHostFunctionSuccessPreImage { } impl WriteXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.return_value.write_xdr(w)?; @@ -23046,7 +23260,7 @@ impl Variants for TransactionMeta { impl Union for TransactionMeta {} impl ReadXdr for TransactionMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23065,7 +23279,7 @@ impl ReadXdr for TransactionMeta { } impl WriteXdr for TransactionMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23107,7 +23321,7 @@ pub struct TransactionResultMeta { } impl ReadXdr for TransactionResultMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23120,7 +23334,7 @@ impl ReadXdr for TransactionResultMeta { } impl WriteXdr for TransactionResultMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.result.write_xdr(w)?; @@ -23155,7 +23369,7 @@ pub struct UpgradeEntryMeta { } impl ReadXdr for UpgradeEntryMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23167,7 +23381,7 @@ impl ReadXdr for UpgradeEntryMeta { } impl WriteXdr for UpgradeEntryMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.upgrade.write_xdr(w)?; @@ -23216,7 +23430,7 @@ pub struct LedgerCloseMetaV0 { } impl ReadXdr for LedgerCloseMetaV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23231,7 +23445,7 @@ impl ReadXdr for LedgerCloseMetaV0 { } impl WriteXdr for LedgerCloseMetaV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_header.write_xdr(w)?; @@ -23268,7 +23482,7 @@ pub struct LedgerCloseMetaExtV1 { } impl ReadXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23280,7 +23494,7 @@ impl ReadXdr for LedgerCloseMetaExtV1 { } impl WriteXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23367,7 +23581,7 @@ impl Variants for LedgerCloseMetaExt { impl Union for LedgerCloseMetaExt {} impl ReadXdr for LedgerCloseMetaExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23384,7 +23598,7 @@ impl ReadXdr for LedgerCloseMetaExt { } impl WriteXdr for LedgerCloseMetaExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23454,7 +23668,7 @@ pub struct LedgerCloseMetaV1 { } impl ReadXdr for LedgerCloseMetaV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23473,7 +23687,7 @@ impl ReadXdr for LedgerCloseMetaV1 { } impl WriteXdr for LedgerCloseMetaV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23567,7 +23781,7 @@ impl Variants for LedgerCloseMeta { impl Union for LedgerCloseMeta {} impl ReadXdr for LedgerCloseMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23584,7 +23798,7 @@ impl ReadXdr for LedgerCloseMeta { } impl WriteXdr for LedgerCloseMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23702,7 +23916,7 @@ impl From for i32 { } impl ReadXdr for ErrorCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -23713,7 +23927,7 @@ impl ReadXdr for ErrorCode { } impl WriteXdr for ErrorCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -23746,7 +23960,7 @@ pub struct SError { } impl ReadXdr for SError { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23758,7 +23972,7 @@ impl ReadXdr for SError { } impl WriteXdr for SError { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.code.write_xdr(w)?; @@ -23790,7 +24004,7 @@ pub struct SendMore { } impl ReadXdr for SendMore { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23801,7 +24015,7 @@ impl ReadXdr for SendMore { } impl WriteXdr for SendMore { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_messages.write_xdr(w)?; @@ -23834,7 +24048,7 @@ pub struct SendMoreExtended { } impl ReadXdr for SendMoreExtended { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23846,7 +24060,7 @@ impl ReadXdr for SendMoreExtended { } impl WriteXdr for SendMoreExtended { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_messages.write_xdr(w)?; @@ -23882,7 +24096,7 @@ pub struct AuthCert { } impl ReadXdr for AuthCert { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23895,7 +24109,7 @@ impl ReadXdr for AuthCert { } impl WriteXdr for AuthCert { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.pubkey.write_xdr(w)?; @@ -23944,7 +24158,7 @@ pub struct Hello { } impl ReadXdr for Hello { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23963,7 +24177,7 @@ impl ReadXdr for Hello { } impl WriteXdr for Hello { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -24010,7 +24224,7 @@ pub struct Auth { } impl ReadXdr for Auth { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24021,7 +24235,7 @@ impl ReadXdr for Auth { } impl WriteXdr for Auth { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.flags.write_xdr(w)?; @@ -24116,7 +24330,7 @@ impl From for i32 { } impl ReadXdr for IpAddrType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24127,7 +24341,7 @@ impl ReadXdr for IpAddrType { } impl WriteXdr for IpAddrType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24213,7 +24427,7 @@ impl Variants for PeerAddressIp { impl Union for PeerAddressIp {} impl ReadXdr for PeerAddressIp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: IpAddrType = ::read_xdr(r)?; @@ -24230,7 +24444,7 @@ impl ReadXdr for PeerAddressIp { } impl WriteXdr for PeerAddressIp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -24277,7 +24491,7 @@ pub struct PeerAddress { } impl ReadXdr for PeerAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24290,7 +24504,7 @@ impl ReadXdr for PeerAddress { } impl WriteXdr for PeerAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ip.write_xdr(w)?; @@ -24536,7 +24750,7 @@ impl From for i32 { } impl ReadXdr for MessageType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24547,7 +24761,7 @@ impl ReadXdr for MessageType { } impl WriteXdr for MessageType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24580,7 +24794,7 @@ pub struct DontHave { } impl ReadXdr for DontHave { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24592,7 +24806,7 @@ impl ReadXdr for DontHave { } impl WriteXdr for DontHave { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.type_.write_xdr(w)?; @@ -24691,7 +24905,7 @@ impl From for i32 { } impl ReadXdr for SurveyMessageCommandType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24702,7 +24916,7 @@ impl ReadXdr for SurveyMessageCommandType { } impl WriteXdr for SurveyMessageCommandType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24805,7 +25019,7 @@ impl From for i32 { } impl ReadXdr for SurveyMessageResponseType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24816,7 +25030,7 @@ impl ReadXdr for SurveyMessageResponseType { } impl WriteXdr for SurveyMessageResponseType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24851,7 +25065,7 @@ pub struct TimeSlicedSurveyStartCollectingMessage { } impl ReadXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24864,7 +25078,7 @@ impl ReadXdr for TimeSlicedSurveyStartCollectingMessage { } impl WriteXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_id.write_xdr(w)?; @@ -24899,7 +25113,7 @@ pub struct SignedTimeSlicedSurveyStartCollectingMessage { } impl ReadXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24911,7 +25125,7 @@ impl ReadXdr for SignedTimeSlicedSurveyStartCollectingMessage { } impl WriteXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.signature.write_xdr(w)?; @@ -24947,7 +25161,7 @@ pub struct TimeSlicedSurveyStopCollectingMessage { } impl ReadXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24960,7 +25174,7 @@ impl ReadXdr for TimeSlicedSurveyStopCollectingMessage { } impl WriteXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_id.write_xdr(w)?; @@ -24995,7 +25209,7 @@ pub struct SignedTimeSlicedSurveyStopCollectingMessage { } impl ReadXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25007,7 +25221,7 @@ impl ReadXdr for SignedTimeSlicedSurveyStopCollectingMessage { } impl WriteXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.signature.write_xdr(w)?; @@ -25047,7 +25261,7 @@ pub struct SurveyRequestMessage { } impl ReadXdr for SurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25062,7 +25276,7 @@ impl ReadXdr for SurveyRequestMessage { } impl WriteXdr for SurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_peer_id.write_xdr(w)?; @@ -25103,7 +25317,7 @@ pub struct TimeSlicedSurveyRequestMessage { } impl ReadXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25117,7 +25331,7 @@ impl ReadXdr for TimeSlicedSurveyRequestMessage { } impl WriteXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request.write_xdr(w)?; @@ -25153,7 +25367,7 @@ pub struct SignedSurveyRequestMessage { } impl ReadXdr for SignedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25165,7 +25379,7 @@ impl ReadXdr for SignedSurveyRequestMessage { } impl WriteXdr for SignedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request_signature.write_xdr(w)?; @@ -25199,7 +25413,7 @@ pub struct SignedTimeSlicedSurveyRequestMessage { } impl ReadXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25211,7 +25425,7 @@ impl ReadXdr for SignedTimeSlicedSurveyRequestMessage { } impl WriteXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request_signature.write_xdr(w)?; @@ -25261,7 +25475,7 @@ impl AsRef> for EncryptedBody { } impl ReadXdr for EncryptedBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64000>::read_xdr(r)?; @@ -25272,7 +25486,7 @@ impl ReadXdr for EncryptedBody { } impl WriteXdr for EncryptedBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25357,7 +25571,7 @@ pub struct SurveyResponseMessage { } impl ReadXdr for SurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25372,7 +25586,7 @@ impl ReadXdr for SurveyResponseMessage { } impl WriteXdr for SurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_peer_id.write_xdr(w)?; @@ -25409,7 +25623,7 @@ pub struct TimeSlicedSurveyResponseMessage { } impl ReadXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25421,7 +25635,7 @@ impl ReadXdr for TimeSlicedSurveyResponseMessage { } impl WriteXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response.write_xdr(w)?; @@ -25455,7 +25669,7 @@ pub struct SignedSurveyResponseMessage { } impl ReadXdr for SignedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25467,7 +25681,7 @@ impl ReadXdr for SignedSurveyResponseMessage { } impl WriteXdr for SignedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response_signature.write_xdr(w)?; @@ -25501,7 +25715,7 @@ pub struct SignedTimeSlicedSurveyResponseMessage { } impl ReadXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25513,7 +25727,7 @@ impl ReadXdr for SignedTimeSlicedSurveyResponseMessage { } impl WriteXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response_signature.write_xdr(w)?; @@ -25575,7 +25789,7 @@ pub struct PeerStats { } impl ReadXdr for PeerStats { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25600,7 +25814,7 @@ impl ReadXdr for PeerStats { } impl WriteXdr for PeerStats { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.id.write_xdr(w)?; @@ -25663,7 +25877,7 @@ impl AsRef> for PeerStatList { } impl ReadXdr for PeerStatList { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -25674,7 +25888,7 @@ impl ReadXdr for PeerStatList { } impl WriteXdr for PeerStatList { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25775,7 +25989,7 @@ pub struct TimeSlicedNodeData { } impl ReadXdr for TimeSlicedNodeData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25795,7 +26009,7 @@ impl ReadXdr for TimeSlicedNodeData { } impl WriteXdr for TimeSlicedNodeData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.added_authenticated_peers.write_xdr(w)?; @@ -25837,7 +26051,7 @@ pub struct TimeSlicedPeerData { } impl ReadXdr for TimeSlicedPeerData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25849,7 +26063,7 @@ impl ReadXdr for TimeSlicedPeerData { } impl WriteXdr for TimeSlicedPeerData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.peer_stats.write_xdr(w)?; @@ -25899,7 +26113,7 @@ impl AsRef> for TimeSlicedPeerDataList { } impl ReadXdr for TimeSlicedPeerDataList { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -25910,7 +26124,7 @@ impl ReadXdr for TimeSlicedPeerDataList { } impl WriteXdr for TimeSlicedPeerDataList { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25994,7 +26208,7 @@ pub struct TopologyResponseBodyV0 { } impl ReadXdr for TopologyResponseBodyV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26008,7 +26222,7 @@ impl ReadXdr for TopologyResponseBodyV0 { } impl WriteXdr for TopologyResponseBodyV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26054,7 +26268,7 @@ pub struct TopologyResponseBodyV1 { } impl ReadXdr for TopologyResponseBodyV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26070,7 +26284,7 @@ impl ReadXdr for TopologyResponseBodyV1 { } impl WriteXdr for TopologyResponseBodyV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26110,7 +26324,7 @@ pub struct TopologyResponseBodyV2 { } impl ReadXdr for TopologyResponseBodyV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26123,7 +26337,7 @@ impl ReadXdr for TopologyResponseBodyV2 { } impl WriteXdr for TopologyResponseBodyV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26220,7 +26434,7 @@ impl Variants for SurveyResponseBody { impl Union for SurveyResponseBody {} impl ReadXdr for SurveyResponseBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SurveyMessageResponseType = @@ -26239,7 +26453,7 @@ impl ReadXdr for SurveyResponseBody { } impl WriteXdr for SurveyResponseBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -26302,7 +26516,7 @@ impl AsRef> for TxAdvertVector { } impl ReadXdr for TxAdvertVector { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26313,7 +26527,7 @@ impl ReadXdr for TxAdvertVector { } impl WriteXdr for TxAdvertVector { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26390,7 +26604,7 @@ pub struct FloodAdvert { } impl ReadXdr for FloodAdvert { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26401,7 +26615,7 @@ impl ReadXdr for FloodAdvert { } impl WriteXdr for FloodAdvert { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_hashes.write_xdr(w)?; @@ -26458,7 +26672,7 @@ impl AsRef> for TxDemandVector { } impl ReadXdr for TxDemandVector { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26469,7 +26683,7 @@ impl ReadXdr for TxDemandVector { } impl WriteXdr for TxDemandVector { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26546,7 +26760,7 @@ pub struct FloodDemand { } impl ReadXdr for FloodDemand { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26557,7 +26771,7 @@ impl ReadXdr for FloodDemand { } impl WriteXdr for FloodDemand { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_hashes.write_xdr(w)?; @@ -26818,7 +27032,7 @@ impl Variants for StellarMessage { impl Union for StellarMessage {} impl ReadXdr for StellarMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: MessageType = ::read_xdr(r)?; @@ -26877,7 +27091,7 @@ impl ReadXdr for StellarMessage { } impl WriteXdr for StellarMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -26939,7 +27153,7 @@ pub struct AuthenticatedMessageV0 { } impl ReadXdr for AuthenticatedMessageV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26952,7 +27166,7 @@ impl ReadXdr for AuthenticatedMessageV0 { } impl WriteXdr for AuthenticatedMessageV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sequence.write_xdr(w)?; @@ -27040,7 +27254,7 @@ impl Variants for AuthenticatedMessage { impl Union for AuthenticatedMessage {} impl ReadXdr for AuthenticatedMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: u32 = ::read_xdr(r)?; @@ -27056,7 +27270,7 @@ impl ReadXdr for AuthenticatedMessage { } impl WriteXdr for AuthenticatedMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27151,7 +27365,7 @@ impl Variants for LiquidityPoolParameters { impl Union for LiquidityPoolParameters {} impl ReadXdr for LiquidityPoolParameters { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolType = ::read_xdr(r)?; @@ -27171,7 +27385,7 @@ impl ReadXdr for LiquidityPoolParameters { } impl WriteXdr for LiquidityPoolParameters { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27206,7 +27420,7 @@ pub struct MuxedAccountMed25519 { } impl ReadXdr for MuxedAccountMed25519 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27218,7 +27432,7 @@ impl ReadXdr for MuxedAccountMed25519 { } impl WriteXdr for MuxedAccountMed25519 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.id.write_xdr(w)?; @@ -27307,7 +27521,7 @@ impl Variants for MuxedAccount { impl Union for MuxedAccount {} impl ReadXdr for MuxedAccount { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CryptoKeyType = ::read_xdr(r)?; @@ -27326,7 +27540,7 @@ impl ReadXdr for MuxedAccount { } impl WriteXdr for MuxedAccount { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27364,7 +27578,7 @@ pub struct DecoratedSignature { } impl ReadXdr for DecoratedSignature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27376,7 +27590,7 @@ impl ReadXdr for DecoratedSignature { } impl WriteXdr for DecoratedSignature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hint.write_xdr(w)?; @@ -27628,7 +27842,7 @@ impl From for i32 { } impl ReadXdr for OperationType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -27639,7 +27853,7 @@ impl ReadXdr for OperationType { } impl WriteXdr for OperationType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -27672,7 +27886,7 @@ pub struct CreateAccountOp { } impl ReadXdr for CreateAccountOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27684,7 +27898,7 @@ impl ReadXdr for CreateAccountOp { } impl WriteXdr for CreateAccountOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -27720,7 +27934,7 @@ pub struct PaymentOp { } impl ReadXdr for PaymentOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27733,7 +27947,7 @@ impl ReadXdr for PaymentOp { } impl WriteXdr for PaymentOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -27780,7 +27994,7 @@ pub struct PathPaymentStrictReceiveOp { } impl ReadXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27796,7 +28010,7 @@ impl ReadXdr for PathPaymentStrictReceiveOp { } impl WriteXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.send_asset.write_xdr(w)?; @@ -27846,7 +28060,7 @@ pub struct PathPaymentStrictSendOp { } impl ReadXdr for PathPaymentStrictSendOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27862,7 +28076,7 @@ impl ReadXdr for PathPaymentStrictSendOp { } impl WriteXdr for PathPaymentStrictSendOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.send_asset.write_xdr(w)?; @@ -27908,7 +28122,7 @@ pub struct ManageSellOfferOp { } impl ReadXdr for ManageSellOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27923,7 +28137,7 @@ impl ReadXdr for ManageSellOfferOp { } impl WriteXdr for ManageSellOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -27969,7 +28183,7 @@ pub struct ManageBuyOfferOp { } impl ReadXdr for ManageBuyOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27984,7 +28198,7 @@ impl ReadXdr for ManageBuyOfferOp { } impl WriteXdr for ManageBuyOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -28025,7 +28239,7 @@ pub struct CreatePassiveSellOfferOp { } impl ReadXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28039,7 +28253,7 @@ impl ReadXdr for CreatePassiveSellOfferOp { } impl WriteXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -28096,7 +28310,7 @@ pub struct SetOptionsOp { } impl ReadXdr for SetOptionsOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28115,7 +28329,7 @@ impl ReadXdr for SetOptionsOp { } impl WriteXdr for SetOptionsOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inflation_dest.write_xdr(w)?; @@ -28230,7 +28444,7 @@ impl Variants for ChangeTrustAsset { impl Union for ChangeTrustAsset {} impl ReadXdr for ChangeTrustAsset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -28249,7 +28463,7 @@ impl ReadXdr for ChangeTrustAsset { } impl WriteXdr for ChangeTrustAsset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -28291,7 +28505,7 @@ pub struct ChangeTrustOp { } impl ReadXdr for ChangeTrustOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28303,7 +28517,7 @@ impl ReadXdr for ChangeTrustOp { } impl WriteXdr for ChangeTrustOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.line.write_xdr(w)?; @@ -28341,7 +28555,7 @@ pub struct AllowTrustOp { } impl ReadXdr for AllowTrustOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28354,7 +28568,7 @@ impl ReadXdr for AllowTrustOp { } impl WriteXdr for AllowTrustOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.trustor.write_xdr(w)?; @@ -28389,7 +28603,7 @@ pub struct ManageDataOp { } impl ReadXdr for ManageDataOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28401,7 +28615,7 @@ impl ReadXdr for ManageDataOp { } impl WriteXdr for ManageDataOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.data_name.write_xdr(w)?; @@ -28433,7 +28647,7 @@ pub struct BumpSequenceOp { } impl ReadXdr for BumpSequenceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28444,7 +28658,7 @@ impl ReadXdr for BumpSequenceOp { } impl WriteXdr for BumpSequenceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.bump_to.write_xdr(w)?; @@ -28479,7 +28693,7 @@ pub struct CreateClaimableBalanceOp { } impl ReadXdr for CreateClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28492,7 +28706,7 @@ impl ReadXdr for CreateClaimableBalanceOp { } impl WriteXdr for CreateClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset.write_xdr(w)?; @@ -28525,7 +28739,7 @@ pub struct ClaimClaimableBalanceOp { } impl ReadXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28536,7 +28750,7 @@ impl ReadXdr for ClaimClaimableBalanceOp { } impl WriteXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -28567,7 +28781,7 @@ pub struct BeginSponsoringFutureReservesOp { } impl ReadXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28578,7 +28792,7 @@ impl ReadXdr for BeginSponsoringFutureReservesOp { } impl WriteXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sponsored_id.write_xdr(w)?; @@ -28676,7 +28890,7 @@ impl From for i32 { } impl ReadXdr for RevokeSponsorshipType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -28687,7 +28901,7 @@ impl ReadXdr for RevokeSponsorshipType { } impl WriteXdr for RevokeSponsorshipType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -28720,7 +28934,7 @@ pub struct RevokeSponsorshipOpSigner { } impl ReadXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28732,7 +28946,7 @@ impl ReadXdr for RevokeSponsorshipOpSigner { } impl WriteXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -28826,7 +29040,7 @@ impl Variants for RevokeSponsorshipOp { impl Union for RevokeSponsorshipOp {} impl ReadXdr for RevokeSponsorshipOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RevokeSponsorshipType = ::read_xdr(r)?; @@ -28845,7 +29059,7 @@ impl ReadXdr for RevokeSponsorshipOp { } impl WriteXdr for RevokeSponsorshipOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -28885,7 +29099,7 @@ pub struct ClawbackOp { } impl ReadXdr for ClawbackOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28898,7 +29112,7 @@ impl ReadXdr for ClawbackOp { } impl WriteXdr for ClawbackOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset.write_xdr(w)?; @@ -28931,7 +29145,7 @@ pub struct ClawbackClaimableBalanceOp { } impl ReadXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28942,7 +29156,7 @@ impl ReadXdr for ClawbackClaimableBalanceOp { } impl WriteXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -28980,7 +29194,7 @@ pub struct SetTrustLineFlagsOp { } impl ReadXdr for SetTrustLineFlagsOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28994,7 +29208,7 @@ impl ReadXdr for SetTrustLineFlagsOp { } impl WriteXdr for SetTrustLineFlagsOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.trustor.write_xdr(w)?; @@ -29044,7 +29258,7 @@ pub struct LiquidityPoolDepositOp { } impl ReadXdr for LiquidityPoolDepositOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29059,7 +29273,7 @@ impl ReadXdr for LiquidityPoolDepositOp { } impl WriteXdr for LiquidityPoolDepositOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -29100,7 +29314,7 @@ pub struct LiquidityPoolWithdrawOp { } impl ReadXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29114,7 +29328,7 @@ impl ReadXdr for LiquidityPoolWithdrawOp { } impl WriteXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -29230,7 +29444,7 @@ impl From for i32 { } impl ReadXdr for HostFunctionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29241,7 +29455,7 @@ impl ReadXdr for HostFunctionType { } impl WriteXdr for HostFunctionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -29339,7 +29553,7 @@ impl From for i32 { } impl ReadXdr for ContractIdPreimageType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29350,7 +29564,7 @@ impl ReadXdr for ContractIdPreimageType { } impl WriteXdr for ContractIdPreimageType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -29383,7 +29597,7 @@ pub struct ContractIdPreimageFromAddress { } impl ReadXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29395,7 +29609,7 @@ impl ReadXdr for ContractIdPreimageFromAddress { } impl WriteXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.address.write_xdr(w)?; @@ -29489,7 +29703,7 @@ impl Variants for ContractIdPreimage { impl Union for ContractIdPreimage {} impl ReadXdr for ContractIdPreimage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ContractIdPreimageType = ::read_xdr(r)?; @@ -29508,7 +29722,7 @@ impl ReadXdr for ContractIdPreimage { } impl WriteXdr for ContractIdPreimage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -29546,7 +29760,7 @@ pub struct CreateContractArgs { } impl ReadXdr for CreateContractArgs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29558,7 +29772,7 @@ impl ReadXdr for CreateContractArgs { } impl WriteXdr for CreateContractArgs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id_preimage.write_xdr(w)?; @@ -29595,7 +29809,7 @@ pub struct CreateContractArgsV2 { } impl ReadXdr for CreateContractArgsV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29608,7 +29822,7 @@ impl ReadXdr for CreateContractArgsV2 { } impl WriteXdr for CreateContractArgsV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id_preimage.write_xdr(w)?; @@ -29644,7 +29858,7 @@ pub struct InvokeContractArgs { } impl ReadXdr for InvokeContractArgs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29657,7 +29871,7 @@ impl ReadXdr for InvokeContractArgs { } impl WriteXdr for InvokeContractArgs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_address.write_xdr(w)?; @@ -29765,7 +29979,7 @@ impl Variants for HostFunction { impl Union for HostFunction {} impl ReadXdr for HostFunction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: HostFunctionType = ::read_xdr(r)?; @@ -29792,7 +30006,7 @@ impl ReadXdr for HostFunction { } impl WriteXdr for HostFunction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -29906,7 +30120,7 @@ impl From for i32 { } impl ReadXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29917,7 +30131,7 @@ impl ReadXdr for SorobanAuthorizedFunctionType { } impl WriteXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -30026,7 +30240,7 @@ impl Variants for SorobanAuthorizedFunction { impl Union for SorobanAuthorizedFunction {} impl ReadXdr for SorobanAuthorizedFunction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SorobanAuthorizedFunctionType = @@ -30051,7 +30265,7 @@ impl ReadXdr for SorobanAuthorizedFunction { } impl WriteXdr for SorobanAuthorizedFunction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30090,7 +30304,7 @@ pub struct SorobanAuthorizedInvocation { } impl ReadXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30102,7 +30316,7 @@ impl ReadXdr for SorobanAuthorizedInvocation { } impl WriteXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.function.write_xdr(w)?; @@ -30140,7 +30354,7 @@ pub struct SorobanAddressCredentials { } impl ReadXdr for SorobanAddressCredentials { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30154,7 +30368,7 @@ impl ReadXdr for SorobanAddressCredentials { } impl WriteXdr for SorobanAddressCredentials { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.address.write_xdr(w)?; @@ -30255,7 +30469,7 @@ impl From for i32 { } impl ReadXdr for SorobanCredentialsType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -30266,7 +30480,7 @@ impl ReadXdr for SorobanCredentialsType { } impl WriteXdr for SorobanCredentialsType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -30355,7 +30569,7 @@ impl Variants for SorobanCredentials { impl Union for SorobanCredentials {} impl ReadXdr for SorobanCredentials { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SorobanCredentialsType = ::read_xdr(r)?; @@ -30374,7 +30588,7 @@ impl ReadXdr for SorobanCredentials { } impl WriteXdr for SorobanCredentials { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30412,7 +30626,7 @@ pub struct SorobanAuthorizationEntry { } impl ReadXdr for SorobanAuthorizationEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30424,7 +30638,7 @@ impl ReadXdr for SorobanAuthorizationEntry { } impl WriteXdr for SorobanAuthorizationEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.credentials.write_xdr(w)?; @@ -30460,7 +30674,7 @@ pub struct InvokeHostFunctionOp { } impl ReadXdr for InvokeHostFunctionOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30472,7 +30686,7 @@ impl ReadXdr for InvokeHostFunctionOp { } impl WriteXdr for InvokeHostFunctionOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.host_function.write_xdr(w)?; @@ -30506,7 +30720,7 @@ pub struct ExtendFootprintTtlOp { } impl ReadXdr for ExtendFootprintTtlOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30518,7 +30732,7 @@ impl ReadXdr for ExtendFootprintTtlOp { } impl WriteXdr for ExtendFootprintTtlOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -30550,7 +30764,7 @@ pub struct RestoreFootprintOp { } impl ReadXdr for RestoreFootprintOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30561,7 +30775,7 @@ impl ReadXdr for RestoreFootprintOp { } impl WriteXdr for RestoreFootprintOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -30828,7 +31042,7 @@ impl Variants for OperationBody { impl Union for OperationBody {} impl ReadXdr for OperationBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationType = ::read_xdr(r)?; @@ -30904,7 +31118,7 @@ impl ReadXdr for OperationBody { } impl WriteXdr for OperationBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31028,7 +31242,7 @@ pub struct Operation { } impl ReadXdr for Operation { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31040,7 +31254,7 @@ impl ReadXdr for Operation { } impl WriteXdr for Operation { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31076,7 +31290,7 @@ pub struct HashIdPreimageOperationId { } impl ReadXdr for HashIdPreimageOperationId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31089,7 +31303,7 @@ impl ReadXdr for HashIdPreimageOperationId { } impl WriteXdr for HashIdPreimageOperationId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31130,7 +31344,7 @@ pub struct HashIdPreimageRevokeId { } impl ReadXdr for HashIdPreimageRevokeId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31145,7 +31359,7 @@ impl ReadXdr for HashIdPreimageRevokeId { } impl WriteXdr for HashIdPreimageRevokeId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31182,7 +31396,7 @@ pub struct HashIdPreimageContractId { } impl ReadXdr for HashIdPreimageContractId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31194,7 +31408,7 @@ impl ReadXdr for HashIdPreimageContractId { } impl WriteXdr for HashIdPreimageContractId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -31232,7 +31446,7 @@ pub struct HashIdPreimageSorobanAuthorization { } impl ReadXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31246,7 +31460,7 @@ impl ReadXdr for HashIdPreimageSorobanAuthorization { } impl WriteXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -31377,7 +31591,7 @@ impl Variants for HashIdPreimage { impl Union for HashIdPreimage {} impl ReadXdr for HashIdPreimage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -31402,7 +31616,7 @@ impl ReadXdr for HashIdPreimage { } impl WriteXdr for HashIdPreimage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31522,7 +31736,7 @@ impl From for i32 { } impl ReadXdr for MemoType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -31533,7 +31747,7 @@ impl ReadXdr for MemoType { } impl WriteXdr for MemoType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -31640,7 +31854,7 @@ impl Variants for Memo { impl Union for Memo {} impl ReadXdr for Memo { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: MemoType = ::read_xdr(r)?; @@ -31660,7 +31874,7 @@ impl ReadXdr for Memo { } impl WriteXdr for Memo { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31701,7 +31915,7 @@ pub struct TimeBounds { } impl ReadXdr for TimeBounds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31713,7 +31927,7 @@ impl ReadXdr for TimeBounds { } impl WriteXdr for TimeBounds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.min_time.write_xdr(w)?; @@ -31747,7 +31961,7 @@ pub struct LedgerBounds { } impl ReadXdr for LedgerBounds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31759,7 +31973,7 @@ impl ReadXdr for LedgerBounds { } impl WriteXdr for LedgerBounds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.min_ledger.write_xdr(w)?; @@ -31824,7 +32038,7 @@ pub struct PreconditionsV2 { } impl ReadXdr for PreconditionsV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31840,7 +32054,7 @@ impl ReadXdr for PreconditionsV2 { } impl WriteXdr for PreconditionsV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.time_bounds.write_xdr(w)?; @@ -31948,7 +32162,7 @@ impl From for i32 { } impl ReadXdr for PreconditionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -31959,7 +32173,7 @@ impl ReadXdr for PreconditionType { } impl WriteXdr for PreconditionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -32054,7 +32268,7 @@ impl Variants for Preconditions { impl Union for Preconditions {} impl ReadXdr for Preconditions { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PreconditionType = ::read_xdr(r)?; @@ -32072,7 +32286,7 @@ impl ReadXdr for Preconditions { } impl WriteXdr for Preconditions { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32111,7 +32325,7 @@ pub struct LedgerFootprint { } impl ReadXdr for LedgerFootprint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32123,7 +32337,7 @@ impl ReadXdr for LedgerFootprint { } impl WriteXdr for LedgerFootprint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.read_only.write_xdr(w)?; @@ -32222,7 +32436,7 @@ impl From for i32 { } impl ReadXdr for ArchivalProofType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -32233,7 +32447,7 @@ impl ReadXdr for ArchivalProofType { } impl WriteXdr for ArchivalProofType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -32266,7 +32480,7 @@ pub struct ArchivalProofNode { } impl ReadXdr for ArchivalProofNode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32278,7 +32492,7 @@ impl ReadXdr for ArchivalProofNode { } impl WriteXdr for ArchivalProofNode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -32328,7 +32542,7 @@ impl AsRef> for ProofLevel { } impl ReadXdr for ProofLevel { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -32339,7 +32553,7 @@ impl ReadXdr for ProofLevel { } impl WriteXdr for ProofLevel { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -32421,7 +32635,7 @@ pub struct NonexistenceProofBody { } impl ReadXdr for NonexistenceProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32433,7 +32647,7 @@ impl ReadXdr for NonexistenceProofBody { } impl WriteXdr for NonexistenceProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.entries_to_prove.write_xdr(w)?; @@ -32477,7 +32691,7 @@ pub struct ExistenceProofBody { } impl ReadXdr for ExistenceProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32491,7 +32705,7 @@ impl ReadXdr for ExistenceProofBody { } impl WriteXdr for ExistenceProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.keys_to_prove.write_xdr(w)?; @@ -32583,7 +32797,7 @@ impl Variants for ArchivalProofBody { impl Union for ArchivalProofBody {} impl ReadXdr for ArchivalProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ArchivalProofType = ::read_xdr(r)?; @@ -32604,7 +32818,7 @@ impl ReadXdr for ArchivalProofBody { } impl WriteXdr for ArchivalProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32649,7 +32863,7 @@ pub struct ArchivalProof { } impl ReadXdr for ArchivalProof { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32661,7 +32875,7 @@ impl ReadXdr for ArchivalProof { } impl WriteXdr for ArchivalProof { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.epoch.write_xdr(w)?; @@ -32704,7 +32918,7 @@ pub struct SorobanResources { } impl ReadXdr for SorobanResources { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32718,7 +32932,7 @@ impl ReadXdr for SorobanResources { } impl WriteXdr for SorobanResources { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.footprint.write_xdr(w)?; @@ -32765,7 +32979,7 @@ pub struct SorobanTransactionData { } impl ReadXdr for SorobanTransactionData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32778,7 +32992,7 @@ impl ReadXdr for SorobanTransactionData { } impl WriteXdr for SorobanTransactionData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -32861,7 +33075,7 @@ impl Variants for TransactionV0Ext { impl Union for TransactionV0Ext {} impl ReadXdr for TransactionV0Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -32877,7 +33091,7 @@ impl ReadXdr for TransactionV0Ext { } impl WriteXdr for TransactionV0Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32929,7 +33143,7 @@ pub struct TransactionV0 { } impl ReadXdr for TransactionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32946,7 +33160,7 @@ impl ReadXdr for TransactionV0 { } impl WriteXdr for TransactionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account_ed25519.write_xdr(w)?; @@ -32987,7 +33201,7 @@ pub struct TransactionV0Envelope { } impl ReadXdr for TransactionV0Envelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32999,7 +33213,7 @@ impl ReadXdr for TransactionV0Envelope { } impl WriteXdr for TransactionV0Envelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33086,7 +33300,7 @@ impl Variants for TransactionExt { impl Union for TransactionExt {} impl ReadXdr for TransactionExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33103,7 +33317,7 @@ impl ReadXdr for TransactionExt { } impl WriteXdr for TransactionExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33169,7 +33383,7 @@ pub struct Transaction { } impl ReadXdr for Transaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33186,7 +33400,7 @@ impl ReadXdr for Transaction { } impl WriteXdr for Transaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -33227,7 +33441,7 @@ pub struct TransactionV1Envelope { } impl ReadXdr for TransactionV1Envelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33239,7 +33453,7 @@ impl ReadXdr for TransactionV1Envelope { } impl WriteXdr for TransactionV1Envelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33321,7 +33535,7 @@ impl Variants for FeeBumpTransactionInnerTx { impl Union for FeeBumpTransactionInnerTx {} impl ReadXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -33337,7 +33551,7 @@ impl ReadXdr for FeeBumpTransactionInnerTx { } impl WriteXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33422,7 +33636,7 @@ impl Variants for FeeBumpTransactionExt { impl Union for FeeBumpTransactionExt {} impl ReadXdr for FeeBumpTransactionExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33438,7 +33652,7 @@ impl ReadXdr for FeeBumpTransactionExt { } impl WriteXdr for FeeBumpTransactionExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33489,7 +33703,7 @@ pub struct FeeBumpTransaction { } impl ReadXdr for FeeBumpTransaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33503,7 +33717,7 @@ impl ReadXdr for FeeBumpTransaction { } impl WriteXdr for FeeBumpTransaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_source.write_xdr(w)?; @@ -33541,7 +33755,7 @@ pub struct FeeBumpTransactionEnvelope { } impl ReadXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33553,7 +33767,7 @@ impl ReadXdr for FeeBumpTransactionEnvelope { } impl WriteXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33649,7 +33863,7 @@ impl Variants for TransactionEnvelope { impl Union for TransactionEnvelope {} impl ReadXdr for TransactionEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -33669,7 +33883,7 @@ impl ReadXdr for TransactionEnvelope { } impl WriteXdr for TransactionEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33762,7 +33976,7 @@ impl Variants for TransactionSignaturePayloadTaggedTransaction { impl Union for TransactionSignaturePayloadTaggedTransaction {} impl ReadXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -33779,7 +33993,7 @@ impl ReadXdr for TransactionSignaturePayloadTaggedTransaction { } impl WriteXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33825,7 +34039,7 @@ pub struct TransactionSignaturePayload { } impl ReadXdr for TransactionSignaturePayload { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33837,7 +34051,7 @@ impl ReadXdr for TransactionSignaturePayload { } impl WriteXdr for TransactionSignaturePayload { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -33941,7 +34155,7 @@ impl From for i32 { } impl ReadXdr for ClaimAtomType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -33952,7 +34166,7 @@ impl ReadXdr for ClaimAtomType { } impl WriteXdr for ClaimAtomType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -33998,7 +34212,7 @@ pub struct ClaimOfferAtomV0 { } impl ReadXdr for ClaimOfferAtomV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34014,7 +34228,7 @@ impl ReadXdr for ClaimOfferAtomV0 { } impl WriteXdr for ClaimOfferAtomV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_ed25519.write_xdr(w)?; @@ -34065,7 +34279,7 @@ pub struct ClaimOfferAtom { } impl ReadXdr for ClaimOfferAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34081,7 +34295,7 @@ impl ReadXdr for ClaimOfferAtom { } impl WriteXdr for ClaimOfferAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -34129,7 +34343,7 @@ pub struct ClaimLiquidityAtom { } impl ReadXdr for ClaimLiquidityAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34144,7 +34358,7 @@ impl ReadXdr for ClaimLiquidityAtom { } impl WriteXdr for ClaimLiquidityAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -34243,7 +34457,7 @@ impl Variants for ClaimAtom { impl Union for ClaimAtom {} impl ReadXdr for ClaimAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimAtomType = ::read_xdr(r)?; @@ -34263,7 +34477,7 @@ impl ReadXdr for ClaimAtom { } impl WriteXdr for ClaimAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34392,7 +34606,7 @@ impl From for i32 { } impl ReadXdr for CreateAccountResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -34403,7 +34617,7 @@ impl ReadXdr for CreateAccountResultCode { } impl WriteXdr for CreateAccountResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -34513,7 +34727,7 @@ impl Variants for CreateAccountResult { impl Union for CreateAccountResult {} impl ReadXdr for CreateAccountResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CreateAccountResultCode = ::read_xdr(r)?; @@ -34533,7 +34747,7 @@ impl ReadXdr for CreateAccountResult { } impl WriteXdr for CreateAccountResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34693,7 +34907,7 @@ impl From for i32 { } impl ReadXdr for PaymentResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -34704,7 +34918,7 @@ impl ReadXdr for PaymentResultCode { } impl WriteXdr for PaymentResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -34844,7 +35058,7 @@ impl Variants for PaymentResult { impl Union for PaymentResult {} impl ReadXdr for PaymentResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PaymentResultCode = ::read_xdr(r)?; @@ -34869,7 +35083,7 @@ impl ReadXdr for PaymentResult { } impl WriteXdr for PaymentResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35061,7 +35275,7 @@ impl From for i32 { } impl ReadXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35072,7 +35286,7 @@ impl ReadXdr for PathPaymentStrictReceiveResultCode { } impl WriteXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35107,7 +35321,7 @@ pub struct SimplePaymentResult { } impl ReadXdr for SimplePaymentResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35120,7 +35334,7 @@ impl ReadXdr for SimplePaymentResult { } impl WriteXdr for SimplePaymentResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -35155,7 +35369,7 @@ pub struct PathPaymentStrictReceiveResultSuccess { } impl ReadXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35167,7 +35381,7 @@ impl ReadXdr for PathPaymentStrictReceiveResultSuccess { } impl WriteXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers.write_xdr(w)?; @@ -35333,7 +35547,7 @@ impl Variants for PathPaymentStrictReceiveRe impl Union for PathPaymentStrictReceiveResult {} impl ReadXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PathPaymentStrictReceiveResultCode = @@ -35364,7 +35578,7 @@ impl ReadXdr for PathPaymentStrictReceiveResult { } impl WriteXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35558,7 +35772,7 @@ impl From for i32 { } impl ReadXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35569,7 +35783,7 @@ impl ReadXdr for PathPaymentStrictSendResultCode { } impl WriteXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35602,7 +35816,7 @@ pub struct PathPaymentStrictSendResultSuccess { } impl ReadXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35614,7 +35828,7 @@ impl ReadXdr for PathPaymentStrictSendResultSuccess { } impl WriteXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers.write_xdr(w)?; @@ -35779,7 +35993,7 @@ impl Variants for PathPaymentStrictSendResult { impl Union for PathPaymentStrictSendResult {} impl ReadXdr for PathPaymentStrictSendResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PathPaymentStrictSendResultCode = @@ -35810,7 +36024,7 @@ impl ReadXdr for PathPaymentStrictSendResult { } impl WriteXdr for PathPaymentStrictSendResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36003,7 +36217,7 @@ impl From for i32 { } impl ReadXdr for ManageSellOfferResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36014,7 +36228,7 @@ impl ReadXdr for ManageSellOfferResultCode { } impl WriteXdr for ManageSellOfferResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36117,7 +36331,7 @@ impl From for i32 { } impl ReadXdr for ManageOfferEffect { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36128,7 +36342,7 @@ impl ReadXdr for ManageOfferEffect { } impl WriteXdr for ManageOfferEffect { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36222,7 +36436,7 @@ impl Variants for ManageOfferSuccessResultOffer { impl Union for ManageOfferSuccessResultOffer {} impl ReadXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageOfferEffect = ::read_xdr(r)?; @@ -36240,7 +36454,7 @@ impl ReadXdr for ManageOfferSuccessResultOffer { } impl WriteXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36289,7 +36503,7 @@ pub struct ManageOfferSuccessResult { } impl ReadXdr for ManageOfferSuccessResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -36301,7 +36515,7 @@ impl ReadXdr for ManageOfferSuccessResult { } impl WriteXdr for ManageOfferSuccessResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers_claimed.write_xdr(w)?; @@ -36460,7 +36674,7 @@ impl Variants for ManageSellOfferResult { impl Union for ManageSellOfferResult {} impl ReadXdr for ManageSellOfferResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageSellOfferResultCode = @@ -36491,7 +36705,7 @@ impl ReadXdr for ManageSellOfferResult { } impl WriteXdr for ManageSellOfferResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36681,7 +36895,7 @@ impl From for i32 { } impl ReadXdr for ManageBuyOfferResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36692,7 +36906,7 @@ impl ReadXdr for ManageBuyOfferResultCode { } impl WriteXdr for ManageBuyOfferResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36850,7 +37064,7 @@ impl Variants for ManageBuyOfferResult { impl Union for ManageBuyOfferResult {} impl ReadXdr for ManageBuyOfferResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageBuyOfferResultCode = ::read_xdr(r)?; @@ -36880,7 +37094,7 @@ impl ReadXdr for ManageBuyOfferResult { } impl WriteXdr for ManageBuyOfferResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37054,7 +37268,7 @@ impl From for i32 { } impl ReadXdr for SetOptionsResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37065,7 +37279,7 @@ impl ReadXdr for SetOptionsResultCode { } impl WriteXdr for SetOptionsResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37211,7 +37425,7 @@ impl Variants for SetOptionsResult { impl Union for SetOptionsResult {} impl ReadXdr for SetOptionsResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SetOptionsResultCode = ::read_xdr(r)?; @@ -37237,7 +37451,7 @@ impl ReadXdr for SetOptionsResult { } impl WriteXdr for SetOptionsResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37400,7 +37614,7 @@ impl From for i32 { } impl ReadXdr for ChangeTrustResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37411,7 +37625,7 @@ impl ReadXdr for ChangeTrustResultCode { } impl WriteXdr for ChangeTrustResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37545,7 +37759,7 @@ impl Variants for ChangeTrustResult { impl Union for ChangeTrustResult {} impl ReadXdr for ChangeTrustResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ChangeTrustResultCode = ::read_xdr(r)?; @@ -37571,7 +37785,7 @@ impl ReadXdr for ChangeTrustResult { } impl WriteXdr for ChangeTrustResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37718,7 +37932,7 @@ impl From for i32 { } impl ReadXdr for AllowTrustResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37729,7 +37943,7 @@ impl ReadXdr for AllowTrustResultCode { } impl WriteXdr for AllowTrustResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37851,7 +38065,7 @@ impl Variants for AllowTrustResult { impl Union for AllowTrustResult {} impl ReadXdr for AllowTrustResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AllowTrustResultCode = ::read_xdr(r)?; @@ -37873,7 +38087,7 @@ impl ReadXdr for AllowTrustResult { } impl WriteXdr for AllowTrustResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38023,7 +38237,7 @@ impl From for i32 { } impl ReadXdr for AccountMergeResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38034,7 +38248,7 @@ impl ReadXdr for AccountMergeResultCode { } impl WriteXdr for AccountMergeResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38162,7 +38376,7 @@ impl Variants for AccountMergeResult { impl Union for AccountMergeResult {} impl ReadXdr for AccountMergeResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AccountMergeResultCode = ::read_xdr(r)?; @@ -38185,7 +38399,7 @@ impl ReadXdr for AccountMergeResult { } impl WriteXdr for AccountMergeResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38294,7 +38508,7 @@ impl From for i32 { } impl ReadXdr for InflationResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38305,7 +38519,7 @@ impl ReadXdr for InflationResultCode { } impl WriteXdr for InflationResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38338,7 +38552,7 @@ pub struct InflationPayout { } impl ReadXdr for InflationPayout { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -38350,7 +38564,7 @@ impl ReadXdr for InflationPayout { } impl WriteXdr for InflationPayout { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -38438,7 +38652,7 @@ impl Variants for InflationResult { impl Union for InflationResult {} impl ReadXdr for InflationResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: InflationResultCode = ::read_xdr(r)?; @@ -38457,7 +38671,7 @@ impl ReadXdr for InflationResult { } impl WriteXdr for InflationResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38585,7 +38799,7 @@ impl From for i32 { } impl ReadXdr for ManageDataResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38596,7 +38810,7 @@ impl ReadXdr for ManageDataResultCode { } impl WriteXdr for ManageDataResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38706,7 +38920,7 @@ impl Variants for ManageDataResult { impl Union for ManageDataResult {} impl ReadXdr for ManageDataResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageDataResultCode = ::read_xdr(r)?; @@ -38726,7 +38940,7 @@ impl ReadXdr for ManageDataResult { } impl WriteXdr for ManageDataResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38834,7 +39048,7 @@ impl From for i32 { } impl ReadXdr for BumpSequenceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38845,7 +39059,7 @@ impl ReadXdr for BumpSequenceResultCode { } impl WriteXdr for BumpSequenceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38934,7 +39148,7 @@ impl Variants for BumpSequenceResult { impl Union for BumpSequenceResult {} impl ReadXdr for BumpSequenceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BumpSequenceResultCode = ::read_xdr(r)?; @@ -38951,7 +39165,7 @@ impl ReadXdr for BumpSequenceResult { } impl WriteXdr for BumpSequenceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39081,7 +39295,7 @@ impl From for i32 { } impl ReadXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39092,7 +39306,7 @@ impl ReadXdr for CreateClaimableBalanceResultCode { } impl WriteXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39209,7 +39423,7 @@ impl Variants for CreateClaimableBalanceResult impl Union for CreateClaimableBalanceResult {} impl ReadXdr for CreateClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CreateClaimableBalanceResultCode = @@ -39233,7 +39447,7 @@ impl ReadXdr for CreateClaimableBalanceResult { } impl WriteXdr for CreateClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39367,7 +39581,7 @@ impl From for i32 { } impl ReadXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39378,7 +39592,7 @@ impl ReadXdr for ClaimClaimableBalanceResultCode { } impl WriteXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39494,7 +39708,7 @@ impl Variants for ClaimClaimableBalanceResult { impl Union for ClaimClaimableBalanceResult {} impl ReadXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimClaimableBalanceResultCode = @@ -39516,7 +39730,7 @@ impl ReadXdr for ClaimClaimableBalanceResult { } impl WriteXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39637,7 +39851,7 @@ impl From for i32 { } impl ReadXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39648,7 +39862,7 @@ impl ReadXdr for BeginSponsoringFutureReservesResultCode { } impl WriteXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39749,7 +39963,7 @@ impl Variants for BeginSponsoringFuture impl Union for BeginSponsoringFutureReservesResult {} impl ReadXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BeginSponsoringFutureReservesResultCode = @@ -39769,7 +39983,7 @@ impl ReadXdr for BeginSponsoringFutureReservesResult { } impl WriteXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39877,7 +40091,7 @@ impl From for i32 { } impl ReadXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39888,7 +40102,7 @@ impl ReadXdr for EndSponsoringFutureReservesResultCode { } impl WriteXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39978,7 +40192,7 @@ impl Variants for EndSponsoringFutureRese impl Union for EndSponsoringFutureReservesResult {} impl ReadXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EndSponsoringFutureReservesResultCode = @@ -39996,7 +40210,7 @@ impl ReadXdr for EndSponsoringFutureReservesResult { } impl WriteXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40129,7 +40343,7 @@ impl From for i32 { } impl ReadXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40140,7 +40354,7 @@ impl ReadXdr for RevokeSponsorshipResultCode { } impl WriteXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40256,7 +40470,7 @@ impl Variants for RevokeSponsorshipResult { impl Union for RevokeSponsorshipResult {} impl ReadXdr for RevokeSponsorshipResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RevokeSponsorshipResultCode = @@ -40278,7 +40492,7 @@ impl ReadXdr for RevokeSponsorshipResult { } impl WriteXdr for RevokeSponsorshipResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40409,7 +40623,7 @@ impl From for i32 { } impl ReadXdr for ClawbackResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40420,7 +40634,7 @@ impl ReadXdr for ClawbackResultCode { } impl WriteXdr for ClawbackResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40530,7 +40744,7 @@ impl Variants for ClawbackResult { impl Union for ClawbackResult {} impl ReadXdr for ClawbackResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClawbackResultCode = ::read_xdr(r)?; @@ -40550,7 +40764,7 @@ impl ReadXdr for ClawbackResult { } impl WriteXdr for ClawbackResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40670,7 +40884,7 @@ impl From for i32 { } impl ReadXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40681,7 +40895,7 @@ impl ReadXdr for ClawbackClaimableBalanceResultCode { } impl WriteXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40782,7 +40996,7 @@ impl Variants for ClawbackClaimableBalanceRe impl Union for ClawbackClaimableBalanceResult {} impl ReadXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClawbackClaimableBalanceResultCode = @@ -40802,7 +41016,7 @@ impl ReadXdr for ClawbackClaimableBalanceResult { } impl WriteXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40938,7 +41152,7 @@ impl From for i32 { } impl ReadXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40949,7 +41163,7 @@ impl ReadXdr for SetTrustLineFlagsResultCode { } impl WriteXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41065,7 +41279,7 @@ impl Variants for SetTrustLineFlagsResult { impl Union for SetTrustLineFlagsResult {} impl ReadXdr for SetTrustLineFlagsResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SetTrustLineFlagsResultCode = @@ -41087,7 +41301,7 @@ impl ReadXdr for SetTrustLineFlagsResult { } impl WriteXdr for SetTrustLineFlagsResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41240,7 +41454,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41251,7 +41465,7 @@ impl ReadXdr for LiquidityPoolDepositResultCode { } impl WriteXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41379,7 +41593,7 @@ impl Variants for LiquidityPoolDepositResult { impl Union for LiquidityPoolDepositResult {} impl ReadXdr for LiquidityPoolDepositResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolDepositResultCode = @@ -41403,7 +41617,7 @@ impl ReadXdr for LiquidityPoolDepositResult { } impl WriteXdr for LiquidityPoolDepositResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41545,7 +41759,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41556,7 +41770,7 @@ impl ReadXdr for LiquidityPoolWithdrawResultCode { } impl WriteXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41672,7 +41886,7 @@ impl Variants for LiquidityPoolWithdrawResult { impl Union for LiquidityPoolWithdrawResult {} impl ReadXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolWithdrawResultCode = @@ -41694,7 +41908,7 @@ impl ReadXdr for LiquidityPoolWithdrawResult { } impl WriteXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41831,7 +42045,7 @@ impl From for i32 { } impl ReadXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41842,7 +42056,7 @@ impl ReadXdr for InvokeHostFunctionResultCode { } impl WriteXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41960,7 +42174,7 @@ impl Variants for InvokeHostFunctionResult { impl Union for InvokeHostFunctionResult {} impl ReadXdr for InvokeHostFunctionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: InvokeHostFunctionResultCode = @@ -41984,7 +42198,7 @@ impl ReadXdr for InvokeHostFunctionResult { } impl WriteXdr for InvokeHostFunctionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42109,7 +42323,7 @@ impl From for i32 { } impl ReadXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42120,7 +42334,7 @@ impl ReadXdr for ExtendFootprintTtlResultCode { } impl WriteXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42226,7 +42440,7 @@ impl Variants for ExtendFootprintTtlResult { impl Union for ExtendFootprintTtlResult {} impl ReadXdr for ExtendFootprintTtlResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ExtendFootprintTtlResultCode = @@ -42248,7 +42462,7 @@ impl ReadXdr for ExtendFootprintTtlResult { } impl WriteXdr for ExtendFootprintTtlResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42371,7 +42585,7 @@ impl From for i32 { } impl ReadXdr for RestoreFootprintResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42382,7 +42596,7 @@ impl ReadXdr for RestoreFootprintResultCode { } impl WriteXdr for RestoreFootprintResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42488,7 +42702,7 @@ impl Variants for RestoreFootprintResult { impl Union for RestoreFootprintResult {} impl ReadXdr for RestoreFootprintResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RestoreFootprintResultCode = @@ -42510,7 +42724,7 @@ impl ReadXdr for RestoreFootprintResult { } impl WriteXdr for RestoreFootprintResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42649,7 +42863,7 @@ impl From for i32 { } impl ReadXdr for OperationResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42660,7 +42874,7 @@ impl ReadXdr for OperationResultCode { } impl WriteXdr for OperationResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42927,7 +43141,7 @@ impl Variants for OperationResultTr { impl Union for OperationResultTr {} impl ReadXdr for OperationResultTr { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationType = ::read_xdr(r)?; @@ -43007,7 +43221,7 @@ impl ReadXdr for OperationResultTr { } impl WriteXdr for OperationResultTr { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43216,7 +43430,7 @@ impl Variants for OperationResult { impl Union for OperationResult {} impl ReadXdr for OperationResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationResultCode = ::read_xdr(r)?; @@ -43238,7 +43452,7 @@ impl ReadXdr for OperationResult { } impl WriteXdr for OperationResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43455,7 +43669,7 @@ impl From for i32 { } impl ReadXdr for TransactionResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -43466,7 +43680,7 @@ impl ReadXdr for TransactionResultCode { } impl WriteXdr for TransactionResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -43650,7 +43864,7 @@ impl Variants for InnerTransactionResultResult { impl Union for InnerTransactionResultResult {} impl ReadXdr for InnerTransactionResultResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TransactionResultCode = ::read_xdr(r)?; @@ -43686,7 +43900,7 @@ impl ReadXdr for InnerTransactionResultResult { } impl WriteXdr for InnerTransactionResultResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43787,7 +44001,7 @@ impl Variants for InnerTransactionResultExt { impl Union for InnerTransactionResultExt {} impl ReadXdr for InnerTransactionResultExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -43803,7 +44017,7 @@ impl ReadXdr for InnerTransactionResultExt { } impl WriteXdr for InnerTransactionResultExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43875,7 +44089,7 @@ pub struct InnerTransactionResult { } impl ReadXdr for InnerTransactionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -43888,7 +44102,7 @@ impl ReadXdr for InnerTransactionResult { } impl WriteXdr for InnerTransactionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_charged.write_xdr(w)?; @@ -43923,7 +44137,7 @@ pub struct InnerTransactionResultPair { } impl ReadXdr for InnerTransactionResultPair { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -43935,7 +44149,7 @@ impl ReadXdr for InnerTransactionResultPair { } impl WriteXdr for InnerTransactionResultPair { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.transaction_hash.write_xdr(w)?; @@ -44132,7 +44346,7 @@ impl Variants for TransactionResultResult { impl Union for TransactionResultResult {} impl ReadXdr for TransactionResultResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TransactionResultCode = ::read_xdr(r)?; @@ -44174,7 +44388,7 @@ impl ReadXdr for TransactionResultResult { } impl WriteXdr for TransactionResultResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44277,7 +44491,7 @@ impl Variants for TransactionResultExt { impl Union for TransactionResultExt {} impl ReadXdr for TransactionResultExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -44293,7 +44507,7 @@ impl ReadXdr for TransactionResultExt { } impl WriteXdr for TransactionResultExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44366,7 +44580,7 @@ pub struct TransactionResult { } impl ReadXdr for TransactionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -44379,7 +44593,7 @@ impl ReadXdr for TransactionResult { } impl WriteXdr for TransactionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_charged.write_xdr(w)?; @@ -44487,7 +44701,7 @@ impl AsRef<[u8; 32]> for Hash { } impl ReadXdr for Hash { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 32]>::read_xdr(r)?; @@ -44498,7 +44712,7 @@ impl ReadXdr for Hash { } impl WriteXdr for Hash { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44638,7 +44852,7 @@ impl AsRef<[u8; 32]> for Uint256 { } impl ReadXdr for Uint256 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 32]>::read_xdr(r)?; @@ -44649,7 +44863,7 @@ impl ReadXdr for Uint256 { } impl WriteXdr for Uint256 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44763,7 +44977,7 @@ impl AsRef for TimePoint { } impl ReadXdr for TimePoint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u64::read_xdr(r)?; @@ -44774,7 +44988,7 @@ impl ReadXdr for TimePoint { } impl WriteXdr for TimePoint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44819,7 +45033,7 @@ impl AsRef for Duration { } impl ReadXdr for Duration { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u64::read_xdr(r)?; @@ -44830,7 +45044,7 @@ impl ReadXdr for Duration { } impl WriteXdr for Duration { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44908,7 +45122,7 @@ impl Variants for ExtensionPoint { impl Union for ExtensionPoint {} impl ReadXdr for ExtensionPoint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -44924,7 +45138,7 @@ impl ReadXdr for ExtensionPoint { } impl WriteXdr for ExtensionPoint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45049,7 +45263,7 @@ impl From for i32 { } impl ReadXdr for CryptoKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45060,7 +45274,7 @@ impl ReadXdr for CryptoKeyType { } impl WriteXdr for CryptoKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45151,7 +45365,7 @@ impl From for i32 { } impl ReadXdr for PublicKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45162,7 +45376,7 @@ impl ReadXdr for PublicKeyType { } impl WriteXdr for PublicKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45271,7 +45485,7 @@ impl From for i32 { } impl ReadXdr for SignerKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45282,7 +45496,7 @@ impl ReadXdr for SignerKeyType { } impl WriteXdr for SignerKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45361,7 +45575,7 @@ impl Variants for PublicKey { impl Union for PublicKey {} impl ReadXdr for PublicKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PublicKeyType = ::read_xdr(r)?; @@ -45379,7 +45593,7 @@ impl ReadXdr for PublicKey { } impl WriteXdr for PublicKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45416,7 +45630,7 @@ pub struct SignerKeyEd25519SignedPayload { } impl ReadXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -45428,7 +45642,7 @@ impl ReadXdr for SignerKeyEd25519SignedPayload { } impl WriteXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ed25519.write_xdr(w)?; @@ -45537,7 +45751,7 @@ impl Variants for SignerKey { impl Union for SignerKey {} impl ReadXdr for SignerKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SignerKeyType = ::read_xdr(r)?; @@ -45558,7 +45772,7 @@ impl ReadXdr for SignerKey { } impl WriteXdr for SignerKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45614,7 +45828,7 @@ impl AsRef> for Signature { } impl ReadXdr for Signature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64>::read_xdr(r)?; @@ -45625,7 +45839,7 @@ impl ReadXdr for Signature { } impl WriteXdr for Signature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45777,7 +45991,7 @@ impl AsRef<[u8; 4]> for SignatureHint { } impl ReadXdr for SignatureHint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -45788,7 +46002,7 @@ impl ReadXdr for SignatureHint { } impl WriteXdr for SignatureHint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45868,7 +46082,7 @@ impl AsRef for NodeId { } impl ReadXdr for NodeId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = PublicKey::read_xdr(r)?; @@ -45879,7 +46093,7 @@ impl ReadXdr for NodeId { } impl WriteXdr for NodeId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45922,7 +46136,7 @@ impl AsRef for AccountId { } impl ReadXdr for AccountId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = PublicKey::read_xdr(r)?; @@ -45933,7 +46147,7 @@ impl ReadXdr for AccountId { } impl WriteXdr for AccountId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45961,7 +46175,7 @@ pub struct Curve25519Secret { } impl ReadXdr for Curve25519Secret { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -45972,7 +46186,7 @@ impl ReadXdr for Curve25519Secret { } impl WriteXdr for Curve25519Secret { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46003,7 +46217,7 @@ pub struct Curve25519Public { } impl ReadXdr for Curve25519Public { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46014,7 +46228,7 @@ impl ReadXdr for Curve25519Public { } impl WriteXdr for Curve25519Public { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46045,7 +46259,7 @@ pub struct HmacSha256Key { } impl ReadXdr for HmacSha256Key { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46056,7 +46270,7 @@ impl ReadXdr for HmacSha256Key { } impl WriteXdr for HmacSha256Key { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46087,7 +46301,7 @@ pub struct HmacSha256Mac { } impl ReadXdr for HmacSha256Mac { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46098,7 +46312,7 @@ impl ReadXdr for HmacSha256Mac { } impl WriteXdr for HmacSha256Mac { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.mac.write_xdr(w)?; @@ -46129,7 +46343,7 @@ pub struct ShortHashSeed { } impl ReadXdr for ShortHashSeed { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46140,7 +46354,7 @@ impl ReadXdr for ShortHashSeed { } impl WriteXdr for ShortHashSeed { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seed.write_xdr(w)?; @@ -46243,7 +46457,7 @@ impl From for i32 { } impl ReadXdr for BinaryFuseFilterType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -46254,7 +46468,7 @@ impl ReadXdr for BinaryFuseFilterType { } impl WriteXdr for BinaryFuseFilterType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -46307,7 +46521,7 @@ pub struct SerializedBinaryFuseFilter { } impl ReadXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46326,7 +46540,7 @@ impl ReadXdr for SerializedBinaryFuseFilter { } impl WriteXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.type_.write_xdr(w)?; @@ -50798,7 +51012,7 @@ impl Type { "SerializedBinaryFuseFilter", ]; - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] #[allow(clippy::too_many_lines)] pub fn read_xdr(v: TypeVariant, r: &mut Limited) -> Result { match v { @@ -52812,7 +53026,7 @@ impl Type { Ok(t) } - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] pub fn read_xdr_to_end(v: TypeVariant, r: &mut Limited) -> Result { let s = Self::read_xdr(v, r)?; // Check that any further reads, such as this read of one byte, read no @@ -58981,7 +59195,7 @@ impl Type { } } - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] pub fn from_xdr>(v: TypeVariant, bytes: B, limits: Limits) -> Result { let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); let t = Self::read_xdr_to_end(v, &mut cursor)?; @@ -63243,7 +63457,7 @@ impl Variants for Type { } impl WriteXdr for Type { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] #[allow(clippy::too_many_lines)] fn write_xdr(&self, w: &mut Limited) -> Result<()> { match self { diff --git a/src/next/generated.rs b/src/next/generated.rs index 7a60a41d..f9e12582 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -112,7 +112,7 @@ use std::{ io::{BufRead, BufReader, Cursor, Read, Write}, }; -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] use embedded_io_extras::{Cursor, Error as _, ErrorType, Read, Write}; /// Error contains all errors returned by functions in this crate. It can be @@ -130,7 +130,7 @@ pub enum Error { InvalidHex, #[cfg(feature = "std")] Io(io::Error), - #[cfg(all(not(feature = "std"), feature = "alloc"))] + #[cfg(feature = "embedded_io")] Io(embedded_io_extras::ErrorKind), DepthLimitExceeded, #[cfg(feature = "serde_json")] @@ -148,14 +148,14 @@ impl PartialEq for Error { // case for comparing errors outputted by the XDR library is for // error case testing, and a lack of the ability to compare has a // detrimental affect on failure testing, so this is a tradeoff. - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] (Self::Io(l), Self::Io(r)) => l.kind() == r.kind(), _ => core::mem::discriminant(self) == core::mem::discriminant(other), } } } -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl embedded_io_extras::Error for Error { fn kind(&self) -> embedded_io_extras::ErrorKind { match self { @@ -165,10 +165,11 @@ impl embedded_io_extras::Error for Error { } } -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl From> for Error { fn from(value: embedded_io_extras::ReadExactError) -> Self { match value { + // TODO: maybe we should map the error to a more specific error? embedded_io_extras::ReadExactError::UnexpectedEof => { Error::Io(embedded_io_extras::ErrorKind::Other) } @@ -203,7 +204,7 @@ impl fmt::Display for Error { Error::InvalidHex => write!(f, "hex invalid"), #[cfg(feature = "std")] Error::Io(e) => write!(f, "{e}"), - #[cfg(all(not(feature = "std"), feature = "alloc"))] + #[cfg(feature = "embedded_io")] Error::Io(_) => write!(f, "io error"), Error::DepthLimitExceeded => write!(f, "depth limit exceeded"), #[cfg(feature = "serde_json")] @@ -257,7 +258,7 @@ impl From for () { #[allow(dead_code)] type Result = core::result::Result; -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl ErrorType for Limited { type Error = Error; } @@ -295,7 +296,7 @@ where /// `Limits` contains the limits that a limited reader or writer will be /// constrained to. -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] #[derive(Debug, Clone, Hash, PartialEq, Eq, PartialOrd, Ord)] pub struct Limits { /// Defines the maximum depth for recursive calls in `Read/WriteXdr` to @@ -312,7 +313,7 @@ pub struct Limits { pub len: usize, } -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] impl Limits { #[must_use] pub fn none() -> Self { @@ -343,13 +344,13 @@ impl Limits { /// /// Intended for use with readers and writers and limiting their reads and /// writes. -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] pub struct Limited { pub inner: L, pub(crate) limits: Limits, } -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] impl Limited { /// Constructs a new `Limited`. /// @@ -402,7 +403,7 @@ impl Read for Limited { } } -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl Read for Limited { /// Forwards the read operation to the wrapped object. fn read(&mut self, buf: &mut [u8]) -> core::result::Result { @@ -436,7 +437,7 @@ impl Write for Limited { } } -#[cfg(all(not(feature = "std"), feature = "alloc"))] +#[cfg(feature = "embedded_io")] impl Write for Limited { /// Forwards the write operation to the wrapped object. fn write(&mut self, buf: &[u8]) -> core::result::Result { @@ -521,7 +522,7 @@ where /// /// Use [`ReadXdR: Read_xdr_to_end`] when the intent is for all bytes in the /// read implementation to be consumed by the read. - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result; /// Construct the type from the XDR bytes base64 encoded. @@ -556,7 +557,7 @@ where /// /// All implementations should continue if the read implementation returns /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr_to_end(r: &mut Limited) -> Result { let s = Self::read_xdr(r)?; // Check that any further reads, such as this read of one byte, read no @@ -596,7 +597,7 @@ where /// /// Use [`ReadXdR: Read_xdr_into_to_end`] when the intent is for all bytes /// in the read implementation to be consumed by the read. - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr_into(&mut self, r: &mut Limited) -> Result<()> { *self = Self::read_xdr(r)?; Ok(()) @@ -620,7 +621,7 @@ where /// /// All implementations should continue if the read implementation returns /// [`ErrorKind::Interrupted`](std::io::ErrorKind::Interrupted). - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr_into_to_end(&mut self, r: &mut Limited) -> Result<()> { Self::read_xdr_into(self, r)?; // Check that any further reads, such as this read of one byte, read no @@ -669,7 +670,7 @@ where /// /// An error is returned if the bytes are not completely consumed by the /// deserialization. - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn from_xdr(bytes: impl AsRef<[u8]>, limits: Limits) -> Result { let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); let t = Self::read_xdr_to_end(&mut cursor)?; @@ -693,10 +694,10 @@ where } pub trait WriteXdr { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()>; - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn to_xdr(&self, limits: Limits) -> Result> { let mut cursor = Limited::new(Cursor::new(vec![]), limits); self.write_xdr(&mut cursor)?; @@ -718,13 +719,13 @@ pub trait WriteXdr { /// `Pad_len` returns the number of bytes to pad an XDR value of the given /// length to make the final serialized size a multiple of 4. -#[cfg(feature = "alloc")] +#[cfg(any(feature = "std", feature = "embedded_io"))] fn pad_len(len: usize) -> usize { (4 - (len % 4)) % 4 } impl ReadXdr for i32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 4]; r.with_limited_depth(|r| { @@ -736,7 +737,7 @@ impl ReadXdr for i32 { } impl WriteXdr for i32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 4] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -747,7 +748,7 @@ impl WriteXdr for i32 { } impl ReadXdr for u32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 4]; r.with_limited_depth(|r| { @@ -759,7 +760,7 @@ impl ReadXdr for u32 { } impl WriteXdr for u32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 4] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -770,7 +771,7 @@ impl WriteXdr for u32 { } impl ReadXdr for i64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 8]; r.with_limited_depth(|r| { @@ -782,7 +783,7 @@ impl ReadXdr for i64 { } impl WriteXdr for i64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 8] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -793,7 +794,7 @@ impl WriteXdr for i64 { } impl ReadXdr for u64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { let mut b = [0u8; 8]; r.with_limited_depth(|r| { @@ -805,7 +806,7 @@ impl ReadXdr for u64 { } impl WriteXdr for u64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { let b: [u8; 8] = self.to_be_bytes(); w.with_limited_depth(|w| { @@ -816,35 +817,35 @@ impl WriteXdr for u64 { } impl ReadXdr for f32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(_r: &mut Limited) -> Result { todo!() } } impl WriteXdr for f32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { todo!() } } impl ReadXdr for f64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(_r: &mut Limited) -> Result { todo!() } } impl WriteXdr for f64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { todo!() } } impl ReadXdr for bool { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u32::read_xdr(r)?; @@ -855,7 +856,7 @@ impl ReadXdr for bool { } impl WriteXdr for bool { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i = u32::from(*self); // true = 1, false = 0 @@ -865,7 +866,7 @@ impl WriteXdr for bool { } impl ReadXdr for Option { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u32::read_xdr(r)?; @@ -882,7 +883,7 @@ impl ReadXdr for Option { } impl WriteXdr for Option { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { if let Some(t) = self { @@ -897,35 +898,35 @@ impl WriteXdr for Option { } impl ReadXdr for Box { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| Ok(Box::new(T::read_xdr(r)?))) } } impl WriteXdr for Box { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| T::write_xdr(self, w)) } } impl ReadXdr for () { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(_r: &mut Limited) -> Result { Ok(()) } } impl WriteXdr for () { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, _w: &mut Limited) -> Result<()> { Ok(()) } } impl ReadXdr for [u8; N] { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { r.consume_len(N)?; @@ -944,7 +945,7 @@ impl ReadXdr for [u8; N] { } impl WriteXdr for [u8; N] { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { w.consume_len(N)?; @@ -958,7 +959,7 @@ impl WriteXdr for [u8; N] { } impl ReadXdr for [T; N] { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let mut vec = Vec::with_capacity(N); @@ -973,7 +974,7 @@ impl ReadXdr for [T; N] { } impl WriteXdr for [T; N] { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { for t in self { @@ -1332,7 +1333,7 @@ impl<'a, const MAX: u32> TryFrom<&'a VecM> for &'a str { } impl ReadXdr for VecM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -1359,7 +1360,7 @@ impl ReadXdr for VecM { } impl WriteXdr for VecM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -1379,7 +1380,7 @@ impl WriteXdr for VecM { } impl ReadXdr for VecM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len = u32::read_xdr(r)?; @@ -1399,7 +1400,7 @@ impl ReadXdr for VecM { } impl WriteXdr for VecM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -1772,7 +1773,7 @@ impl<'a, const MAX: u32> TryFrom<&'a BytesM> for &'a str { } impl ReadXdr for BytesM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -1799,7 +1800,7 @@ impl ReadXdr for BytesM { } impl WriteXdr for BytesM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -2175,7 +2176,7 @@ impl<'a, const MAX: u32> TryFrom<&'a StringM> for &'a str { } impl ReadXdr for StringM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let len: u32 = u32::read_xdr(r)?; @@ -2202,7 +2203,7 @@ impl ReadXdr for StringM { } impl WriteXdr for StringM { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let len: u32 = self.len().try_into().map_err(|_| Error::LengthExceedsMax)?; @@ -2248,7 +2249,7 @@ impl ReadXdr for Frame where T: ReadXdr, { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { // Read the frame header value that contains 1 flag-bit and a 33-bit length. // - The 1 flag bit is 0 when there are more frames for the same record. @@ -2268,7 +2269,7 @@ where } } -#[cfg(all(test, feature = "alloc"))] +#[cfg(all(test, any(feature = "std", feature = "embedded_io")))] mod tests { use super::*; @@ -2378,7 +2379,7 @@ mod tests { } } -#[cfg(all(test, feature = "alloc"))] +#[cfg(all(test, any(feature = "std", feature = "embedded_io")))] mod test { use super::*; @@ -2891,6 +2892,219 @@ mod test { } } +#[cfg(all(test, any(feature = "std", feature = "embedded_io")))] +mod test_io { + // We will use different IO libraries according to the feature, + // we hope the selected IO library can work as expected + + use super::*; + + #[test] + fn test_read_exact_success() { + let data = b"The quick brown fox jumps over the lazy dog."; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 19]; // Exactly the length of "The quick brown fox" + + // Attempt to read exactly 19 bytes + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"The quick brown fox"); + assert_eq!(cursor.position(), 19); + } + + #[test] + fn test_read_exact_less_than_available() { + let data = b"Hello, Rust!"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 5]; + + // Attempt to read 5 bytes from the start + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"Hello"); + assert_eq!(cursor.position(), 5); + } + + #[test] + fn test_read_exact_exact_eof() { + let data = b"Data"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 4]; + + // Attempt to read exactly 4 bytes, which is the entire buffer + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"Data"); + assert_eq!(cursor.position(), 4); + + // Further attempt to read should fail with EOF + let mut buffer_eof = [0u8; 1]; + let result = cursor.read_exact(&mut buffer_eof); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + assert_eq!(cursor.position(), 4); // Position should remain at EOF + } + + #[test] + fn test_read_exact_past_eof() { + let data = b"Short"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 10]; // Requesting more bytes than available + + // Attempt to read 10 bytes from a 5-byte buffer + let result = cursor.read_exact(&mut buffer); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + assert_eq!(cursor.position(), 5); // Position should move to EOF + } + + #[test] + fn test_read_exact_empty_buffer() { + let data = b"Non-empty"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 0]; // Zero-length buffer + + // Attempt to read zero bytes + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(cursor.position(), 0); // Position should remain unchanged + } + + #[test] + fn test_read_exact_from_empty_cursor() { + let data: &[u8] = b""; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 5]; + + // Attempt to read from an empty cursor + let result = cursor.read_exact(&mut buffer); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + assert_eq!(cursor.position(), 0); // Position remains at 0 + } + + #[test] + fn test_read_exact_multiple_reads() { + let data = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + let mut cursor = Cursor::new(data); + + let mut buffer1 = [0u8; 10]; + let mut buffer2 = [0u8; 10]; + let mut buffer3 = [0u8; 10]; // Only 6 bytes left + + // First read: 10 bytes + assert!(cursor.read_exact(&mut buffer1).is_ok()); + assert_eq!(&buffer1, b"ABCDEFGHIJ"); + assert_eq!(cursor.position(), 10); + + // Second read: 10 bytes + assert!(cursor.read_exact(&mut buffer2).is_ok()); + assert_eq!(&buffer2, b"KLMNOPQRST"); + assert_eq!(cursor.position(), 20); + + // Third read: Attempt to read 10 bytes, but only 6 are available + let result = cursor.read_exact(&mut buffer3); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + // read_exact makes no promises about the content of the buffer on error + // assert_eq!(&buffer3[..6], b"UVWXYZ"); + assert_eq!(cursor.position(), 26); // Position should be at EOF + } + + #[test] + fn test_cursor_read_exact_after_eof() { + let data = b"End"; + let mut cursor = Cursor::new(data); + let mut buffer = [0u8; 3]; + + // First read: read the entire buffer + assert!(cursor.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"End"); + assert_eq!(cursor.position(), 3); + + // Second read: attempt to read again, should fail + let mut buffer_eof = [0u8; 1]; + let result = cursor.read_exact(&mut buffer_eof); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + assert_eq!(cursor.position(), 3); // Position remains at EOF + } + + #[test] + fn test_slice_read_exact_success() { + let data = b"SliceReadTest"; + let mut slice = &data[..]; + let mut buffer = [0u8; 13]; // Exact length + + // Using Read trait directly on slice + assert!(slice.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"SliceReadTest"); + } + + #[test] + fn test_slice_read_exact_partial() { + let data = b"SlicePartial"; + let mut slice = &data[..]; + let mut buffer = [0u8; 20]; // Request more bytes than available + + // Using Read trait directly on slice + let result = slice.read_exact(&mut buffer); + assert!(result.is_err()); + #[cfg(feature = "std")] + assert_eq!( + result.unwrap_err().kind(), + std::io::ErrorKind::UnexpectedEof + ); + #[cfg(feature = "embedded_io")] + assert_eq!( + result.unwrap_err(), + embedded_io_extras::ReadExactError::UnexpectedEof + ); + // read_exact makes no promises about the content of the buffer on error + } +} + /// Value is an XDR Typedef defines as: /// /// ```text @@ -2931,7 +3145,7 @@ impl AsRef for Value { } impl ReadXdr for Value { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::read_xdr(r)?; @@ -2942,7 +3156,7 @@ impl ReadXdr for Value { } impl WriteXdr for Value { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -3021,7 +3235,7 @@ pub struct ScpBallot { } impl ReadXdr for ScpBallot { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3033,7 +3247,7 @@ impl ReadXdr for ScpBallot { } impl WriteXdr for ScpBallot { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.counter.write_xdr(w)?; @@ -3142,7 +3356,7 @@ impl From for i32 { } impl ReadXdr for ScpStatementType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -3153,7 +3367,7 @@ impl ReadXdr for ScpStatementType { } impl WriteXdr for ScpStatementType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -3188,7 +3402,7 @@ pub struct ScpNomination { } impl ReadXdr for ScpNomination { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3201,7 +3415,7 @@ impl ReadXdr for ScpNomination { } impl WriteXdr for ScpNomination { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_set_hash.write_xdr(w)?; @@ -3244,7 +3458,7 @@ pub struct ScpStatementPrepare { } impl ReadXdr for ScpStatementPrepare { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3260,7 +3474,7 @@ impl ReadXdr for ScpStatementPrepare { } impl WriteXdr for ScpStatementPrepare { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_set_hash.write_xdr(w)?; @@ -3304,7 +3518,7 @@ pub struct ScpStatementConfirm { } impl ReadXdr for ScpStatementConfirm { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3319,7 +3533,7 @@ impl ReadXdr for ScpStatementConfirm { } impl WriteXdr for ScpStatementConfirm { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ballot.write_xdr(w)?; @@ -3358,7 +3572,7 @@ pub struct ScpStatementExternalize { } impl ReadXdr for ScpStatementExternalize { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3371,7 +3585,7 @@ impl ReadXdr for ScpStatementExternalize { } impl WriteXdr for ScpStatementExternalize { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.commit.write_xdr(w)?; @@ -3494,7 +3708,7 @@ impl Variants for ScpStatementPledges { impl Union for ScpStatementPledges {} impl ReadXdr for ScpStatementPledges { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScpStatementType = ::read_xdr(r)?; @@ -3515,7 +3729,7 @@ impl ReadXdr for ScpStatementPledges { } impl WriteXdr for ScpStatementPledges { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -3589,7 +3803,7 @@ pub struct ScpStatement { } impl ReadXdr for ScpStatement { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3602,7 +3816,7 @@ impl ReadXdr for ScpStatement { } impl WriteXdr for ScpStatement { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.node_id.write_xdr(w)?; @@ -3637,7 +3851,7 @@ pub struct ScpEnvelope { } impl ReadXdr for ScpEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3649,7 +3863,7 @@ impl ReadXdr for ScpEnvelope { } impl WriteXdr for ScpEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.statement.write_xdr(w)?; @@ -3685,7 +3899,7 @@ pub struct ScpQuorumSet { } impl ReadXdr for ScpQuorumSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3698,7 +3912,7 @@ impl ReadXdr for ScpQuorumSet { } impl WriteXdr for ScpQuorumSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.threshold.write_xdr(w)?; @@ -3732,7 +3946,7 @@ pub struct ConfigSettingContractExecutionLanesV0 { } impl ReadXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3743,7 +3957,7 @@ impl ReadXdr for ConfigSettingContractExecutionLanesV0 { } impl WriteXdr for ConfigSettingContractExecutionLanesV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_tx_count.write_xdr(w)?; @@ -3786,7 +4000,7 @@ pub struct ConfigSettingContractComputeV0 { } impl ReadXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3800,7 +4014,7 @@ impl ReadXdr for ConfigSettingContractComputeV0 { } impl WriteXdr for ConfigSettingContractComputeV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_instructions.write_xdr(w)?; @@ -3840,7 +4054,7 @@ pub struct ConfigSettingContractParallelComputeV0 { } impl ReadXdr for ConfigSettingContractParallelComputeV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3851,7 +4065,7 @@ impl ReadXdr for ConfigSettingContractParallelComputeV0 { } impl WriteXdr for ConfigSettingContractParallelComputeV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_parallel_threads.write_xdr(w)?; @@ -3927,7 +4141,7 @@ pub struct ConfigSettingContractLedgerCostV0 { } impl ReadXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -3952,7 +4166,7 @@ impl ReadXdr for ConfigSettingContractLedgerCostV0 { } impl WriteXdr for ConfigSettingContractLedgerCostV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_read_ledger_entries.write_xdr(w)?; @@ -3997,7 +4211,7 @@ pub struct ConfigSettingContractHistoricalDataV0 { } impl ReadXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4008,7 +4222,7 @@ impl ReadXdr for ConfigSettingContractHistoricalDataV0 { } impl WriteXdr for ConfigSettingContractHistoricalDataV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_historical1_kb.write_xdr(w)?; @@ -4043,7 +4257,7 @@ pub struct ConfigSettingContractEventsV0 { } impl ReadXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4055,7 +4269,7 @@ impl ReadXdr for ConfigSettingContractEventsV0 { } impl WriteXdr for ConfigSettingContractEventsV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_max_contract_events_size_bytes.write_xdr(w)?; @@ -4095,7 +4309,7 @@ pub struct ConfigSettingContractBandwidthV0 { } impl ReadXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4108,7 +4322,7 @@ impl ReadXdr for ConfigSettingContractBandwidthV0 { } impl WriteXdr for ConfigSettingContractBandwidthV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_max_txs_size_bytes.write_xdr(w)?; @@ -4684,7 +4898,7 @@ impl From for i32 { } impl ReadXdr for ContractCostType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -4695,7 +4909,7 @@ impl ReadXdr for ContractCostType { } impl WriteXdr for ContractCostType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -4731,7 +4945,7 @@ pub struct ContractCostParamEntry { } impl ReadXdr for ContractCostParamEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4744,7 +4958,7 @@ impl ReadXdr for ContractCostParamEntry { } impl WriteXdr for ContractCostParamEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -4806,7 +5020,7 @@ pub struct StateArchivalSettings { } impl ReadXdr for StateArchivalSettings { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4826,7 +5040,7 @@ impl ReadXdr for StateArchivalSettings { } impl WriteXdr for StateArchivalSettings { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.max_entry_ttl.write_xdr(w)?; @@ -4869,7 +5083,7 @@ pub struct EvictionIterator { } impl ReadXdr for EvictionIterator { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -4882,7 +5096,7 @@ impl ReadXdr for EvictionIterator { } impl WriteXdr for EvictionIterator { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.bucket_list_level.write_xdr(w)?; @@ -4941,7 +5155,7 @@ impl AsRef> for ContractCostParams { } impl ReadXdr for ContractCostParams { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -4952,7 +5166,7 @@ impl ReadXdr for ContractCostParams { } impl WriteXdr for ContractCostParams { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -5177,7 +5391,7 @@ impl From for i32 { } impl ReadXdr for ConfigSettingId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5188,7 +5402,7 @@ impl ReadXdr for ConfigSettingId { } impl WriteXdr for ConfigSettingId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5375,7 +5589,7 @@ impl Variants for ConfigSettingEntry { impl Union for ConfigSettingEntry {} impl ReadXdr for ConfigSettingEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ConfigSettingId = ::read_xdr(r)?; @@ -5435,7 +5649,7 @@ impl ReadXdr for ConfigSettingEntry { } impl WriteXdr for ConfigSettingEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -5544,7 +5758,7 @@ impl From for i32 { } impl ReadXdr for ScEnvMetaKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5555,7 +5769,7 @@ impl ReadXdr for ScEnvMetaKind { } impl WriteXdr for ScEnvMetaKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5587,7 +5801,7 @@ pub struct ScEnvMetaEntryInterfaceVersion { } impl ReadXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -5599,7 +5813,7 @@ impl ReadXdr for ScEnvMetaEntryInterfaceVersion { } impl WriteXdr for ScEnvMetaEntryInterfaceVersion { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.protocol.write_xdr(w)?; @@ -5684,7 +5898,7 @@ impl Variants for ScEnvMetaEntry { impl Union for ScEnvMetaEntry {} impl ReadXdr for ScEnvMetaEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScEnvMetaKind = ::read_xdr(r)?; @@ -5704,7 +5918,7 @@ impl ReadXdr for ScEnvMetaEntry { } impl WriteXdr for ScEnvMetaEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -5741,7 +5955,7 @@ pub struct ScMetaV0 { } impl ReadXdr for ScMetaV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -5753,7 +5967,7 @@ impl ReadXdr for ScMetaV0 { } impl WriteXdr for ScMetaV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -5845,7 +6059,7 @@ impl From for i32 { } impl ReadXdr for ScMetaKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -5856,7 +6070,7 @@ impl ReadXdr for ScMetaKind { } impl WriteXdr for ScMetaKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -5937,7 +6151,7 @@ impl Variants for ScMetaEntry { impl Union for ScMetaEntry {} impl ReadXdr for ScMetaEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScMetaKind = ::read_xdr(r)?; @@ -5953,7 +6167,7 @@ impl ReadXdr for ScMetaEntry { } impl WriteXdr for ScMetaEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -6210,7 +6424,7 @@ impl From for i32 { } impl ReadXdr for ScSpecType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -6221,7 +6435,7 @@ impl ReadXdr for ScSpecType { } impl WriteXdr for ScSpecType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -6252,7 +6466,7 @@ pub struct ScSpecTypeOption { } impl ReadXdr for ScSpecTypeOption { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6263,7 +6477,7 @@ impl ReadXdr for ScSpecTypeOption { } impl WriteXdr for ScSpecTypeOption { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.value_type.write_xdr(w)?; @@ -6296,7 +6510,7 @@ pub struct ScSpecTypeResult { } impl ReadXdr for ScSpecTypeResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6308,7 +6522,7 @@ impl ReadXdr for ScSpecTypeResult { } impl WriteXdr for ScSpecTypeResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ok_type.write_xdr(w)?; @@ -6340,7 +6554,7 @@ pub struct ScSpecTypeVec { } impl ReadXdr for ScSpecTypeVec { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6351,7 +6565,7 @@ impl ReadXdr for ScSpecTypeVec { } impl WriteXdr for ScSpecTypeVec { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.element_type.write_xdr(w)?; @@ -6384,7 +6598,7 @@ pub struct ScSpecTypeMap { } impl ReadXdr for ScSpecTypeMap { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6396,7 +6610,7 @@ impl ReadXdr for ScSpecTypeMap { } impl WriteXdr for ScSpecTypeMap { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_type.write_xdr(w)?; @@ -6428,7 +6642,7 @@ pub struct ScSpecTypeTuple { } impl ReadXdr for ScSpecTypeTuple { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6439,7 +6653,7 @@ impl ReadXdr for ScSpecTypeTuple { } impl WriteXdr for ScSpecTypeTuple { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.value_types.write_xdr(w)?; @@ -6470,7 +6684,7 @@ pub struct ScSpecTypeBytesN { } impl ReadXdr for ScSpecTypeBytesN { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6481,7 +6695,7 @@ impl ReadXdr for ScSpecTypeBytesN { } impl WriteXdr for ScSpecTypeBytesN { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.n.write_xdr(w)?; @@ -6512,7 +6726,7 @@ pub struct ScSpecTypeUdt { } impl ReadXdr for ScSpecTypeUdt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6523,7 +6737,7 @@ impl ReadXdr for ScSpecTypeUdt { } impl WriteXdr for ScSpecTypeUdt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.name.write_xdr(w)?; @@ -6759,7 +6973,7 @@ impl Variants for ScSpecTypeDef { impl Union for ScSpecTypeDef {} impl ReadXdr for ScSpecTypeDef { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecType = ::read_xdr(r)?; @@ -6799,7 +7013,7 @@ impl ReadXdr for ScSpecTypeDef { } impl WriteXdr for ScSpecTypeDef { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -6862,7 +7076,7 @@ pub struct ScSpecUdtStructFieldV0 { } impl ReadXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6875,7 +7089,7 @@ impl ReadXdr for ScSpecUdtStructFieldV0 { } impl WriteXdr for ScSpecUdtStructFieldV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6914,7 +7128,7 @@ pub struct ScSpecUdtStructV0 { } impl ReadXdr for ScSpecUdtStructV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6928,7 +7142,7 @@ impl ReadXdr for ScSpecUdtStructV0 { } impl WriteXdr for ScSpecUdtStructV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -6964,7 +7178,7 @@ pub struct ScSpecUdtUnionCaseVoidV0 { } impl ReadXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -6976,7 +7190,7 @@ impl ReadXdr for ScSpecUdtUnionCaseVoidV0 { } impl WriteXdr for ScSpecUdtUnionCaseVoidV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7012,7 +7226,7 @@ pub struct ScSpecUdtUnionCaseTupleV0 { } impl ReadXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7025,7 +7239,7 @@ impl ReadXdr for ScSpecUdtUnionCaseTupleV0 { } impl WriteXdr for ScSpecUdtUnionCaseTupleV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7125,7 +7339,7 @@ impl From for i32 { } impl ReadXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -7136,7 +7350,7 @@ impl ReadXdr for ScSpecUdtUnionCaseV0Kind { } impl WriteXdr for ScSpecUdtUnionCaseV0Kind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -7225,7 +7439,7 @@ impl Variants for ScSpecUdtUnionCaseV0 { impl Union for ScSpecUdtUnionCaseV0 {} impl ReadXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecUdtUnionCaseV0Kind = ::read_xdr(r)?; @@ -7246,7 +7460,7 @@ impl ReadXdr for ScSpecUdtUnionCaseV0 { } impl WriteXdr for ScSpecUdtUnionCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -7288,7 +7502,7 @@ pub struct ScSpecUdtUnionV0 { } impl ReadXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7302,7 +7516,7 @@ impl ReadXdr for ScSpecUdtUnionV0 { } impl WriteXdr for ScSpecUdtUnionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7340,7 +7554,7 @@ pub struct ScSpecUdtEnumCaseV0 { } impl ReadXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7353,7 +7567,7 @@ impl ReadXdr for ScSpecUdtEnumCaseV0 { } impl WriteXdr for ScSpecUdtEnumCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7392,7 +7606,7 @@ pub struct ScSpecUdtEnumV0 { } impl ReadXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7406,7 +7620,7 @@ impl ReadXdr for ScSpecUdtEnumV0 { } impl WriteXdr for ScSpecUdtEnumV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7444,7 +7658,7 @@ pub struct ScSpecUdtErrorEnumCaseV0 { } impl ReadXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7457,7 +7671,7 @@ impl ReadXdr for ScSpecUdtErrorEnumCaseV0 { } impl WriteXdr for ScSpecUdtErrorEnumCaseV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7496,7 +7710,7 @@ pub struct ScSpecUdtErrorEnumV0 { } impl ReadXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7510,7 +7724,7 @@ impl ReadXdr for ScSpecUdtErrorEnumV0 { } impl WriteXdr for ScSpecUdtErrorEnumV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7548,7 +7762,7 @@ pub struct ScSpecFunctionInputV0 { } impl ReadXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7561,7 +7775,7 @@ impl ReadXdr for ScSpecFunctionInputV0 { } impl WriteXdr for ScSpecFunctionInputV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7600,7 +7814,7 @@ pub struct ScSpecFunctionV0 { } impl ReadXdr for ScSpecFunctionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -7614,7 +7828,7 @@ impl ReadXdr for ScSpecFunctionV0 { } impl WriteXdr for ScSpecFunctionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.doc.write_xdr(w)?; @@ -7736,7 +7950,7 @@ impl From for i32 { } impl ReadXdr for ScSpecEntryKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -7747,7 +7961,7 @@ impl ReadXdr for ScSpecEntryKind { } impl WriteXdr for ScSpecEntryKind { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -7860,7 +8074,7 @@ impl Variants for ScSpecEntry { impl Union for ScSpecEntry {} impl ReadXdr for ScSpecEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScSpecEntryKind = ::read_xdr(r)?; @@ -7882,7 +8096,7 @@ impl ReadXdr for ScSpecEntry { } impl WriteXdr for ScSpecEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -8140,7 +8354,7 @@ impl From for i32 { } impl ReadXdr for ScValType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8151,7 +8365,7 @@ impl ReadXdr for ScValType { } impl WriteXdr for ScValType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8292,7 +8506,7 @@ impl From for i32 { } impl ReadXdr for ScErrorType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8303,7 +8517,7 @@ impl ReadXdr for ScErrorType { } impl WriteXdr for ScErrorType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8452,7 +8666,7 @@ impl From for i32 { } impl ReadXdr for ScErrorCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8463,7 +8677,7 @@ impl ReadXdr for ScErrorCode { } impl WriteXdr for ScErrorCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -8595,7 +8809,7 @@ impl Variants for ScError { impl Union for ScError {} impl ReadXdr for ScError { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScErrorType = ::read_xdr(r)?; @@ -8620,7 +8834,7 @@ impl ReadXdr for ScError { } impl WriteXdr for ScError { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -8665,7 +8879,7 @@ pub struct UInt128Parts { } impl ReadXdr for UInt128Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8677,7 +8891,7 @@ impl ReadXdr for UInt128Parts { } impl WriteXdr for UInt128Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi.write_xdr(w)?; @@ -8710,7 +8924,7 @@ pub struct Int128Parts { } impl ReadXdr for Int128Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8722,7 +8936,7 @@ impl ReadXdr for Int128Parts { } impl WriteXdr for Int128Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi.write_xdr(w)?; @@ -8759,7 +8973,7 @@ pub struct UInt256Parts { } impl ReadXdr for UInt256Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8773,7 +8987,7 @@ impl ReadXdr for UInt256Parts { } impl WriteXdr for UInt256Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi_hi.write_xdr(w)?; @@ -8812,7 +9026,7 @@ pub struct Int256Parts { } impl ReadXdr for Int256Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -8826,7 +9040,7 @@ impl ReadXdr for Int256Parts { } impl WriteXdr for Int256Parts { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hi_hi.write_xdr(w)?; @@ -8927,7 +9141,7 @@ impl From for i32 { } impl ReadXdr for ContractExecutableType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -8938,7 +9152,7 @@ impl ReadXdr for ContractExecutableType { } impl WriteXdr for ContractExecutableType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -9027,7 +9241,7 @@ impl Variants for ContractExecutable { impl Union for ContractExecutable {} impl ReadXdr for ContractExecutable { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ContractExecutableType = ::read_xdr(r)?; @@ -9044,7 +9258,7 @@ impl ReadXdr for ContractExecutable { } impl WriteXdr for ContractExecutable { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -9144,7 +9358,7 @@ impl From for i32 { } impl ReadXdr for ScAddressType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -9155,7 +9369,7 @@ impl ReadXdr for ScAddressType { } impl WriteXdr for ScAddressType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -9239,7 +9453,7 @@ impl Variants for ScAddress { impl Union for ScAddress {} impl ReadXdr for ScAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScAddressType = ::read_xdr(r)?; @@ -9256,7 +9470,7 @@ impl ReadXdr for ScAddress { } impl WriteXdr for ScAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -9318,7 +9532,7 @@ impl AsRef> for ScVec { } impl ReadXdr for ScVec { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -9329,7 +9543,7 @@ impl ReadXdr for ScVec { } impl WriteXdr for ScVec { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9424,7 +9638,7 @@ impl AsRef> for ScMap { } impl ReadXdr for ScMap { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -9435,7 +9649,7 @@ impl ReadXdr for ScMap { } impl WriteXdr for ScMap { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9530,7 +9744,7 @@ impl AsRef for ScBytes { } impl ReadXdr for ScBytes { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::read_xdr(r)?; @@ -9541,7 +9755,7 @@ impl ReadXdr for ScBytes { } impl WriteXdr for ScBytes { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9636,7 +9850,7 @@ impl AsRef for ScString { } impl ReadXdr for ScString { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::read_xdr(r)?; @@ -9647,7 +9861,7 @@ impl ReadXdr for ScString { } impl WriteXdr for ScString { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9742,7 +9956,7 @@ impl AsRef> for ScSymbol { } impl ReadXdr for ScSymbol { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<32>::read_xdr(r)?; @@ -9753,7 +9967,7 @@ impl ReadXdr for ScSymbol { } impl WriteXdr for ScSymbol { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -9829,7 +10043,7 @@ pub struct ScNonceKey { } impl ReadXdr for ScNonceKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -9840,7 +10054,7 @@ impl ReadXdr for ScNonceKey { } impl WriteXdr for ScNonceKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.nonce.write_xdr(w)?; @@ -9872,7 +10086,7 @@ pub struct ScContractInstance { } impl ReadXdr for ScContractInstance { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -9884,7 +10098,7 @@ impl ReadXdr for ScContractInstance { } impl WriteXdr for ScContractInstance { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.executable.write_xdr(w)?; @@ -10131,7 +10345,7 @@ impl Variants for ScVal { impl Union for ScVal {} impl ReadXdr for ScVal { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ScValType = ::read_xdr(r)?; @@ -10170,7 +10384,7 @@ impl ReadXdr for ScVal { } impl WriteXdr for ScVal { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10228,7 +10442,7 @@ pub struct ScMapEntry { } impl ReadXdr for ScMapEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10240,7 +10454,7 @@ impl ReadXdr for ScMapEntry { } impl WriteXdr for ScMapEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -10327,7 +10541,7 @@ impl Variants for StoredTransactionSet { impl Union for StoredTransactionSet {} impl ReadXdr for StoredTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -10344,7 +10558,7 @@ impl ReadXdr for StoredTransactionSet { } impl WriteXdr for StoredTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10384,7 +10598,7 @@ pub struct StoredDebugTransactionSet { } impl ReadXdr for StoredDebugTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10397,7 +10611,7 @@ impl ReadXdr for StoredDebugTransactionSet { } impl WriteXdr for StoredDebugTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_set.write_xdr(w)?; @@ -10434,7 +10648,7 @@ pub struct PersistedScpStateV0 { } impl ReadXdr for PersistedScpStateV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10447,7 +10661,7 @@ impl ReadXdr for PersistedScpStateV0 { } impl WriteXdr for PersistedScpStateV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.scp_envelopes.write_xdr(w)?; @@ -10483,7 +10697,7 @@ pub struct PersistedScpStateV1 { } impl ReadXdr for PersistedScpStateV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -10495,7 +10709,7 @@ impl ReadXdr for PersistedScpStateV1 { } impl WriteXdr for PersistedScpStateV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.scp_envelopes.write_xdr(w)?; @@ -10582,7 +10796,7 @@ impl Variants for PersistedScpState { impl Union for PersistedScpState {} impl ReadXdr for PersistedScpState { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -10599,7 +10813,7 @@ impl ReadXdr for PersistedScpState { } impl WriteXdr for PersistedScpState { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -10710,7 +10924,7 @@ impl AsRef<[u8; 4]> for Thresholds { } impl ReadXdr for Thresholds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -10721,7 +10935,7 @@ impl ReadXdr for Thresholds { } impl WriteXdr for Thresholds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10804,7 +11018,7 @@ impl AsRef> for String32 { } impl ReadXdr for String32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<32>::read_xdr(r)?; @@ -10815,7 +11029,7 @@ impl ReadXdr for String32 { } impl WriteXdr for String32 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -10910,7 +11124,7 @@ impl AsRef> for String64 { } impl ReadXdr for String64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = StringM::<64>::read_xdr(r)?; @@ -10921,7 +11135,7 @@ impl ReadXdr for String64 { } impl WriteXdr for String64 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11015,7 +11229,7 @@ impl AsRef for SequenceNumber { } impl ReadXdr for SequenceNumber { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = i64::read_xdr(r)?; @@ -11026,7 +11240,7 @@ impl ReadXdr for SequenceNumber { } impl WriteXdr for SequenceNumber { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11072,7 +11286,7 @@ impl AsRef> for DataValue { } impl ReadXdr for DataValue { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64>::read_xdr(r)?; @@ -11083,7 +11297,7 @@ impl ReadXdr for DataValue { } impl WriteXdr for DataValue { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11177,7 +11391,7 @@ impl AsRef for PoolId { } impl ReadXdr for PoolId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = Hash::read_xdr(r)?; @@ -11188,7 +11402,7 @@ impl ReadXdr for PoolId { } impl WriteXdr for PoolId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11241,7 +11455,7 @@ impl AsRef<[u8; 4]> for AssetCode4 { } impl ReadXdr for AssetCode4 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -11252,7 +11466,7 @@ impl ReadXdr for AssetCode4 { } impl WriteXdr for AssetCode4 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11342,7 +11556,7 @@ impl AsRef<[u8; 12]> for AssetCode12 { } impl ReadXdr for AssetCode12 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 12]>::read_xdr(r)?; @@ -11353,7 +11567,7 @@ impl ReadXdr for AssetCode12 { } impl WriteXdr for AssetCode12 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -11496,7 +11710,7 @@ impl From for i32 { } impl ReadXdr for AssetType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -11507,7 +11721,7 @@ impl ReadXdr for AssetType { } impl WriteXdr for AssetType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -11594,7 +11808,7 @@ impl Variants for AssetCode { impl Union for AssetCode {} impl ReadXdr for AssetCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -11611,7 +11825,7 @@ impl ReadXdr for AssetCode { } impl WriteXdr for AssetCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -11649,7 +11863,7 @@ pub struct AlphaNum4 { } impl ReadXdr for AlphaNum4 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11661,7 +11875,7 @@ impl ReadXdr for AlphaNum4 { } impl WriteXdr for AlphaNum4 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_code.write_xdr(w)?; @@ -11695,7 +11909,7 @@ pub struct AlphaNum12 { } impl ReadXdr for AlphaNum12 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11707,7 +11921,7 @@ impl ReadXdr for AlphaNum12 { } impl WriteXdr for AlphaNum12 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_code.write_xdr(w)?; @@ -11807,7 +12021,7 @@ impl Variants for Asset { impl Union for Asset {} impl ReadXdr for Asset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -11825,7 +12039,7 @@ impl ReadXdr for Asset { } impl WriteXdr for Asset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -11864,7 +12078,7 @@ pub struct Price { } impl ReadXdr for Price { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11876,7 +12090,7 @@ impl ReadXdr for Price { } impl WriteXdr for Price { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.n.write_xdr(w)?; @@ -11910,7 +12124,7 @@ pub struct Liabilities { } impl ReadXdr for Liabilities { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -11922,7 +12136,7 @@ impl ReadXdr for Liabilities { } impl WriteXdr for Liabilities { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.buying.write_xdr(w)?; @@ -12031,7 +12245,7 @@ impl From for i32 { } impl ReadXdr for ThresholdIndexes { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -12042,7 +12256,7 @@ impl ReadXdr for ThresholdIndexes { } impl WriteXdr for ThresholdIndexes { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12191,7 +12405,7 @@ impl From for i32 { } impl ReadXdr for LedgerEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -12202,7 +12416,7 @@ impl ReadXdr for LedgerEntryType { } impl WriteXdr for LedgerEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12235,7 +12449,7 @@ pub struct Signer { } impl ReadXdr for Signer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12247,7 +12461,7 @@ impl ReadXdr for Signer { } impl WriteXdr for Signer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -12371,7 +12585,7 @@ impl From for i32 { } impl ReadXdr for AccountFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -12382,7 +12596,7 @@ impl ReadXdr for AccountFlags { } impl WriteXdr for AccountFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -12454,7 +12668,7 @@ impl AsRef> for SponsorshipDescriptor { } impl ReadXdr for SponsorshipDescriptor { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = Option::::read_xdr(r)?; @@ -12465,7 +12679,7 @@ impl ReadXdr for SponsorshipDescriptor { } impl WriteXdr for SponsorshipDescriptor { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -12503,7 +12717,7 @@ pub struct AccountEntryExtensionV3 { } impl ReadXdr for AccountEntryExtensionV3 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12516,7 +12730,7 @@ impl ReadXdr for AccountEntryExtensionV3 { } impl WriteXdr for AccountEntryExtensionV3 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -12604,7 +12818,7 @@ impl Variants for AccountEntryExtensionV2Ext { impl Union for AccountEntryExtensionV2Ext {} impl ReadXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12621,7 +12835,7 @@ impl ReadXdr for AccountEntryExtensionV2Ext { } impl WriteXdr for AccountEntryExtensionV2Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12671,7 +12885,7 @@ pub struct AccountEntryExtensionV2 { } impl ReadXdr for AccountEntryExtensionV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12685,7 +12899,7 @@ impl ReadXdr for AccountEntryExtensionV2 { } impl WriteXdr for AccountEntryExtensionV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_sponsored.write_xdr(w)?; @@ -12774,7 +12988,7 @@ impl Variants for AccountEntryExtensionV1Ext { impl Union for AccountEntryExtensionV1Ext {} impl ReadXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12791,7 +13005,7 @@ impl ReadXdr for AccountEntryExtensionV1Ext { } impl WriteXdr for AccountEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -12837,7 +13051,7 @@ pub struct AccountEntryExtensionV1 { } impl ReadXdr for AccountEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -12849,7 +13063,7 @@ impl ReadXdr for AccountEntryExtensionV1 { } impl WriteXdr for AccountEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liabilities.write_xdr(w)?; @@ -12936,7 +13150,7 @@ impl Variants for AccountEntryExt { impl Union for AccountEntryExt {} impl ReadXdr for AccountEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -12953,7 +13167,7 @@ impl ReadXdr for AccountEntryExt { } impl WriteXdr for AccountEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13022,7 +13236,7 @@ pub struct AccountEntry { } impl ReadXdr for AccountEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13042,7 +13256,7 @@ impl ReadXdr for AccountEntry { } impl WriteXdr for AccountEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -13163,7 +13377,7 @@ impl From for i32 { } impl ReadXdr for TrustLineFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13174,7 +13388,7 @@ impl ReadXdr for TrustLineFlags { } impl WriteXdr for TrustLineFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -13289,7 +13503,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -13300,7 +13514,7 @@ impl ReadXdr for LiquidityPoolType { } impl WriteXdr for LiquidityPoolType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -13407,7 +13621,7 @@ impl Variants for TrustLineAsset { impl Union for TrustLineAsset {} impl ReadXdr for TrustLineAsset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -13426,7 +13640,7 @@ impl ReadXdr for TrustLineAsset { } impl WriteXdr for TrustLineAsset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13514,7 +13728,7 @@ impl Variants for TrustLineEntryExtensionV2Ext { impl Union for TrustLineEntryExtensionV2Ext {} impl ReadXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13530,7 +13744,7 @@ impl ReadXdr for TrustLineEntryExtensionV2Ext { } impl WriteXdr for TrustLineEntryExtensionV2Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13573,7 +13787,7 @@ pub struct TrustLineEntryExtensionV2 { } impl ReadXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13585,7 +13799,7 @@ impl ReadXdr for TrustLineEntryExtensionV2 { } impl WriteXdr for TrustLineEntryExtensionV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_use_count.write_xdr(w)?; @@ -13672,7 +13886,7 @@ impl Variants for TrustLineEntryV1Ext { impl Union for TrustLineEntryV1Ext {} impl ReadXdr for TrustLineEntryV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13689,7 +13903,7 @@ impl ReadXdr for TrustLineEntryV1Ext { } impl WriteXdr for TrustLineEntryV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13735,7 +13949,7 @@ pub struct TrustLineEntryV1 { } impl ReadXdr for TrustLineEntryV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13747,7 +13961,7 @@ impl ReadXdr for TrustLineEntryV1 { } impl WriteXdr for TrustLineEntryV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liabilities.write_xdr(w)?; @@ -13846,7 +14060,7 @@ impl Variants for TrustLineEntryExt { impl Union for TrustLineEntryExt {} impl ReadXdr for TrustLineEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -13863,7 +14077,7 @@ impl ReadXdr for TrustLineEntryExt { } impl WriteXdr for TrustLineEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -13932,7 +14146,7 @@ pub struct TrustLineEntry { } impl ReadXdr for TrustLineEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -13948,7 +14162,7 @@ impl ReadXdr for TrustLineEntry { } impl WriteXdr for TrustLineEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -14046,7 +14260,7 @@ impl From for i32 { } impl ReadXdr for OfferEntryFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14057,7 +14271,7 @@ impl ReadXdr for OfferEntryFlags { } impl WriteXdr for OfferEntryFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14146,7 +14360,7 @@ impl Variants for OfferEntryExt { impl Union for OfferEntryExt {} impl ReadXdr for OfferEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -14162,7 +14376,7 @@ impl ReadXdr for OfferEntryExt { } impl WriteXdr for OfferEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14224,7 +14438,7 @@ pub struct OfferEntry { } impl ReadXdr for OfferEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14242,7 +14456,7 @@ impl ReadXdr for OfferEntry { } impl WriteXdr for OfferEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -14330,7 +14544,7 @@ impl Variants for DataEntryExt { impl Union for DataEntryExt {} impl ReadXdr for DataEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -14346,7 +14560,7 @@ impl ReadXdr for DataEntryExt { } impl WriteXdr for DataEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14394,7 +14608,7 @@ pub struct DataEntry { } impl ReadXdr for DataEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14408,7 +14622,7 @@ impl ReadXdr for DataEntry { } impl WriteXdr for DataEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -14536,7 +14750,7 @@ impl From for i32 { } impl ReadXdr for ClaimPredicateType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14547,7 +14761,7 @@ impl ReadXdr for ClaimPredicateType { } impl WriteXdr for ClaimPredicateType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14668,7 +14882,7 @@ impl Variants for ClaimPredicate { impl Union for ClaimPredicate {} impl ReadXdr for ClaimPredicate { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimPredicateType = ::read_xdr(r)?; @@ -14693,7 +14907,7 @@ impl ReadXdr for ClaimPredicate { } impl WriteXdr for ClaimPredicate { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -14793,7 +15007,7 @@ impl From for i32 { } impl ReadXdr for ClaimantType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -14804,7 +15018,7 @@ impl ReadXdr for ClaimantType { } impl WriteXdr for ClaimantType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -14837,7 +15051,7 @@ pub struct ClaimantV0 { } impl ReadXdr for ClaimantV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -14849,7 +15063,7 @@ impl ReadXdr for ClaimantV0 { } impl WriteXdr for ClaimantV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -14935,7 +15149,7 @@ impl Variants for Claimant { impl Union for Claimant {} impl ReadXdr for Claimant { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimantType = ::read_xdr(r)?; @@ -14951,7 +15165,7 @@ impl ReadXdr for Claimant { } impl WriteXdr for Claimant { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15047,7 +15261,7 @@ impl From for i32 { } impl ReadXdr for ClaimableBalanceIdType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -15058,7 +15272,7 @@ impl ReadXdr for ClaimableBalanceIdType { } impl WriteXdr for ClaimableBalanceIdType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15138,7 +15352,7 @@ impl Variants for ClaimableBalanceId { impl Union for ClaimableBalanceId {} impl ReadXdr for ClaimableBalanceId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimableBalanceIdType = ::read_xdr(r)?; @@ -15156,7 +15370,7 @@ impl ReadXdr for ClaimableBalanceId { } impl WriteXdr for ClaimableBalanceId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15254,7 +15468,7 @@ impl From for i32 { } impl ReadXdr for ClaimableBalanceFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -15265,7 +15479,7 @@ impl ReadXdr for ClaimableBalanceFlags { } impl WriteXdr for ClaimableBalanceFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -15354,7 +15568,7 @@ impl Variants for ClaimableBalanceEntryExtensionV1Ext { impl Union for ClaimableBalanceEntryExtensionV1Ext {} impl ReadXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -15370,7 +15584,7 @@ impl ReadXdr for ClaimableBalanceEntryExtensionV1Ext { } impl WriteXdr for ClaimableBalanceEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15413,7 +15627,7 @@ pub struct ClaimableBalanceEntryExtensionV1 { } impl ReadXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15425,7 +15639,7 @@ impl ReadXdr for ClaimableBalanceEntryExtensionV1 { } impl WriteXdr for ClaimableBalanceEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -15512,7 +15726,7 @@ impl Variants for ClaimableBalanceEntryExt { impl Union for ClaimableBalanceEntryExt {} impl ReadXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -15529,7 +15743,7 @@ impl ReadXdr for ClaimableBalanceEntryExt { } impl WriteXdr for ClaimableBalanceEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15589,7 +15803,7 @@ pub struct ClaimableBalanceEntry { } impl ReadXdr for ClaimableBalanceEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15604,7 +15818,7 @@ impl ReadXdr for ClaimableBalanceEntry { } impl WriteXdr for ClaimableBalanceEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -15643,7 +15857,7 @@ pub struct LiquidityPoolConstantProductParameters { } impl ReadXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15656,7 +15870,7 @@ impl ReadXdr for LiquidityPoolConstantProductParameters { } impl WriteXdr for LiquidityPoolConstantProductParameters { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset_a.write_xdr(w)?; @@ -15699,7 +15913,7 @@ pub struct LiquidityPoolEntryConstantProduct { } impl ReadXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15714,7 +15928,7 @@ impl ReadXdr for LiquidityPoolEntryConstantProduct { } impl WriteXdr for LiquidityPoolEntryConstantProduct { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.params.write_xdr(w)?; @@ -15810,7 +16024,7 @@ impl Variants for LiquidityPoolEntryBody { impl Union for LiquidityPoolEntryBody {} impl ReadXdr for LiquidityPoolEntryBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolType = ::read_xdr(r)?; @@ -15830,7 +16044,7 @@ impl ReadXdr for LiquidityPoolEntryBody { } impl WriteXdr for LiquidityPoolEntryBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -15882,7 +16096,7 @@ pub struct LiquidityPoolEntry { } impl ReadXdr for LiquidityPoolEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -15894,7 +16108,7 @@ impl ReadXdr for LiquidityPoolEntry { } impl WriteXdr for LiquidityPoolEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -15992,7 +16206,7 @@ impl From for i32 { } impl ReadXdr for ContractDataDurability { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -16003,7 +16217,7 @@ impl ReadXdr for ContractDataDurability { } impl WriteXdr for ContractDataDurability { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -16042,7 +16256,7 @@ pub struct ContractDataEntry { } impl ReadXdr for ContractDataEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16057,7 +16271,7 @@ impl ReadXdr for ContractDataEntry { } impl WriteXdr for ContractDataEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16111,7 +16325,7 @@ pub struct ContractCodeCostInputs { } impl ReadXdr for ContractCodeCostInputs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16132,7 +16346,7 @@ impl ReadXdr for ContractCodeCostInputs { } impl WriteXdr for ContractCodeCostInputs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16175,7 +16389,7 @@ pub struct ContractCodeEntryV1 { } impl ReadXdr for ContractCodeEntryV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16187,7 +16401,7 @@ impl ReadXdr for ContractCodeEntryV1 { } impl WriteXdr for ContractCodeEntryV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16278,7 +16492,7 @@ impl Variants for ContractCodeEntryExt { impl Union for ContractCodeEntryExt {} impl ReadXdr for ContractCodeEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16295,7 +16509,7 @@ impl ReadXdr for ContractCodeEntryExt { } impl WriteXdr for ContractCodeEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16345,7 +16559,7 @@ pub struct ContractCodeEntry { } impl ReadXdr for ContractCodeEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16358,7 +16572,7 @@ impl ReadXdr for ContractCodeEntry { } impl WriteXdr for ContractCodeEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -16393,7 +16607,7 @@ pub struct TtlEntry { } impl ReadXdr for TtlEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16405,7 +16619,7 @@ impl ReadXdr for TtlEntry { } impl WriteXdr for TtlEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_hash.write_xdr(w)?; @@ -16487,7 +16701,7 @@ impl Variants for LedgerEntryExtensionV1Ext { impl Union for LedgerEntryExtensionV1Ext {} impl ReadXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16503,7 +16717,7 @@ impl ReadXdr for LedgerEntryExtensionV1Ext { } impl WriteXdr for LedgerEntryExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16546,7 +16760,7 @@ pub struct LedgerEntryExtensionV1 { } impl ReadXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16558,7 +16772,7 @@ impl ReadXdr for LedgerEntryExtensionV1 { } impl WriteXdr for LedgerEntryExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sponsoring_id.write_xdr(w)?; @@ -16707,7 +16921,7 @@ impl Variants for LedgerEntryData { impl Union for LedgerEntryData {} impl ReadXdr for LedgerEntryData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryType = ::read_xdr(r)?; @@ -16742,7 +16956,7 @@ impl ReadXdr for LedgerEntryData { } impl WriteXdr for LedgerEntryData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16841,7 +17055,7 @@ impl Variants for LedgerEntryExt { impl Union for LedgerEntryExt {} impl ReadXdr for LedgerEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -16858,7 +17072,7 @@ impl ReadXdr for LedgerEntryExt { } impl WriteXdr for LedgerEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -16931,7 +17145,7 @@ pub struct LedgerEntry { } impl ReadXdr for LedgerEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16944,7 +17158,7 @@ impl ReadXdr for LedgerEntry { } impl WriteXdr for LedgerEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.last_modified_ledger_seq.write_xdr(w)?; @@ -16977,7 +17191,7 @@ pub struct LedgerKeyAccount { } impl ReadXdr for LedgerKeyAccount { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -16988,7 +17202,7 @@ impl ReadXdr for LedgerKeyAccount { } impl WriteXdr for LedgerKeyAccount { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -17021,7 +17235,7 @@ pub struct LedgerKeyTrustLine { } impl ReadXdr for LedgerKeyTrustLine { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17033,7 +17247,7 @@ impl ReadXdr for LedgerKeyTrustLine { } impl WriteXdr for LedgerKeyTrustLine { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -17067,7 +17281,7 @@ pub struct LedgerKeyOffer { } impl ReadXdr for LedgerKeyOffer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17079,7 +17293,7 @@ impl ReadXdr for LedgerKeyOffer { } impl WriteXdr for LedgerKeyOffer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -17113,7 +17327,7 @@ pub struct LedgerKeyData { } impl ReadXdr for LedgerKeyData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17125,7 +17339,7 @@ impl ReadXdr for LedgerKeyData { } impl WriteXdr for LedgerKeyData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -17157,7 +17371,7 @@ pub struct LedgerKeyClaimableBalance { } impl ReadXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17168,7 +17382,7 @@ impl ReadXdr for LedgerKeyClaimableBalance { } impl WriteXdr for LedgerKeyClaimableBalance { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -17199,7 +17413,7 @@ pub struct LedgerKeyLiquidityPool { } impl ReadXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17210,7 +17424,7 @@ impl ReadXdr for LedgerKeyLiquidityPool { } impl WriteXdr for LedgerKeyLiquidityPool { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -17245,7 +17459,7 @@ pub struct LedgerKeyContractData { } impl ReadXdr for LedgerKeyContractData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17258,7 +17472,7 @@ impl ReadXdr for LedgerKeyContractData { } impl WriteXdr for LedgerKeyContractData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract.write_xdr(w)?; @@ -17291,7 +17505,7 @@ pub struct LedgerKeyContractCode { } impl ReadXdr for LedgerKeyContractCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17302,7 +17516,7 @@ impl ReadXdr for LedgerKeyContractCode { } impl WriteXdr for LedgerKeyContractCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hash.write_xdr(w)?; @@ -17333,7 +17547,7 @@ pub struct LedgerKeyConfigSetting { } impl ReadXdr for LedgerKeyConfigSetting { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17344,7 +17558,7 @@ impl ReadXdr for LedgerKeyConfigSetting { } impl WriteXdr for LedgerKeyConfigSetting { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.config_setting_id.write_xdr(w)?; @@ -17376,7 +17590,7 @@ pub struct LedgerKeyTtl { } impl ReadXdr for LedgerKeyTtl { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -17387,7 +17601,7 @@ impl ReadXdr for LedgerKeyTtl { } impl WriteXdr for LedgerKeyTtl { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key_hash.write_xdr(w)?; @@ -17576,7 +17790,7 @@ impl Variants for LedgerKey { impl Union for LedgerKey {} impl ReadXdr for LedgerKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryType = ::read_xdr(r)?; @@ -17611,7 +17825,7 @@ impl ReadXdr for LedgerKey { } impl WriteXdr for LedgerKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -17773,7 +17987,7 @@ impl From for i32 { } impl ReadXdr for EnvelopeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17784,7 +17998,7 @@ impl ReadXdr for EnvelopeType { } impl WriteXdr for EnvelopeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -17887,7 +18101,7 @@ impl From for i32 { } impl ReadXdr for BucketListType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -17898,7 +18112,7 @@ impl ReadXdr for BucketListType { } impl WriteXdr for BucketListType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18009,7 +18223,7 @@ impl From for i32 { } impl ReadXdr for BucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -18020,7 +18234,7 @@ impl ReadXdr for BucketEntryType { } impl WriteXdr for BucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18130,7 +18344,7 @@ impl From for i32 { } impl ReadXdr for HotArchiveBucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -18141,7 +18355,7 @@ impl ReadXdr for HotArchiveBucketEntryType { } impl WriteXdr for HotArchiveBucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18260,7 +18474,7 @@ impl From for i32 { } impl ReadXdr for ColdArchiveBucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -18271,7 +18485,7 @@ impl ReadXdr for ColdArchiveBucketEntryType { } impl WriteXdr for ColdArchiveBucketEntryType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -18357,7 +18571,7 @@ impl Variants for BucketMetadataExt { impl Union for BucketMetadataExt {} impl ReadXdr for BucketMetadataExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -18374,7 +18588,7 @@ impl ReadXdr for BucketMetadataExt { } impl WriteXdr for BucketMetadataExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18422,7 +18636,7 @@ pub struct BucketMetadata { } impl ReadXdr for BucketMetadata { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18434,7 +18648,7 @@ impl ReadXdr for BucketMetadata { } impl WriteXdr for BucketMetadata { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -18537,7 +18751,7 @@ impl Variants for BucketEntry { impl Union for BucketEntry {} impl ReadXdr for BucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BucketEntryType = ::read_xdr(r)?; @@ -18556,7 +18770,7 @@ impl ReadXdr for BucketEntry { } impl WriteXdr for BucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18664,7 +18878,7 @@ impl Variants for HotArchiveBucketEntry { impl Union for HotArchiveBucketEntry {} impl ReadXdr for HotArchiveBucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: HotArchiveBucketEntryType = @@ -18686,7 +18900,7 @@ impl ReadXdr for HotArchiveBucketEntry { } impl WriteXdr for HotArchiveBucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -18726,7 +18940,7 @@ pub struct ColdArchiveArchivedLeaf { } impl ReadXdr for ColdArchiveArchivedLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18738,7 +18952,7 @@ impl ReadXdr for ColdArchiveArchivedLeaf { } impl WriteXdr for ColdArchiveArchivedLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18772,7 +18986,7 @@ pub struct ColdArchiveDeletedLeaf { } impl ReadXdr for ColdArchiveDeletedLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18784,7 +18998,7 @@ impl ReadXdr for ColdArchiveDeletedLeaf { } impl WriteXdr for ColdArchiveDeletedLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18818,7 +19032,7 @@ pub struct ColdArchiveBoundaryLeaf { } impl ReadXdr for ColdArchiveBoundaryLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18830,7 +19044,7 @@ impl ReadXdr for ColdArchiveBoundaryLeaf { } impl WriteXdr for ColdArchiveBoundaryLeaf { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18866,7 +19080,7 @@ pub struct ColdArchiveHashEntry { } impl ReadXdr for ColdArchiveHashEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -18879,7 +19093,7 @@ impl ReadXdr for ColdArchiveHashEntry { } impl WriteXdr for ColdArchiveHashEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -18994,7 +19208,7 @@ impl Variants for ColdArchiveBucketEntry { impl Union for ColdArchiveBucketEntry {} impl ReadXdr for ColdArchiveBucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ColdArchiveBucketEntryType = @@ -19023,7 +19237,7 @@ impl ReadXdr for ColdArchiveBucketEntry { } impl WriteXdr for ColdArchiveBucketEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19080,7 +19294,7 @@ impl AsRef> for UpgradeType { } impl ReadXdr for UpgradeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<128>::read_xdr(r)?; @@ -19091,7 +19305,7 @@ impl ReadXdr for UpgradeType { } impl WriteXdr for UpgradeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -19232,7 +19446,7 @@ impl From for i32 { } impl ReadXdr for StellarValueType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -19243,7 +19457,7 @@ impl ReadXdr for StellarValueType { } impl WriteXdr for StellarValueType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -19276,7 +19490,7 @@ pub struct LedgerCloseValueSignature { } impl ReadXdr for LedgerCloseValueSignature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19288,7 +19502,7 @@ impl ReadXdr for LedgerCloseValueSignature { } impl WriteXdr for LedgerCloseValueSignature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.node_id.write_xdr(w)?; @@ -19375,7 +19589,7 @@ impl Variants for StellarValueExt { impl Union for StellarValueExt {} impl ReadXdr for StellarValueExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: StellarValueType = ::read_xdr(r)?; @@ -19392,7 +19606,7 @@ impl ReadXdr for StellarValueExt { } impl WriteXdr for StellarValueExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19449,7 +19663,7 @@ pub struct StellarValue { } impl ReadXdr for StellarValue { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19463,7 +19677,7 @@ impl ReadXdr for StellarValue { } impl WriteXdr for StellarValue { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_set_hash.write_xdr(w)?; @@ -19577,7 +19791,7 @@ impl From for i32 { } impl ReadXdr for LedgerHeaderFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -19588,7 +19802,7 @@ impl ReadXdr for LedgerHeaderFlags { } impl WriteXdr for LedgerHeaderFlags { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -19669,7 +19883,7 @@ impl Variants for LedgerHeaderExtensionV1Ext { impl Union for LedgerHeaderExtensionV1Ext {} impl ReadXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -19685,7 +19899,7 @@ impl ReadXdr for LedgerHeaderExtensionV1Ext { } impl WriteXdr for LedgerHeaderExtensionV1Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19728,7 +19942,7 @@ pub struct LedgerHeaderExtensionV1 { } impl ReadXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19740,7 +19954,7 @@ impl ReadXdr for LedgerHeaderExtensionV1 { } impl WriteXdr for LedgerHeaderExtensionV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.flags.write_xdr(w)?; @@ -19827,7 +20041,7 @@ impl Variants for LedgerHeaderExt { impl Union for LedgerHeaderExt {} impl ReadXdr for LedgerHeaderExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -19844,7 +20058,7 @@ impl ReadXdr for LedgerHeaderExt { } impl WriteXdr for LedgerHeaderExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -19929,7 +20143,7 @@ pub struct LedgerHeader { } impl ReadXdr for LedgerHeader { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -19954,7 +20168,7 @@ impl ReadXdr for LedgerHeader { } impl WriteXdr for LedgerHeader { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -20099,7 +20313,7 @@ impl From for i32 { } impl ReadXdr for LedgerUpgradeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -20110,7 +20324,7 @@ impl ReadXdr for LedgerUpgradeType { } impl WriteXdr for LedgerUpgradeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -20142,7 +20356,7 @@ pub struct ConfigUpgradeSetKey { } impl ReadXdr for ConfigUpgradeSetKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20154,7 +20368,7 @@ impl ReadXdr for ConfigUpgradeSetKey { } impl WriteXdr for ConfigUpgradeSetKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id.write_xdr(w)?; @@ -20285,7 +20499,7 @@ impl Variants for LedgerUpgrade { impl Union for LedgerUpgrade {} impl ReadXdr for LedgerUpgrade { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerUpgradeType = ::read_xdr(r)?; @@ -20309,7 +20523,7 @@ impl ReadXdr for LedgerUpgrade { } impl WriteXdr for LedgerUpgrade { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20349,7 +20563,7 @@ pub struct ConfigUpgradeSet { } impl ReadXdr for ConfigUpgradeSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20360,7 +20574,7 @@ impl ReadXdr for ConfigUpgradeSet { } impl WriteXdr for ConfigUpgradeSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.updated_entry.write_xdr(w)?; @@ -20454,7 +20668,7 @@ impl From for i32 { } impl ReadXdr for TxSetComponentType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -20465,7 +20679,7 @@ impl ReadXdr for TxSetComponentType { } impl WriteXdr for TxSetComponentType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -20514,7 +20728,7 @@ impl AsRef> for TxExecutionThread { } impl ReadXdr for TxExecutionThread { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -20525,7 +20739,7 @@ impl ReadXdr for TxExecutionThread { } impl WriteXdr for TxExecutionThread { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -20620,7 +20834,7 @@ impl AsRef> for ParallelTxExecutionStage { } impl ReadXdr for ParallelTxExecutionStage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -20631,7 +20845,7 @@ impl ReadXdr for ParallelTxExecutionStage { } impl WriteXdr for ParallelTxExecutionStage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -20710,7 +20924,7 @@ pub struct ParallelTxsComponent { } impl ReadXdr for ParallelTxsComponent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20722,7 +20936,7 @@ impl ReadXdr for ParallelTxsComponent { } impl WriteXdr for ParallelTxsComponent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.base_fee.write_xdr(w)?; @@ -20756,7 +20970,7 @@ pub struct TxSetComponentTxsMaybeDiscountedFee { } impl ReadXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -20768,7 +20982,7 @@ impl ReadXdr for TxSetComponentTxsMaybeDiscountedFee { } impl WriteXdr for TxSetComponentTxsMaybeDiscountedFee { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.base_fee.write_xdr(w)?; @@ -20857,7 +21071,7 @@ impl Variants for TxSetComponent { impl Union for TxSetComponent {} impl ReadXdr for TxSetComponent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TxSetComponentType = ::read_xdr(r)?; @@ -20877,7 +21091,7 @@ impl ReadXdr for TxSetComponent { } impl WriteXdr for TxSetComponent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -20967,7 +21181,7 @@ impl Variants for TransactionPhase { impl Union for TransactionPhase {} impl ReadXdr for TransactionPhase { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -20984,7 +21198,7 @@ impl ReadXdr for TransactionPhase { } impl WriteXdr for TransactionPhase { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21022,7 +21236,7 @@ pub struct TransactionSet { } impl ReadXdr for TransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21034,7 +21248,7 @@ impl ReadXdr for TransactionSet { } impl WriteXdr for TransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.previous_ledger_hash.write_xdr(w)?; @@ -21068,7 +21282,7 @@ pub struct TransactionSetV1 { } impl ReadXdr for TransactionSetV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21080,7 +21294,7 @@ impl ReadXdr for TransactionSetV1 { } impl WriteXdr for TransactionSetV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.previous_ledger_hash.write_xdr(w)?; @@ -21163,7 +21377,7 @@ impl Variants for GeneralizedTransactionSet { impl Union for GeneralizedTransactionSet {} impl ReadXdr for GeneralizedTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21179,7 +21393,7 @@ impl ReadXdr for GeneralizedTransactionSet { } impl WriteXdr for GeneralizedTransactionSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21216,7 +21430,7 @@ pub struct TransactionResultPair { } impl ReadXdr for TransactionResultPair { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21228,7 +21442,7 @@ impl ReadXdr for TransactionResultPair { } impl WriteXdr for TransactionResultPair { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.transaction_hash.write_xdr(w)?; @@ -21260,7 +21474,7 @@ pub struct TransactionResultSet { } impl ReadXdr for TransactionResultSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21271,7 +21485,7 @@ impl ReadXdr for TransactionResultSet { } impl WriteXdr for TransactionResultSet { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.results.write_xdr(w)?; @@ -21357,7 +21571,7 @@ impl Variants for TransactionHistoryEntryExt { impl Union for TransactionHistoryEntryExt {} impl ReadXdr for TransactionHistoryEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21374,7 +21588,7 @@ impl ReadXdr for TransactionHistoryEntryExt { } impl WriteXdr for TransactionHistoryEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21423,7 +21637,7 @@ pub struct TransactionHistoryEntry { } impl ReadXdr for TransactionHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21436,7 +21650,7 @@ impl ReadXdr for TransactionHistoryEntry { } impl WriteXdr for TransactionHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21519,7 +21733,7 @@ impl Variants for TransactionHistoryResultEntryExt { impl Union for TransactionHistoryResultEntryExt {} impl ReadXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21535,7 +21749,7 @@ impl ReadXdr for TransactionHistoryResultEntryExt { } impl WriteXdr for TransactionHistoryResultEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21581,7 +21795,7 @@ pub struct TransactionHistoryResultEntry { } impl ReadXdr for TransactionHistoryResultEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21594,7 +21808,7 @@ impl ReadXdr for TransactionHistoryResultEntry { } impl WriteXdr for TransactionHistoryResultEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21677,7 +21891,7 @@ impl Variants for LedgerHeaderHistoryEntryExt { impl Union for LedgerHeaderHistoryEntryExt {} impl ReadXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21693,7 +21907,7 @@ impl ReadXdr for LedgerHeaderHistoryEntryExt { } impl WriteXdr for LedgerHeaderHistoryEntryExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -21739,7 +21953,7 @@ pub struct LedgerHeaderHistoryEntry { } impl ReadXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21752,7 +21966,7 @@ impl ReadXdr for LedgerHeaderHistoryEntry { } impl WriteXdr for LedgerHeaderHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hash.write_xdr(w)?; @@ -21787,7 +22001,7 @@ pub struct LedgerScpMessages { } impl ReadXdr for LedgerScpMessages { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21799,7 +22013,7 @@ impl ReadXdr for LedgerScpMessages { } impl WriteXdr for LedgerScpMessages { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_seq.write_xdr(w)?; @@ -21833,7 +22047,7 @@ pub struct ScpHistoryEntryV0 { } impl ReadXdr for ScpHistoryEntryV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -21845,7 +22059,7 @@ impl ReadXdr for ScpHistoryEntryV0 { } impl WriteXdr for ScpHistoryEntryV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.quorum_sets.write_xdr(w)?; @@ -21927,7 +22141,7 @@ impl Variants for ScpHistoryEntry { impl Union for ScpHistoryEntry {} impl ReadXdr for ScpHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -21943,7 +22157,7 @@ impl ReadXdr for ScpHistoryEntry { } impl WriteXdr for ScpHistoryEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22055,7 +22269,7 @@ impl From for i32 { } impl ReadXdr for LedgerEntryChangeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -22066,7 +22280,7 @@ impl ReadXdr for LedgerEntryChangeType { } impl WriteXdr for LedgerEntryChangeType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -22167,7 +22381,7 @@ impl Variants for LedgerEntryChange { impl Union for LedgerEntryChange {} impl ReadXdr for LedgerEntryChange { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LedgerEntryChangeType = ::read_xdr(r)?; @@ -22186,7 +22400,7 @@ impl ReadXdr for LedgerEntryChange { } impl WriteXdr for LedgerEntryChange { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22242,7 +22456,7 @@ impl AsRef> for LedgerEntryChanges { } impl ReadXdr for LedgerEntryChanges { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -22253,7 +22467,7 @@ impl ReadXdr for LedgerEntryChanges { } impl WriteXdr for LedgerEntryChanges { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -22330,7 +22544,7 @@ pub struct OperationMeta { } impl ReadXdr for OperationMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22341,7 +22555,7 @@ impl ReadXdr for OperationMeta { } impl WriteXdr for OperationMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.changes.write_xdr(w)?; @@ -22374,7 +22588,7 @@ pub struct TransactionMetaV1 { } impl ReadXdr for TransactionMetaV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22386,7 +22600,7 @@ impl ReadXdr for TransactionMetaV1 { } impl WriteXdr for TransactionMetaV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_changes.write_xdr(w)?; @@ -22424,7 +22638,7 @@ pub struct TransactionMetaV2 { } impl ReadXdr for TransactionMetaV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22437,7 +22651,7 @@ impl ReadXdr for TransactionMetaV2 { } impl WriteXdr for TransactionMetaV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_changes_before.write_xdr(w)?; @@ -22542,7 +22756,7 @@ impl From for i32 { } impl ReadXdr for ContractEventType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -22553,7 +22767,7 @@ impl ReadXdr for ContractEventType { } impl WriteXdr for ContractEventType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -22586,7 +22800,7 @@ pub struct ContractEventV0 { } impl ReadXdr for ContractEventV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22598,7 +22812,7 @@ impl ReadXdr for ContractEventV0 { } impl WriteXdr for ContractEventV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.topics.write_xdr(w)?; @@ -22684,7 +22898,7 @@ impl Variants for ContractEventBody { impl Union for ContractEventBody {} impl ReadXdr for ContractEventBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -22700,7 +22914,7 @@ impl ReadXdr for ContractEventBody { } impl WriteXdr for ContractEventBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -22754,7 +22968,7 @@ pub struct ContractEvent { } impl ReadXdr for ContractEvent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22768,7 +22982,7 @@ impl ReadXdr for ContractEvent { } impl WriteXdr for ContractEvent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22804,7 +23018,7 @@ pub struct DiagnosticEvent { } impl ReadXdr for DiagnosticEvent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22816,7 +23030,7 @@ impl ReadXdr for DiagnosticEvent { } impl WriteXdr for DiagnosticEvent { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.in_successful_contract_call.write_xdr(w)?; @@ -22880,7 +23094,7 @@ pub struct SorobanTransactionMetaExtV1 { } impl ReadXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -22894,7 +23108,7 @@ impl ReadXdr for SorobanTransactionMetaExtV1 { } impl WriteXdr for SorobanTransactionMetaExtV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -22984,7 +23198,7 @@ impl Variants for SorobanTransactionMetaExt { impl Union for SorobanTransactionMetaExt {} impl ReadXdr for SorobanTransactionMetaExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23001,7 +23215,7 @@ impl ReadXdr for SorobanTransactionMetaExt { } impl WriteXdr for SorobanTransactionMetaExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23049,7 +23263,7 @@ pub struct SorobanTransactionMeta { } impl ReadXdr for SorobanTransactionMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23063,7 +23277,7 @@ impl ReadXdr for SorobanTransactionMeta { } impl WriteXdr for SorobanTransactionMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23109,7 +23323,7 @@ pub struct TransactionMetaV3 { } impl ReadXdr for TransactionMetaV3 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23124,7 +23338,7 @@ impl ReadXdr for TransactionMetaV3 { } impl WriteXdr for TransactionMetaV3 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23161,7 +23375,7 @@ pub struct InvokeHostFunctionSuccessPreImage { } impl ReadXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23173,7 +23387,7 @@ impl ReadXdr for InvokeHostFunctionSuccessPreImage { } impl WriteXdr for InvokeHostFunctionSuccessPreImage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.return_value.write_xdr(w)?; @@ -23270,7 +23484,7 @@ impl Variants for TransactionMeta { impl Union for TransactionMeta {} impl ReadXdr for TransactionMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23289,7 +23503,7 @@ impl ReadXdr for TransactionMeta { } impl WriteXdr for TransactionMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23331,7 +23545,7 @@ pub struct TransactionResultMeta { } impl ReadXdr for TransactionResultMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23344,7 +23558,7 @@ impl ReadXdr for TransactionResultMeta { } impl WriteXdr for TransactionResultMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.result.write_xdr(w)?; @@ -23379,7 +23593,7 @@ pub struct UpgradeEntryMeta { } impl ReadXdr for UpgradeEntryMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23391,7 +23605,7 @@ impl ReadXdr for UpgradeEntryMeta { } impl WriteXdr for UpgradeEntryMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.upgrade.write_xdr(w)?; @@ -23440,7 +23654,7 @@ pub struct LedgerCloseMetaV0 { } impl ReadXdr for LedgerCloseMetaV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23455,7 +23669,7 @@ impl ReadXdr for LedgerCloseMetaV0 { } impl WriteXdr for LedgerCloseMetaV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_header.write_xdr(w)?; @@ -23492,7 +23706,7 @@ pub struct LedgerCloseMetaExtV1 { } impl ReadXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23504,7 +23718,7 @@ impl ReadXdr for LedgerCloseMetaExtV1 { } impl WriteXdr for LedgerCloseMetaExtV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23591,7 +23805,7 @@ impl Variants for LedgerCloseMetaExt { impl Union for LedgerCloseMetaExt {} impl ReadXdr for LedgerCloseMetaExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23608,7 +23822,7 @@ impl ReadXdr for LedgerCloseMetaExt { } impl WriteXdr for LedgerCloseMetaExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23678,7 +23892,7 @@ pub struct LedgerCloseMetaV1 { } impl ReadXdr for LedgerCloseMetaV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23697,7 +23911,7 @@ impl ReadXdr for LedgerCloseMetaV1 { } impl WriteXdr for LedgerCloseMetaV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -23791,7 +24005,7 @@ impl Variants for LedgerCloseMeta { impl Union for LedgerCloseMeta {} impl ReadXdr for LedgerCloseMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -23808,7 +24022,7 @@ impl ReadXdr for LedgerCloseMeta { } impl WriteXdr for LedgerCloseMeta { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -23926,7 +24140,7 @@ impl From for i32 { } impl ReadXdr for ErrorCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -23937,7 +24151,7 @@ impl ReadXdr for ErrorCode { } impl WriteXdr for ErrorCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -23970,7 +24184,7 @@ pub struct SError { } impl ReadXdr for SError { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -23982,7 +24196,7 @@ impl ReadXdr for SError { } impl WriteXdr for SError { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.code.write_xdr(w)?; @@ -24014,7 +24228,7 @@ pub struct SendMore { } impl ReadXdr for SendMore { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24025,7 +24239,7 @@ impl ReadXdr for SendMore { } impl WriteXdr for SendMore { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_messages.write_xdr(w)?; @@ -24058,7 +24272,7 @@ pub struct SendMoreExtended { } impl ReadXdr for SendMoreExtended { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24070,7 +24284,7 @@ impl ReadXdr for SendMoreExtended { } impl WriteXdr for SendMoreExtended { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.num_messages.write_xdr(w)?; @@ -24106,7 +24320,7 @@ pub struct AuthCert { } impl ReadXdr for AuthCert { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24119,7 +24333,7 @@ impl ReadXdr for AuthCert { } impl WriteXdr for AuthCert { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.pubkey.write_xdr(w)?; @@ -24168,7 +24382,7 @@ pub struct Hello { } impl ReadXdr for Hello { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24187,7 +24401,7 @@ impl ReadXdr for Hello { } impl WriteXdr for Hello { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ledger_version.write_xdr(w)?; @@ -24234,7 +24448,7 @@ pub struct Auth { } impl ReadXdr for Auth { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24245,7 +24459,7 @@ impl ReadXdr for Auth { } impl WriteXdr for Auth { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.flags.write_xdr(w)?; @@ -24340,7 +24554,7 @@ impl From for i32 { } impl ReadXdr for IpAddrType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24351,7 +24565,7 @@ impl ReadXdr for IpAddrType { } impl WriteXdr for IpAddrType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24437,7 +24651,7 @@ impl Variants for PeerAddressIp { impl Union for PeerAddressIp {} impl ReadXdr for PeerAddressIp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: IpAddrType = ::read_xdr(r)?; @@ -24454,7 +24668,7 @@ impl ReadXdr for PeerAddressIp { } impl WriteXdr for PeerAddressIp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -24501,7 +24715,7 @@ pub struct PeerAddress { } impl ReadXdr for PeerAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24514,7 +24728,7 @@ impl ReadXdr for PeerAddress { } impl WriteXdr for PeerAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ip.write_xdr(w)?; @@ -24760,7 +24974,7 @@ impl From for i32 { } impl ReadXdr for MessageType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24771,7 +24985,7 @@ impl ReadXdr for MessageType { } impl WriteXdr for MessageType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -24804,7 +25018,7 @@ pub struct DontHave { } impl ReadXdr for DontHave { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -24816,7 +25030,7 @@ impl ReadXdr for DontHave { } impl WriteXdr for DontHave { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.type_.write_xdr(w)?; @@ -24915,7 +25129,7 @@ impl From for i32 { } impl ReadXdr for SurveyMessageCommandType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -24926,7 +25140,7 @@ impl ReadXdr for SurveyMessageCommandType { } impl WriteXdr for SurveyMessageCommandType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -25029,7 +25243,7 @@ impl From for i32 { } impl ReadXdr for SurveyMessageResponseType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -25040,7 +25254,7 @@ impl ReadXdr for SurveyMessageResponseType { } impl WriteXdr for SurveyMessageResponseType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -25075,7 +25289,7 @@ pub struct TimeSlicedSurveyStartCollectingMessage { } impl ReadXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25088,7 +25302,7 @@ impl ReadXdr for TimeSlicedSurveyStartCollectingMessage { } impl WriteXdr for TimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_id.write_xdr(w)?; @@ -25123,7 +25337,7 @@ pub struct SignedTimeSlicedSurveyStartCollectingMessage { } impl ReadXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25135,7 +25349,7 @@ impl ReadXdr for SignedTimeSlicedSurveyStartCollectingMessage { } impl WriteXdr for SignedTimeSlicedSurveyStartCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.signature.write_xdr(w)?; @@ -25171,7 +25385,7 @@ pub struct TimeSlicedSurveyStopCollectingMessage { } impl ReadXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25184,7 +25398,7 @@ impl ReadXdr for TimeSlicedSurveyStopCollectingMessage { } impl WriteXdr for TimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_id.write_xdr(w)?; @@ -25219,7 +25433,7 @@ pub struct SignedTimeSlicedSurveyStopCollectingMessage { } impl ReadXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25231,7 +25445,7 @@ impl ReadXdr for SignedTimeSlicedSurveyStopCollectingMessage { } impl WriteXdr for SignedTimeSlicedSurveyStopCollectingMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.signature.write_xdr(w)?; @@ -25271,7 +25485,7 @@ pub struct SurveyRequestMessage { } impl ReadXdr for SurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25286,7 +25500,7 @@ impl ReadXdr for SurveyRequestMessage { } impl WriteXdr for SurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_peer_id.write_xdr(w)?; @@ -25327,7 +25541,7 @@ pub struct TimeSlicedSurveyRequestMessage { } impl ReadXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25341,7 +25555,7 @@ impl ReadXdr for TimeSlicedSurveyRequestMessage { } impl WriteXdr for TimeSlicedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request.write_xdr(w)?; @@ -25377,7 +25591,7 @@ pub struct SignedSurveyRequestMessage { } impl ReadXdr for SignedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25389,7 +25603,7 @@ impl ReadXdr for SignedSurveyRequestMessage { } impl WriteXdr for SignedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request_signature.write_xdr(w)?; @@ -25423,7 +25637,7 @@ pub struct SignedTimeSlicedSurveyRequestMessage { } impl ReadXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25435,7 +25649,7 @@ impl ReadXdr for SignedTimeSlicedSurveyRequestMessage { } impl WriteXdr for SignedTimeSlicedSurveyRequestMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.request_signature.write_xdr(w)?; @@ -25485,7 +25699,7 @@ impl AsRef> for EncryptedBody { } impl ReadXdr for EncryptedBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64000>::read_xdr(r)?; @@ -25496,7 +25710,7 @@ impl ReadXdr for EncryptedBody { } impl WriteXdr for EncryptedBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25581,7 +25795,7 @@ pub struct SurveyResponseMessage { } impl ReadXdr for SurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25596,7 +25810,7 @@ impl ReadXdr for SurveyResponseMessage { } impl WriteXdr for SurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.surveyor_peer_id.write_xdr(w)?; @@ -25633,7 +25847,7 @@ pub struct TimeSlicedSurveyResponseMessage { } impl ReadXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25645,7 +25859,7 @@ impl ReadXdr for TimeSlicedSurveyResponseMessage { } impl WriteXdr for TimeSlicedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response.write_xdr(w)?; @@ -25679,7 +25893,7 @@ pub struct SignedSurveyResponseMessage { } impl ReadXdr for SignedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25691,7 +25905,7 @@ impl ReadXdr for SignedSurveyResponseMessage { } impl WriteXdr for SignedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response_signature.write_xdr(w)?; @@ -25725,7 +25939,7 @@ pub struct SignedTimeSlicedSurveyResponseMessage { } impl ReadXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25737,7 +25951,7 @@ impl ReadXdr for SignedTimeSlicedSurveyResponseMessage { } impl WriteXdr for SignedTimeSlicedSurveyResponseMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.response_signature.write_xdr(w)?; @@ -25799,7 +26013,7 @@ pub struct PeerStats { } impl ReadXdr for PeerStats { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -25824,7 +26038,7 @@ impl ReadXdr for PeerStats { } impl WriteXdr for PeerStats { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.id.write_xdr(w)?; @@ -25887,7 +26101,7 @@ impl AsRef> for PeerStatList { } impl ReadXdr for PeerStatList { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -25898,7 +26112,7 @@ impl ReadXdr for PeerStatList { } impl WriteXdr for PeerStatList { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -25999,7 +26213,7 @@ pub struct TimeSlicedNodeData { } impl ReadXdr for TimeSlicedNodeData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26019,7 +26233,7 @@ impl ReadXdr for TimeSlicedNodeData { } impl WriteXdr for TimeSlicedNodeData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.added_authenticated_peers.write_xdr(w)?; @@ -26061,7 +26275,7 @@ pub struct TimeSlicedPeerData { } impl ReadXdr for TimeSlicedPeerData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26073,7 +26287,7 @@ impl ReadXdr for TimeSlicedPeerData { } impl WriteXdr for TimeSlicedPeerData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.peer_stats.write_xdr(w)?; @@ -26123,7 +26337,7 @@ impl AsRef> for TimeSlicedPeerDataList { } impl ReadXdr for TimeSlicedPeerDataList { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26134,7 +26348,7 @@ impl ReadXdr for TimeSlicedPeerDataList { } impl WriteXdr for TimeSlicedPeerDataList { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26218,7 +26432,7 @@ pub struct TopologyResponseBodyV0 { } impl ReadXdr for TopologyResponseBodyV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26232,7 +26446,7 @@ impl ReadXdr for TopologyResponseBodyV0 { } impl WriteXdr for TopologyResponseBodyV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26278,7 +26492,7 @@ pub struct TopologyResponseBodyV1 { } impl ReadXdr for TopologyResponseBodyV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26294,7 +26508,7 @@ impl ReadXdr for TopologyResponseBodyV1 { } impl WriteXdr for TopologyResponseBodyV1 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26334,7 +26548,7 @@ pub struct TopologyResponseBodyV2 { } impl ReadXdr for TopologyResponseBodyV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26347,7 +26561,7 @@ impl ReadXdr for TopologyResponseBodyV2 { } impl WriteXdr for TopologyResponseBodyV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inbound_peers.write_xdr(w)?; @@ -26444,7 +26658,7 @@ impl Variants for SurveyResponseBody { impl Union for SurveyResponseBody {} impl ReadXdr for SurveyResponseBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SurveyMessageResponseType = @@ -26463,7 +26677,7 @@ impl ReadXdr for SurveyResponseBody { } impl WriteXdr for SurveyResponseBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -26526,7 +26740,7 @@ impl AsRef> for TxAdvertVector { } impl ReadXdr for TxAdvertVector { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26537,7 +26751,7 @@ impl ReadXdr for TxAdvertVector { } impl WriteXdr for TxAdvertVector { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26614,7 +26828,7 @@ pub struct FloodAdvert { } impl ReadXdr for FloodAdvert { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26625,7 +26839,7 @@ impl ReadXdr for FloodAdvert { } impl WriteXdr for FloodAdvert { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_hashes.write_xdr(w)?; @@ -26682,7 +26896,7 @@ impl AsRef> for TxDemandVector { } impl ReadXdr for TxDemandVector { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -26693,7 +26907,7 @@ impl ReadXdr for TxDemandVector { } impl WriteXdr for TxDemandVector { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -26770,7 +26984,7 @@ pub struct FloodDemand { } impl ReadXdr for FloodDemand { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -26781,7 +26995,7 @@ impl ReadXdr for FloodDemand { } impl WriteXdr for FloodDemand { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx_hashes.write_xdr(w)?; @@ -27042,7 +27256,7 @@ impl Variants for StellarMessage { impl Union for StellarMessage {} impl ReadXdr for StellarMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: MessageType = ::read_xdr(r)?; @@ -27101,7 +27315,7 @@ impl ReadXdr for StellarMessage { } impl WriteXdr for StellarMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27163,7 +27377,7 @@ pub struct AuthenticatedMessageV0 { } impl ReadXdr for AuthenticatedMessageV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27176,7 +27390,7 @@ impl ReadXdr for AuthenticatedMessageV0 { } impl WriteXdr for AuthenticatedMessageV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sequence.write_xdr(w)?; @@ -27264,7 +27478,7 @@ impl Variants for AuthenticatedMessage { impl Union for AuthenticatedMessage {} impl ReadXdr for AuthenticatedMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: u32 = ::read_xdr(r)?; @@ -27280,7 +27494,7 @@ impl ReadXdr for AuthenticatedMessage { } impl WriteXdr for AuthenticatedMessage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27375,7 +27589,7 @@ impl Variants for LiquidityPoolParameters { impl Union for LiquidityPoolParameters {} impl ReadXdr for LiquidityPoolParameters { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolType = ::read_xdr(r)?; @@ -27395,7 +27609,7 @@ impl ReadXdr for LiquidityPoolParameters { } impl WriteXdr for LiquidityPoolParameters { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27430,7 +27644,7 @@ pub struct MuxedAccountMed25519 { } impl ReadXdr for MuxedAccountMed25519 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27442,7 +27656,7 @@ impl ReadXdr for MuxedAccountMed25519 { } impl WriteXdr for MuxedAccountMed25519 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.id.write_xdr(w)?; @@ -27531,7 +27745,7 @@ impl Variants for MuxedAccount { impl Union for MuxedAccount {} impl ReadXdr for MuxedAccount { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CryptoKeyType = ::read_xdr(r)?; @@ -27550,7 +27764,7 @@ impl ReadXdr for MuxedAccount { } impl WriteXdr for MuxedAccount { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -27588,7 +27802,7 @@ pub struct DecoratedSignature { } impl ReadXdr for DecoratedSignature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27600,7 +27814,7 @@ impl ReadXdr for DecoratedSignature { } impl WriteXdr for DecoratedSignature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.hint.write_xdr(w)?; @@ -27852,7 +28066,7 @@ impl From for i32 { } impl ReadXdr for OperationType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -27863,7 +28077,7 @@ impl ReadXdr for OperationType { } impl WriteXdr for OperationType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -27896,7 +28110,7 @@ pub struct CreateAccountOp { } impl ReadXdr for CreateAccountOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27908,7 +28122,7 @@ impl ReadXdr for CreateAccountOp { } impl WriteXdr for CreateAccountOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -27944,7 +28158,7 @@ pub struct PaymentOp { } impl ReadXdr for PaymentOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -27957,7 +28171,7 @@ impl ReadXdr for PaymentOp { } impl WriteXdr for PaymentOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -28004,7 +28218,7 @@ pub struct PathPaymentStrictReceiveOp { } impl ReadXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28020,7 +28234,7 @@ impl ReadXdr for PathPaymentStrictReceiveOp { } impl WriteXdr for PathPaymentStrictReceiveOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.send_asset.write_xdr(w)?; @@ -28070,7 +28284,7 @@ pub struct PathPaymentStrictSendOp { } impl ReadXdr for PathPaymentStrictSendOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28086,7 +28300,7 @@ impl ReadXdr for PathPaymentStrictSendOp { } impl WriteXdr for PathPaymentStrictSendOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.send_asset.write_xdr(w)?; @@ -28132,7 +28346,7 @@ pub struct ManageSellOfferOp { } impl ReadXdr for ManageSellOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28147,7 +28361,7 @@ impl ReadXdr for ManageSellOfferOp { } impl WriteXdr for ManageSellOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -28193,7 +28407,7 @@ pub struct ManageBuyOfferOp { } impl ReadXdr for ManageBuyOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28208,7 +28422,7 @@ impl ReadXdr for ManageBuyOfferOp { } impl WriteXdr for ManageBuyOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -28249,7 +28463,7 @@ pub struct CreatePassiveSellOfferOp { } impl ReadXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28263,7 +28477,7 @@ impl ReadXdr for CreatePassiveSellOfferOp { } impl WriteXdr for CreatePassiveSellOfferOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.selling.write_xdr(w)?; @@ -28320,7 +28534,7 @@ pub struct SetOptionsOp { } impl ReadXdr for SetOptionsOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28339,7 +28553,7 @@ impl ReadXdr for SetOptionsOp { } impl WriteXdr for SetOptionsOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.inflation_dest.write_xdr(w)?; @@ -28454,7 +28668,7 @@ impl Variants for ChangeTrustAsset { impl Union for ChangeTrustAsset {} impl ReadXdr for ChangeTrustAsset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AssetType = ::read_xdr(r)?; @@ -28473,7 +28687,7 @@ impl ReadXdr for ChangeTrustAsset { } impl WriteXdr for ChangeTrustAsset { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -28515,7 +28729,7 @@ pub struct ChangeTrustOp { } impl ReadXdr for ChangeTrustOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28527,7 +28741,7 @@ impl ReadXdr for ChangeTrustOp { } impl WriteXdr for ChangeTrustOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.line.write_xdr(w)?; @@ -28565,7 +28779,7 @@ pub struct AllowTrustOp { } impl ReadXdr for AllowTrustOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28578,7 +28792,7 @@ impl ReadXdr for AllowTrustOp { } impl WriteXdr for AllowTrustOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.trustor.write_xdr(w)?; @@ -28613,7 +28827,7 @@ pub struct ManageDataOp { } impl ReadXdr for ManageDataOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28625,7 +28839,7 @@ impl ReadXdr for ManageDataOp { } impl WriteXdr for ManageDataOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.data_name.write_xdr(w)?; @@ -28657,7 +28871,7 @@ pub struct BumpSequenceOp { } impl ReadXdr for BumpSequenceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28668,7 +28882,7 @@ impl ReadXdr for BumpSequenceOp { } impl WriteXdr for BumpSequenceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.bump_to.write_xdr(w)?; @@ -28703,7 +28917,7 @@ pub struct CreateClaimableBalanceOp { } impl ReadXdr for CreateClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28716,7 +28930,7 @@ impl ReadXdr for CreateClaimableBalanceOp { } impl WriteXdr for CreateClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset.write_xdr(w)?; @@ -28749,7 +28963,7 @@ pub struct ClaimClaimableBalanceOp { } impl ReadXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28760,7 +28974,7 @@ impl ReadXdr for ClaimClaimableBalanceOp { } impl WriteXdr for ClaimClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -28791,7 +29005,7 @@ pub struct BeginSponsoringFutureReservesOp { } impl ReadXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28802,7 +29016,7 @@ impl ReadXdr for BeginSponsoringFutureReservesOp { } impl WriteXdr for BeginSponsoringFutureReservesOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.sponsored_id.write_xdr(w)?; @@ -28900,7 +29114,7 @@ impl From for i32 { } impl ReadXdr for RevokeSponsorshipType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -28911,7 +29125,7 @@ impl ReadXdr for RevokeSponsorshipType { } impl WriteXdr for RevokeSponsorshipType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -28944,7 +29158,7 @@ pub struct RevokeSponsorshipOpSigner { } impl ReadXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -28956,7 +29170,7 @@ impl ReadXdr for RevokeSponsorshipOpSigner { } impl WriteXdr for RevokeSponsorshipOpSigner { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.account_id.write_xdr(w)?; @@ -29050,7 +29264,7 @@ impl Variants for RevokeSponsorshipOp { impl Union for RevokeSponsorshipOp {} impl ReadXdr for RevokeSponsorshipOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RevokeSponsorshipType = ::read_xdr(r)?; @@ -29069,7 +29283,7 @@ impl ReadXdr for RevokeSponsorshipOp { } impl WriteXdr for RevokeSponsorshipOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -29109,7 +29323,7 @@ pub struct ClawbackOp { } impl ReadXdr for ClawbackOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29122,7 +29336,7 @@ impl ReadXdr for ClawbackOp { } impl WriteXdr for ClawbackOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.asset.write_xdr(w)?; @@ -29155,7 +29369,7 @@ pub struct ClawbackClaimableBalanceOp { } impl ReadXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29166,7 +29380,7 @@ impl ReadXdr for ClawbackClaimableBalanceOp { } impl WriteXdr for ClawbackClaimableBalanceOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.balance_id.write_xdr(w)?; @@ -29204,7 +29418,7 @@ pub struct SetTrustLineFlagsOp { } impl ReadXdr for SetTrustLineFlagsOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29218,7 +29432,7 @@ impl ReadXdr for SetTrustLineFlagsOp { } impl WriteXdr for SetTrustLineFlagsOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.trustor.write_xdr(w)?; @@ -29268,7 +29482,7 @@ pub struct LiquidityPoolDepositOp { } impl ReadXdr for LiquidityPoolDepositOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29283,7 +29497,7 @@ impl ReadXdr for LiquidityPoolDepositOp { } impl WriteXdr for LiquidityPoolDepositOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -29324,7 +29538,7 @@ pub struct LiquidityPoolWithdrawOp { } impl ReadXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29338,7 +29552,7 @@ impl ReadXdr for LiquidityPoolWithdrawOp { } impl WriteXdr for LiquidityPoolWithdrawOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -29454,7 +29668,7 @@ impl From for i32 { } impl ReadXdr for HostFunctionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29465,7 +29679,7 @@ impl ReadXdr for HostFunctionType { } impl WriteXdr for HostFunctionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -29563,7 +29777,7 @@ impl From for i32 { } impl ReadXdr for ContractIdPreimageType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -29574,7 +29788,7 @@ impl ReadXdr for ContractIdPreimageType { } impl WriteXdr for ContractIdPreimageType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -29607,7 +29821,7 @@ pub struct ContractIdPreimageFromAddress { } impl ReadXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29619,7 +29833,7 @@ impl ReadXdr for ContractIdPreimageFromAddress { } impl WriteXdr for ContractIdPreimageFromAddress { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.address.write_xdr(w)?; @@ -29713,7 +29927,7 @@ impl Variants for ContractIdPreimage { impl Union for ContractIdPreimage {} impl ReadXdr for ContractIdPreimage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ContractIdPreimageType = ::read_xdr(r)?; @@ -29732,7 +29946,7 @@ impl ReadXdr for ContractIdPreimage { } impl WriteXdr for ContractIdPreimage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -29770,7 +29984,7 @@ pub struct CreateContractArgs { } impl ReadXdr for CreateContractArgs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29782,7 +29996,7 @@ impl ReadXdr for CreateContractArgs { } impl WriteXdr for CreateContractArgs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id_preimage.write_xdr(w)?; @@ -29819,7 +30033,7 @@ pub struct CreateContractArgsV2 { } impl ReadXdr for CreateContractArgsV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29832,7 +30046,7 @@ impl ReadXdr for CreateContractArgsV2 { } impl WriteXdr for CreateContractArgsV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_id_preimage.write_xdr(w)?; @@ -29868,7 +30082,7 @@ pub struct InvokeContractArgs { } impl ReadXdr for InvokeContractArgs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -29881,7 +30095,7 @@ impl ReadXdr for InvokeContractArgs { } impl WriteXdr for InvokeContractArgs { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.contract_address.write_xdr(w)?; @@ -29989,7 +30203,7 @@ impl Variants for HostFunction { impl Union for HostFunction {} impl ReadXdr for HostFunction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: HostFunctionType = ::read_xdr(r)?; @@ -30016,7 +30230,7 @@ impl ReadXdr for HostFunction { } impl WriteXdr for HostFunction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30130,7 +30344,7 @@ impl From for i32 { } impl ReadXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -30141,7 +30355,7 @@ impl ReadXdr for SorobanAuthorizedFunctionType { } impl WriteXdr for SorobanAuthorizedFunctionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -30250,7 +30464,7 @@ impl Variants for SorobanAuthorizedFunction { impl Union for SorobanAuthorizedFunction {} impl ReadXdr for SorobanAuthorizedFunction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SorobanAuthorizedFunctionType = @@ -30275,7 +30489,7 @@ impl ReadXdr for SorobanAuthorizedFunction { } impl WriteXdr for SorobanAuthorizedFunction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30314,7 +30528,7 @@ pub struct SorobanAuthorizedInvocation { } impl ReadXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30326,7 +30540,7 @@ impl ReadXdr for SorobanAuthorizedInvocation { } impl WriteXdr for SorobanAuthorizedInvocation { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.function.write_xdr(w)?; @@ -30364,7 +30578,7 @@ pub struct SorobanAddressCredentials { } impl ReadXdr for SorobanAddressCredentials { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30378,7 +30592,7 @@ impl ReadXdr for SorobanAddressCredentials { } impl WriteXdr for SorobanAddressCredentials { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.address.write_xdr(w)?; @@ -30479,7 +30693,7 @@ impl From for i32 { } impl ReadXdr for SorobanCredentialsType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -30490,7 +30704,7 @@ impl ReadXdr for SorobanCredentialsType { } impl WriteXdr for SorobanCredentialsType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -30579,7 +30793,7 @@ impl Variants for SorobanCredentials { impl Union for SorobanCredentials {} impl ReadXdr for SorobanCredentials { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SorobanCredentialsType = ::read_xdr(r)?; @@ -30598,7 +30812,7 @@ impl ReadXdr for SorobanCredentials { } impl WriteXdr for SorobanCredentials { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -30636,7 +30850,7 @@ pub struct SorobanAuthorizationEntry { } impl ReadXdr for SorobanAuthorizationEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30648,7 +30862,7 @@ impl ReadXdr for SorobanAuthorizationEntry { } impl WriteXdr for SorobanAuthorizationEntry { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.credentials.write_xdr(w)?; @@ -30684,7 +30898,7 @@ pub struct InvokeHostFunctionOp { } impl ReadXdr for InvokeHostFunctionOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30696,7 +30910,7 @@ impl ReadXdr for InvokeHostFunctionOp { } impl WriteXdr for InvokeHostFunctionOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.host_function.write_xdr(w)?; @@ -30730,7 +30944,7 @@ pub struct ExtendFootprintTtlOp { } impl ReadXdr for ExtendFootprintTtlOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30742,7 +30956,7 @@ impl ReadXdr for ExtendFootprintTtlOp { } impl WriteXdr for ExtendFootprintTtlOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -30774,7 +30988,7 @@ pub struct RestoreFootprintOp { } impl ReadXdr for RestoreFootprintOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -30785,7 +30999,7 @@ impl ReadXdr for RestoreFootprintOp { } impl WriteXdr for RestoreFootprintOp { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -31052,7 +31266,7 @@ impl Variants for OperationBody { impl Union for OperationBody {} impl ReadXdr for OperationBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationType = ::read_xdr(r)?; @@ -31128,7 +31342,7 @@ impl ReadXdr for OperationBody { } impl WriteXdr for OperationBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31252,7 +31466,7 @@ pub struct Operation { } impl ReadXdr for Operation { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31264,7 +31478,7 @@ impl ReadXdr for Operation { } impl WriteXdr for Operation { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31300,7 +31514,7 @@ pub struct HashIdPreimageOperationId { } impl ReadXdr for HashIdPreimageOperationId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31313,7 +31527,7 @@ impl ReadXdr for HashIdPreimageOperationId { } impl WriteXdr for HashIdPreimageOperationId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31354,7 +31568,7 @@ pub struct HashIdPreimageRevokeId { } impl ReadXdr for HashIdPreimageRevokeId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31369,7 +31583,7 @@ impl ReadXdr for HashIdPreimageRevokeId { } impl WriteXdr for HashIdPreimageRevokeId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -31406,7 +31620,7 @@ pub struct HashIdPreimageContractId { } impl ReadXdr for HashIdPreimageContractId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31418,7 +31632,7 @@ impl ReadXdr for HashIdPreimageContractId { } impl WriteXdr for HashIdPreimageContractId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -31456,7 +31670,7 @@ pub struct HashIdPreimageSorobanAuthorization { } impl ReadXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31470,7 +31684,7 @@ impl ReadXdr for HashIdPreimageSorobanAuthorization { } impl WriteXdr for HashIdPreimageSorobanAuthorization { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -31601,7 +31815,7 @@ impl Variants for HashIdPreimage { impl Union for HashIdPreimage {} impl ReadXdr for HashIdPreimage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -31626,7 +31840,7 @@ impl ReadXdr for HashIdPreimage { } impl WriteXdr for HashIdPreimage { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31746,7 +31960,7 @@ impl From for i32 { } impl ReadXdr for MemoType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -31757,7 +31971,7 @@ impl ReadXdr for MemoType { } impl WriteXdr for MemoType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -31864,7 +32078,7 @@ impl Variants for Memo { impl Union for Memo {} impl ReadXdr for Memo { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: MemoType = ::read_xdr(r)?; @@ -31884,7 +32098,7 @@ impl ReadXdr for Memo { } impl WriteXdr for Memo { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -31925,7 +32139,7 @@ pub struct TimeBounds { } impl ReadXdr for TimeBounds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31937,7 +32151,7 @@ impl ReadXdr for TimeBounds { } impl WriteXdr for TimeBounds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.min_time.write_xdr(w)?; @@ -31971,7 +32185,7 @@ pub struct LedgerBounds { } impl ReadXdr for LedgerBounds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -31983,7 +32197,7 @@ impl ReadXdr for LedgerBounds { } impl WriteXdr for LedgerBounds { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.min_ledger.write_xdr(w)?; @@ -32048,7 +32262,7 @@ pub struct PreconditionsV2 { } impl ReadXdr for PreconditionsV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32064,7 +32278,7 @@ impl ReadXdr for PreconditionsV2 { } impl WriteXdr for PreconditionsV2 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.time_bounds.write_xdr(w)?; @@ -32172,7 +32386,7 @@ impl From for i32 { } impl ReadXdr for PreconditionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -32183,7 +32397,7 @@ impl ReadXdr for PreconditionType { } impl WriteXdr for PreconditionType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -32278,7 +32492,7 @@ impl Variants for Preconditions { impl Union for Preconditions {} impl ReadXdr for Preconditions { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PreconditionType = ::read_xdr(r)?; @@ -32296,7 +32510,7 @@ impl ReadXdr for Preconditions { } impl WriteXdr for Preconditions { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32335,7 +32549,7 @@ pub struct LedgerFootprint { } impl ReadXdr for LedgerFootprint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32347,7 +32561,7 @@ impl ReadXdr for LedgerFootprint { } impl WriteXdr for LedgerFootprint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.read_only.write_xdr(w)?; @@ -32446,7 +32660,7 @@ impl From for i32 { } impl ReadXdr for ArchivalProofType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -32457,7 +32671,7 @@ impl ReadXdr for ArchivalProofType { } impl WriteXdr for ArchivalProofType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -32490,7 +32704,7 @@ pub struct ArchivalProofNode { } impl ReadXdr for ArchivalProofNode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32502,7 +32716,7 @@ impl ReadXdr for ArchivalProofNode { } impl WriteXdr for ArchivalProofNode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.index.write_xdr(w)?; @@ -32552,7 +32766,7 @@ impl AsRef> for ProofLevel { } impl ReadXdr for ProofLevel { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = VecM::::read_xdr(r)?; @@ -32563,7 +32777,7 @@ impl ReadXdr for ProofLevel { } impl WriteXdr for ProofLevel { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -32645,7 +32859,7 @@ pub struct NonexistenceProofBody { } impl ReadXdr for NonexistenceProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32657,7 +32871,7 @@ impl ReadXdr for NonexistenceProofBody { } impl WriteXdr for NonexistenceProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.entries_to_prove.write_xdr(w)?; @@ -32701,7 +32915,7 @@ pub struct ExistenceProofBody { } impl ReadXdr for ExistenceProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32715,7 +32929,7 @@ impl ReadXdr for ExistenceProofBody { } impl WriteXdr for ExistenceProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.keys_to_prove.write_xdr(w)?; @@ -32807,7 +33021,7 @@ impl Variants for ArchivalProofBody { impl Union for ArchivalProofBody {} impl ReadXdr for ArchivalProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ArchivalProofType = ::read_xdr(r)?; @@ -32828,7 +33042,7 @@ impl ReadXdr for ArchivalProofBody { } impl WriteXdr for ArchivalProofBody { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -32873,7 +33087,7 @@ pub struct ArchivalProof { } impl ReadXdr for ArchivalProof { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32885,7 +33099,7 @@ impl ReadXdr for ArchivalProof { } impl WriteXdr for ArchivalProof { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.epoch.write_xdr(w)?; @@ -32928,7 +33142,7 @@ pub struct SorobanResources { } impl ReadXdr for SorobanResources { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -32942,7 +33156,7 @@ impl ReadXdr for SorobanResources { } impl WriteXdr for SorobanResources { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.footprint.write_xdr(w)?; @@ -33031,7 +33245,7 @@ impl Variants for SorobanTransactionDataExt { impl Union for SorobanTransactionDataExt {} impl ReadXdr for SorobanTransactionDataExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33048,7 +33262,7 @@ impl ReadXdr for SorobanTransactionDataExt { } impl WriteXdr for SorobanTransactionDataExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33103,7 +33317,7 @@ pub struct SorobanTransactionData { } impl ReadXdr for SorobanTransactionData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33116,7 +33330,7 @@ impl ReadXdr for SorobanTransactionData { } impl WriteXdr for SorobanTransactionData { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ext.write_xdr(w)?; @@ -33199,7 +33413,7 @@ impl Variants for TransactionV0Ext { impl Union for TransactionV0Ext {} impl ReadXdr for TransactionV0Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33215,7 +33429,7 @@ impl ReadXdr for TransactionV0Ext { } impl WriteXdr for TransactionV0Ext { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33267,7 +33481,7 @@ pub struct TransactionV0 { } impl ReadXdr for TransactionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33284,7 +33498,7 @@ impl ReadXdr for TransactionV0 { } impl WriteXdr for TransactionV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account_ed25519.write_xdr(w)?; @@ -33325,7 +33539,7 @@ pub struct TransactionV0Envelope { } impl ReadXdr for TransactionV0Envelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33337,7 +33551,7 @@ impl ReadXdr for TransactionV0Envelope { } impl WriteXdr for TransactionV0Envelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33424,7 +33638,7 @@ impl Variants for TransactionExt { impl Union for TransactionExt {} impl ReadXdr for TransactionExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33441,7 +33655,7 @@ impl ReadXdr for TransactionExt { } impl WriteXdr for TransactionExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33507,7 +33721,7 @@ pub struct Transaction { } impl ReadXdr for Transaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33524,7 +33738,7 @@ impl ReadXdr for Transaction { } impl WriteXdr for Transaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.source_account.write_xdr(w)?; @@ -33565,7 +33779,7 @@ pub struct TransactionV1Envelope { } impl ReadXdr for TransactionV1Envelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33577,7 +33791,7 @@ impl ReadXdr for TransactionV1Envelope { } impl WriteXdr for TransactionV1Envelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33659,7 +33873,7 @@ impl Variants for FeeBumpTransactionInnerTx { impl Union for FeeBumpTransactionInnerTx {} impl ReadXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -33675,7 +33889,7 @@ impl ReadXdr for FeeBumpTransactionInnerTx { } impl WriteXdr for FeeBumpTransactionInnerTx { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33760,7 +33974,7 @@ impl Variants for FeeBumpTransactionExt { impl Union for FeeBumpTransactionExt {} impl ReadXdr for FeeBumpTransactionExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -33776,7 +33990,7 @@ impl ReadXdr for FeeBumpTransactionExt { } impl WriteXdr for FeeBumpTransactionExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -33827,7 +34041,7 @@ pub struct FeeBumpTransaction { } impl ReadXdr for FeeBumpTransaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33841,7 +34055,7 @@ impl ReadXdr for FeeBumpTransaction { } impl WriteXdr for FeeBumpTransaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_source.write_xdr(w)?; @@ -33879,7 +34093,7 @@ pub struct FeeBumpTransactionEnvelope { } impl ReadXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -33891,7 +34105,7 @@ impl ReadXdr for FeeBumpTransactionEnvelope { } impl WriteXdr for FeeBumpTransactionEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.tx.write_xdr(w)?; @@ -33987,7 +34201,7 @@ impl Variants for TransactionEnvelope { impl Union for TransactionEnvelope {} impl ReadXdr for TransactionEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -34007,7 +34221,7 @@ impl ReadXdr for TransactionEnvelope { } impl WriteXdr for TransactionEnvelope { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34100,7 +34314,7 @@ impl Variants for TransactionSignaturePayloadTaggedTransaction { impl Union for TransactionSignaturePayloadTaggedTransaction {} impl ReadXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EnvelopeType = ::read_xdr(r)?; @@ -34117,7 +34331,7 @@ impl ReadXdr for TransactionSignaturePayloadTaggedTransaction { } impl WriteXdr for TransactionSignaturePayloadTaggedTransaction { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34163,7 +34377,7 @@ pub struct TransactionSignaturePayload { } impl ReadXdr for TransactionSignaturePayload { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34175,7 +34389,7 @@ impl ReadXdr for TransactionSignaturePayload { } impl WriteXdr for TransactionSignaturePayload { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.network_id.write_xdr(w)?; @@ -34279,7 +34493,7 @@ impl From for i32 { } impl ReadXdr for ClaimAtomType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -34290,7 +34504,7 @@ impl ReadXdr for ClaimAtomType { } impl WriteXdr for ClaimAtomType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -34336,7 +34550,7 @@ pub struct ClaimOfferAtomV0 { } impl ReadXdr for ClaimOfferAtomV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34352,7 +34566,7 @@ impl ReadXdr for ClaimOfferAtomV0 { } impl WriteXdr for ClaimOfferAtomV0 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_ed25519.write_xdr(w)?; @@ -34403,7 +34617,7 @@ pub struct ClaimOfferAtom { } impl ReadXdr for ClaimOfferAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34419,7 +34633,7 @@ impl ReadXdr for ClaimOfferAtom { } impl WriteXdr for ClaimOfferAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seller_id.write_xdr(w)?; @@ -34467,7 +34681,7 @@ pub struct ClaimLiquidityAtom { } impl ReadXdr for ClaimLiquidityAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -34482,7 +34696,7 @@ impl ReadXdr for ClaimLiquidityAtom { } impl WriteXdr for ClaimLiquidityAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.liquidity_pool_id.write_xdr(w)?; @@ -34581,7 +34795,7 @@ impl Variants for ClaimAtom { impl Union for ClaimAtom {} impl ReadXdr for ClaimAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimAtomType = ::read_xdr(r)?; @@ -34601,7 +34815,7 @@ impl ReadXdr for ClaimAtom { } impl WriteXdr for ClaimAtom { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -34730,7 +34944,7 @@ impl From for i32 { } impl ReadXdr for CreateAccountResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -34741,7 +34955,7 @@ impl ReadXdr for CreateAccountResultCode { } impl WriteXdr for CreateAccountResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -34851,7 +35065,7 @@ impl Variants for CreateAccountResult { impl Union for CreateAccountResult {} impl ReadXdr for CreateAccountResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CreateAccountResultCode = ::read_xdr(r)?; @@ -34871,7 +35085,7 @@ impl ReadXdr for CreateAccountResult { } impl WriteXdr for CreateAccountResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35031,7 +35245,7 @@ impl From for i32 { } impl ReadXdr for PaymentResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35042,7 +35256,7 @@ impl ReadXdr for PaymentResultCode { } impl WriteXdr for PaymentResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35182,7 +35396,7 @@ impl Variants for PaymentResult { impl Union for PaymentResult {} impl ReadXdr for PaymentResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PaymentResultCode = ::read_xdr(r)?; @@ -35207,7 +35421,7 @@ impl ReadXdr for PaymentResult { } impl WriteXdr for PaymentResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35399,7 +35613,7 @@ impl From for i32 { } impl ReadXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35410,7 +35624,7 @@ impl ReadXdr for PathPaymentStrictReceiveResultCode { } impl WriteXdr for PathPaymentStrictReceiveResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35445,7 +35659,7 @@ pub struct SimplePaymentResult { } impl ReadXdr for SimplePaymentResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35458,7 +35672,7 @@ impl ReadXdr for SimplePaymentResult { } impl WriteXdr for SimplePaymentResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -35493,7 +35707,7 @@ pub struct PathPaymentStrictReceiveResultSuccess { } impl ReadXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35505,7 +35719,7 @@ impl ReadXdr for PathPaymentStrictReceiveResultSuccess { } impl WriteXdr for PathPaymentStrictReceiveResultSuccess { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers.write_xdr(w)?; @@ -35671,7 +35885,7 @@ impl Variants for PathPaymentStrictReceiveRe impl Union for PathPaymentStrictReceiveResult {} impl ReadXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PathPaymentStrictReceiveResultCode = @@ -35702,7 +35916,7 @@ impl ReadXdr for PathPaymentStrictReceiveResult { } impl WriteXdr for PathPaymentStrictReceiveResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -35896,7 +36110,7 @@ impl From for i32 { } impl ReadXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -35907,7 +36121,7 @@ impl ReadXdr for PathPaymentStrictSendResultCode { } impl WriteXdr for PathPaymentStrictSendResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -35940,7 +36154,7 @@ pub struct PathPaymentStrictSendResultSuccess { } impl ReadXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -35952,7 +36166,7 @@ impl ReadXdr for PathPaymentStrictSendResultSuccess { } impl WriteXdr for PathPaymentStrictSendResultSuccess { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers.write_xdr(w)?; @@ -36117,7 +36331,7 @@ impl Variants for PathPaymentStrictSendResult { impl Union for PathPaymentStrictSendResult {} impl ReadXdr for PathPaymentStrictSendResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PathPaymentStrictSendResultCode = @@ -36148,7 +36362,7 @@ impl ReadXdr for PathPaymentStrictSendResult { } impl WriteXdr for PathPaymentStrictSendResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36341,7 +36555,7 @@ impl From for i32 { } impl ReadXdr for ManageSellOfferResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36352,7 +36566,7 @@ impl ReadXdr for ManageSellOfferResultCode { } impl WriteXdr for ManageSellOfferResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36455,7 +36669,7 @@ impl From for i32 { } impl ReadXdr for ManageOfferEffect { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -36466,7 +36680,7 @@ impl ReadXdr for ManageOfferEffect { } impl WriteXdr for ManageOfferEffect { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -36560,7 +36774,7 @@ impl Variants for ManageOfferSuccessResultOffer { impl Union for ManageOfferSuccessResultOffer {} impl ReadXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageOfferEffect = ::read_xdr(r)?; @@ -36578,7 +36792,7 @@ impl ReadXdr for ManageOfferSuccessResultOffer { } impl WriteXdr for ManageOfferSuccessResultOffer { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -36627,7 +36841,7 @@ pub struct ManageOfferSuccessResult { } impl ReadXdr for ManageOfferSuccessResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -36639,7 +36853,7 @@ impl ReadXdr for ManageOfferSuccessResult { } impl WriteXdr for ManageOfferSuccessResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.offers_claimed.write_xdr(w)?; @@ -36798,7 +37012,7 @@ impl Variants for ManageSellOfferResult { impl Union for ManageSellOfferResult {} impl ReadXdr for ManageSellOfferResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageSellOfferResultCode = @@ -36829,7 +37043,7 @@ impl ReadXdr for ManageSellOfferResult { } impl WriteXdr for ManageSellOfferResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37019,7 +37233,7 @@ impl From for i32 { } impl ReadXdr for ManageBuyOfferResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37030,7 +37244,7 @@ impl ReadXdr for ManageBuyOfferResultCode { } impl WriteXdr for ManageBuyOfferResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37188,7 +37402,7 @@ impl Variants for ManageBuyOfferResult { impl Union for ManageBuyOfferResult {} impl ReadXdr for ManageBuyOfferResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageBuyOfferResultCode = ::read_xdr(r)?; @@ -37218,7 +37432,7 @@ impl ReadXdr for ManageBuyOfferResult { } impl WriteXdr for ManageBuyOfferResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37392,7 +37606,7 @@ impl From for i32 { } impl ReadXdr for SetOptionsResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37403,7 +37617,7 @@ impl ReadXdr for SetOptionsResultCode { } impl WriteXdr for SetOptionsResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37549,7 +37763,7 @@ impl Variants for SetOptionsResult { impl Union for SetOptionsResult {} impl ReadXdr for SetOptionsResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SetOptionsResultCode = ::read_xdr(r)?; @@ -37575,7 +37789,7 @@ impl ReadXdr for SetOptionsResult { } impl WriteXdr for SetOptionsResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -37738,7 +37952,7 @@ impl From for i32 { } impl ReadXdr for ChangeTrustResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -37749,7 +37963,7 @@ impl ReadXdr for ChangeTrustResultCode { } impl WriteXdr for ChangeTrustResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -37883,7 +38097,7 @@ impl Variants for ChangeTrustResult { impl Union for ChangeTrustResult {} impl ReadXdr for ChangeTrustResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ChangeTrustResultCode = ::read_xdr(r)?; @@ -37909,7 +38123,7 @@ impl ReadXdr for ChangeTrustResult { } impl WriteXdr for ChangeTrustResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38056,7 +38270,7 @@ impl From for i32 { } impl ReadXdr for AllowTrustResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38067,7 +38281,7 @@ impl ReadXdr for AllowTrustResultCode { } impl WriteXdr for AllowTrustResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38189,7 +38403,7 @@ impl Variants for AllowTrustResult { impl Union for AllowTrustResult {} impl ReadXdr for AllowTrustResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AllowTrustResultCode = ::read_xdr(r)?; @@ -38211,7 +38425,7 @@ impl ReadXdr for AllowTrustResult { } impl WriteXdr for AllowTrustResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38361,7 +38575,7 @@ impl From for i32 { } impl ReadXdr for AccountMergeResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38372,7 +38586,7 @@ impl ReadXdr for AccountMergeResultCode { } impl WriteXdr for AccountMergeResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38500,7 +38714,7 @@ impl Variants for AccountMergeResult { impl Union for AccountMergeResult {} impl ReadXdr for AccountMergeResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: AccountMergeResultCode = ::read_xdr(r)?; @@ -38523,7 +38737,7 @@ impl ReadXdr for AccountMergeResult { } impl WriteXdr for AccountMergeResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38632,7 +38846,7 @@ impl From for i32 { } impl ReadXdr for InflationResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38643,7 +38857,7 @@ impl ReadXdr for InflationResultCode { } impl WriteXdr for InflationResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -38676,7 +38890,7 @@ pub struct InflationPayout { } impl ReadXdr for InflationPayout { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -38688,7 +38902,7 @@ impl ReadXdr for InflationPayout { } impl WriteXdr for InflationPayout { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.destination.write_xdr(w)?; @@ -38776,7 +38990,7 @@ impl Variants for InflationResult { impl Union for InflationResult {} impl ReadXdr for InflationResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: InflationResultCode = ::read_xdr(r)?; @@ -38795,7 +39009,7 @@ impl ReadXdr for InflationResult { } impl WriteXdr for InflationResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -38923,7 +39137,7 @@ impl From for i32 { } impl ReadXdr for ManageDataResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -38934,7 +39148,7 @@ impl ReadXdr for ManageDataResultCode { } impl WriteXdr for ManageDataResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39044,7 +39258,7 @@ impl Variants for ManageDataResult { impl Union for ManageDataResult {} impl ReadXdr for ManageDataResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ManageDataResultCode = ::read_xdr(r)?; @@ -39064,7 +39278,7 @@ impl ReadXdr for ManageDataResult { } impl WriteXdr for ManageDataResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39172,7 +39386,7 @@ impl From for i32 { } impl ReadXdr for BumpSequenceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39183,7 +39397,7 @@ impl ReadXdr for BumpSequenceResultCode { } impl WriteXdr for BumpSequenceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39272,7 +39486,7 @@ impl Variants for BumpSequenceResult { impl Union for BumpSequenceResult {} impl ReadXdr for BumpSequenceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BumpSequenceResultCode = ::read_xdr(r)?; @@ -39289,7 +39503,7 @@ impl ReadXdr for BumpSequenceResult { } impl WriteXdr for BumpSequenceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39419,7 +39633,7 @@ impl From for i32 { } impl ReadXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39430,7 +39644,7 @@ impl ReadXdr for CreateClaimableBalanceResultCode { } impl WriteXdr for CreateClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39547,7 +39761,7 @@ impl Variants for CreateClaimableBalanceResult impl Union for CreateClaimableBalanceResult {} impl ReadXdr for CreateClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: CreateClaimableBalanceResultCode = @@ -39571,7 +39785,7 @@ impl ReadXdr for CreateClaimableBalanceResult { } impl WriteXdr for CreateClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39705,7 +39919,7 @@ impl From for i32 { } impl ReadXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39716,7 +39930,7 @@ impl ReadXdr for ClaimClaimableBalanceResultCode { } impl WriteXdr for ClaimClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -39832,7 +40046,7 @@ impl Variants for ClaimClaimableBalanceResult { impl Union for ClaimClaimableBalanceResult {} impl ReadXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClaimClaimableBalanceResultCode = @@ -39854,7 +40068,7 @@ impl ReadXdr for ClaimClaimableBalanceResult { } impl WriteXdr for ClaimClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -39975,7 +40189,7 @@ impl From for i32 { } impl ReadXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -39986,7 +40200,7 @@ impl ReadXdr for BeginSponsoringFutureReservesResultCode { } impl WriteXdr for BeginSponsoringFutureReservesResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40087,7 +40301,7 @@ impl Variants for BeginSponsoringFuture impl Union for BeginSponsoringFutureReservesResult {} impl ReadXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: BeginSponsoringFutureReservesResultCode = @@ -40107,7 +40321,7 @@ impl ReadXdr for BeginSponsoringFutureReservesResult { } impl WriteXdr for BeginSponsoringFutureReservesResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40215,7 +40429,7 @@ impl From for i32 { } impl ReadXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40226,7 +40440,7 @@ impl ReadXdr for EndSponsoringFutureReservesResultCode { } impl WriteXdr for EndSponsoringFutureReservesResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40316,7 +40530,7 @@ impl Variants for EndSponsoringFutureRese impl Union for EndSponsoringFutureReservesResult {} impl ReadXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: EndSponsoringFutureReservesResultCode = @@ -40334,7 +40548,7 @@ impl ReadXdr for EndSponsoringFutureReservesResult { } impl WriteXdr for EndSponsoringFutureReservesResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40467,7 +40681,7 @@ impl From for i32 { } impl ReadXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40478,7 +40692,7 @@ impl ReadXdr for RevokeSponsorshipResultCode { } impl WriteXdr for RevokeSponsorshipResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40594,7 +40808,7 @@ impl Variants for RevokeSponsorshipResult { impl Union for RevokeSponsorshipResult {} impl ReadXdr for RevokeSponsorshipResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RevokeSponsorshipResultCode = @@ -40616,7 +40830,7 @@ impl ReadXdr for RevokeSponsorshipResult { } impl WriteXdr for RevokeSponsorshipResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -40747,7 +40961,7 @@ impl From for i32 { } impl ReadXdr for ClawbackResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -40758,7 +40972,7 @@ impl ReadXdr for ClawbackResultCode { } impl WriteXdr for ClawbackResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -40868,7 +41082,7 @@ impl Variants for ClawbackResult { impl Union for ClawbackResult {} impl ReadXdr for ClawbackResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClawbackResultCode = ::read_xdr(r)?; @@ -40888,7 +41102,7 @@ impl ReadXdr for ClawbackResult { } impl WriteXdr for ClawbackResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41008,7 +41222,7 @@ impl From for i32 { } impl ReadXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41019,7 +41233,7 @@ impl ReadXdr for ClawbackClaimableBalanceResultCode { } impl WriteXdr for ClawbackClaimableBalanceResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41120,7 +41334,7 @@ impl Variants for ClawbackClaimableBalanceRe impl Union for ClawbackClaimableBalanceResult {} impl ReadXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ClawbackClaimableBalanceResultCode = @@ -41140,7 +41354,7 @@ impl ReadXdr for ClawbackClaimableBalanceResult { } impl WriteXdr for ClawbackClaimableBalanceResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41276,7 +41490,7 @@ impl From for i32 { } impl ReadXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41287,7 +41501,7 @@ impl ReadXdr for SetTrustLineFlagsResultCode { } impl WriteXdr for SetTrustLineFlagsResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41403,7 +41617,7 @@ impl Variants for SetTrustLineFlagsResult { impl Union for SetTrustLineFlagsResult {} impl ReadXdr for SetTrustLineFlagsResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SetTrustLineFlagsResultCode = @@ -41425,7 +41639,7 @@ impl ReadXdr for SetTrustLineFlagsResult { } impl WriteXdr for SetTrustLineFlagsResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41578,7 +41792,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41589,7 +41803,7 @@ impl ReadXdr for LiquidityPoolDepositResultCode { } impl WriteXdr for LiquidityPoolDepositResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -41717,7 +41931,7 @@ impl Variants for LiquidityPoolDepositResult { impl Union for LiquidityPoolDepositResult {} impl ReadXdr for LiquidityPoolDepositResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolDepositResultCode = @@ -41741,7 +41955,7 @@ impl ReadXdr for LiquidityPoolDepositResult { } impl WriteXdr for LiquidityPoolDepositResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -41883,7 +42097,7 @@ impl From for i32 { } impl ReadXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -41894,7 +42108,7 @@ impl ReadXdr for LiquidityPoolWithdrawResultCode { } impl WriteXdr for LiquidityPoolWithdrawResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42010,7 +42224,7 @@ impl Variants for LiquidityPoolWithdrawResult { impl Union for LiquidityPoolWithdrawResult {} impl ReadXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: LiquidityPoolWithdrawResultCode = @@ -42032,7 +42246,7 @@ impl ReadXdr for LiquidityPoolWithdrawResult { } impl WriteXdr for LiquidityPoolWithdrawResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42169,7 +42383,7 @@ impl From for i32 { } impl ReadXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42180,7 +42394,7 @@ impl ReadXdr for InvokeHostFunctionResultCode { } impl WriteXdr for InvokeHostFunctionResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42298,7 +42512,7 @@ impl Variants for InvokeHostFunctionResult { impl Union for InvokeHostFunctionResult {} impl ReadXdr for InvokeHostFunctionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: InvokeHostFunctionResultCode = @@ -42322,7 +42536,7 @@ impl ReadXdr for InvokeHostFunctionResult { } impl WriteXdr for InvokeHostFunctionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42447,7 +42661,7 @@ impl From for i32 { } impl ReadXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42458,7 +42672,7 @@ impl ReadXdr for ExtendFootprintTtlResultCode { } impl WriteXdr for ExtendFootprintTtlResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42564,7 +42778,7 @@ impl Variants for ExtendFootprintTtlResult { impl Union for ExtendFootprintTtlResult {} impl ReadXdr for ExtendFootprintTtlResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: ExtendFootprintTtlResultCode = @@ -42586,7 +42800,7 @@ impl ReadXdr for ExtendFootprintTtlResult { } impl WriteXdr for ExtendFootprintTtlResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42709,7 +42923,7 @@ impl From for i32 { } impl ReadXdr for RestoreFootprintResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42720,7 +42934,7 @@ impl ReadXdr for RestoreFootprintResultCode { } impl WriteXdr for RestoreFootprintResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -42826,7 +43040,7 @@ impl Variants for RestoreFootprintResult { impl Union for RestoreFootprintResult {} impl ReadXdr for RestoreFootprintResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: RestoreFootprintResultCode = @@ -42848,7 +43062,7 @@ impl ReadXdr for RestoreFootprintResult { } impl WriteXdr for RestoreFootprintResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -42987,7 +43201,7 @@ impl From for i32 { } impl ReadXdr for OperationResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -42998,7 +43212,7 @@ impl ReadXdr for OperationResultCode { } impl WriteXdr for OperationResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -43265,7 +43479,7 @@ impl Variants for OperationResultTr { impl Union for OperationResultTr {} impl ReadXdr for OperationResultTr { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationType = ::read_xdr(r)?; @@ -43345,7 +43559,7 @@ impl ReadXdr for OperationResultTr { } impl WriteXdr for OperationResultTr { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43554,7 +43768,7 @@ impl Variants for OperationResult { impl Union for OperationResult {} impl ReadXdr for OperationResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: OperationResultCode = ::read_xdr(r)?; @@ -43576,7 +43790,7 @@ impl ReadXdr for OperationResult { } impl WriteXdr for OperationResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -43793,7 +44007,7 @@ impl From for i32 { } impl ReadXdr for TransactionResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -43804,7 +44018,7 @@ impl ReadXdr for TransactionResultCode { } impl WriteXdr for TransactionResultCode { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -43988,7 +44202,7 @@ impl Variants for InnerTransactionResultResult { impl Union for InnerTransactionResultResult {} impl ReadXdr for InnerTransactionResultResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TransactionResultCode = ::read_xdr(r)?; @@ -44024,7 +44238,7 @@ impl ReadXdr for InnerTransactionResultResult { } impl WriteXdr for InnerTransactionResultResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44125,7 +44339,7 @@ impl Variants for InnerTransactionResultExt { impl Union for InnerTransactionResultExt {} impl ReadXdr for InnerTransactionResultExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -44141,7 +44355,7 @@ impl ReadXdr for InnerTransactionResultExt { } impl WriteXdr for InnerTransactionResultExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44213,7 +44427,7 @@ pub struct InnerTransactionResult { } impl ReadXdr for InnerTransactionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -44226,7 +44440,7 @@ impl ReadXdr for InnerTransactionResult { } impl WriteXdr for InnerTransactionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_charged.write_xdr(w)?; @@ -44261,7 +44475,7 @@ pub struct InnerTransactionResultPair { } impl ReadXdr for InnerTransactionResultPair { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -44273,7 +44487,7 @@ impl ReadXdr for InnerTransactionResultPair { } impl WriteXdr for InnerTransactionResultPair { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.transaction_hash.write_xdr(w)?; @@ -44470,7 +44684,7 @@ impl Variants for TransactionResultResult { impl Union for TransactionResultResult {} impl ReadXdr for TransactionResultResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: TransactionResultCode = ::read_xdr(r)?; @@ -44512,7 +44726,7 @@ impl ReadXdr for TransactionResultResult { } impl WriteXdr for TransactionResultResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44615,7 +44829,7 @@ impl Variants for TransactionResultExt { impl Union for TransactionResultExt {} impl ReadXdr for TransactionResultExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -44631,7 +44845,7 @@ impl ReadXdr for TransactionResultExt { } impl WriteXdr for TransactionResultExt { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -44704,7 +44918,7 @@ pub struct TransactionResult { } impl ReadXdr for TransactionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -44717,7 +44931,7 @@ impl ReadXdr for TransactionResult { } impl WriteXdr for TransactionResult { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.fee_charged.write_xdr(w)?; @@ -44825,7 +45039,7 @@ impl AsRef<[u8; 32]> for Hash { } impl ReadXdr for Hash { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 32]>::read_xdr(r)?; @@ -44836,7 +45050,7 @@ impl ReadXdr for Hash { } impl WriteXdr for Hash { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -44976,7 +45190,7 @@ impl AsRef<[u8; 32]> for Uint256 { } impl ReadXdr for Uint256 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 32]>::read_xdr(r)?; @@ -44987,7 +45201,7 @@ impl ReadXdr for Uint256 { } impl WriteXdr for Uint256 { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45101,7 +45315,7 @@ impl AsRef for TimePoint { } impl ReadXdr for TimePoint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u64::read_xdr(r)?; @@ -45112,7 +45326,7 @@ impl ReadXdr for TimePoint { } impl WriteXdr for TimePoint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45157,7 +45371,7 @@ impl AsRef for Duration { } impl ReadXdr for Duration { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = u64::read_xdr(r)?; @@ -45168,7 +45382,7 @@ impl ReadXdr for Duration { } impl WriteXdr for Duration { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -45246,7 +45460,7 @@ impl Variants for ExtensionPoint { impl Union for ExtensionPoint {} impl ReadXdr for ExtensionPoint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: i32 = ::read_xdr(r)?; @@ -45262,7 +45476,7 @@ impl ReadXdr for ExtensionPoint { } impl WriteXdr for ExtensionPoint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45387,7 +45601,7 @@ impl From for i32 { } impl ReadXdr for CryptoKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45398,7 +45612,7 @@ impl ReadXdr for CryptoKeyType { } impl WriteXdr for CryptoKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45489,7 +45703,7 @@ impl From for i32 { } impl ReadXdr for PublicKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45500,7 +45714,7 @@ impl ReadXdr for PublicKeyType { } impl WriteXdr for PublicKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45609,7 +45823,7 @@ impl From for i32 { } impl ReadXdr for SignerKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -45620,7 +45834,7 @@ impl ReadXdr for SignerKeyType { } impl WriteXdr for SignerKeyType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -45699,7 +45913,7 @@ impl Variants for PublicKey { impl Union for PublicKey {} impl ReadXdr for PublicKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: PublicKeyType = ::read_xdr(r)?; @@ -45717,7 +45931,7 @@ impl ReadXdr for PublicKey { } impl WriteXdr for PublicKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45754,7 +45968,7 @@ pub struct SignerKeyEd25519SignedPayload { } impl ReadXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -45766,7 +45980,7 @@ impl ReadXdr for SignerKeyEd25519SignedPayload { } impl WriteXdr for SignerKeyEd25519SignedPayload { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.ed25519.write_xdr(w)?; @@ -45875,7 +46089,7 @@ impl Variants for SignerKey { impl Union for SignerKey {} impl ReadXdr for SignerKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let dv: SignerKeyType = ::read_xdr(r)?; @@ -45896,7 +46110,7 @@ impl ReadXdr for SignerKey { } impl WriteXdr for SignerKey { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.discriminant().write_xdr(w)?; @@ -45952,7 +46166,7 @@ impl AsRef> for Signature { } impl ReadXdr for Signature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = BytesM::<64>::read_xdr(r)?; @@ -45963,7 +46177,7 @@ impl ReadXdr for Signature { } impl WriteXdr for Signature { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -46115,7 +46329,7 @@ impl AsRef<[u8; 4]> for SignatureHint { } impl ReadXdr for SignatureHint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = <[u8; 4]>::read_xdr(r)?; @@ -46126,7 +46340,7 @@ impl ReadXdr for SignatureHint { } impl WriteXdr for SignatureHint { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -46206,7 +46420,7 @@ impl AsRef for NodeId { } impl ReadXdr for NodeId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = PublicKey::read_xdr(r)?; @@ -46217,7 +46431,7 @@ impl ReadXdr for NodeId { } impl WriteXdr for NodeId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -46260,7 +46474,7 @@ impl AsRef for AccountId { } impl ReadXdr for AccountId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let i = PublicKey::read_xdr(r)?; @@ -46271,7 +46485,7 @@ impl ReadXdr for AccountId { } impl WriteXdr for AccountId { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| self.0.write_xdr(w)) } @@ -46299,7 +46513,7 @@ pub struct Curve25519Secret { } impl ReadXdr for Curve25519Secret { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46310,7 +46524,7 @@ impl ReadXdr for Curve25519Secret { } impl WriteXdr for Curve25519Secret { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46341,7 +46555,7 @@ pub struct Curve25519Public { } impl ReadXdr for Curve25519Public { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46352,7 +46566,7 @@ impl ReadXdr for Curve25519Public { } impl WriteXdr for Curve25519Public { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46383,7 +46597,7 @@ pub struct HmacSha256Key { } impl ReadXdr for HmacSha256Key { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46394,7 +46608,7 @@ impl ReadXdr for HmacSha256Key { } impl WriteXdr for HmacSha256Key { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.key.write_xdr(w)?; @@ -46425,7 +46639,7 @@ pub struct HmacSha256Mac { } impl ReadXdr for HmacSha256Mac { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46436,7 +46650,7 @@ impl ReadXdr for HmacSha256Mac { } impl WriteXdr for HmacSha256Mac { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.mac.write_xdr(w)?; @@ -46467,7 +46681,7 @@ pub struct ShortHashSeed { } impl ReadXdr for ShortHashSeed { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46478,7 +46692,7 @@ impl ReadXdr for ShortHashSeed { } impl WriteXdr for ShortHashSeed { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.seed.write_xdr(w)?; @@ -46581,7 +46795,7 @@ impl From for i32 { } impl ReadXdr for BinaryFuseFilterType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { let e = i32::read_xdr(r)?; @@ -46592,7 +46806,7 @@ impl ReadXdr for BinaryFuseFilterType { } impl WriteXdr for BinaryFuseFilterType { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { let i: i32 = (*self).into(); @@ -46645,7 +46859,7 @@ pub struct SerializedBinaryFuseFilter { } impl ReadXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn read_xdr(r: &mut Limited) -> Result { r.with_limited_depth(|r| { Ok(Self { @@ -46664,7 +46878,7 @@ impl ReadXdr for SerializedBinaryFuseFilter { } impl WriteXdr for SerializedBinaryFuseFilter { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] fn write_xdr(&self, w: &mut Limited) -> Result<()> { w.with_limited_depth(|w| { self.type_.write_xdr(w)?; @@ -51182,7 +51396,7 @@ impl Type { "SerializedBinaryFuseFilter", ]; - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] #[allow(clippy::too_many_lines)] pub fn read_xdr(v: TypeVariant, r: &mut Limited) -> Result { match v { @@ -53216,7 +53430,7 @@ impl Type { Ok(t) } - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] pub fn read_xdr_to_end(v: TypeVariant, r: &mut Limited) -> Result { let s = Self::read_xdr(v, r)?; // Check that any further reads, such as this read of one byte, read no @@ -59448,7 +59662,7 @@ impl Type { } } - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] pub fn from_xdr>(v: TypeVariant, bytes: B, limits: Limits) -> Result { let mut cursor = Limited::new(Cursor::new(bytes.as_ref()), limits); let t = Self::read_xdr_to_end(v, &mut cursor)?; @@ -63752,7 +63966,7 @@ impl Variants for Type { } impl WriteXdr for Type { - #[cfg(feature = "alloc")] + #[cfg(any(feature = "std", feature = "embedded_io"))] #[allow(clippy::too_many_lines)] fn write_xdr(&self, w: &mut Limited) -> Result<()> { match self { From 752c157b988ed0c6da012676c3b058dab81d0cfb Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Sat, 21 Sep 2024 11:20:59 +0800 Subject: [PATCH 08/14] regenerate XDR --- Makefile | 2 +- src/curr/generated.rs | 3 ++- src/next/generated.rs | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a9799097..5c827510 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CARGO_HACK_ARGS=--feature-powerset --exclude-features default --group-features b CARGO_DOC_ARGS?=--open # TODO: Update this after https://github.com/stellar/xdrgen/pull/205 is merged -XDRGEN_VERSION=d7b6f935e7c026901a7d9958e5700a8caca344f8 +XDRGEN_VERSION=cd72b3f1c17b34b92e3de10b44efe7290b95695d # XDRGEN_LOCAL=1 XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 62d3baa9..df8195c7 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -97,7 +97,6 @@ use alloc::{ borrow::ToOwned, boxed::Box, string::{FromUtf8Error, String}, - vec, vec::Vec, }; #[cfg(feature = "std")] @@ -112,6 +111,8 @@ use std::{ io::{BufRead, BufReader, Cursor, Read, Write}, }; +#[cfg(feature = "embedded_io")] +use alloc::vec; #[cfg(feature = "embedded_io")] use embedded_io_extras::{Cursor, Error as _, ErrorType, Read, Write}; diff --git a/src/next/generated.rs b/src/next/generated.rs index f9e12582..aea8c30f 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -97,7 +97,6 @@ use alloc::{ borrow::ToOwned, boxed::Box, string::{FromUtf8Error, String}, - vec, vec::Vec, }; #[cfg(feature = "std")] @@ -112,6 +111,8 @@ use std::{ io::{BufRead, BufReader, Cursor, Read, Write}, }; +#[cfg(feature = "embedded_io")] +use alloc::vec; #[cfg(feature = "embedded_io")] use embedded_io_extras::{Cursor, Error as _, ErrorType, Read, Write}; From 067c6ee6dda5a5e6044501600780e3f99f05340e Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Sat, 21 Sep 2024 11:29:35 +0800 Subject: [PATCH 09/14] update readme --- README.md | 8 ++++++-- src/lib.rs | 11 +++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 512ee130..b7bb8e8b 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,14 @@ decode), and is the default feature set. 2. `alloc` – The alloc feature uses `Box` and `Vec` types for recursive references and arrays, and is automatically enabled if the std feature is enabled. The default global allocator is used. Support for a custom -allocator will be added in [#39]. Encode or decode capability exists, but -still in an experimental stage, there may be breaking changes at any time. +allocator will be added in [#39]. No encode or decode capability exists, +only types. Encode and decode capability will be added in [#46]. 3. If std or alloc are not enabled recursive and array types requires static lifetime values. No encode or decode capability exists. Encode and decode capability will be added in [#47]. [#39]: https://github.com/stellar/rs-stellar-xdr/issues/39 +[#46]: https://github.com/stellar/rs-stellar-xdr/issues/46 [#47]: https://github.com/stellar/rs-stellar-xdr/issues/47 Ancillary functionality: @@ -53,6 +54,9 @@ only necessary to use utility functions that depend on serde_json. 5. `hex` – Enables support for hex in string representations of some types. Automatically enabled when serde is enabled. 6. `schemars` – Enables support for JSON Schema generation. (Experimental) +7. `embedded_io` - Enables support for encoding and decoding using the +`embedded-io` library, without relying on `std::io`, making it suitable for +`no_std` environments. (Experimental) Features marked experimental may disappear at anytime, see breaking changes at anytime, or and may be minimal implementations instead of complete. diff --git a/src/lib.rs b/src/lib.rs index 5b59acbe..6e0779b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,8 +5,7 @@ // auto-generated docs. #![allow(clippy::tabs_in_doc_comments)] #![allow(clippy::doc_markdown)] -// TODO: Make clippy happy -#![allow(clippy::doc_lazy_continuation)] + //! Library and CLI containing types and functionality for working with Stellar //! XDR. //! @@ -39,13 +38,14 @@ //! 2. `alloc` – The alloc feature uses `Box` and `Vec` types for recursive //! references and arrays, and is automatically enabled if the std feature is //! enabled. The default global allocator is used. Support for a custom -//! allocator will be added in [#39]. Encode or decode capability exists, but -//! still in an experimental stage, there may be breaking changes at any time. +//! allocator will be added in [#39]. No encode or decode capability exists, +//! only types. Encode and decode capability will be added in [#46]. //! 3. If std or alloc are not enabled recursive and array types requires static //! lifetime values. No encode or decode capability exists. Encode and decode //! capability will be added in [#47]. //! //! [#39]: https://github.com/stellar/rs-stellar-xdr/issues/39 +//! [#46]: https://github.com/stellar/rs-stellar-xdr/issues/46 //! [#47]: https://github.com/stellar/rs-stellar-xdr/issues/47 //! //! Ancillary functionality: @@ -60,6 +60,9 @@ //! 5. `hex` – Enables support for hex in string representations of some types. //! Automatically enabled when serde is enabled. //! 6. `schemars` – Enables support for JSON Schema generation. (Experimental) +//! 7. `embedded_io` - Enables support for encoding and decoding using the +//! `embedded-io` library, without relying on `std::io`, making it suitable for +//! `no_std` environments. (Experimental) //! //! Features marked experimental may disappear at anytime, see breaking changes //! at anytime, or and may be minimal implementations instead of complete. From a0aeb71260c26e724b44dbb32c59a5c8935ccf1a Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Sat, 21 Sep 2024 11:33:09 +0800 Subject: [PATCH 10/14] update readme --- src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 6e0779b9..33d897c2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,8 @@ // auto-generated docs. #![allow(clippy::tabs_in_doc_comments)] #![allow(clippy::doc_markdown)] +// TODO: Make clippy happy +#![allow(clippy::doc_lazy_continuation)] //! Library and CLI containing types and functionality for working with Stellar //! XDR. From 1771f923b38ba31d9ac051073242b59b4a1a89b7 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Sat, 21 Sep 2024 12:39:56 +0800 Subject: [PATCH 11/14] update ci --- .github/workflows/rust.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 86b3d348..09eb1781 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,7 +11,8 @@ concurrency: cancel-in-progress: true env: - CARGO_HACK_ARGS: --feature-powerset --exclude-features default --group-features base64,serde,serde_json,schemars,arbitrary,hex + CARGO_HACK_ARGS: --feature-powerset --exclude-features default --group-features base64,serde,serde_json,schemars,arbitrary,hex --skip "embedded_io" + EMBEDDED_IO_CARGO_HACK_ARGS: --feature-powerset --exclude-features default --skip "cli,std,base64,serde,serde_json,schemars,arbitrary,hex" jobs: @@ -90,6 +91,9 @@ jobs: name: cargo-hack version: 0.5.16 - run: cargo hack clippy $CARGO_HACK_ARGS --target ${{ matrix.sys.target }} --all-targets + # TODO: Features "std" and "embedded_io" cannot be enabled simultaneously. + # Is there a better solution to solve it? + - run: cargo hack clippy $EMBEDDED_IO_CARGO_HACK_ARGS --target ${{ matrix.sys.target }} --all-targets test: strategy: From 5c3cd236d297049acc28340deeea548db05e8d88 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Sat, 21 Sep 2024 12:44:48 +0800 Subject: [PATCH 12/14] update ci --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 09eb1781..db92d659 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -130,6 +130,8 @@ jobs: name: cargo-hack version: 0.5.16 - run: cargo hack test $CARGO_HACK_ARGS + # TODO: Features "std" and "embedded_io" cannot be enabled simultaneously. + - run: cargo hack test $EMBEDDED_IO_CARGO_HACK_ARGS publish-dry-run: if: github.event_name == 'push' || startsWith(github.head_ref, 'release/') From 34ce139e2548c1794ae8a316c33b2c4cd3c0617f Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Sat, 21 Sep 2024 15:27:31 +0800 Subject: [PATCH 13/14] regenerate XDR --- Makefile | 2 +- src/curr/generated.rs | 301 +++++++++++++++++++++++++++++------------- src/next/generated.rs | 301 +++++++++++++++++++++++++++++------------- 3 files changed, 421 insertions(+), 183 deletions(-) diff --git a/Makefile b/Makefile index 5c827510..513da982 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CARGO_HACK_ARGS=--feature-powerset --exclude-features default --group-features b CARGO_DOC_ARGS?=--open # TODO: Update this after https://github.com/stellar/xdrgen/pull/205 is merged -XDRGEN_VERSION=cd72b3f1c17b34b92e3de10b44efe7290b95695d +XDRGEN_VERSION=1907cf80feb4e9f25d98f5f970db206ad4135282 # XDRGEN_LOCAL=1 XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId diff --git a/src/curr/generated.rs b/src/curr/generated.rs index df8195c7..7cb4f9a9 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -2900,11 +2900,25 @@ mod test_io { use super::*; + macro_rules! assert_unexpected_eof { + ($result:expr) => {{ + let err = $result.unwrap_err(); + #[cfg(feature = "std")] + { + assert_eq!(err.kind(), io::ErrorKind::UnexpectedEof); + } + #[cfg(feature = "embedded_io")] + { + assert_eq!(err, embedded_io_extras::ReadExactError::UnexpectedEof); + } + }}; + } + #[test] - fn test_read_exact_success() { + fn test_cursor_read_exact_success() { let data = b"The quick brown fox jumps over the lazy dog."; let mut cursor = Cursor::new(data); - let mut buffer = [0u8; 19]; // Exactly the length of "The quick brown fox" + let mut buffer = [0u8; 19]; // Attempt to read exactly 19 bytes assert!(cursor.read_exact(&mut buffer).is_ok()); @@ -2913,8 +2927,8 @@ mod test_io { } #[test] - fn test_read_exact_less_than_available() { - let data = b"Hello, Rust!"; + fn test_cursor_read_exact_less_than_available() { + let data = b"Hello, Stellar!"; let mut cursor = Cursor::new(data); let mut buffer = [0u8; 5]; @@ -2925,7 +2939,7 @@ mod test_io { } #[test] - fn test_read_exact_exact_eof() { + fn test_cursor_read_exact_exact_eof() { let data = b"Data"; let mut cursor = Cursor::new(data); let mut buffer = [0u8; 4]; @@ -2939,21 +2953,12 @@ mod test_io { let mut buffer_eof = [0u8; 1]; let result = cursor.read_exact(&mut buffer_eof); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); + assert_unexpected_eof!(result); assert_eq!(cursor.position(), 4); // Position should remain at EOF } #[test] - fn test_read_exact_past_eof() { + fn test_cursor_read_exact_past_eof() { let data = b"Short"; let mut cursor = Cursor::new(data); let mut buffer = [0u8; 10]; // Requesting more bytes than available @@ -2961,24 +2966,15 @@ mod test_io { // Attempt to read 10 bytes from a 5-byte buffer let result = cursor.read_exact(&mut buffer); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); + assert_unexpected_eof!(result); assert_eq!(cursor.position(), 5); // Position should move to EOF } #[test] - fn test_read_exact_empty_buffer() { + fn test_cursor_read_exact_empty_buffer() { let data = b"Non-empty"; let mut cursor = Cursor::new(data); - let mut buffer = [0u8; 0]; // Zero-length buffer + let mut buffer = [0u8; 0]; // Attempt to read zero bytes assert!(cursor.read_exact(&mut buffer).is_ok()); @@ -2986,7 +2982,7 @@ mod test_io { } #[test] - fn test_read_exact_from_empty_cursor() { + fn test_cursor_read_exact_from_empty_cursor() { let data: &[u8] = b""; let mut cursor = Cursor::new(data); let mut buffer = [0u8; 5]; @@ -2994,21 +2990,12 @@ mod test_io { // Attempt to read from an empty cursor let result = cursor.read_exact(&mut buffer); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); + assert_unexpected_eof!(result); assert_eq!(cursor.position(), 0); // Position remains at 0 } #[test] - fn test_read_exact_multiple_reads() { + fn test_cursor_read_exact_multiple_reads() { let data = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; let mut cursor = Cursor::new(data); @@ -3029,80 +3016,212 @@ mod test_io { // Third read: Attempt to read 10 bytes, but only 6 are available let result = cursor.read_exact(&mut buffer3); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); + assert_unexpected_eof!(result); // read_exact makes no promises about the content of the buffer on error + // https://github.com/rust-lang/rust/blob/84ac80f1921afc243d71fd0caaa4f2838c294102/library/std/src/io/impls.rs#L287 // assert_eq!(&buffer3[..6], b"UVWXYZ"); assert_eq!(cursor.position(), 26); // Position should be at EOF } #[test] - fn test_cursor_read_exact_after_eof() { - let data = b"End"; - let mut cursor = Cursor::new(data); - let mut buffer = [0u8; 3]; + fn test_slice_read_exact_success() { + let data: &[u8] = b"The quick brown fox jumps over the lazy dog."; + let mut reader = data; + let mut buffer = [0u8; 19]; - // First read: read the entire buffer - assert!(cursor.read_exact(&mut buffer).is_ok()); - assert_eq!(&buffer, b"End"); - assert_eq!(cursor.position(), 3); + // Attempt to read exactly 19 bytes + assert!(reader.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"The quick brown fox"); + } - // Second read: attempt to read again, should fail + #[test] + fn test_slice_read_exact_less_than_available() { + let data: &[u8] = b"Hello, Stellar!"; + let mut reader = data; + let mut buffer = [0u8; 5]; + + // Attempt to read 5 bytes from the start + assert!(reader.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"Hello"); + } + + #[test] + fn test_slice_read_exact_exact_eof() { + let data: &[u8] = b"Data"; + let mut reader = data; + let mut buffer = [0u8; 4]; + + // Attempt to read exactly 4 bytes, which is the entire slice + assert!(reader.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"Data"); + + // Further attempt to read should fail with EOF let mut buffer_eof = [0u8; 1]; - let result = cursor.read_exact(&mut buffer_eof); + let result = reader.read_exact(&mut buffer_eof); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); - assert_eq!(cursor.position(), 3); // Position remains at EOF + assert_unexpected_eof!(result); } #[test] - fn test_slice_read_exact_success() { - let data = b"SliceReadTest"; - let mut slice = &data[..]; - let mut buffer = [0u8; 13]; // Exact length + fn test_slice_read_exact_past_eof() { + let data: &[u8] = b"Short"; + let mut reader = data; + let mut buffer = [0u8; 10]; // Requesting more bytes than available - // Using Read trait directly on slice - assert!(slice.read_exact(&mut buffer).is_ok()); - assert_eq!(&buffer, b"SliceReadTest"); + // Attempt to read 10 bytes from a 5-byte slice + let result = reader.read_exact(&mut buffer); + assert!(result.is_err()); + assert_unexpected_eof!(result); } #[test] - fn test_slice_read_exact_partial() { - let data = b"SlicePartial"; - let mut slice = &data[..]; - let mut buffer = [0u8; 20]; // Request more bytes than available + fn test_slice_read_exact_empty_buffer() { + let data: &[u8] = b"Non-empty"; + let mut reader = data; + let mut buffer = [0u8; 0]; // Zero-length buffer - // Using Read trait directly on slice - let result = slice.read_exact(&mut buffer); + // Attempt to read zero bytes + assert!(reader.read_exact(&mut buffer).is_ok()); + } + + #[test] + fn test_slice_read_exact_from_empty_slice() { + let data: &[u8] = b""; + let mut reader = data; + let mut buffer = [0u8; 5]; + + // Attempt to read from an empty slice + let result = reader.read_exact(&mut buffer); assert!(result.is_err()); + assert_unexpected_eof!(result); + } + + #[test] + fn test_slice_read_exact_multiple_reads() { + let data: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + let mut reader = data; + + let mut buffer1 = [0u8; 10]; + let mut buffer2 = [0u8; 10]; + let mut buffer3 = [0u8; 10]; // Only 6 bytes left + + // First read: 10 bytes + assert!(reader.read_exact(&mut buffer1).is_ok()); + assert_eq!(&buffer1, b"ABCDEFGHIJ"); + + // Second read: 10 bytes + assert!(reader.read_exact(&mut buffer2).is_ok()); + assert_eq!(&buffer2, b"KLMNOPQRST"); + + // Third read: Attempt to read 10 bytes, but only 6 are available + let result = reader.read_exact(&mut buffer3); + assert!(result.is_err()); + assert_unexpected_eof!(result); + } + + #[test] + fn test_cursor_write_success() { + let data = Vec::with_capacity(100); + let mut cursor = Cursor::new(data); + let write_data = b"Hello, Stellar!"; + + assert!(cursor.write_all(write_data).is_ok()); + assert_eq!(&cursor.get_ref()[..], write_data); + assert_eq!(cursor.position(), write_data.len() as u64); + } + + #[test] + fn test_cursor_write_multiple_writes() { + let data = Vec::with_capacity(100); + let mut cursor = Cursor::new(data); + let write_data1: &[u8] = b"Hello, "; + let write_data2: &[u8] = b"Rust!"; + + // First write + assert!(cursor.write_all(write_data1).is_ok()); + assert_eq!(&cursor.get_ref()[..], write_data1); + assert_eq!(cursor.position(), write_data1.len() as u64); + + // Second write + assert!(cursor.write_all(write_data2).is_ok()); + let mut expected = Vec::new(); + expected.extend_from_slice(write_data1); + expected.extend_from_slice(write_data2); + assert_eq!(&cursor.get_ref()[..], expected.as_slice()); + assert_eq!(cursor.position(), expected.len() as u64); + } + + #[test] + fn test_cursor_write_empty() { + let data = Vec::with_capacity(100); + let mut cursor = Cursor::new(data); + let write_data = b""; + + assert!(cursor.write_all(write_data).is_ok()); + assert_eq!(cursor.get_ref().len(), 0); + assert_eq!(cursor.position(), 0); + } + + #[test] + fn test_cursor_write_at_position() { + let mut data = vec![0u8; 10]; + { + let mut cursor = Cursor::new(&mut data[..]); + let write_data = b"Rust"; + + // Move cursor to position 6 + cursor.set_position(6); + assert_eq!(cursor.position(), 6); + + assert!(cursor.write_all(write_data).is_ok()); + assert_eq!(cursor.position(), 10); + } + + let mut expected = vec![0u8; 10]; + expected[6..10].copy_from_slice(b"Rust"); + assert_eq!(&data[..], &expected[..]); + } + + #[test] + fn test_cursor_write_overflow() { + let mut data = vec![0u8; 5]; + let mut cursor = Cursor::new(&mut data[..]); + let write_data = b"Too long data"; + + let result = cursor.write_all(write_data); + assert!(result.is_err()); + #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); + assert_eq!(result.unwrap_err().kind(), io::ErrorKind::WriteZero); #[cfg(feature = "embedded_io")] assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof + result.unwrap_err().kind(), + embedded_io_extras::ErrorKind::WriteZero ); - // read_exact makes no promises about the content of the buffer on error + } + + #[test] + fn test_cursor_write_from_empty_cursor() { + let data = Vec::new(); + let mut cursor = Cursor::new(data); + let write_data = b"Initial Data"; + + assert!(cursor.write_all(write_data).is_ok()); + assert_eq!(&cursor.get_ref()[..], write_data); + assert_eq!(cursor.position(), write_data.len() as u64); + } + + #[test] + fn test_cursor_write_partial() { + let mut data = [0u8; 5]; + let mut cursor = Cursor::new(&mut data[..]); + let write_data = b"Hello, Stellar!"; + + // Attempt to write data that exceeds the buffer size + // using `write` instead of `write_all` + let result = cursor.write(&write_data[..7]).unwrap(); + assert_eq!(result, 5); + assert_eq!(&cursor.get_ref()[..], b"Hello"); } } diff --git a/src/next/generated.rs b/src/next/generated.rs index aea8c30f..13499a6e 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -2900,11 +2900,25 @@ mod test_io { use super::*; + macro_rules! assert_unexpected_eof { + ($result:expr) => {{ + let err = $result.unwrap_err(); + #[cfg(feature = "std")] + { + assert_eq!(err.kind(), io::ErrorKind::UnexpectedEof); + } + #[cfg(feature = "embedded_io")] + { + assert_eq!(err, embedded_io_extras::ReadExactError::UnexpectedEof); + } + }}; + } + #[test] - fn test_read_exact_success() { + fn test_cursor_read_exact_success() { let data = b"The quick brown fox jumps over the lazy dog."; let mut cursor = Cursor::new(data); - let mut buffer = [0u8; 19]; // Exactly the length of "The quick brown fox" + let mut buffer = [0u8; 19]; // Attempt to read exactly 19 bytes assert!(cursor.read_exact(&mut buffer).is_ok()); @@ -2913,8 +2927,8 @@ mod test_io { } #[test] - fn test_read_exact_less_than_available() { - let data = b"Hello, Rust!"; + fn test_cursor_read_exact_less_than_available() { + let data = b"Hello, Stellar!"; let mut cursor = Cursor::new(data); let mut buffer = [0u8; 5]; @@ -2925,7 +2939,7 @@ mod test_io { } #[test] - fn test_read_exact_exact_eof() { + fn test_cursor_read_exact_exact_eof() { let data = b"Data"; let mut cursor = Cursor::new(data); let mut buffer = [0u8; 4]; @@ -2939,21 +2953,12 @@ mod test_io { let mut buffer_eof = [0u8; 1]; let result = cursor.read_exact(&mut buffer_eof); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); + assert_unexpected_eof!(result); assert_eq!(cursor.position(), 4); // Position should remain at EOF } #[test] - fn test_read_exact_past_eof() { + fn test_cursor_read_exact_past_eof() { let data = b"Short"; let mut cursor = Cursor::new(data); let mut buffer = [0u8; 10]; // Requesting more bytes than available @@ -2961,24 +2966,15 @@ mod test_io { // Attempt to read 10 bytes from a 5-byte buffer let result = cursor.read_exact(&mut buffer); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); + assert_unexpected_eof!(result); assert_eq!(cursor.position(), 5); // Position should move to EOF } #[test] - fn test_read_exact_empty_buffer() { + fn test_cursor_read_exact_empty_buffer() { let data = b"Non-empty"; let mut cursor = Cursor::new(data); - let mut buffer = [0u8; 0]; // Zero-length buffer + let mut buffer = [0u8; 0]; // Attempt to read zero bytes assert!(cursor.read_exact(&mut buffer).is_ok()); @@ -2986,7 +2982,7 @@ mod test_io { } #[test] - fn test_read_exact_from_empty_cursor() { + fn test_cursor_read_exact_from_empty_cursor() { let data: &[u8] = b""; let mut cursor = Cursor::new(data); let mut buffer = [0u8; 5]; @@ -2994,21 +2990,12 @@ mod test_io { // Attempt to read from an empty cursor let result = cursor.read_exact(&mut buffer); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); + assert_unexpected_eof!(result); assert_eq!(cursor.position(), 0); // Position remains at 0 } #[test] - fn test_read_exact_multiple_reads() { + fn test_cursor_read_exact_multiple_reads() { let data = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; let mut cursor = Cursor::new(data); @@ -3029,80 +3016,212 @@ mod test_io { // Third read: Attempt to read 10 bytes, but only 6 are available let result = cursor.read_exact(&mut buffer3); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); + assert_unexpected_eof!(result); // read_exact makes no promises about the content of the buffer on error + // https://github.com/rust-lang/rust/blob/84ac80f1921afc243d71fd0caaa4f2838c294102/library/std/src/io/impls.rs#L287 // assert_eq!(&buffer3[..6], b"UVWXYZ"); assert_eq!(cursor.position(), 26); // Position should be at EOF } #[test] - fn test_cursor_read_exact_after_eof() { - let data = b"End"; - let mut cursor = Cursor::new(data); - let mut buffer = [0u8; 3]; + fn test_slice_read_exact_success() { + let data: &[u8] = b"The quick brown fox jumps over the lazy dog."; + let mut reader = data; + let mut buffer = [0u8; 19]; - // First read: read the entire buffer - assert!(cursor.read_exact(&mut buffer).is_ok()); - assert_eq!(&buffer, b"End"); - assert_eq!(cursor.position(), 3); + // Attempt to read exactly 19 bytes + assert!(reader.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"The quick brown fox"); + } - // Second read: attempt to read again, should fail + #[test] + fn test_slice_read_exact_less_than_available() { + let data: &[u8] = b"Hello, Stellar!"; + let mut reader = data; + let mut buffer = [0u8; 5]; + + // Attempt to read 5 bytes from the start + assert!(reader.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"Hello"); + } + + #[test] + fn test_slice_read_exact_exact_eof() { + let data: &[u8] = b"Data"; + let mut reader = data; + let mut buffer = [0u8; 4]; + + // Attempt to read exactly 4 bytes, which is the entire slice + assert!(reader.read_exact(&mut buffer).is_ok()); + assert_eq!(&buffer, b"Data"); + + // Further attempt to read should fail with EOF let mut buffer_eof = [0u8; 1]; - let result = cursor.read_exact(&mut buffer_eof); + let result = reader.read_exact(&mut buffer_eof); assert!(result.is_err()); - #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); - #[cfg(feature = "embedded_io")] - assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof - ); - assert_eq!(cursor.position(), 3); // Position remains at EOF + assert_unexpected_eof!(result); } #[test] - fn test_slice_read_exact_success() { - let data = b"SliceReadTest"; - let mut slice = &data[..]; - let mut buffer = [0u8; 13]; // Exact length + fn test_slice_read_exact_past_eof() { + let data: &[u8] = b"Short"; + let mut reader = data; + let mut buffer = [0u8; 10]; // Requesting more bytes than available - // Using Read trait directly on slice - assert!(slice.read_exact(&mut buffer).is_ok()); - assert_eq!(&buffer, b"SliceReadTest"); + // Attempt to read 10 bytes from a 5-byte slice + let result = reader.read_exact(&mut buffer); + assert!(result.is_err()); + assert_unexpected_eof!(result); } #[test] - fn test_slice_read_exact_partial() { - let data = b"SlicePartial"; - let mut slice = &data[..]; - let mut buffer = [0u8; 20]; // Request more bytes than available + fn test_slice_read_exact_empty_buffer() { + let data: &[u8] = b"Non-empty"; + let mut reader = data; + let mut buffer = [0u8; 0]; // Zero-length buffer - // Using Read trait directly on slice - let result = slice.read_exact(&mut buffer); + // Attempt to read zero bytes + assert!(reader.read_exact(&mut buffer).is_ok()); + } + + #[test] + fn test_slice_read_exact_from_empty_slice() { + let data: &[u8] = b""; + let mut reader = data; + let mut buffer = [0u8; 5]; + + // Attempt to read from an empty slice + let result = reader.read_exact(&mut buffer); assert!(result.is_err()); + assert_unexpected_eof!(result); + } + + #[test] + fn test_slice_read_exact_multiple_reads() { + let data: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + let mut reader = data; + + let mut buffer1 = [0u8; 10]; + let mut buffer2 = [0u8; 10]; + let mut buffer3 = [0u8; 10]; // Only 6 bytes left + + // First read: 10 bytes + assert!(reader.read_exact(&mut buffer1).is_ok()); + assert_eq!(&buffer1, b"ABCDEFGHIJ"); + + // Second read: 10 bytes + assert!(reader.read_exact(&mut buffer2).is_ok()); + assert_eq!(&buffer2, b"KLMNOPQRST"); + + // Third read: Attempt to read 10 bytes, but only 6 are available + let result = reader.read_exact(&mut buffer3); + assert!(result.is_err()); + assert_unexpected_eof!(result); + } + + #[test] + fn test_cursor_write_success() { + let data = Vec::with_capacity(100); + let mut cursor = Cursor::new(data); + let write_data = b"Hello, Stellar!"; + + assert!(cursor.write_all(write_data).is_ok()); + assert_eq!(&cursor.get_ref()[..], write_data); + assert_eq!(cursor.position(), write_data.len() as u64); + } + + #[test] + fn test_cursor_write_multiple_writes() { + let data = Vec::with_capacity(100); + let mut cursor = Cursor::new(data); + let write_data1: &[u8] = b"Hello, "; + let write_data2: &[u8] = b"Rust!"; + + // First write + assert!(cursor.write_all(write_data1).is_ok()); + assert_eq!(&cursor.get_ref()[..], write_data1); + assert_eq!(cursor.position(), write_data1.len() as u64); + + // Second write + assert!(cursor.write_all(write_data2).is_ok()); + let mut expected = Vec::new(); + expected.extend_from_slice(write_data1); + expected.extend_from_slice(write_data2); + assert_eq!(&cursor.get_ref()[..], expected.as_slice()); + assert_eq!(cursor.position(), expected.len() as u64); + } + + #[test] + fn test_cursor_write_empty() { + let data = Vec::with_capacity(100); + let mut cursor = Cursor::new(data); + let write_data = b""; + + assert!(cursor.write_all(write_data).is_ok()); + assert_eq!(cursor.get_ref().len(), 0); + assert_eq!(cursor.position(), 0); + } + + #[test] + fn test_cursor_write_at_position() { + let mut data = vec![0u8; 10]; + { + let mut cursor = Cursor::new(&mut data[..]); + let write_data = b"Rust"; + + // Move cursor to position 6 + cursor.set_position(6); + assert_eq!(cursor.position(), 6); + + assert!(cursor.write_all(write_data).is_ok()); + assert_eq!(cursor.position(), 10); + } + + let mut expected = vec![0u8; 10]; + expected[6..10].copy_from_slice(b"Rust"); + assert_eq!(&data[..], &expected[..]); + } + + #[test] + fn test_cursor_write_overflow() { + let mut data = vec![0u8; 5]; + let mut cursor = Cursor::new(&mut data[..]); + let write_data = b"Too long data"; + + let result = cursor.write_all(write_data); + assert!(result.is_err()); + #[cfg(feature = "std")] - assert_eq!( - result.unwrap_err().kind(), - std::io::ErrorKind::UnexpectedEof - ); + assert_eq!(result.unwrap_err().kind(), io::ErrorKind::WriteZero); #[cfg(feature = "embedded_io")] assert_eq!( - result.unwrap_err(), - embedded_io_extras::ReadExactError::UnexpectedEof + result.unwrap_err().kind(), + embedded_io_extras::ErrorKind::WriteZero ); - // read_exact makes no promises about the content of the buffer on error + } + + #[test] + fn test_cursor_write_from_empty_cursor() { + let data = Vec::new(); + let mut cursor = Cursor::new(data); + let write_data = b"Initial Data"; + + assert!(cursor.write_all(write_data).is_ok()); + assert_eq!(&cursor.get_ref()[..], write_data); + assert_eq!(cursor.position(), write_data.len() as u64); + } + + #[test] + fn test_cursor_write_partial() { + let mut data = [0u8; 5]; + let mut cursor = Cursor::new(&mut data[..]); + let write_data = b"Hello, Stellar!"; + + // Attempt to write data that exceeds the buffer size + // using `write` instead of `write_all` + let result = cursor.write(&write_data[..7]).unwrap(); + assert_eq!(result, 5); + assert_eq!(&cursor.get_ref()[..], b"Hello"); } } From 942fe38fb50e6b341ca90102fd481cb654149ba2 Mon Sep 17 00:00:00 2001 From: Jun Luo <4catcode@gmail.com> Date: Sat, 21 Sep 2024 15:40:19 +0800 Subject: [PATCH 14/14] regenerate XDR --- Makefile | 2 +- src/curr/generated.rs | 6 +++--- src/next/generated.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 513da982..e2d60a0e 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ CARGO_HACK_ARGS=--feature-powerset --exclude-features default --group-features b CARGO_DOC_ARGS?=--open # TODO: Update this after https://github.com/stellar/xdrgen/pull/205 is merged -XDRGEN_VERSION=1907cf80feb4e9f25d98f5f970db206ad4135282 +XDRGEN_VERSION=e57dfa9199f476acde88ddb096699c829ad86c28 # XDRGEN_LOCAL=1 XDRGEN_TYPES_CUSTOM_STR_IMPL_CURR=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId XDRGEN_TYPES_CUSTOM_STR_IMPL_NEXT=PublicKey,AccountId,MuxedAccount,MuxedAccountMed25519,SignerKey,SignerKeyEd25519SignedPayload,NodeId,ScAddress,AssetCode,AssetCode4,AssetCode12,ClaimableBalanceId diff --git a/src/curr/generated.rs b/src/curr/generated.rs index 7cb4f9a9..1cfeb866 100644 --- a/src/curr/generated.rs +++ b/src/curr/generated.rs @@ -3164,7 +3164,7 @@ mod test_io { #[test] fn test_cursor_write_at_position() { - let mut data = vec![0u8; 10]; + let mut data = [0u8; 10]; { let mut cursor = Cursor::new(&mut data[..]); let write_data = b"Rust"; @@ -3177,14 +3177,14 @@ mod test_io { assert_eq!(cursor.position(), 10); } - let mut expected = vec![0u8; 10]; + let mut expected = [0u8; 10]; expected[6..10].copy_from_slice(b"Rust"); assert_eq!(&data[..], &expected[..]); } #[test] fn test_cursor_write_overflow() { - let mut data = vec![0u8; 5]; + let mut data = [0u8; 5]; let mut cursor = Cursor::new(&mut data[..]); let write_data = b"Too long data"; diff --git a/src/next/generated.rs b/src/next/generated.rs index 13499a6e..1f47c83d 100644 --- a/src/next/generated.rs +++ b/src/next/generated.rs @@ -3164,7 +3164,7 @@ mod test_io { #[test] fn test_cursor_write_at_position() { - let mut data = vec![0u8; 10]; + let mut data = [0u8; 10]; { let mut cursor = Cursor::new(&mut data[..]); let write_data = b"Rust"; @@ -3177,14 +3177,14 @@ mod test_io { assert_eq!(cursor.position(), 10); } - let mut expected = vec![0u8; 10]; + let mut expected = [0u8; 10]; expected[6..10].copy_from_slice(b"Rust"); assert_eq!(&data[..], &expected[..]); } #[test] fn test_cursor_write_overflow() { - let mut data = vec![0u8; 5]; + let mut data = [0u8; 5]; let mut cursor = Cursor::new(&mut data[..]); let write_data = b"Too long data";