summaryrefslogtreecommitdiff
path: root/examples/11-transient-0/output/rust/src/gen/data
diff options
context:
space:
mode:
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.rs12
1 files changed, 12 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 fb07229..cffb318 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
@@ -257,3 +257,15 @@ pub fn decode_struct_with_different_shared_types(reader: &mut impl std::io::Read
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 })
}
+
+pub fn encode_struct_with_shared_sum_and_variant(value: &crate::data::StructWithSharedSumAndVariant, writer: &mut impl std::io::Write) -> ::std::io::Result::<()> {
+ crate::data::transient_0::encode_sum_with_variants((&value.a).as_ref(), writer)?;
+ crate::data::transient_0::encode_variant_one((&value.b).as_ref(), writer)?;
+ ::std::io::Result::Ok(())
+}
+
+pub fn decode_struct_with_shared_sum_and_variant(reader: &mut impl std::io::Read) -> ::std::io::Result::<crate::data::StructWithSharedSumAndVariant> {
+ let a = ::std::sync::Arc::new(crate::data::transient_0::decode_sum_with_variants(reader)?);
+ let b = ::std::sync::Arc::new(crate::data::transient_0::decode_variant_one(reader)?);
+ std::io::Result::Ok(crate::data::StructWithSharedSumAndVariant { a: a, b: b })
+}