diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-07-25 17:44:47 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-07-25 17:44:47 +0100 |
| commit | 5de41ad211a542ce1ae26a1db3f219b1aaf4c9f4 (patch) | |
| tree | b25f9f24d0ddb2517a8fe9dd923d0cb8b9e8efa6 /examples/11-transient-0/output/rust/src/gen/data | |
| parent | b219b7a24fbece0256b15d408e0f65d8136e671a (diff) | |
Test shared values of different types in java-transient-0
Diffstat (limited to 'examples/11-transient-0/output/rust/src/gen/data')
| -rw-r--r-- | examples/11-transient-0/output/rust/src/gen/data/transient_0.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/11-transient-0/output/rust/src/gen/data/transient_0.rs b/examples/11-transient-0/output/rust/src/gen/data/transient_0.rs index 442e723..fb07229 100644 --- a/examples/11-transient-0/output/rust/src/gen/data/transient_0.rs +++ b/examples/11-transient-0/output/rust/src/gen/data/transient_0.rs @@ -243,3 +243,17 @@ pub fn decode_struct_with_list_of_shared(reader: &mut impl std::io::Read) -> ::s }; std::io::Result::Ok(crate::data::StructWithListOfShared { inner: inner }) } + +pub fn encode_struct_with_different_shared_types(value: &crate::data::StructWithDifferentSharedTypes, writer: &mut impl std::io::Write) -> ::std::io::Result::<()> { + crate::data::transient_0::encode_struct_with_int_32((&value.a).as_ref(), writer)?; + crate::data::transient_0::encode_struct_with_int_64((&value.b).as_ref(), writer)?; + crate::data::transient_0::encode_struct_with_int_32((&value.c).as_ref(), writer)?; + ::std::io::Result::Ok(()) +} + +pub fn decode_struct_with_different_shared_types(reader: &mut impl std::io::Read) -> ::std::io::Result::<crate::data::StructWithDifferentSharedTypes> { + let a = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_32(reader)?); + let b = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_64(reader)?); + let c = ::std::sync::Arc::new(crate::data::transient_0::decode_struct_with_int_32(reader)?); + std::io::Result::Ok(crate::data::StructWithDifferentSharedTypes { a: a, b: b, c: c }) +} |
