diff options
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 }) +} |
