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 {