diff --git a/CHANGELOG.md b/CHANGELOG.md index 316263c6..943d67d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.9.2] - 2022-01-11 + +### Changed +- The deserialization code generated for Rust is now significantly faster for certain types of messages. +- The serialization and deserialization functions generated for Rust now have more general type signatures. + ## [0.9.1] - 2022-01-11 ### Changed diff --git a/Cargo.lock b/Cargo.lock index 1f8e1673..aa40b8af 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,7 +162,7 @@ dependencies = [ [[package]] name = "typical" -version = "0.9.1" +version = "0.9.2" dependencies = [ "clap", "colored", diff --git a/Cargo.toml b/Cargo.toml index 481d09ec..d09c7c37 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "typical" -version = "0.9.1" +version = "0.9.2" authors = ["Stephan Boyer "] edition = "2021" description = "Algebraic data types for data interchange." diff --git a/README.md b/README.md index 152dbecb..25920b13 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ In short, Typical offers two important features that are conventionally thought Typical's design was informed by experience using Protocol Buffers at Google and Apache Thrift at Airbnb. This is not an officially supported product of either company. If you want to support Typical, you can do so [here](https://github.com/sponsors/stepchowfun). -## Supported programming languages +#### Supported programming languages The following languages are currently supported: @@ -21,8 +21,6 @@ The following languages are currently supported: - TypeScript - JavaScript (via TypeScript) -See [below](#code-generation) for remarks about each code generator. - ## Tutorial To understand what this is all about, let's walk through an example scenario. Suppose you want to build a simple API for sending emails, and you need to decide how requests and responses will be serialized over the wire. You could use a self-describing format like JSON or XML, but you may want better type safety and performance. Typical has a great story to tell about those things. @@ -84,15 +82,15 @@ let message = SendEmailRequestOut { body: "It makes serialization easy and safe.".to_owned(), }; -let mut file = BufWriter::new(File::create("/tmp/message")?); -message.serialize(&mut file)?; +let file = BufWriter::new(File::create(FILE_PATH)?); +message.serialize(file)?; ``` Another program could read the file and deserialize the message as follows: ```rust -let mut file = BufReader::new(File::open("/tmp/message")?); -let message = SendEmailRequestIn::deserialize(&mut file)?; +let file = BufReader::new(File::open(FILE_PATH)?); +let message = SendEmailRequestIn::deserialize(file)?; println!("to: {}", message.to); println!("subject: {}", message.subject); @@ -479,15 +477,7 @@ To mitigate memory-based denial-of-service attacks, it's good practice to reject ## Code generation -The code generators have a simple user interface. They have no settings to configure, and they produce a single self-contained source file regardless of the number of schema files. The [example projects](https://github.com/stepchowfun/typical/tree/main/examples) demonstrate how to use them. - -The primary goal is to generate code that is amenable to compiler optimizations, though the generated code is reasonably human-readable too. For example, indentation is used as one would expect, and variables are named appropriately. For web-based applications, it's sensible to [minify](https://en.wikipedia.org/wiki/Minification_\(programming\)) the generated code along with your other application code for distribution. - -Typical types map to [plain old data types](https://en.wikipedia.org/wiki/Passive_data_structure), rather than objects with methods like getters and setters. That means serialization and deserialization aren't [zero-copy operations](https://en.wikipedia.org/wiki/Zero-copy), but it also means accessing individual fields of decoded messages is extremely fast. - -The code generators are thoroughly exercised with a comprehensive [integration test suite](https://github.com/stepchowfun/typical/tree/main/integration_tests). All of the data serialized by the test suite is recorded in a file called the [omnifile](https://github.com/stepchowfun/typical/blob/main/test_data/omnifile), and every code generator is required to produce identical results, bit-for-bit. - -Every programming language has its own patterns and idiosyncrasies. The sections below contain some language-specific notes. +Each code generator produces a single self-contained source file regardless of the number of schema files. The [example projects](https://github.com/stepchowfun/typical/tree/main/examples) demonstrate how to use them. The sections below contain some language-specific remarks. ### Rust @@ -495,7 +485,7 @@ Every programming language has its own patterns and idiosyncrasies. The sections ### JavaScript and TypeScript -- The generated code runs in Node.js and modern web browsers. Older browsers can be targeted with tools like [Babel](https://babeljs.io/). +- The generated code runs in Node.js and modern web browsers. Older browsers can be targeted with tools like [Babel](https://babeljs.io/). For web applications, it's sensible to [minify](https://en.wikipedia.org/wiki/Minification_\(programming\)) the generated code along with your other application code. - The generated code never uses reflection or dynamic code evaluation, so it works in [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)-restricted environments. - Typical's integer types map to `bigint` rather than `number`. It's safe to use integers to represent money or other quantities that shouldn't be rounded. Typical's `F64` type maps to `number`, as one would expect. - The generated functions never throw exceptions when given well-typed arguments. The `deserialize` functions can return an `Error` to signal failure, and TypeScript requires callers to acknowledge that possibility. @@ -627,17 +617,17 @@ We have coarse-grained benchmarks [here](https://github.com/stepchowfun/typical/ One benchmark serializes and deserializes a large message containing several hundred megabytes of text: -| | Rust | TypeScript | -| ----------------------------------- | ----------- | ----------- | -| **Per-thread serialization rate** | 2.1 GiB/s | 1.7 GiB/s | -| **Per-thread deserialization rate** | 906.0 MiB/s | 339.3 MiB/s | +| | Rust | TypeScript | +| ----------------------------------- | ---------- | ------------ | +| **Per-thread serialization rate** | 2.17 GiB/s | 1.96 GiB/s | +| **Per-thread deserialization rate** | 1.12 GiB/s | 366.78 MiB/s | Another benchmark repeatedly serializes and deserializes a pathological message containing many small and deeply nested values: -| | Rust | TypeScript | -| ----------------------------------- | ------------- | ---------- | -| **Per-thread serialization rate** | 341.2.4 MiB/s | 20.2 MiB/s | -| **Per-thread deserialization rate** | 94.4 MiB/s | 1.2 MiB/s | +| | Rust | TypeScript | +| ----------------------------------- | ------------ | ----------- | +| **Per-thread serialization rate** | 336.23 MiB/s | 22.32 MiB/s | +| **Per-thread deserialization rate** | 89.81 MiB/s | 1.23 MiB/s | These benchmarks represent two extremes. Real-world performance will be somewhere in the middle. diff --git a/benchmarks/rust/src/main.rs b/benchmarks/rust/src/main.rs index 273b7e6f..f3626128 100644 --- a/benchmarks/rust/src/main.rs +++ b/benchmarks/rust/src/main.rs @@ -97,7 +97,7 @@ fn benchmark(message: &T, iterations: usize) -> io for i in 0..iterations { let offset = message_size * i; - U::deserialize(&mut &buffer[offset..offset + message_size])?; + U::deserialize(&buffer[offset..offset + message_size])?; } let deserialization_duration = deserialization_instant.elapsed(); diff --git a/examples/rust/src/main.rs b/examples/rust/src/main.rs index b9ae6c86..e510ba39 100644 --- a/examples/rust/src/main.rs +++ b/examples/rust/src/main.rs @@ -22,13 +22,13 @@ fn write_to_file() -> io::Result<()> { body: "It makes serialization easy and safe.".to_owned(), }; - let mut file = BufWriter::new(File::create(FILE_PATH)?); - message.serialize(&mut file) + let file = BufWriter::new(File::create(FILE_PATH)?); + message.serialize(file) } fn read_from_file() -> io::Result<()> { - let mut file = BufReader::new(File::open(FILE_PATH)?); - let message = SendEmailRequestIn::deserialize(&mut file)?; + let file = BufReader::new(File::open(FILE_PATH)?); + let message = SendEmailRequestIn::deserialize(file)?; println!("to: {}", message.to); println!("subject: {}", message.subject); diff --git a/integration_tests/rust/src/assertions.rs b/integration_tests/rust/src/assertions.rs index ba4cda6b..fae854ea 100644 --- a/integration_tests/rust/src/assertions.rs +++ b/integration_tests/rust/src/assertions.rs @@ -38,17 +38,9 @@ pub fn assert_match( .unwrap(); file.write_all(&buffer).unwrap(); - let mut slice = buffer.as_slice(); - let replica = U::deserialize(&mut slice)?; + let replica = U::deserialize(buffer.as_slice())?; println!("Message deserialized from those bytes: {:?}", replica); - if !slice.is_empty() { - return Err(Error::new( - ErrorKind::Other, - "The buffer was not consumed completely!", - )); - } - if format!("{:?}", replica) != format!("{:?}", expected) { return Err(Error::new(ErrorKind::Other, "Mismatch!")); } diff --git a/src/generate_rust.rs b/src/generate_rust.rs index 5ebc5a30..88a6e56e 100644 --- a/src/generate_rust.rs +++ b/src/generate_rust.rs @@ -100,14 +100,11 @@ const MISSING_FIELDS_ERROR_MESSAGE: &str = \"Struct missing one or more required pub trait Serialize {{ fn size(&self) -> usize; - fn serialize(&self, writer: &mut T) -> io::Result<()>; + fn serialize(&self, writer: T) -> io::Result<()>; }} -pub trait Deserialize {{ - fn deserialize(reader: &mut T) -> io::Result - where - Self: Sized, - T: BufRead; +pub trait Deserialize: Sized {{ + fn deserialize(reader: T) -> io::Result; }} fn zigzag_encode(value: i64) -> u64 {{ @@ -517,159 +514,7 @@ fn write_schema( write!(buffer, "Deserialize for ")?; write_identifier(buffer, &declaration.name, Pascal, Some(In))?; writeln!(buffer, " {{")?; - write_indentation(buffer, indentation + 1)?; - writeln!( - buffer, - "fn deserialize(reader: &mut T) -> ::std::io::Result", - )?; - write_indentation(buffer, indentation + 1)?; - writeln!(buffer, "where")?; - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "Self: Sized,")?; - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "T: ::std::io::BufRead,")?; - write_indentation(buffer, indentation + 1)?; - writeln!(buffer, "{{")?; - if !&declaration.fields.is_empty() { - for field in &declaration.fields { - write_indentation(buffer, indentation + 2)?; - write!(buffer, "let mut _")?; - write_identifier(buffer, &field.name, Snake, None)?; - write!(buffer, ": Option<")?; - write_type(buffer, &imports, namespace, &field.r#type.variant, In)?; - writeln!(buffer, "> = None;")?; - } - writeln!(buffer)?; - } - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "loop {{")?; - write_indentation(buffer, indentation + 3)?; - write!(buffer, "let (index, payload_size) = match ")?; - write_supers(buffer, indentation)?; - writeln!(buffer, "deserialize_field_header(&mut *reader) {{")?; - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "Ok(header) => header,")?; - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "Err(err) => {{")?; - write_indentation(buffer, indentation + 5)?; - writeln!( - buffer, - "if let std::io::ErrorKind::UnexpectedEof = err.kind() {{", - )?; - write_indentation(buffer, indentation + 6)?; - writeln!(buffer, "break;")?; - write_indentation(buffer, indentation + 5)?; - writeln!(buffer, "}}")?; - writeln!(buffer)?; - write_indentation(buffer, indentation + 5)?; - writeln!(buffer, "return Err(err);")?; - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "}}")?; - write_indentation(buffer, indentation + 3)?; - writeln!(buffer, "}};")?; - writeln!(buffer)?; - write_indentation(buffer, indentation + 3)?; - writeln!( - buffer, - "let mut sub_reader = ::std::io::Read::take(&mut *reader, \ - payload_size as u64);", - )?; - writeln!(buffer)?; - write_indentation(buffer, indentation + 3)?; - writeln!(buffer, "match index {{")?; - for field in &declaration.fields { - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "{} => {{", field.index)?; - write_deserialization_invocation( - buffer, - indentation + 5, - indentation, - &imports, - namespace, - &field.r#type.variant, - true, - )?; - write_indentation(buffer, indentation + 5)?; - write!(buffer, "_")?; - write_identifier(buffer, &field.name, Snake, None)?; - writeln!(buffer, ".get_or_insert(payload);")?; - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "}}")?; - } - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "_ => {{")?; - write_indentation(buffer, indentation + 5)?; - write_supers(buffer, indentation)?; - writeln!(buffer, "skip(&mut sub_reader, payload_size as usize)?;")?; - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "}}")?; - write_indentation(buffer, indentation + 3)?; - writeln!(buffer, "}}")?; - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "}}")?; - writeln!(buffer)?; - // The logic below ensures that all required fields have been parsed. - // [tag:required_fields_present] - if declaration.fields.iter().any(|field| match field.rule { - schema::Rule::Asymmetric | schema::Rule::Optional => false, - schema::Rule::Required => true, - }) { - write_indentation(buffer, indentation + 2)?; - write!(buffer, "if ")?; - let mut first = true; - for field in &declaration.fields { - match field.rule { - schema::Rule::Asymmetric | schema::Rule::Optional => {} - schema::Rule::Required => { - if first { - first = false; - } else { - writeln!(buffer)?; - write_indentation(buffer, indentation + 3)?; - write!(buffer, "|| ")?; - } - write!(buffer, "_")?; - write_identifier(buffer, &field.name, Snake, None)?; - write!(buffer, ".is_none()")?; - } - } - } - writeln!(buffer, " {{")?; - write_indentation(buffer, indentation + 3)?; - writeln!(buffer, "return Err(::std::io::Error::new(")?; - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "::std::io::ErrorKind::InvalidData,")?; - write_indentation(buffer, indentation + 4)?; - write_supers(buffer, indentation)?; - writeln!(buffer, "MISSING_FIELDS_ERROR_MESSAGE,")?; - write_indentation(buffer, indentation + 3)?; - writeln!(buffer, "));")?; - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "}}")?; - writeln!(buffer)?; - } - write_indentation(buffer, indentation + 2)?; - write!(buffer, "Ok(")?; - write_identifier(buffer, &declaration.name, Pascal, Some(In))?; - writeln!(buffer, " {{")?; - for field in &declaration.fields { - write_indentation(buffer, indentation + 3)?; - write_identifier(buffer, &field.name, Snake, None)?; - write!(buffer, ": _")?; - write_identifier(buffer, &field.name, Snake, None)?; - match field.rule { - schema::Rule::Asymmetric | schema::Rule::Optional => {} - schema::Rule::Required => { - // This `unwrap` is safe due to [ref:required_fields_present]. - write!(buffer, ".unwrap()")?; - } - } - writeln!(buffer, ",")?; - } - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "}})")?; - write_indentation(buffer, indentation + 1)?; - writeln!(buffer, "}}")?; + write_deserialize_function(buffer, indentation + 1)?; write_indentation(buffer, indentation)?; writeln!(buffer, "}}")?; @@ -899,6 +744,164 @@ fn write_schema( writeln!(buffer)?; + write_indentation(buffer, indentation)?; + write!(buffer, "impl ")?; + write_identifier(buffer, &declaration.name, Pascal, Some(In))?; + writeln!(buffer, " {{")?; + write_indentation(buffer, indentation + 1)?; + writeln!( + buffer, + "pub fn deserialize_from_reader_ref(", + )?; + write_indentation(buffer, indentation + 2)?; + writeln!(buffer, "reader: &mut T,")?; + write_indentation(buffer, indentation + 1)?; + writeln!(buffer, ") -> ::std::io::Result {{")?; + if !&declaration.fields.is_empty() { + for field in &declaration.fields { + write_indentation(buffer, indentation + 2)?; + write!(buffer, "let mut _")?; + write_identifier(buffer, &field.name, Snake, None)?; + write!(buffer, ": Option<")?; + write_type(buffer, &imports, namespace, &field.r#type.variant, In)?; + writeln!(buffer, "> = None;")?; + } + writeln!(buffer)?; + } + write_indentation(buffer, indentation + 2)?; + writeln!(buffer, "loop {{")?; + write_indentation(buffer, indentation + 3)?; + write!(buffer, "let (index, payload_size) = match ")?; + write_supers(buffer, indentation)?; + writeln!(buffer, "deserialize_field_header(&mut *reader) {{")?; + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "Ok(header) => header,")?; + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "Err(err) => {{")?; + write_indentation(buffer, indentation + 5)?; + writeln!( + buffer, + "if let std::io::ErrorKind::UnexpectedEof = err.kind() {{", + )?; + write_indentation(buffer, indentation + 6)?; + writeln!(buffer, "break;")?; + write_indentation(buffer, indentation + 5)?; + writeln!(buffer, "}}")?; + writeln!(buffer)?; + write_indentation(buffer, indentation + 5)?; + writeln!(buffer, "return Err(err);")?; + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "}}")?; + write_indentation(buffer, indentation + 3)?; + writeln!(buffer, "}};")?; + writeln!(buffer)?; + write_indentation(buffer, indentation + 3)?; + writeln!( + buffer, + "let mut sub_reader = ::std::io::Read::take(&mut *reader, \ + payload_size as u64);", + )?; + writeln!(buffer)?; + write_indentation(buffer, indentation + 3)?; + writeln!(buffer, "match index {{")?; + for field in &declaration.fields { + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "{} => {{", field.index)?; + write_deserialization_invocation( + buffer, + indentation + 5, + indentation, + &imports, + namespace, + &field.r#type.variant, + true, + )?; + write_indentation(buffer, indentation + 5)?; + write!(buffer, "_")?; + write_identifier(buffer, &field.name, Snake, None)?; + writeln!(buffer, ".get_or_insert(payload);")?; + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "}}")?; + } + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "_ => {{")?; + write_indentation(buffer, indentation + 5)?; + write_supers(buffer, indentation)?; + writeln!(buffer, "skip(&mut sub_reader, payload_size as usize)?;")?; + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "}}")?; + write_indentation(buffer, indentation + 3)?; + writeln!(buffer, "}}")?; + write_indentation(buffer, indentation + 2)?; + writeln!(buffer, "}}")?; + writeln!(buffer)?; + // The logic below ensures that all required fields have been parsed. + // [tag:required_fields_present] + if declaration.fields.iter().any(|field| match field.rule { + schema::Rule::Asymmetric | schema::Rule::Optional => false, + schema::Rule::Required => true, + }) { + write_indentation(buffer, indentation + 2)?; + write!(buffer, "if ")?; + first = true; + for field in &declaration.fields { + match field.rule { + schema::Rule::Asymmetric | schema::Rule::Optional => {} + schema::Rule::Required => { + if first { + first = false; + } else { + writeln!(buffer)?; + write_indentation(buffer, indentation + 3)?; + write!(buffer, "|| ")?; + } + write!(buffer, "_")?; + write_identifier(buffer, &field.name, Snake, None)?; + write!(buffer, ".is_none()")?; + } + } + } + writeln!(buffer, " {{")?; + write_indentation(buffer, indentation + 3)?; + writeln!(buffer, "return Err(::std::io::Error::new(")?; + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "::std::io::ErrorKind::InvalidData,")?; + write_indentation(buffer, indentation + 4)?; + write_supers(buffer, indentation)?; + writeln!(buffer, "MISSING_FIELDS_ERROR_MESSAGE,")?; + write_indentation(buffer, indentation + 3)?; + writeln!(buffer, "));")?; + write_indentation(buffer, indentation + 2)?; + writeln!(buffer, "}}")?; + writeln!(buffer)?; + } + write_indentation(buffer, indentation + 2)?; + write!(buffer, "Ok(")?; + write_identifier(buffer, &declaration.name, Pascal, Some(In))?; + writeln!(buffer, " {{")?; + for field in &declaration.fields { + write_indentation(buffer, indentation + 3)?; + write_identifier(buffer, &field.name, Snake, None)?; + write!(buffer, ": _")?; + write_identifier(buffer, &field.name, Snake, None)?; + match field.rule { + schema::Rule::Asymmetric | schema::Rule::Optional => {} + schema::Rule::Required => { + // This `unwrap` is safe due to [ref:required_fields_present]. + write!(buffer, ".unwrap()")?; + } + } + writeln!(buffer, ",")?; + } + write_indentation(buffer, indentation + 2)?; + writeln!(buffer, "}})")?; + write_indentation(buffer, indentation + 1)?; + writeln!(buffer, "}}")?; + write_indentation(buffer, indentation)?; + writeln!(buffer, "}}")?; + + writeln!(buffer)?; + write_indentation(buffer, indentation)?; write!(buffer, "impl ")?; write_identifier(buffer, &declaration.name, Pascal, Some(Atlas))?; @@ -969,98 +972,7 @@ fn write_schema( write!(buffer, "Deserialize for ")?; write_identifier(buffer, &declaration.name, Pascal, Some(In))?; writeln!(buffer, " {{")?; - write_indentation(buffer, indentation + 1)?; - writeln!( - buffer, - "fn deserialize(reader: &mut T) -> ::std::io::Result", - )?; - write_indentation(buffer, indentation + 1)?; - writeln!(buffer, "where")?; - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "Self: Sized,")?; - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "T: ::std::io::BufRead,")?; - write_indentation(buffer, indentation + 1)?; - writeln!(buffer, "{{")?; - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "loop {{")?; - write_indentation(buffer, indentation + 3)?; - write!(buffer, "let (index, payload_size) = ")?; - write_supers(buffer, indentation)?; - writeln!(buffer, "deserialize_field_header(&mut *reader)?;")?; - writeln!(buffer)?; - write_indentation(buffer, indentation + 3)?; - writeln!( - buffer, - "let mut sub_reader = ::std::io::Read::take(&mut *reader, \ - payload_size as u64);", - )?; - writeln!(buffer)?; - write_indentation(buffer, indentation + 3)?; - writeln!(buffer, "match index {{")?; - for field in &declaration.fields { - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "{} => {{", field.index)?; - write_deserialization_invocation( - buffer, - indentation + 5, - indentation, - &imports, - namespace, - &field.r#type.variant, - true, - )?; - match field.rule { - schema::Rule::Asymmetric | schema::Rule::Required => { - write_indentation(buffer, indentation + 5)?; - write_supers(buffer, indentation)?; - writeln!(buffer, "finish(&mut *reader)?;")?; - write_indentation(buffer, indentation + 5)?; - write!(buffer, "return Ok(")?; - write_identifier(buffer, &declaration.name, Pascal, Some(In))?; - write!(buffer, "::")?; - write_identifier(buffer, &field.name, Pascal, None)?; - if matches!(field.r#type.variant, schema::TypeVariant::Unit) { - writeln!(buffer, ");")?; - } else { - writeln!(buffer, "(payload));")?; - } - } - schema::Rule::Optional => { - write_indentation(buffer, indentation + 5)?; - write!(buffer, "let fallback = Box::new(<")?; - write_identifier(buffer, &declaration.name, Pascal, Some(In))?; - write!(buffer, " as ")?; - write_supers(buffer, indentation)?; - writeln!(buffer, "Deserialize>::deserialize(&mut *reader)?);")?; - write_indentation(buffer, indentation + 5)?; - write!(buffer, "return Ok(")?; - write_identifier(buffer, &declaration.name, Pascal, Some(In))?; - write!(buffer, "::")?; - write_identifier(buffer, &field.name, Pascal, None)?; - if matches!(field.r#type.variant, schema::TypeVariant::Unit) { - writeln!(buffer, "(fallback));")?; - } else { - writeln!(buffer, "(payload, fallback));")?; - } - } - } - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "}}")?; - } - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "_ => {{")?; - write_indentation(buffer, indentation + 5)?; - write_supers(buffer, indentation)?; - writeln!(buffer, "skip(&mut sub_reader, payload_size as usize)?;")?; - write_indentation(buffer, indentation + 4)?; - writeln!(buffer, "}}")?; - write_indentation(buffer, indentation + 3)?; - writeln!(buffer, "}}")?; - write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "}}")?; - write_indentation(buffer, indentation + 1)?; - writeln!(buffer, "}}")?; + write_deserialize_function(buffer, indentation + 1)?; write_indentation(buffer, indentation)?; writeln!(buffer, "}}")?; @@ -1313,6 +1225,101 @@ fn write_schema( writeln!(buffer)?; + write_indentation(buffer, indentation)?; + write!(buffer, "impl ")?; + write_identifier(buffer, &declaration.name, Pascal, Some(In))?; + writeln!(buffer, " {{")?; + write_indentation(buffer, indentation + 1)?; + writeln!( + buffer, + "pub fn deserialize_from_reader_ref(", + )?; + write_indentation(buffer, indentation + 2)?; + writeln!(buffer, "reader: &mut T,")?; + write_indentation(buffer, indentation + 1)?; + writeln!(buffer, ") -> ::std::io::Result {{")?; + write_indentation(buffer, indentation + 2)?; + writeln!(buffer, "loop {{")?; + write_indentation(buffer, indentation + 3)?; + write!(buffer, "let (index, payload_size) = ")?; + write_supers(buffer, indentation)?; + writeln!(buffer, "deserialize_field_header(&mut *reader)?;")?; + writeln!(buffer)?; + write_indentation(buffer, indentation + 3)?; + writeln!( + buffer, + "let mut sub_reader = ::std::io::Read::take(&mut *reader, \ + payload_size as u64);", + )?; + writeln!(buffer)?; + write_indentation(buffer, indentation + 3)?; + writeln!(buffer, "match index {{")?; + for field in &declaration.fields { + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "{} => {{", field.index)?; + write_deserialization_invocation( + buffer, + indentation + 5, + indentation, + &imports, + namespace, + &field.r#type.variant, + true, + )?; + match field.rule { + schema::Rule::Asymmetric | schema::Rule::Required => { + write_indentation(buffer, indentation + 5)?; + write_supers(buffer, indentation)?; + writeln!(buffer, "finish(&mut *reader)?;")?; + write_indentation(buffer, indentation + 5)?; + write!(buffer, "return Ok(")?; + write_identifier(buffer, &declaration.name, Pascal, Some(In))?; + write!(buffer, "::")?; + write_identifier(buffer, &field.name, Pascal, None)?; + if matches!(field.r#type.variant, schema::TypeVariant::Unit) { + writeln!(buffer, ");")?; + } else { + writeln!(buffer, "(payload));")?; + } + } + schema::Rule::Optional => { + write_indentation(buffer, indentation + 5)?; + write!(buffer, "let fallback = Box::new(")?; + write_identifier(buffer, &declaration.name, Pascal, Some(In))?; + writeln!(buffer, "::deserialize_from_reader_ref(&mut *reader)?);")?; + write_indentation(buffer, indentation + 5)?; + write!(buffer, "return Ok(")?; + write_identifier(buffer, &declaration.name, Pascal, Some(In))?; + write!(buffer, "::")?; + write_identifier(buffer, &field.name, Pascal, None)?; + if matches!(field.r#type.variant, schema::TypeVariant::Unit) { + writeln!(buffer, "(fallback));")?; + } else { + writeln!(buffer, "(payload, fallback));")?; + } + } + } + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "}}")?; + } + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "_ => {{")?; + write_indentation(buffer, indentation + 5)?; + write_supers(buffer, indentation)?; + writeln!(buffer, "skip(&mut sub_reader, payload_size as usize)?;")?; + write_indentation(buffer, indentation + 4)?; + writeln!(buffer, "}}")?; + write_indentation(buffer, indentation + 3)?; + writeln!(buffer, "}}")?; + write_indentation(buffer, indentation + 2)?; + writeln!(buffer, "}}")?; + write_indentation(buffer, indentation + 1)?; + writeln!(buffer, "}}")?; + write_indentation(buffer, indentation)?; + writeln!(buffer, "}}")?; + + writeln!(buffer)?; + write_indentation(buffer, indentation)?; write!(buffer, "impl ")?; write_identifier(buffer, &declaration.name, Pascal, Some(Atlas))?; @@ -1514,13 +1521,28 @@ fn write_serialize_function( write_indentation(buffer, indentation)?; writeln!( buffer, - "fn serialize(&self, writer: &mut T) -> \ - ::std::io::Result<()> {{", + "fn serialize(&self, mut writer: T) -> ::std::io::Result<()> {{", )?; write_indentation(buffer, indentation + 1)?; writeln!(buffer, "let atlas = self.atlas();")?; write_indentation(buffer, indentation + 1)?; - writeln!(buffer, "self.serialize_with_atlas(writer, &atlas)")?; + writeln!(buffer, "self.serialize_with_atlas(&mut writer, &atlas)")?; + write_indentation(buffer, indentation)?; + writeln!(buffer, "}}") +} + +// Write the function to deserialize a message. +fn write_deserialize_function( + buffer: &mut T, + indentation: usize, +) -> Result<(), fmt::Error> { + write_indentation(buffer, indentation)?; + writeln!( + buffer, + "fn deserialize(mut reader: T) -> ::std::io::Result {{", + )?; + write_indentation(buffer, indentation + 1)?; + writeln!(buffer, "Self::deserialize_from_reader_ref(&mut reader)")?; write_indentation(buffer, indentation)?; writeln!(buffer, "}}") } @@ -2032,13 +2054,15 @@ fn write_u64_serialization_invocation( // Write the logic to invoke the deserialization logic for a value, including a trailing line break. // // Context variables: -// - `payload_size` (in, unused if `is_field` is `false`) +// - `payload_size` (in) // - `payload` (out, introduced) // - `sub_reader` (in and out) // // Additional notes: // - If `type_variant` is `Array`, `Bytes`, `Custom`, or `String` and the encoded data is well- // formed, then `sub_reader` is consumed to the end. +// - If `type_variant` is `Array` and the element type is `Bool`, `S64`, or `U64`, then +// `payload_size` is never read. #[allow(clippy::too_many_lines)] fn write_deserialization_invocation( buffer: &mut T, @@ -2060,11 +2084,11 @@ fn write_deserialization_invocation( write_indentation(buffer, indentation)?; writeln!(buffer, "loop {{")?; write_indentation(buffer, indentation + 1)?; - write!(buffer, "let element_size = match ")?; + write!(buffer, "let payload_size = match ")?; write_supers(buffer, supers)?; writeln!(buffer, "deserialize_varint(&mut sub_reader) {{")?; write_indentation(buffer, indentation + 2)?; - writeln!(buffer, "Ok(element_size) => element_size,")?; + writeln!(buffer, "Ok(payload_size) => payload_size as usize,")?; write_indentation(buffer, indentation + 2)?; writeln!(buffer, "Err(err) => {{")?; write_indentation(buffer, indentation + 3)?; @@ -2086,7 +2110,7 @@ fn write_deserialization_invocation( writeln!( buffer, "let mut sub_reader = ::std::io::Read::take(\ - &mut sub_reader, element_size as u64);", + &mut sub_reader, payload_size as u64);", )?; write_indentation(buffer, indentation + 1)?; writeln!(buffer, "payload.push({{")?; @@ -2107,9 +2131,9 @@ fn write_deserialization_invocation( writeln!(buffer, "}}") } schema::TypeVariant::Bool + | schema::TypeVariant::F64 | schema::TypeVariant::S64 - | schema::TypeVariant::U64 - | schema::TypeVariant::F64 => { + | schema::TypeVariant::U64 => { write_indentation(buffer, indentation)?; write!( buffer, @@ -2133,6 +2157,10 @@ fn write_deserialization_invocation( writeln!(buffer, "}}")?; write_indentation(buffer, indentation)?; writeln!(buffer, "let mut payload = Vec::new();")?; + if matches!(inner_type.variant, schema::TypeVariant::F64) { + write_indentation(buffer, indentation)?; + writeln!(buffer, "payload.reserve_exact(payload_size);")?; + } write_indentation(buffer, indentation)?; writeln!(buffer, "loop {{")?; write_indentation(buffer, indentation + 1)?; @@ -2193,6 +2221,8 @@ fn write_deserialization_invocation( write_indentation(buffer, indentation)?; writeln!(buffer, "let mut payload = vec![];")?; write_indentation(buffer, indentation)?; + writeln!(buffer, "payload.reserve_exact(payload_size);")?; + write_indentation(buffer, indentation)?; writeln!( buffer, "::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?;", @@ -2200,11 +2230,9 @@ fn write_deserialization_invocation( } schema::TypeVariant::Custom(_, _) => { write_indentation(buffer, indentation)?; - write!(buffer, "let payload = <")?; + write!(buffer, "let payload = ")?; write_type(buffer, imports, namespace, type_variant, In)?; - write!(buffer, " as ")?; - write_supers(buffer, supers)?; - writeln!(buffer, "Deserialize>::deserialize(&mut sub_reader)?;") + writeln!(buffer, "::deserialize_from_reader_ref(&mut sub_reader)?;") } schema::TypeVariant::F64 => { write_indentation(buffer, indentation)?; @@ -2253,26 +2281,14 @@ fn write_deserialization_invocation( } schema::TypeVariant::String => { write_indentation(buffer, indentation)?; - writeln!(buffer, "let mut buffer = vec![];")?; + writeln!(buffer, "let mut payload = String::new();")?; write_indentation(buffer, indentation)?; - writeln!( - buffer, - "::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?;", - )?; + writeln!(buffer, "payload.reserve_exact(payload_size);")?; write_indentation(buffer, indentation)?; writeln!( buffer, - "let payload = std::str::from_utf8(&buffer).map_or_else(", - )?; - write_indentation(buffer, indentation + 1)?; - writeln!( - buffer, - "|err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)),", - )?; - write_indentation(buffer, indentation + 1)?; - writeln!(buffer, "|result| Ok(result.to_owned()),")?; - write_indentation(buffer, indentation)?; - writeln!(buffer, ")?;") + "::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?;", + ) } schema::TypeVariant::U64 => { write_indentation(buffer, indentation)?; diff --git a/test_data/types.rs b/test_data/types.rs index 77b2df07..b9eba80a 100644 --- a/test_data/types.rs +++ b/test_data/types.rs @@ -12,14 +12,11 @@ const MISSING_FIELDS_ERROR_MESSAGE: &str = "Struct missing one or more required pub trait Serialize { fn size(&self) -> usize; - fn serialize(&self, writer: &mut T) -> io::Result<()>; + fn serialize(&self, writer: T) -> io::Result<()>; } -pub trait Deserialize { - fn deserialize(reader: &mut T) -> io::Result - where - Self: Sized, - T: BufRead; +pub trait Deserialize: Sized { + fn deserialize(reader: T) -> io::Result; } fn zigzag_encode(value: i64) -> u64 { @@ -266,18 +263,57 @@ pub mod circular_dependency { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::super::Deserialize for StructFromBelowIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) + } + } + + impl From for StructFromBelowIn { + fn from(message: StructFromBelowOut) -> Self { + StructFromBelowIn { + x: message.x.into(), + } + } + } + + impl StructFromBelowOut { + pub fn atlas(&self) -> StructFromBelowAtlas { + let _x = { let payload = &self.x; (payload.atlas()) }; + + StructFromBelowAtlas { + _size: + { let payload_atlas = &_x; let payload_size = payload_atlas.size(); super::super::super::field_header_size(0_u64, payload_size, false) + payload_size }, + x: _x, + } + } + + pub fn serialize_with_atlas( + &self, + writer: &mut T, + atlas: &StructFromBelowAtlas, + ) -> ::std::io::Result<()> { + { + let payload = &self.x; + let payload_atlas = &atlas.x; + super::super::super::serialize_field_header(writer, 0_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + + Ok(()) + } + } + + impl StructFromBelowIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { let mut _x: Option = None; loop { @@ -296,7 +332,7 @@ pub mod circular_dependency { match index { 0 => { - let payload = ::deserialize(&mut sub_reader)?; + let payload = super::super::types::StructFromAboveIn::deserialize_from_reader_ref(&mut sub_reader)?; _x.get_or_insert(payload); } _ => { @@ -318,41 +354,6 @@ pub mod circular_dependency { } } - impl From for StructFromBelowIn { - fn from(message: StructFromBelowOut) -> Self { - StructFromBelowIn { - x: message.x.into(), - } - } - } - - impl StructFromBelowOut { - pub fn atlas(&self) -> StructFromBelowAtlas { - let _x = { let payload = &self.x; (payload.atlas()) }; - - StructFromBelowAtlas { - _size: - { let payload_atlas = &_x; let payload_size = payload_atlas.size(); super::super::super::field_header_size(0_u64, payload_size, false) + payload_size }, - x: _x, - } - } - - pub fn serialize_with_atlas( - &self, - writer: &mut T, - atlas: &StructFromBelowAtlas, - ) -> ::std::io::Result<()> { - { - let payload = &self.x; - let payload_atlas = &atlas.x; - super::super::super::serialize_field_header(writer, 0_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - - Ok(()) - } - } - impl StructFromBelowAtlas { pub fn size(&self) -> usize { self._size @@ -392,96 +393,15 @@ pub mod circular_dependency { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::Deserialize for StructFromAboveIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - let mut _field: Option = None; - let mut _size: Option = None; - let mut _elements: Option = None; - let mut _fallback: Option = None; - - loop { - let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { - Ok(header) => header, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - - return Err(err); - } - }; - - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); - - match index { - 0 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _field.get_or_insert(payload); - } - 1 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _size.get_or_insert(payload); - } - 2 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _elements.get_or_insert(payload); - } - 3 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _fallback.get_or_insert(payload); - } - _ => { - super::super::skip(&mut sub_reader, payload_size as usize)?; - } - } - } - - if _field.is_none() - || _size.is_none() - || _elements.is_none() - || _fallback.is_none() { - return Err(::std::io::Error::new( - ::std::io::ErrorKind::InvalidData, - super::super::MISSING_FIELDS_ERROR_MESSAGE, - )); - } - - Ok(StructFromAboveIn { - field: _field.unwrap(), - size: _size.unwrap(), - elements: _elements.unwrap(), - fallback: _fallback.unwrap(), - }) + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) } } @@ -553,6 +473,79 @@ pub mod circular_dependency { } } + impl StructFromAboveIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + let mut _field: Option = None; + let mut _size: Option = None; + let mut _elements: Option = None; + let mut _fallback: Option = None; + + loop { + let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { + Ok(header) => header, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + + return Err(err); + } + }; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + 0 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _field.get_or_insert(payload); + } + 1 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _size.get_or_insert(payload); + } + 2 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _elements.get_or_insert(payload); + } + 3 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _fallback.get_or_insert(payload); + } + _ => { + super::super::skip(&mut sub_reader, payload_size as usize)?; + } + } + } + + if _field.is_none() + || _size.is_none() + || _elements.is_none() + || _fallback.is_none() { + return Err(::std::io::Error::new( + ::std::io::ErrorKind::InvalidData, + super::super::MISSING_FIELDS_ERROR_MESSAGE, + )); + } + + Ok(StructFromAboveIn { + field: _field.unwrap(), + size: _size.unwrap(), + elements: _elements.unwrap(), + fallback: _fallback.unwrap(), + }) + } + } + impl StructFromAboveAtlas { pub fn size(&self) -> usize { self._size @@ -581,41 +574,15 @@ pub mod comprehensive { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::Deserialize for LocalStructIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - loop { - let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { - Ok(header) => header, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - - return Err(err); - } - }; - - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); - - match index { - _ => { - super::super::skip(&mut sub_reader, payload_size as usize)?; - } - } - } - - Ok(LocalStructIn { - }) + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) } } @@ -642,6 +609,36 @@ pub mod comprehensive { } } + impl LocalStructIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + loop { + let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { + Ok(header) => header, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + + return Err(err); + } + }; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + _ => { + super::super::skip(&mut sub_reader, payload_size as usize)?; + } + } + } + + Ok(LocalStructIn { + }) + } + } + impl LocalStructAtlas { pub fn size(&self) -> usize { self._size @@ -909,901 +906,1502 @@ pub mod comprehensive { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::Deserialize for FooIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - let mut _a_required: Option<()> = None; - let mut _b_required: Option = None; - let mut _c_required: Option = None; - let mut _d_required: Option = None; - let mut _e_required: Option = None; - let mut _f_required: Option> = None; - let mut _g_required: Option = None; - let mut _h_required: Option = None; - let mut _i_required: Option = None; - let mut _j_required: Option> = None; - let mut _k_required: Option> = None; - let mut _l_required: Option> = None; - let mut _m_required: Option> = None; - let mut _n_required: Option> = None; - let mut _o_required: Option>> = None; - let mut _p_required: Option> = None; - let mut _q_required: Option> = None; - let mut _r_required: Option> = None; - let mut _s_required: Option>> = None; - let mut _t_required: Option>> = None; - let mut _u_required: Option>> = None; - let mut _v_required: Option>> = None; - let mut _w_required: Option>> = None; - let mut _x_required: Option>>> = None; - let mut _y_required: Option>> = None; - let mut _z_required: Option>> = None; - let mut _aa_required: Option>> = None; - let mut _a_asymmetric: Option<()> = None; - let mut _b_asymmetric: Option = None; - let mut _c_asymmetric: Option = None; - let mut _d_asymmetric: Option = None; - let mut _e_asymmetric: Option = None; - let mut _f_asymmetric: Option> = None; - let mut _g_asymmetric: Option = None; - let mut _h_asymmetric: Option = None; - let mut _i_asymmetric: Option = None; - let mut _j_asymmetric: Option> = None; - let mut _k_asymmetric: Option> = None; - let mut _l_asymmetric: Option> = None; - let mut _m_asymmetric: Option> = None; - let mut _n_asymmetric: Option> = None; - let mut _o_asymmetric: Option>> = None; - let mut _p_asymmetric: Option> = None; - let mut _q_asymmetric: Option> = None; - let mut _r_asymmetric: Option> = None; - let mut _s_asymmetric: Option>> = None; - let mut _t_asymmetric: Option>> = None; - let mut _u_asymmetric: Option>> = None; - let mut _v_asymmetric: Option>> = None; - let mut _w_asymmetric: Option>> = None; - let mut _x_asymmetric: Option>>> = None; - let mut _y_asymmetric: Option>> = None; - let mut _z_asymmetric: Option>> = None; - let mut _aa_asymmetric: Option>> = None; - let mut _a_optional: Option<()> = None; - let mut _b_optional: Option = None; - let mut _c_optional: Option = None; - let mut _d_optional: Option = None; - let mut _e_optional: Option = None; - let mut _f_optional: Option> = None; - let mut _g_optional: Option = None; - let mut _h_optional: Option = None; - let mut _i_optional: Option = None; - let mut _j_optional: Option> = None; - let mut _k_optional: Option> = None; - let mut _l_optional: Option> = None; - let mut _m_optional: Option> = None; - let mut _n_optional: Option> = None; - let mut _o_optional: Option>> = None; - let mut _p_optional: Option> = None; - let mut _q_optional: Option> = None; - let mut _r_optional: Option> = None; - let mut _s_optional: Option>> = None; - let mut _t_optional: Option>> = None; - let mut _u_optional: Option>> = None; - let mut _v_optional: Option>> = None; - let mut _w_optional: Option>> = None; - let mut _x_optional: Option>>> = None; - let mut _y_optional: Option>> = None; - let mut _z_optional: Option>> = None; - let mut _aa_optional: Option>> = None; - - loop { - let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { - Ok(header) => header, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) + } + } - return Err(err); - } - }; + impl From for FooIn { + fn from(message: FooOut) -> Self { + FooIn { + a_required: message.a_required.into(), + b_required: message.b_required.into(), + c_required: message.c_required.into(), + d_required: message.d_required.into(), + e_required: message.e_required.into(), + f_required: message.f_required.into(), + g_required: message.g_required.into(), + h_required: message.h_required.into(), + i_required: message.i_required.into(), + j_required: message.j_required.into(), + k_required: message.k_required.into(), + l_required: message.l_required.into(), + m_required: message.m_required.into(), + n_required: message.n_required.into(), + o_required: message.o_required.into(), + p_required: message.p_required.into(), + q_required: message.q_required.into_iter().map(|x| x.into()).collect::>(), + r_required: message.r_required.into_iter().map(|x| x.into()).collect::>(), + s_required: message.s_required.into(), + t_required: message.t_required.into(), + u_required: message.u_required.into(), + v_required: message.v_required.into(), + w_required: message.w_required.into(), + x_required: message.x_required.into(), + y_required: message.y_required.into(), + z_required: message.z_required.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>(), + aa_required: message.aa_required.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>(), + a_asymmetric: Some(message.a_asymmetric.into()), + b_asymmetric: Some(message.b_asymmetric.into()), + c_asymmetric: Some(message.c_asymmetric.into()), + d_asymmetric: Some(message.d_asymmetric.into()), + e_asymmetric: Some(message.e_asymmetric.into()), + f_asymmetric: Some(message.f_asymmetric.into()), + g_asymmetric: Some(message.g_asymmetric.into()), + h_asymmetric: Some(message.h_asymmetric.into()), + i_asymmetric: Some(message.i_asymmetric.into()), + j_asymmetric: Some(message.j_asymmetric.into()), + k_asymmetric: Some(message.k_asymmetric.into()), + l_asymmetric: Some(message.l_asymmetric.into()), + m_asymmetric: Some(message.m_asymmetric.into()), + n_asymmetric: Some(message.n_asymmetric.into()), + o_asymmetric: Some(message.o_asymmetric.into()), + p_asymmetric: Some(message.p_asymmetric.into()), + q_asymmetric: Some(message.q_asymmetric.into_iter().map(|x| x.into()).collect::>()), + r_asymmetric: Some(message.r_asymmetric.into_iter().map(|x| x.into()).collect::>()), + s_asymmetric: Some(message.s_asymmetric.into()), + t_asymmetric: Some(message.t_asymmetric.into()), + u_asymmetric: Some(message.u_asymmetric.into()), + v_asymmetric: Some(message.v_asymmetric.into()), + w_asymmetric: Some(message.w_asymmetric.into()), + x_asymmetric: Some(message.x_asymmetric.into()), + y_asymmetric: Some(message.y_asymmetric.into()), + z_asymmetric: Some(message.z_asymmetric.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), + aa_asymmetric: Some(message.aa_asymmetric.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), + a_optional: message.a_optional.map(|payload| payload.into()), + b_optional: message.b_optional.map(|payload| payload.into()), + c_optional: message.c_optional.map(|payload| payload.into()), + d_optional: message.d_optional.map(|payload| payload.into()), + e_optional: message.e_optional.map(|payload| payload.into()), + f_optional: message.f_optional.map(|payload| payload.into()), + g_optional: message.g_optional.map(|payload| payload.into()), + h_optional: message.h_optional.map(|payload| payload.into()), + i_optional: message.i_optional.map(|payload| payload.into()), + j_optional: message.j_optional.map(|payload| payload.into()), + k_optional: message.k_optional.map(|payload| payload.into()), + l_optional: message.l_optional.map(|payload| payload.into()), + m_optional: message.m_optional.map(|payload| payload.into()), + n_optional: message.n_optional.map(|payload| payload.into()), + o_optional: message.o_optional.map(|payload| payload.into()), + p_optional: message.p_optional.map(|payload| payload.into()), + q_optional: message.q_optional.map(|payload| payload.into_iter().map(|x| x.into()).collect::>()), + r_optional: message.r_optional.map(|payload| payload.into_iter().map(|x| x.into()).collect::>()), + s_optional: message.s_optional.map(|payload| payload.into()), + t_optional: message.t_optional.map(|payload| payload.into()), + u_optional: message.u_optional.map(|payload| payload.into()), + v_optional: message.v_optional.map(|payload| payload.into()), + w_optional: message.w_optional.map(|payload| payload.into()), + x_optional: message.x_optional.map(|payload| payload.into()), + y_optional: message.y_optional.map(|payload| payload.into()), + z_optional: message.z_optional.map(|payload| payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), + aa_optional: message.aa_optional.map(|payload| payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), + } + } + } - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + impl FooOut { + pub fn atlas(&self) -> FooAtlas { + let _a_required = { let payload = &self.a_required; (0_usize) }; + let _b_required = { let payload = &self.b_required; (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize }) }; + let _c_required = { let payload = &self.c_required; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }; + let _d_required = { let payload = &self.d_required; ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }) }; + let _e_required = { let payload = &self.e_required; (if *payload { 1_usize } else { 0_usize }) }; + let _f_required = { let payload = &self.f_required; (payload.len()) }; + let _g_required = { let payload = &self.g_required; (payload.len()) }; + let _h_required = { let payload = &self.h_required; (payload.atlas()) }; + let _i_required = { let payload = &self.i_required; (payload.atlas()) }; + let _j_required = { let payload = &self.j_required; ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }) }; + let _k_required = { let payload = &self.k_required; (8_usize * payload.len()) }; + let _l_required = { let payload = &self.l_required; (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload)))) }; + let _m_required = { let payload = &self.m_required; (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))) }; + let _n_required = { let payload = &self.n_required; (payload.iter().fold(0_usize, |x, payload| x + (1_usize))) }; + let _o_required = { let payload = &self.o_required; ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _p_required = { let payload = &self.p_required; ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _q_required = { let payload = &self.q_required; ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _r_required = { let payload = &self.r_required; ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _s_required = { let payload = &self.s_required; ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _t_required = { let payload = &self.t_required; ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _u_required = { let payload = &self.u_required; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _v_required = { let payload = &self.v_required; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _w_required = { let payload = &self.w_required; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _x_required = { let payload = &self.x_required; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _y_required = { let payload = &self.y_required; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _z_required = { let payload = &self.z_required; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _aa_required = { let payload = &self.aa_required; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _a_asymmetric = { let payload = &self.a_asymmetric; (0_usize) }; + let _b_asymmetric = { let payload = &self.b_asymmetric; (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize }) }; + let _c_asymmetric = { let payload = &self.c_asymmetric; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }; + let _d_asymmetric = { let payload = &self.d_asymmetric; ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }) }; + let _e_asymmetric = { let payload = &self.e_asymmetric; (if *payload { 1_usize } else { 0_usize }) }; + let _f_asymmetric = { let payload = &self.f_asymmetric; (payload.len()) }; + let _g_asymmetric = { let payload = &self.g_asymmetric; (payload.len()) }; + let _h_asymmetric = { let payload = &self.h_asymmetric; (payload.atlas()) }; + let _i_asymmetric = { let payload = &self.i_asymmetric; (payload.atlas()) }; + let _j_asymmetric = { let payload = &self.j_asymmetric; ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }) }; + let _k_asymmetric = { let payload = &self.k_asymmetric; (8_usize * payload.len()) }; + let _l_asymmetric = { let payload = &self.l_asymmetric; (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload)))) }; + let _m_asymmetric = { let payload = &self.m_asymmetric; (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))) }; + let _n_asymmetric = { let payload = &self.n_asymmetric; (payload.iter().fold(0_usize, |x, payload| x + (1_usize))) }; + let _o_asymmetric = { let payload = &self.o_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _p_asymmetric = { let payload = &self.p_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _q_asymmetric = { let payload = &self.q_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _r_asymmetric = { let payload = &self.r_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _s_asymmetric = { let payload = &self.s_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _t_asymmetric = { let payload = &self.t_asymmetric; ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _u_asymmetric = { let payload = &self.u_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _v_asymmetric = { let payload = &self.v_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _w_asymmetric = { let payload = &self.w_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _x_asymmetric = { let payload = &self.x_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _y_asymmetric = { let payload = &self.y_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _z_asymmetric = { let payload = &self.z_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _aa_asymmetric = { let payload = &self.aa_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; + let _a_optional = self.a_optional.as_ref().map(|payload| (0_usize)); + let _b_optional = self.b_optional.as_ref().map(|payload| (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize })); + let _c_optional = self.c_optional.as_ref().map(|payload| (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } })); + let _d_optional = self.d_optional.as_ref().map(|payload| ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) })); + let _e_optional = self.e_optional.as_ref().map(|payload| (if *payload { 1_usize } else { 0_usize })); + let _f_optional = self.f_optional.as_ref().map(|payload| (payload.len())); + let _g_optional = self.g_optional.as_ref().map(|payload| (payload.len())); + let _h_optional = self.h_optional.as_ref().map(|payload| (payload.atlas())); + let _i_optional = self.i_optional.as_ref().map(|payload| (payload.atlas())); + let _j_optional = self.j_optional.as_ref().map(|payload| ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) })); + let _k_optional = self.k_optional.as_ref().map(|payload| (8_usize * payload.len())); + let _l_optional = self.l_optional.as_ref().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))); + let _m_optional = self.m_optional.as_ref().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))); + let _n_optional = self.n_optional.as_ref().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))); + let _o_optional = self.o_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _p_optional = self.p_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _q_optional = self.q_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _r_optional = self.r_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _s_optional = self.s_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _t_optional = self.t_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _u_optional = self.u_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _v_optional = self.v_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _w_optional = self.w_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _x_optional = self.x_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _y_optional = self.y_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _z_optional = self.z_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); + let _aa_optional = self.aa_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - match index { - 0 => { - let payload = (); - _a_required.get_or_insert(payload); - } - 1 => { - let payload = if payload_size == 0_usize { - 0.0_f64 - } else { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - f64::from_le_bytes(buffer) - }; - _b_required.get_or_insert(payload); + FooAtlas { + _size: + { let payload_atlas = &_a_required; let payload_size = *payload_atlas; super::super::field_header_size(0_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_b_required; let payload_size = *payload_atlas; super::super::field_header_size(1_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_c_required; let payload_size = *payload_atlas; super::super::field_header_size(2_u64, payload_size, true) + payload_size } + + { let payload_atlas = &_d_required; let payload_size = *payload_atlas; super::super::field_header_size(3_u64, payload_size, true) + payload_size } + + { let payload_atlas = &_e_required; let payload_size = *payload_atlas; super::super::field_header_size(4_u64, payload_size, true) + payload_size } + + { let payload_atlas = &_f_required; let payload_size = *payload_atlas; super::super::field_header_size(5_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_g_required; let payload_size = *payload_atlas; super::super::field_header_size(6_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_h_required; let payload_size = payload_atlas.size(); super::super::field_header_size(7_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_i_required; let payload_size = payload_atlas.size(); super::super::field_header_size(8_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_j_required; let payload_size = *payload_atlas; super::super::field_header_size(9_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_k_required; let payload_size = *payload_atlas; super::super::field_header_size(10_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_l_required; let payload_size = *payload_atlas; super::super::field_header_size(11_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_m_required; let payload_size = *payload_atlas; super::super::field_header_size(12_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_n_required; let payload_size = *payload_atlas; super::super::field_header_size(13_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_o_required; let payload_size = payload_atlas.0; super::super::field_header_size(14_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_p_required; let payload_size = payload_atlas.0; super::super::field_header_size(15_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_q_required; let payload_size = payload_atlas.0; super::super::field_header_size(16_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_r_required; let payload_size = payload_atlas.0; super::super::field_header_size(17_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_s_required; let payload_size = payload_atlas.0; super::super::field_header_size(18_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_t_required; let payload_size = payload_atlas.0; super::super::field_header_size(19_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_u_required; let payload_size = payload_atlas.0; super::super::field_header_size(20_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_v_required; let payload_size = payload_atlas.0; super::super::field_header_size(21_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_w_required; let payload_size = payload_atlas.0; super::super::field_header_size(22_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_x_required; let payload_size = payload_atlas.0; super::super::field_header_size(23_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_y_required; let payload_size = payload_atlas.0; super::super::field_header_size(24_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_z_required; let payload_size = payload_atlas.0; super::super::field_header_size(25_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_aa_required; let payload_size = payload_atlas.0; super::super::field_header_size(26_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_a_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(28_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_b_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(29_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_c_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(30_u64, payload_size, true) + payload_size } + + { let payload_atlas = &_d_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(31_u64, payload_size, true) + payload_size } + + { let payload_atlas = &_e_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(32_u64, payload_size, true) + payload_size } + + { let payload_atlas = &_f_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(33_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_g_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(34_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_h_asymmetric; let payload_size = payload_atlas.size(); super::super::field_header_size(35_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_i_asymmetric; let payload_size = payload_atlas.size(); super::super::field_header_size(36_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_j_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(37_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_k_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(38_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_l_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(39_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_m_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(40_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_n_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(41_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_o_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(42_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_p_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(43_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_q_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(44_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_r_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(45_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_s_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(46_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_t_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(47_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_u_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(48_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_v_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(49_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_w_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(50_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_x_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(51_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_y_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(52_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_z_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(53_u64, payload_size, false) + payload_size } + + { let payload_atlas = &_aa_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(54_u64, payload_size, false) + payload_size } + + _a_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(56_u64, payload_size, false) + payload_size }) + + _b_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(57_u64, payload_size, false) + payload_size }) + + _c_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(58_u64, payload_size, true) + payload_size }) + + _d_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(59_u64, payload_size, true) + payload_size }) + + _e_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(60_u64, payload_size, true) + payload_size }) + + _f_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(61_u64, payload_size, false) + payload_size }) + + _g_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(62_u64, payload_size, false) + payload_size }) + + _h_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.size(); super::super::field_header_size(63_u64, payload_size, false) + payload_size }) + + _i_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.size(); super::super::field_header_size(64_u64, payload_size, false) + payload_size }) + + _j_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(65_u64, payload_size, false) + payload_size }) + + _k_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(66_u64, payload_size, false) + payload_size }) + + _l_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(67_u64, payload_size, false) + payload_size }) + + _m_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(68_u64, payload_size, false) + payload_size }) + + _n_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(69_u64, payload_size, false) + payload_size }) + + _o_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(70_u64, payload_size, false) + payload_size }) + + _p_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(71_u64, payload_size, false) + payload_size }) + + _q_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(72_u64, payload_size, false) + payload_size }) + + _r_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(73_u64, payload_size, false) + payload_size }) + + _s_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(74_u64, payload_size, false) + payload_size }) + + _t_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(75_u64, payload_size, false) + payload_size }) + + _u_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(76_u64, payload_size, false) + payload_size }) + + _v_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(77_u64, payload_size, false) + payload_size }) + + _w_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(78_u64, payload_size, false) + payload_size }) + + _x_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(79_u64, payload_size, false) + payload_size }) + + _y_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(80_u64, payload_size, false) + payload_size }) + + _z_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(81_u64, payload_size, false) + payload_size }) + + _aa_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(82_u64, payload_size, false) + payload_size }), + a_required: _a_required, + b_required: _b_required, + c_required: _c_required, + d_required: _d_required, + e_required: _e_required, + f_required: _f_required, + g_required: _g_required, + h_required: _h_required, + i_required: _i_required, + j_required: _j_required, + k_required: _k_required, + l_required: _l_required, + m_required: _m_required, + n_required: _n_required, + o_required: _o_required, + p_required: _p_required, + q_required: _q_required, + r_required: _r_required, + s_required: _s_required, + t_required: _t_required, + u_required: _u_required, + v_required: _v_required, + w_required: _w_required, + x_required: _x_required, + y_required: _y_required, + z_required: _z_required, + aa_required: _aa_required, + a_asymmetric: _a_asymmetric, + b_asymmetric: _b_asymmetric, + c_asymmetric: _c_asymmetric, + d_asymmetric: _d_asymmetric, + e_asymmetric: _e_asymmetric, + f_asymmetric: _f_asymmetric, + g_asymmetric: _g_asymmetric, + h_asymmetric: _h_asymmetric, + i_asymmetric: _i_asymmetric, + j_asymmetric: _j_asymmetric, + k_asymmetric: _k_asymmetric, + l_asymmetric: _l_asymmetric, + m_asymmetric: _m_asymmetric, + n_asymmetric: _n_asymmetric, + o_asymmetric: _o_asymmetric, + p_asymmetric: _p_asymmetric, + q_asymmetric: _q_asymmetric, + r_asymmetric: _r_asymmetric, + s_asymmetric: _s_asymmetric, + t_asymmetric: _t_asymmetric, + u_asymmetric: _u_asymmetric, + v_asymmetric: _v_asymmetric, + w_asymmetric: _w_asymmetric, + x_asymmetric: _x_asymmetric, + y_asymmetric: _y_asymmetric, + z_asymmetric: _z_asymmetric, + aa_asymmetric: _aa_asymmetric, + a_optional: _a_optional, + b_optional: _b_optional, + c_optional: _c_optional, + d_optional: _d_optional, + e_optional: _e_optional, + f_optional: _f_optional, + g_optional: _g_optional, + h_optional: _h_optional, + i_optional: _i_optional, + j_optional: _j_optional, + k_optional: _k_optional, + l_optional: _l_optional, + m_optional: _m_optional, + n_optional: _n_optional, + o_optional: _o_optional, + p_optional: _p_optional, + q_optional: _q_optional, + r_optional: _r_optional, + s_optional: _s_optional, + t_optional: _t_optional, + u_optional: _u_optional, + v_optional: _v_optional, + w_optional: _w_optional, + x_optional: _x_optional, + y_optional: _y_optional, + z_optional: _z_optional, + aa_optional: _aa_optional, + } + } + + pub fn serialize_with_atlas( + &self, + writer: &mut T, + atlas: &FooAtlas, + ) -> ::std::io::Result<()> { + { + let payload = &self.a_required; + let payload_atlas = &atlas.a_required; + super::super::serialize_field_header(writer, 0_u64, *payload_atlas, false)?; + } + + { + let payload = &self.b_required; + let payload_atlas = &atlas.b_required; + super::super::serialize_field_header(writer, 1_u64, *payload_atlas, false)?; + if payload.to_bits() != 0_u64 { + writer.write_all(&payload.to_le_bytes())?; + } + } + + { + let payload = &self.c_required; + let payload_atlas = &atlas.c_required; + super::super::serialize_field_header(writer, 2_u64, *payload_atlas, true)?; + { + let varint = *payload; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 2 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - _c_required.get_or_insert(payload); + } + } + + { + let payload = &self.d_required; + let payload_atlas = &atlas.d_required; + super::super::serialize_field_header(writer, 3_u64, *payload_atlas, true)?; + { + let varint = super::super::zigzag_encode(*payload); + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 3 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = super::super::zigzag_decode(payload); - _d_required.get_or_insert(payload); + } + } + + { + let payload = &self.e_required; + let payload_atlas = &atlas.e_required; + super::super::serialize_field_header(writer, 4_u64, *payload_atlas, true)?; + { + let varint = *payload as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 4 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = payload != 0_u64; - _e_required.get_or_insert(payload); + } + } + + { + let payload = &self.f_required; + let payload_atlas = &atlas.f_required; + super::super::serialize_field_header(writer, 5_u64, *payload_atlas, false)?; + writer.write_all(payload)?; + } + + { + let payload = &self.g_required; + let payload_atlas = &atlas.g_required; + super::super::serialize_field_header(writer, 6_u64, *payload_atlas, false)?; + writer.write_all(payload.as_bytes())?; + } + + { + let payload = &self.h_required; + let payload_atlas = &atlas.h_required; + super::super::serialize_field_header(writer, 7_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + + { + let payload = &self.i_required; + let payload_atlas = &atlas.i_required; + super::super::serialize_field_header(writer, 8_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + + { + let payload = &self.j_required; + let payload_atlas = &atlas.j_required; + super::super::serialize_field_header(writer, 9_u64, *payload_atlas, false)?; + { + let varint = payload.len() as u64 as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 5 => { - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - _f_required.get_or_insert(payload); + } + } + + { + let payload = &self.k_required; + let payload_atlas = &atlas.k_required; + super::super::serialize_field_header(writer, 10_u64, *payload_atlas, false)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + } + + { + let payload = &self.l_required; + let payload_atlas = &atlas.l_required; + super::super::serialize_field_header(writer, 11_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; } - 6 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _g_required.get_or_insert(payload); + } + } + + { + let payload = &self.m_required; + let payload_atlas = &atlas.m_required; + super::super::serialize_field_header(writer, 12_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; } - 7 => { - let payload = ::deserialize(&mut sub_reader)?; - _h_required.get_or_insert(payload); + } + } + + { + let payload = &self.n_required; + let payload_atlas = &atlas.n_required; + super::super::serialize_field_header(writer, 13_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; } - 8 => { - let payload = ::deserialize(&mut sub_reader)?; - _i_required.get_or_insert(payload); + } + } + + { + let payload = &self.o_required; + let payload_atlas = &atlas.o_required; + super::super::serialize_field_header(writer, 14_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + } + + { + let payload = &self.p_required; + let payload_atlas = &atlas.p_required; + super::super::serialize_field_header(writer, 15_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + } + + { + let payload = &self.q_required; + let payload_atlas = &atlas.q_required; + super::super::serialize_field_header(writer, 16_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + + { + let payload = &self.r_required; + let payload_atlas = &atlas.r_required; + super::super::serialize_field_header(writer, 17_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + + { + let payload = &self.s_required; + let payload_atlas = &atlas.s_required; + super::super::serialize_field_header(writer, 18_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + { + let varint = payload.len() as u64 as u64; + super::super::serialize_varint(varint, writer)?; } - 9 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = vec![(); payload as usize]; - _j_required.get_or_insert(payload); + } + } + + { + let payload = &self.t_required; + let payload_atlas = &atlas.t_required; + super::super::serialize_field_header(writer, 19_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; } - 10 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - let payload = f64::from_le_bytes(buffer); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); + } + } + + { + let payload = &self.u_required; + let payload_atlas = &atlas.u_required; + super::super::serialize_field_header(writer, 20_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; } - _k_required.get_or_insert(payload); } - 11 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); + } + } + + { + let payload = &self.v_required; + let payload_atlas = &atlas.v_required; + super::super::serialize_field_header(writer, 21_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; } - _l_required.get_or_insert(payload); } - 12 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = super::super::zigzag_decode(payload); - Ok(payload) + } + } + + { + let payload = &self.w_required; + let payload_atlas = &atlas.w_required; + super::super::serialize_field_header(writer, 22_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - _m_required.get_or_insert(payload); } - 13 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = payload != 0_u64; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - _n_required.get_or_insert(payload); + } + } + + { + let payload = &self.x_required; + let payload_atlas = &atlas.x_required; + super::super::serialize_field_header(writer, 23_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; } - 14 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - payload - }); - } - _o_required.get_or_insert(payload); + } + } + + { + let payload = &self.y_required; + let payload_atlas = &atlas.y_required; + super::super::serialize_field_header(writer, 24_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; } - 15 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - payload - }); - } - _p_required.get_or_insert(payload); + } + } + + { + let payload = &self.z_required; + let payload_atlas = &atlas.z_required; + super::super::serialize_field_header(writer, 25_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; } - 16 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - _q_required.get_or_insert(payload); + } + } + + { + let payload = &self.aa_required; + let payload_atlas = &atlas.aa_required; + super::super::serialize_field_header(writer, 26_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; } - 17 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - _r_required.get_or_insert(payload); + } + } + + { + let payload = &self.a_asymmetric; + let payload_atlas = &atlas.a_asymmetric; + super::super::serialize_field_header(writer, 28_u64, *payload_atlas, false)?; + } + + { + let payload = &self.b_asymmetric; + let payload_atlas = &atlas.b_asymmetric; + super::super::serialize_field_header(writer, 29_u64, *payload_atlas, false)?; + if payload.to_bits() != 0_u64 { + writer.write_all(&payload.to_le_bytes())?; + } + } + + { + let payload = &self.c_asymmetric; + let payload_atlas = &atlas.c_asymmetric; + super::super::serialize_field_header(writer, 30_u64, *payload_atlas, true)?; + { + let varint = *payload; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 18 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = vec![(); payload as usize]; - payload - }); - } - _s_required.get_or_insert(payload); + } + } + + { + let payload = &self.d_asymmetric; + let payload_atlas = &atlas.d_asymmetric; + super::super::serialize_field_header(writer, 31_u64, *payload_atlas, true)?; + { + let varint = super::super::zigzag_encode(*payload); + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 19 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - let payload = f64::from_le_bytes(buffer); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - _t_required.get_or_insert(payload); + } + } + + { + let payload = &self.e_asymmetric; + let payload_atlas = &atlas.e_asymmetric; + super::super::serialize_field_header(writer, 32_u64, *payload_atlas, true)?; + { + let varint = *payload as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 20 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - _u_required.get_or_insert(payload); + } + } + + { + let payload = &self.f_asymmetric; + let payload_atlas = &atlas.f_asymmetric; + super::super::serialize_field_header(writer, 33_u64, *payload_atlas, false)?; + writer.write_all(payload)?; + } + + { + let payload = &self.g_asymmetric; + let payload_atlas = &atlas.g_asymmetric; + super::super::serialize_field_header(writer, 34_u64, *payload_atlas, false)?; + writer.write_all(payload.as_bytes())?; + } + + { + let payload = &self.h_asymmetric; + let payload_atlas = &atlas.h_asymmetric; + super::super::serialize_field_header(writer, 35_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + + { + let payload = &self.i_asymmetric; + let payload_atlas = &atlas.i_asymmetric; + super::super::serialize_field_header(writer, 36_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + + { + let payload = &self.j_asymmetric; + let payload_atlas = &atlas.j_asymmetric; + super::super::serialize_field_header(writer, 37_u64, *payload_atlas, false)?; + { + let varint = payload.len() as u64 as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 21 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = super::super::zigzag_decode(payload); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); + } + } + + { + let payload = &self.k_asymmetric; + let payload_atlas = &atlas.k_asymmetric; + super::super::serialize_field_header(writer, 38_u64, *payload_atlas, false)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + } + + { + let payload = &self.l_asymmetric; + let payload_atlas = &atlas.l_asymmetric; + super::super::serialize_field_header(writer, 39_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; + } + } + } + + { + let payload = &self.m_asymmetric; + let payload_atlas = &atlas.m_asymmetric; + super::super::serialize_field_header(writer, 40_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; + } + } + } + + { + let payload = &self.n_asymmetric; + let payload_atlas = &atlas.n_asymmetric; + super::super::serialize_field_header(writer, 41_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; + } + } + } + + { + let payload = &self.o_asymmetric; + let payload_atlas = &atlas.o_asymmetric; + super::super::serialize_field_header(writer, 42_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + } + + { + let payload = &self.p_asymmetric; + let payload_atlas = &atlas.p_asymmetric; + super::super::serialize_field_header(writer, 43_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + } + + { + let payload = &self.q_asymmetric; + let payload_atlas = &atlas.q_asymmetric; + super::super::serialize_field_header(writer, 44_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + + { + let payload = &self.r_asymmetric; + let payload_atlas = &atlas.r_asymmetric; + super::super::serialize_field_header(writer, 45_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + + { + let payload = &self.s_asymmetric; + let payload_atlas = &atlas.s_asymmetric; + super::super::serialize_field_header(writer, 46_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + { + let varint = payload.len() as u64 as u64; + super::super::serialize_varint(varint, writer)?; + } + } + } + + { + let payload = &self.t_asymmetric; + let payload_atlas = &atlas.t_asymmetric; + super::super::serialize_field_header(writer, 47_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + } + } + + { + let payload = &self.u_asymmetric; + let payload_atlas = &atlas.u_asymmetric; + super::super::serialize_field_header(writer, 48_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; } - _v_required.get_or_insert(payload); } - 22 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = payload != 0_u64; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); + } + } + + { + let payload = &self.v_asymmetric; + let payload_atlas = &atlas.v_asymmetric; + super::super::serialize_field_header(writer, 49_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; } - _w_required.get_or_insert(payload); } - 23 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - payload - }); - } - payload - }); + } + } + + { + let payload = &self.w_asymmetric; + let payload_atlas = &atlas.w_asymmetric; + super::super::serialize_field_header(writer, 50_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; } - _x_required.get_or_insert(payload); } - 24 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - payload - }); - } - payload - }); - } - _y_required.get_or_insert(payload); + } + } + + { + let payload = &self.x_asymmetric; + let payload_atlas = &atlas.x_asymmetric; + super::super::serialize_field_header(writer, 51_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; } - 25 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - payload - }); - } - _z_required.get_or_insert(payload); + } + } + + { + let payload = &self.y_asymmetric; + let payload_atlas = &atlas.y_asymmetric; + super::super::serialize_field_header(writer, 52_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; } - 26 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - payload - }); - } - _aa_required.get_or_insert(payload); + } + } + + { + let payload = &self.z_asymmetric; + let payload_atlas = &atlas.z_asymmetric; + super::super::serialize_field_header(writer, 53_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; } - 28 => { - let payload = (); - _a_asymmetric.get_or_insert(payload); + } + } + + { + let payload = &self.aa_asymmetric; + let payload_atlas = &atlas.aa_asymmetric; + super::super::serialize_field_header(writer, 54_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; } - 29 => { - let payload = if payload_size == 0_usize { - 0.0_f64 - } else { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - f64::from_le_bytes(buffer) - }; - _b_asymmetric.get_or_insert(payload); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.a_optional, &atlas.a_optional) { + super::super::serialize_field_header(writer, 56_u64, *payload_atlas, false)?; + } + + if let (Some(payload), Some(payload_atlas)) = (&self.b_optional, &atlas.b_optional) { + super::super::serialize_field_header(writer, 57_u64, *payload_atlas, false)?; + if payload.to_bits() != 0_u64 { + writer.write_all(&payload.to_le_bytes())?; + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.c_optional, &atlas.c_optional) { + super::super::serialize_field_header(writer, 58_u64, *payload_atlas, true)?; + { + let varint = *payload; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 30 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - _c_asymmetric.get_or_insert(payload); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.d_optional, &atlas.d_optional) { + super::super::serialize_field_header(writer, 59_u64, *payload_atlas, true)?; + { + let varint = super::super::zigzag_encode(*payload); + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 31 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = super::super::zigzag_decode(payload); - _d_asymmetric.get_or_insert(payload); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.e_optional, &atlas.e_optional) { + super::super::serialize_field_header(writer, 60_u64, *payload_atlas, true)?; + { + let varint = *payload as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 32 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = payload != 0_u64; - _e_asymmetric.get_or_insert(payload); - } - 33 => { - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - _f_asymmetric.get_or_insert(payload); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.f_optional, &atlas.f_optional) { + super::super::serialize_field_header(writer, 61_u64, *payload_atlas, false)?; + writer.write_all(payload)?; + } + + if let (Some(payload), Some(payload_atlas)) = (&self.g_optional, &atlas.g_optional) { + super::super::serialize_field_header(writer, 62_u64, *payload_atlas, false)?; + writer.write_all(payload.as_bytes())?; + } + + if let (Some(payload), Some(payload_atlas)) = (&self.h_optional, &atlas.h_optional) { + super::super::serialize_field_header(writer, 63_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + + if let (Some(payload), Some(payload_atlas)) = (&self.i_optional, &atlas.i_optional) { + super::super::serialize_field_header(writer, 64_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + + if let (Some(payload), Some(payload_atlas)) = (&self.j_optional, &atlas.j_optional) { + super::super::serialize_field_header(writer, 65_u64, *payload_atlas, false)?; + { + let varint = payload.len() as u64 as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, } - 34 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _g_asymmetric.get_or_insert(payload); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.k_optional, &atlas.k_optional) { + super::super::serialize_field_header(writer, 66_u64, *payload_atlas, false)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.l_optional, &atlas.l_optional) { + super::super::serialize_field_header(writer, 67_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; } - 35 => { - let payload = ::deserialize(&mut sub_reader)?; - _h_asymmetric.get_or_insert(payload); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.m_optional, &atlas.m_optional) { + super::super::serialize_field_header(writer, 68_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; } - 36 => { - let payload = ::deserialize(&mut sub_reader)?; - _i_asymmetric.get_or_insert(payload); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.n_optional, &atlas.n_optional) { + super::super::serialize_field_header(writer, 69_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; } - 37 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = vec![(); payload as usize]; - _j_asymmetric.get_or_insert(payload); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.o_optional, &atlas.o_optional) { + super::super::serialize_field_header(writer, 70_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.p_optional, &atlas.p_optional) { + super::super::serialize_field_header(writer, 71_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.q_optional, &atlas.q_optional) { + super::super::serialize_field_header(writer, 72_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.r_optional, &atlas.r_optional) { + super::super::serialize_field_header(writer, 73_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.s_optional, &atlas.s_optional) { + super::super::serialize_field_header(writer, 74_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + { + let varint = payload.len() as u64 as u64; + super::super::serialize_varint(varint, writer)?; } - 38 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - let payload = f64::from_le_bytes(buffer); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - _k_asymmetric.get_or_insert(payload); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.t_optional, &atlas.t_optional) { + super::super::serialize_field_header(writer, 75_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; } - 39 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.u_optional, &atlas.u_optional) { + super::super::serialize_field_header(writer, 76_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; } - _l_asymmetric.get_or_insert(payload); } - 40 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = super::super::zigzag_decode(payload); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.v_optional, &atlas.v_optional) { + super::super::serialize_field_header(writer, 77_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; } - _m_asymmetric.get_or_insert(payload); } - 41 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = payload != 0_u64; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.w_optional, &atlas.w_optional) { + super::super::serialize_field_header(writer, 78_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; } - _n_asymmetric.get_or_insert(payload); } - 42 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.x_optional, &atlas.x_optional) { + super::super::serialize_field_header(writer, 79_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.y_optional, &atlas.y_optional) { + super::super::serialize_field_header(writer, 80_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.z_optional, &atlas.z_optional) { + super::super::serialize_field_header(writer, 81_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + } + + if let (Some(payload), Some(payload_atlas)) = (&self.aa_optional, &atlas.aa_optional) { + super::super::serialize_field_header(writer, 82_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + } + + Ok(()) + } + } + + impl FooIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + let mut _a_required: Option<()> = None; + let mut _b_required: Option = None; + let mut _c_required: Option = None; + let mut _d_required: Option = None; + let mut _e_required: Option = None; + let mut _f_required: Option> = None; + let mut _g_required: Option = None; + let mut _h_required: Option = None; + let mut _i_required: Option = None; + let mut _j_required: Option> = None; + let mut _k_required: Option> = None; + let mut _l_required: Option> = None; + let mut _m_required: Option> = None; + let mut _n_required: Option> = None; + let mut _o_required: Option>> = None; + let mut _p_required: Option> = None; + let mut _q_required: Option> = None; + let mut _r_required: Option> = None; + let mut _s_required: Option>> = None; + let mut _t_required: Option>> = None; + let mut _u_required: Option>> = None; + let mut _v_required: Option>> = None; + let mut _w_required: Option>> = None; + let mut _x_required: Option>>> = None; + let mut _y_required: Option>> = None; + let mut _z_required: Option>> = None; + let mut _aa_required: Option>> = None; + let mut _a_asymmetric: Option<()> = None; + let mut _b_asymmetric: Option = None; + let mut _c_asymmetric: Option = None; + let mut _d_asymmetric: Option = None; + let mut _e_asymmetric: Option = None; + let mut _f_asymmetric: Option> = None; + let mut _g_asymmetric: Option = None; + let mut _h_asymmetric: Option = None; + let mut _i_asymmetric: Option = None; + let mut _j_asymmetric: Option> = None; + let mut _k_asymmetric: Option> = None; + let mut _l_asymmetric: Option> = None; + let mut _m_asymmetric: Option> = None; + let mut _n_asymmetric: Option> = None; + let mut _o_asymmetric: Option>> = None; + let mut _p_asymmetric: Option> = None; + let mut _q_asymmetric: Option> = None; + let mut _r_asymmetric: Option> = None; + let mut _s_asymmetric: Option>> = None; + let mut _t_asymmetric: Option>> = None; + let mut _u_asymmetric: Option>> = None; + let mut _v_asymmetric: Option>> = None; + let mut _w_asymmetric: Option>> = None; + let mut _x_asymmetric: Option>>> = None; + let mut _y_asymmetric: Option>> = None; + let mut _z_asymmetric: Option>> = None; + let mut _aa_asymmetric: Option>> = None; + let mut _a_optional: Option<()> = None; + let mut _b_optional: Option = None; + let mut _c_optional: Option = None; + let mut _d_optional: Option = None; + let mut _e_optional: Option = None; + let mut _f_optional: Option> = None; + let mut _g_optional: Option = None; + let mut _h_optional: Option = None; + let mut _i_optional: Option = None; + let mut _j_optional: Option> = None; + let mut _k_optional: Option> = None; + let mut _l_optional: Option> = None; + let mut _m_optional: Option> = None; + let mut _n_optional: Option> = None; + let mut _o_optional: Option>> = None; + let mut _p_optional: Option> = None; + let mut _q_optional: Option> = None; + let mut _r_optional: Option> = None; + let mut _s_optional: Option>> = None; + let mut _t_optional: Option>> = None; + let mut _u_optional: Option>> = None; + let mut _v_optional: Option>> = None; + let mut _w_optional: Option>> = None; + let mut _x_optional: Option>>> = None; + let mut _y_optional: Option>> = None; + let mut _z_optional: Option>> = None; + let mut _aa_optional: Option>> = None; + + loop { + let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { + Ok(header) => header, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + + return Err(err); + } + }; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + 0 => { + let payload = (); + _a_required.get_or_insert(payload); + } + 1 => { + let payload = if payload_size == 0_usize { + 0.0_f64 + } else { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + f64::from_le_bytes(buffer) + }; + _b_required.get_or_insert(payload); + } + 2 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + _c_required.get_or_insert(payload); + } + 3 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = super::super::zigzag_decode(payload); + _d_required.get_or_insert(payload); + } + 4 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = payload != 0_u64; + _e_required.get_or_insert(payload); + } + 5 => { + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + _f_required.get_or_insert(payload); + } + 6 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _g_required.get_or_insert(payload); + } + 7 => { + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + _h_required.get_or_insert(payload); + } + 8 => { + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + _i_required.get_or_insert(payload); + } + 9 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = vec![(); payload as usize]; + _j_required.get_or_insert(payload); + } + 10 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + let payload = f64::from_le_bytes(buffer); + Ok(payload) + } + let mut payload = Vec::new(); + payload.reserve_exact(payload_size); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; } return Err(err); } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - payload }); } - _o_asymmetric.get_or_insert(payload); + _k_required.get_or_insert(payload); } - 43 => { + 11 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + Ok(payload) + } let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; } return Err(err); } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - payload }); } - _p_asymmetric.get_or_insert(payload); + _l_required.get_or_insert(payload); } - 44 => { + 12 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = super::super::zigzag_decode(payload); + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + _m_required.get_or_insert(payload); + } + 13 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = payload != 0_u64; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + _n_required.get_or_insert(payload); + } + 14 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -1811,19 +2409,21 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; payload }); } - _q_asymmetric.get_or_insert(payload); + _o_required.get_or_insert(payload); } - 45 => { + 15 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -1831,19 +2431,61 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; payload }); } - _r_asymmetric.get_or_insert(payload); + _p_required.get_or_insert(payload); } - 46 => { + 16 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + _q_required.get_or_insert(payload); + } + 17 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + _r_required.get_or_insert(payload); + } + 18 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -1851,20 +2493,20 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let payload = super::super::deserialize_varint(&mut sub_reader)?; let payload = vec![(); payload as usize]; payload }); } - _s_asymmetric.get_or_insert(payload); + _s_required.get_or_insert(payload); } - 47 => { + 19 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -1872,7 +2514,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let mut buffer = [0; 8]; @@ -1881,6 +2523,7 @@ pub mod comprehensive { Ok(payload) } let mut payload = Vec::new(); + payload.reserve_exact(payload_size); loop { payload.push(match deserialize_element(&mut sub_reader) { Ok(element) => element, @@ -1895,13 +2538,13 @@ pub mod comprehensive { payload }); } - _t_asymmetric.get_or_insert(payload); + _t_required.get_or_insert(payload); } - 48 => { + 20 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -1909,7 +2552,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; @@ -1930,13 +2573,13 @@ pub mod comprehensive { payload }); } - _u_asymmetric.get_or_insert(payload); + _u_required.get_or_insert(payload); } - 49 => { + 21 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -1944,7 +2587,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; @@ -1966,13 +2609,13 @@ pub mod comprehensive { payload }); } - _v_asymmetric.get_or_insert(payload); + _v_required.get_or_insert(payload); } - 50 => { + 22 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -1980,7 +2623,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; @@ -2002,13 +2645,13 @@ pub mod comprehensive { payload }); } - _w_asymmetric.get_or_insert(payload); + _w_required.get_or_insert(payload); } - 51 => { + 23 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2016,12 +2659,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2029,9 +2672,10 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = vec![]; + payload.reserve_exact(payload_size); ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; payload }); @@ -2039,13 +2683,13 @@ pub mod comprehensive { payload }); } - _x_asymmetric.get_or_insert(payload); + _x_required.get_or_insert(payload); } - 52 => { + 24 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2053,12 +2697,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2066,27 +2710,24 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; payload }); } payload }); } - _y_asymmetric.get_or_insert(payload); + _y_required.get_or_insert(payload); } - 53 => { + 25 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2094,12 +2735,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2107,22 +2748,22 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } payload }); } - _z_asymmetric.get_or_insert(payload); + _z_required.get_or_insert(payload); } - 54 => { + 26 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2130,12 +2771,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2143,22 +2784,22 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } payload }); } - _aa_asymmetric.get_or_insert(payload); + _aa_required.get_or_insert(payload); } - 56 => { + 28 => { let payload = (); - _a_optional.get_or_insert(payload); + _a_asymmetric.get_or_insert(payload); } - 57 => { + 29 => { let payload = if payload_size == 0_usize { 0.0_f64 } else { @@ -2166,9 +2807,9 @@ pub mod comprehensive { ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; f64::from_le_bytes(buffer) }; - _b_optional.get_or_insert(payload); + _b_asymmetric.get_or_insert(payload); } - 58 => { + 30 => { let payload = match payload_size { 0_usize => 0_u64, 8_usize => { @@ -2178,9 +2819,9 @@ pub mod comprehensive { } _ => super::super::deserialize_varint(&mut sub_reader)?, }; - _c_optional.get_or_insert(payload); + _c_asymmetric.get_or_insert(payload); } - 59 => { + 31 => { let payload = match payload_size { 0_usize => 0_u64, 8_usize => { @@ -2191,9 +2832,9 @@ pub mod comprehensive { _ => super::super::deserialize_varint(&mut sub_reader)?, }; let payload = super::super::zigzag_decode(payload); - _d_optional.get_or_insert(payload); + _d_asymmetric.get_or_insert(payload); } - 60 => { + 32 => { let payload = match payload_size { 0_usize => 0_u64, 8_usize => { @@ -2204,31 +2845,29 @@ pub mod comprehensive { _ => super::super::deserialize_varint(&mut sub_reader)?, }; let payload = payload != 0_u64; - _e_optional.get_or_insert(payload); + _e_asymmetric.get_or_insert(payload); } - 61 => { + 33 => { let mut payload = vec![]; + payload.reserve_exact(payload_size); ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - _f_optional.get_or_insert(payload); + _f_asymmetric.get_or_insert(payload); } - 62 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _g_optional.get_or_insert(payload); + 34 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _g_asymmetric.get_or_insert(payload); } - 63 => { - let payload = ::deserialize(&mut sub_reader)?; - _h_optional.get_or_insert(payload); + 35 => { + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + _h_asymmetric.get_or_insert(payload); } - 64 => { - let payload = ::deserialize(&mut sub_reader)?; - _i_optional.get_or_insert(payload); + 36 => { + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + _i_asymmetric.get_or_insert(payload); } - 65 => { + 37 => { let payload = match payload_size { 0_usize => 0_u64, 8_usize => { @@ -2239,9 +2878,9 @@ pub mod comprehensive { _ => super::super::deserialize_varint(&mut sub_reader)?, }; let payload = vec![(); payload as usize]; - _j_optional.get_or_insert(payload); + _j_asymmetric.get_or_insert(payload); } - 66 => { + 38 => { fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let mut buffer = [0; 8]; ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; @@ -2249,6 +2888,7 @@ pub mod comprehensive { Ok(payload) } let mut payload = Vec::new(); + payload.reserve_exact(payload_size); loop { payload.push(match deserialize_element(&mut sub_reader) { Ok(element) => element, @@ -2260,9 +2900,9 @@ pub mod comprehensive { } }); } - _k_optional.get_or_insert(payload); + _k_asymmetric.get_or_insert(payload); } - 67 => { + 39 => { fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; Ok(payload) @@ -2279,9 +2919,9 @@ pub mod comprehensive { } }); } - _l_optional.get_or_insert(payload); + _l_asymmetric.get_or_insert(payload); } - 68 => { + 40 => { fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; let payload = super::super::zigzag_decode(payload); @@ -2299,9 +2939,9 @@ pub mod comprehensive { } }); } - _m_optional.get_or_insert(payload); + _m_asymmetric.get_or_insert(payload); } - 69 => { + 41 => { fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; let payload = payload != 0_u64; @@ -2319,13 +2959,13 @@ pub mod comprehensive { } }); } - _n_optional.get_or_insert(payload); + _n_asymmetric.get_or_insert(payload); } - 70 => { + 42 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2333,20 +2973,21 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = vec![]; + payload.reserve_exact(payload_size); ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; payload }); } - _o_optional.get_or_insert(payload); + _o_asymmetric.get_or_insert(payload); } - 71 => { + 43 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2354,24 +2995,21 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; payload }); } - _p_optional.get_or_insert(payload); + _p_asymmetric.get_or_insert(payload); } - 72 => { + 44 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2379,19 +3017,19 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } - _q_optional.get_or_insert(payload); + _q_asymmetric.get_or_insert(payload); } - 73 => { + 45 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2399,19 +3037,19 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } - _r_optional.get_or_insert(payload); + _r_asymmetric.get_or_insert(payload); } - 74 => { + 46 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2419,20 +3057,20 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let payload = super::super::deserialize_varint(&mut sub_reader)?; let payload = vec![(); payload as usize]; payload }); } - _s_optional.get_or_insert(payload); + _s_asymmetric.get_or_insert(payload); } - 75 => { + 47 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2440,7 +3078,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let mut buffer = [0; 8]; @@ -2449,6 +3087,7 @@ pub mod comprehensive { Ok(payload) } let mut payload = Vec::new(); + payload.reserve_exact(payload_size); loop { payload.push(match deserialize_element(&mut sub_reader) { Ok(element) => element, @@ -2463,13 +3102,13 @@ pub mod comprehensive { payload }); } - _t_optional.get_or_insert(payload); + _t_asymmetric.get_or_insert(payload); } - 76 => { + 48 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2477,7 +3116,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; @@ -2498,13 +3137,13 @@ pub mod comprehensive { payload }); } - _u_optional.get_or_insert(payload); + _u_asymmetric.get_or_insert(payload); } - 77 => { + 49 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2512,7 +3151,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; @@ -2534,13 +3173,13 @@ pub mod comprehensive { payload }); } - _v_optional.get_or_insert(payload); + _v_asymmetric.get_or_insert(payload); } - 78 => { + 50 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2548,7 +3187,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; @@ -2570,13 +3209,13 @@ pub mod comprehensive { payload }); } - _w_optional.get_or_insert(payload); + _w_asymmetric.get_or_insert(payload); } - 79 => { + 51 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2584,12 +3223,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2597,9 +3236,10 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = vec![]; + payload.reserve_exact(payload_size); ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; payload }); @@ -2607,13 +3247,13 @@ pub mod comprehensive { payload }); } - _x_optional.get_or_insert(payload); + _x_asymmetric.get_or_insert(payload); } - 80 => { + 52 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2621,12 +3261,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2634,27 +3274,24 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; payload }); } payload }); } - _y_optional.get_or_insert(payload); + _y_asymmetric.get_or_insert(payload); } - 81 => { + 53 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2662,12 +3299,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2675,22 +3312,22 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } payload }); } - _z_optional.get_or_insert(payload); + _z_asymmetric.get_or_insert(payload); } - 82 => { + 54 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2698,12 +3335,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -2711,2832 +3348,20 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } payload }); } - _aa_optional.get_or_insert(payload); + _aa_asymmetric.get_or_insert(payload); } - _ => { - super::super::skip(&mut sub_reader, payload_size as usize)?; - } - } - } - - if _a_required.is_none() - || _b_required.is_none() - || _c_required.is_none() - || _d_required.is_none() - || _e_required.is_none() - || _f_required.is_none() - || _g_required.is_none() - || _h_required.is_none() - || _i_required.is_none() - || _j_required.is_none() - || _k_required.is_none() - || _l_required.is_none() - || _m_required.is_none() - || _n_required.is_none() - || _o_required.is_none() - || _p_required.is_none() - || _q_required.is_none() - || _r_required.is_none() - || _s_required.is_none() - || _t_required.is_none() - || _u_required.is_none() - || _v_required.is_none() - || _w_required.is_none() - || _x_required.is_none() - || _y_required.is_none() - || _z_required.is_none() - || _aa_required.is_none() { - return Err(::std::io::Error::new( - ::std::io::ErrorKind::InvalidData, - super::super::MISSING_FIELDS_ERROR_MESSAGE, - )); - } - - Ok(FooIn { - a_required: _a_required.unwrap(), - b_required: _b_required.unwrap(), - c_required: _c_required.unwrap(), - d_required: _d_required.unwrap(), - e_required: _e_required.unwrap(), - f_required: _f_required.unwrap(), - g_required: _g_required.unwrap(), - h_required: _h_required.unwrap(), - i_required: _i_required.unwrap(), - j_required: _j_required.unwrap(), - k_required: _k_required.unwrap(), - l_required: _l_required.unwrap(), - m_required: _m_required.unwrap(), - n_required: _n_required.unwrap(), - o_required: _o_required.unwrap(), - p_required: _p_required.unwrap(), - q_required: _q_required.unwrap(), - r_required: _r_required.unwrap(), - s_required: _s_required.unwrap(), - t_required: _t_required.unwrap(), - u_required: _u_required.unwrap(), - v_required: _v_required.unwrap(), - w_required: _w_required.unwrap(), - x_required: _x_required.unwrap(), - y_required: _y_required.unwrap(), - z_required: _z_required.unwrap(), - aa_required: _aa_required.unwrap(), - a_asymmetric: _a_asymmetric, - b_asymmetric: _b_asymmetric, - c_asymmetric: _c_asymmetric, - d_asymmetric: _d_asymmetric, - e_asymmetric: _e_asymmetric, - f_asymmetric: _f_asymmetric, - g_asymmetric: _g_asymmetric, - h_asymmetric: _h_asymmetric, - i_asymmetric: _i_asymmetric, - j_asymmetric: _j_asymmetric, - k_asymmetric: _k_asymmetric, - l_asymmetric: _l_asymmetric, - m_asymmetric: _m_asymmetric, - n_asymmetric: _n_asymmetric, - o_asymmetric: _o_asymmetric, - p_asymmetric: _p_asymmetric, - q_asymmetric: _q_asymmetric, - r_asymmetric: _r_asymmetric, - s_asymmetric: _s_asymmetric, - t_asymmetric: _t_asymmetric, - u_asymmetric: _u_asymmetric, - v_asymmetric: _v_asymmetric, - w_asymmetric: _w_asymmetric, - x_asymmetric: _x_asymmetric, - y_asymmetric: _y_asymmetric, - z_asymmetric: _z_asymmetric, - aa_asymmetric: _aa_asymmetric, - a_optional: _a_optional, - b_optional: _b_optional, - c_optional: _c_optional, - d_optional: _d_optional, - e_optional: _e_optional, - f_optional: _f_optional, - g_optional: _g_optional, - h_optional: _h_optional, - i_optional: _i_optional, - j_optional: _j_optional, - k_optional: _k_optional, - l_optional: _l_optional, - m_optional: _m_optional, - n_optional: _n_optional, - o_optional: _o_optional, - p_optional: _p_optional, - q_optional: _q_optional, - r_optional: _r_optional, - s_optional: _s_optional, - t_optional: _t_optional, - u_optional: _u_optional, - v_optional: _v_optional, - w_optional: _w_optional, - x_optional: _x_optional, - y_optional: _y_optional, - z_optional: _z_optional, - aa_optional: _aa_optional, - }) - } - } - - impl From for FooIn { - fn from(message: FooOut) -> Self { - FooIn { - a_required: message.a_required.into(), - b_required: message.b_required.into(), - c_required: message.c_required.into(), - d_required: message.d_required.into(), - e_required: message.e_required.into(), - f_required: message.f_required.into(), - g_required: message.g_required.into(), - h_required: message.h_required.into(), - i_required: message.i_required.into(), - j_required: message.j_required.into(), - k_required: message.k_required.into(), - l_required: message.l_required.into(), - m_required: message.m_required.into(), - n_required: message.n_required.into(), - o_required: message.o_required.into(), - p_required: message.p_required.into(), - q_required: message.q_required.into_iter().map(|x| x.into()).collect::>(), - r_required: message.r_required.into_iter().map(|x| x.into()).collect::>(), - s_required: message.s_required.into(), - t_required: message.t_required.into(), - u_required: message.u_required.into(), - v_required: message.v_required.into(), - w_required: message.w_required.into(), - x_required: message.x_required.into(), - y_required: message.y_required.into(), - z_required: message.z_required.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>(), - aa_required: message.aa_required.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>(), - a_asymmetric: Some(message.a_asymmetric.into()), - b_asymmetric: Some(message.b_asymmetric.into()), - c_asymmetric: Some(message.c_asymmetric.into()), - d_asymmetric: Some(message.d_asymmetric.into()), - e_asymmetric: Some(message.e_asymmetric.into()), - f_asymmetric: Some(message.f_asymmetric.into()), - g_asymmetric: Some(message.g_asymmetric.into()), - h_asymmetric: Some(message.h_asymmetric.into()), - i_asymmetric: Some(message.i_asymmetric.into()), - j_asymmetric: Some(message.j_asymmetric.into()), - k_asymmetric: Some(message.k_asymmetric.into()), - l_asymmetric: Some(message.l_asymmetric.into()), - m_asymmetric: Some(message.m_asymmetric.into()), - n_asymmetric: Some(message.n_asymmetric.into()), - o_asymmetric: Some(message.o_asymmetric.into()), - p_asymmetric: Some(message.p_asymmetric.into()), - q_asymmetric: Some(message.q_asymmetric.into_iter().map(|x| x.into()).collect::>()), - r_asymmetric: Some(message.r_asymmetric.into_iter().map(|x| x.into()).collect::>()), - s_asymmetric: Some(message.s_asymmetric.into()), - t_asymmetric: Some(message.t_asymmetric.into()), - u_asymmetric: Some(message.u_asymmetric.into()), - v_asymmetric: Some(message.v_asymmetric.into()), - w_asymmetric: Some(message.w_asymmetric.into()), - x_asymmetric: Some(message.x_asymmetric.into()), - y_asymmetric: Some(message.y_asymmetric.into()), - z_asymmetric: Some(message.z_asymmetric.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), - aa_asymmetric: Some(message.aa_asymmetric.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), - a_optional: message.a_optional.map(|payload| payload.into()), - b_optional: message.b_optional.map(|payload| payload.into()), - c_optional: message.c_optional.map(|payload| payload.into()), - d_optional: message.d_optional.map(|payload| payload.into()), - e_optional: message.e_optional.map(|payload| payload.into()), - f_optional: message.f_optional.map(|payload| payload.into()), - g_optional: message.g_optional.map(|payload| payload.into()), - h_optional: message.h_optional.map(|payload| payload.into()), - i_optional: message.i_optional.map(|payload| payload.into()), - j_optional: message.j_optional.map(|payload| payload.into()), - k_optional: message.k_optional.map(|payload| payload.into()), - l_optional: message.l_optional.map(|payload| payload.into()), - m_optional: message.m_optional.map(|payload| payload.into()), - n_optional: message.n_optional.map(|payload| payload.into()), - o_optional: message.o_optional.map(|payload| payload.into()), - p_optional: message.p_optional.map(|payload| payload.into()), - q_optional: message.q_optional.map(|payload| payload.into_iter().map(|x| x.into()).collect::>()), - r_optional: message.r_optional.map(|payload| payload.into_iter().map(|x| x.into()).collect::>()), - s_optional: message.s_optional.map(|payload| payload.into()), - t_optional: message.t_optional.map(|payload| payload.into()), - u_optional: message.u_optional.map(|payload| payload.into()), - v_optional: message.v_optional.map(|payload| payload.into()), - w_optional: message.w_optional.map(|payload| payload.into()), - x_optional: message.x_optional.map(|payload| payload.into()), - y_optional: message.y_optional.map(|payload| payload.into()), - z_optional: message.z_optional.map(|payload| payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), - aa_optional: message.aa_optional.map(|payload| payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), - } - } - } - - impl FooOut { - pub fn atlas(&self) -> FooAtlas { - let _a_required = { let payload = &self.a_required; (0_usize) }; - let _b_required = { let payload = &self.b_required; (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize }) }; - let _c_required = { let payload = &self.c_required; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }; - let _d_required = { let payload = &self.d_required; ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }) }; - let _e_required = { let payload = &self.e_required; (if *payload { 1_usize } else { 0_usize }) }; - let _f_required = { let payload = &self.f_required; (payload.len()) }; - let _g_required = { let payload = &self.g_required; (payload.len()) }; - let _h_required = { let payload = &self.h_required; (payload.atlas()) }; - let _i_required = { let payload = &self.i_required; (payload.atlas()) }; - let _j_required = { let payload = &self.j_required; ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }) }; - let _k_required = { let payload = &self.k_required; (8_usize * payload.len()) }; - let _l_required = { let payload = &self.l_required; (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload)))) }; - let _m_required = { let payload = &self.m_required; (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))) }; - let _n_required = { let payload = &self.n_required; (payload.iter().fold(0_usize, |x, payload| x + (1_usize))) }; - let _o_required = { let payload = &self.o_required; ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _p_required = { let payload = &self.p_required; ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _q_required = { let payload = &self.q_required; ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _r_required = { let payload = &self.r_required; ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _s_required = { let payload = &self.s_required; ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _t_required = { let payload = &self.t_required; ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _u_required = { let payload = &self.u_required; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _v_required = { let payload = &self.v_required; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _w_required = { let payload = &self.w_required; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _x_required = { let payload = &self.x_required; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _y_required = { let payload = &self.y_required; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _z_required = { let payload = &self.z_required; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _aa_required = { let payload = &self.aa_required; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _a_asymmetric = { let payload = &self.a_asymmetric; (0_usize) }; - let _b_asymmetric = { let payload = &self.b_asymmetric; (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize }) }; - let _c_asymmetric = { let payload = &self.c_asymmetric; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }; - let _d_asymmetric = { let payload = &self.d_asymmetric; ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }) }; - let _e_asymmetric = { let payload = &self.e_asymmetric; (if *payload { 1_usize } else { 0_usize }) }; - let _f_asymmetric = { let payload = &self.f_asymmetric; (payload.len()) }; - let _g_asymmetric = { let payload = &self.g_asymmetric; (payload.len()) }; - let _h_asymmetric = { let payload = &self.h_asymmetric; (payload.atlas()) }; - let _i_asymmetric = { let payload = &self.i_asymmetric; (payload.atlas()) }; - let _j_asymmetric = { let payload = &self.j_asymmetric; ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }) }; - let _k_asymmetric = { let payload = &self.k_asymmetric; (8_usize * payload.len()) }; - let _l_asymmetric = { let payload = &self.l_asymmetric; (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload)))) }; - let _m_asymmetric = { let payload = &self.m_asymmetric; (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))) }; - let _n_asymmetric = { let payload = &self.n_asymmetric; (payload.iter().fold(0_usize, |x, payload| x + (1_usize))) }; - let _o_asymmetric = { let payload = &self.o_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _p_asymmetric = { let payload = &self.p_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _q_asymmetric = { let payload = &self.q_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _r_asymmetric = { let payload = &self.r_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _s_asymmetric = { let payload = &self.s_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _t_asymmetric = { let payload = &self.t_asymmetric; ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _u_asymmetric = { let payload = &self.u_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _v_asymmetric = { let payload = &self.v_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _w_asymmetric = { let payload = &self.w_asymmetric; ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _x_asymmetric = { let payload = &self.x_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _y_asymmetric = { let payload = &self.y_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _z_asymmetric = { let payload = &self.z_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _aa_asymmetric = { let payload = &self.aa_asymmetric; ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }) }; - let _a_optional = self.a_optional.as_ref().map(|payload| (0_usize)); - let _b_optional = self.b_optional.as_ref().map(|payload| (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize })); - let _c_optional = self.c_optional.as_ref().map(|payload| (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } })); - let _d_optional = self.d_optional.as_ref().map(|payload| ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) })); - let _e_optional = self.e_optional.as_ref().map(|payload| (if *payload { 1_usize } else { 0_usize })); - let _f_optional = self.f_optional.as_ref().map(|payload| (payload.len())); - let _g_optional = self.g_optional.as_ref().map(|payload| (payload.len())); - let _h_optional = self.h_optional.as_ref().map(|payload| (payload.atlas())); - let _i_optional = self.i_optional.as_ref().map(|payload| (payload.atlas())); - let _j_optional = self.j_optional.as_ref().map(|payload| ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) })); - let _k_optional = self.k_optional.as_ref().map(|payload| (8_usize * payload.len())); - let _l_optional = self.l_optional.as_ref().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))); - let _m_optional = self.m_optional.as_ref().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))); - let _n_optional = self.n_optional.as_ref().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))); - let _o_optional = self.o_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _p_optional = self.p_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _q_optional = self.q_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _r_optional = self.r_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _s_optional = self.s_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _t_optional = self.t_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _u_optional = self.u_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _v_optional = self.v_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _w_optional = self.w_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _x_optional = self.x_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _y_optional = self.y_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _z_optional = self.z_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - let _aa_optional = self.aa_optional.as_ref().map(|payload| ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })); - - FooAtlas { - _size: - { let payload_atlas = &_a_required; let payload_size = *payload_atlas; super::super::field_header_size(0_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_b_required; let payload_size = *payload_atlas; super::super::field_header_size(1_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_c_required; let payload_size = *payload_atlas; super::super::field_header_size(2_u64, payload_size, true) + payload_size } - + { let payload_atlas = &_d_required; let payload_size = *payload_atlas; super::super::field_header_size(3_u64, payload_size, true) + payload_size } - + { let payload_atlas = &_e_required; let payload_size = *payload_atlas; super::super::field_header_size(4_u64, payload_size, true) + payload_size } - + { let payload_atlas = &_f_required; let payload_size = *payload_atlas; super::super::field_header_size(5_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_g_required; let payload_size = *payload_atlas; super::super::field_header_size(6_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_h_required; let payload_size = payload_atlas.size(); super::super::field_header_size(7_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_i_required; let payload_size = payload_atlas.size(); super::super::field_header_size(8_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_j_required; let payload_size = *payload_atlas; super::super::field_header_size(9_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_k_required; let payload_size = *payload_atlas; super::super::field_header_size(10_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_l_required; let payload_size = *payload_atlas; super::super::field_header_size(11_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_m_required; let payload_size = *payload_atlas; super::super::field_header_size(12_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_n_required; let payload_size = *payload_atlas; super::super::field_header_size(13_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_o_required; let payload_size = payload_atlas.0; super::super::field_header_size(14_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_p_required; let payload_size = payload_atlas.0; super::super::field_header_size(15_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_q_required; let payload_size = payload_atlas.0; super::super::field_header_size(16_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_r_required; let payload_size = payload_atlas.0; super::super::field_header_size(17_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_s_required; let payload_size = payload_atlas.0; super::super::field_header_size(18_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_t_required; let payload_size = payload_atlas.0; super::super::field_header_size(19_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_u_required; let payload_size = payload_atlas.0; super::super::field_header_size(20_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_v_required; let payload_size = payload_atlas.0; super::super::field_header_size(21_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_w_required; let payload_size = payload_atlas.0; super::super::field_header_size(22_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_x_required; let payload_size = payload_atlas.0; super::super::field_header_size(23_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_y_required; let payload_size = payload_atlas.0; super::super::field_header_size(24_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_z_required; let payload_size = payload_atlas.0; super::super::field_header_size(25_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_aa_required; let payload_size = payload_atlas.0; super::super::field_header_size(26_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_a_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(28_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_b_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(29_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_c_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(30_u64, payload_size, true) + payload_size } - + { let payload_atlas = &_d_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(31_u64, payload_size, true) + payload_size } - + { let payload_atlas = &_e_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(32_u64, payload_size, true) + payload_size } - + { let payload_atlas = &_f_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(33_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_g_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(34_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_h_asymmetric; let payload_size = payload_atlas.size(); super::super::field_header_size(35_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_i_asymmetric; let payload_size = payload_atlas.size(); super::super::field_header_size(36_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_j_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(37_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_k_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(38_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_l_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(39_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_m_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(40_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_n_asymmetric; let payload_size = *payload_atlas; super::super::field_header_size(41_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_o_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(42_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_p_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(43_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_q_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(44_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_r_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(45_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_s_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(46_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_t_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(47_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_u_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(48_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_v_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(49_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_w_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(50_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_x_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(51_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_y_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(52_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_z_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(53_u64, payload_size, false) + payload_size } - + { let payload_atlas = &_aa_asymmetric; let payload_size = payload_atlas.0; super::super::field_header_size(54_u64, payload_size, false) + payload_size } - + _a_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(56_u64, payload_size, false) + payload_size }) - + _b_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(57_u64, payload_size, false) + payload_size }) - + _c_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(58_u64, payload_size, true) + payload_size }) - + _d_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(59_u64, payload_size, true) + payload_size }) - + _e_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(60_u64, payload_size, true) + payload_size }) - + _f_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(61_u64, payload_size, false) + payload_size }) - + _g_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(62_u64, payload_size, false) + payload_size }) - + _h_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.size(); super::super::field_header_size(63_u64, payload_size, false) + payload_size }) - + _i_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.size(); super::super::field_header_size(64_u64, payload_size, false) + payload_size }) - + _j_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(65_u64, payload_size, false) + payload_size }) - + _k_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(66_u64, payload_size, false) + payload_size }) - + _l_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(67_u64, payload_size, false) + payload_size }) - + _m_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(68_u64, payload_size, false) + payload_size }) - + _n_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = *payload_atlas; super::super::field_header_size(69_u64, payload_size, false) + payload_size }) - + _o_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(70_u64, payload_size, false) + payload_size }) - + _p_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(71_u64, payload_size, false) + payload_size }) - + _q_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(72_u64, payload_size, false) + payload_size }) - + _r_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(73_u64, payload_size, false) + payload_size }) - + _s_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(74_u64, payload_size, false) + payload_size }) - + _t_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(75_u64, payload_size, false) + payload_size }) - + _u_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(76_u64, payload_size, false) + payload_size }) - + _v_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(77_u64, payload_size, false) + payload_size }) - + _w_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(78_u64, payload_size, false) + payload_size }) - + _x_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(79_u64, payload_size, false) + payload_size }) - + _y_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(80_u64, payload_size, false) + payload_size }) - + _z_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(81_u64, payload_size, false) + payload_size }) - + _aa_optional.as_ref().map_or(0_usize, |payload_atlas| { let payload_size = payload_atlas.0; super::super::field_header_size(82_u64, payload_size, false) + payload_size }), - a_required: _a_required, - b_required: _b_required, - c_required: _c_required, - d_required: _d_required, - e_required: _e_required, - f_required: _f_required, - g_required: _g_required, - h_required: _h_required, - i_required: _i_required, - j_required: _j_required, - k_required: _k_required, - l_required: _l_required, - m_required: _m_required, - n_required: _n_required, - o_required: _o_required, - p_required: _p_required, - q_required: _q_required, - r_required: _r_required, - s_required: _s_required, - t_required: _t_required, - u_required: _u_required, - v_required: _v_required, - w_required: _w_required, - x_required: _x_required, - y_required: _y_required, - z_required: _z_required, - aa_required: _aa_required, - a_asymmetric: _a_asymmetric, - b_asymmetric: _b_asymmetric, - c_asymmetric: _c_asymmetric, - d_asymmetric: _d_asymmetric, - e_asymmetric: _e_asymmetric, - f_asymmetric: _f_asymmetric, - g_asymmetric: _g_asymmetric, - h_asymmetric: _h_asymmetric, - i_asymmetric: _i_asymmetric, - j_asymmetric: _j_asymmetric, - k_asymmetric: _k_asymmetric, - l_asymmetric: _l_asymmetric, - m_asymmetric: _m_asymmetric, - n_asymmetric: _n_asymmetric, - o_asymmetric: _o_asymmetric, - p_asymmetric: _p_asymmetric, - q_asymmetric: _q_asymmetric, - r_asymmetric: _r_asymmetric, - s_asymmetric: _s_asymmetric, - t_asymmetric: _t_asymmetric, - u_asymmetric: _u_asymmetric, - v_asymmetric: _v_asymmetric, - w_asymmetric: _w_asymmetric, - x_asymmetric: _x_asymmetric, - y_asymmetric: _y_asymmetric, - z_asymmetric: _z_asymmetric, - aa_asymmetric: _aa_asymmetric, - a_optional: _a_optional, - b_optional: _b_optional, - c_optional: _c_optional, - d_optional: _d_optional, - e_optional: _e_optional, - f_optional: _f_optional, - g_optional: _g_optional, - h_optional: _h_optional, - i_optional: _i_optional, - j_optional: _j_optional, - k_optional: _k_optional, - l_optional: _l_optional, - m_optional: _m_optional, - n_optional: _n_optional, - o_optional: _o_optional, - p_optional: _p_optional, - q_optional: _q_optional, - r_optional: _r_optional, - s_optional: _s_optional, - t_optional: _t_optional, - u_optional: _u_optional, - v_optional: _v_optional, - w_optional: _w_optional, - x_optional: _x_optional, - y_optional: _y_optional, - z_optional: _z_optional, - aa_optional: _aa_optional, - } - } - - pub fn serialize_with_atlas( - &self, - writer: &mut T, - atlas: &FooAtlas, - ) -> ::std::io::Result<()> { - { - let payload = &self.a_required; - let payload_atlas = &atlas.a_required; - super::super::serialize_field_header(writer, 0_u64, *payload_atlas, false)?; - } - - { - let payload = &self.b_required; - let payload_atlas = &atlas.b_required; - super::super::serialize_field_header(writer, 1_u64, *payload_atlas, false)?; - if payload.to_bits() != 0_u64 { - writer.write_all(&payload.to_le_bytes())?; - } - } - - { - let payload = &self.c_required; - let payload_atlas = &atlas.c_required; - super::super::serialize_field_header(writer, 2_u64, *payload_atlas, true)?; - { - let varint = *payload; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - { - let payload = &self.d_required; - let payload_atlas = &atlas.d_required; - super::super::serialize_field_header(writer, 3_u64, *payload_atlas, true)?; - { - let varint = super::super::zigzag_encode(*payload); - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - { - let payload = &self.e_required; - let payload_atlas = &atlas.e_required; - super::super::serialize_field_header(writer, 4_u64, *payload_atlas, true)?; - { - let varint = *payload as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - { - let payload = &self.f_required; - let payload_atlas = &atlas.f_required; - super::super::serialize_field_header(writer, 5_u64, *payload_atlas, false)?; - writer.write_all(payload)?; - } - - { - let payload = &self.g_required; - let payload_atlas = &atlas.g_required; - super::super::serialize_field_header(writer, 6_u64, *payload_atlas, false)?; - writer.write_all(payload.as_bytes())?; - } - - { - let payload = &self.h_required; - let payload_atlas = &atlas.h_required; - super::super::serialize_field_header(writer, 7_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - - { - let payload = &self.i_required; - let payload_atlas = &atlas.i_required; - super::super::serialize_field_header(writer, 8_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - - { - let payload = &self.j_required; - let payload_atlas = &atlas.j_required; - super::super::serialize_field_header(writer, 9_u64, *payload_atlas, false)?; - { - let varint = payload.len() as u64 as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - { - let payload = &self.k_required; - let payload_atlas = &atlas.k_required; - super::super::serialize_field_header(writer, 10_u64, *payload_atlas, false)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; - } - } - - { - let payload = &self.l_required; - let payload_atlas = &atlas.l_required; - super::super::serialize_field_header(writer, 11_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; - } - } - } - - { - let payload = &self.m_required; - let payload_atlas = &atlas.m_required; - super::super::serialize_field_header(writer, 12_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; - } - } - } - - { - let payload = &self.n_required; - let payload_atlas = &atlas.n_required; - super::super::serialize_field_header(writer, 13_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; - } - } - } - - { - let payload = &self.o_required; - let payload_atlas = &atlas.o_required; - super::super::serialize_field_header(writer, 14_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; - } - } - - { - let payload = &self.p_required; - let payload_atlas = &atlas.p_required; - super::super::serialize_field_header(writer, 15_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; - } - } - - { - let payload = &self.q_required; - let payload_atlas = &atlas.q_required; - super::super::serialize_field_header(writer, 16_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - - { - let payload = &self.r_required; - let payload_atlas = &atlas.r_required; - super::super::serialize_field_header(writer, 17_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - - { - let payload = &self.s_required; - let payload_atlas = &atlas.s_required; - super::super::serialize_field_header(writer, 18_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - { - let varint = payload.len() as u64 as u64; - super::super::serialize_varint(varint, writer)?; - } - } - } - - { - let payload = &self.t_required; - let payload_atlas = &atlas.t_required; - super::super::serialize_field_header(writer, 19_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; - } - } - } - - { - let payload = &self.u_required; - let payload_atlas = &atlas.u_required; - super::super::serialize_field_header(writer, 20_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; - } - } - } - } - - { - let payload = &self.v_required; - let payload_atlas = &atlas.v_required; - super::super::serialize_field_header(writer, 21_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; - } - } - } - } - - { - let payload = &self.w_required; - let payload_atlas = &atlas.w_required; - super::super::serialize_field_header(writer, 22_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; - } - } - } - } - - { - let payload = &self.x_required; - let payload_atlas = &atlas.x_required; - super::super::serialize_field_header(writer, 23_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; - } - } - } - - { - let payload = &self.y_required; - let payload_atlas = &atlas.y_required; - super::super::serialize_field_header(writer, 24_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; - } - } - } - - { - let payload = &self.z_required; - let payload_atlas = &atlas.z_required; - super::super::serialize_field_header(writer, 25_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - } - - { - let payload = &self.aa_required; - let payload_atlas = &atlas.aa_required; - super::super::serialize_field_header(writer, 26_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - } - - { - let payload = &self.a_asymmetric; - let payload_atlas = &atlas.a_asymmetric; - super::super::serialize_field_header(writer, 28_u64, *payload_atlas, false)?; - } - - { - let payload = &self.b_asymmetric; - let payload_atlas = &atlas.b_asymmetric; - super::super::serialize_field_header(writer, 29_u64, *payload_atlas, false)?; - if payload.to_bits() != 0_u64 { - writer.write_all(&payload.to_le_bytes())?; - } - } - - { - let payload = &self.c_asymmetric; - let payload_atlas = &atlas.c_asymmetric; - super::super::serialize_field_header(writer, 30_u64, *payload_atlas, true)?; - { - let varint = *payload; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - { - let payload = &self.d_asymmetric; - let payload_atlas = &atlas.d_asymmetric; - super::super::serialize_field_header(writer, 31_u64, *payload_atlas, true)?; - { - let varint = super::super::zigzag_encode(*payload); - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - { - let payload = &self.e_asymmetric; - let payload_atlas = &atlas.e_asymmetric; - super::super::serialize_field_header(writer, 32_u64, *payload_atlas, true)?; - { - let varint = *payload as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - { - let payload = &self.f_asymmetric; - let payload_atlas = &atlas.f_asymmetric; - super::super::serialize_field_header(writer, 33_u64, *payload_atlas, false)?; - writer.write_all(payload)?; - } - - { - let payload = &self.g_asymmetric; - let payload_atlas = &atlas.g_asymmetric; - super::super::serialize_field_header(writer, 34_u64, *payload_atlas, false)?; - writer.write_all(payload.as_bytes())?; - } - - { - let payload = &self.h_asymmetric; - let payload_atlas = &atlas.h_asymmetric; - super::super::serialize_field_header(writer, 35_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - - { - let payload = &self.i_asymmetric; - let payload_atlas = &atlas.i_asymmetric; - super::super::serialize_field_header(writer, 36_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - - { - let payload = &self.j_asymmetric; - let payload_atlas = &atlas.j_asymmetric; - super::super::serialize_field_header(writer, 37_u64, *payload_atlas, false)?; - { - let varint = payload.len() as u64 as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - { - let payload = &self.k_asymmetric; - let payload_atlas = &atlas.k_asymmetric; - super::super::serialize_field_header(writer, 38_u64, *payload_atlas, false)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; - } - } - - { - let payload = &self.l_asymmetric; - let payload_atlas = &atlas.l_asymmetric; - super::super::serialize_field_header(writer, 39_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; - } - } - } - - { - let payload = &self.m_asymmetric; - let payload_atlas = &atlas.m_asymmetric; - super::super::serialize_field_header(writer, 40_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; - } - } - } - - { - let payload = &self.n_asymmetric; - let payload_atlas = &atlas.n_asymmetric; - super::super::serialize_field_header(writer, 41_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; - } - } - } - - { - let payload = &self.o_asymmetric; - let payload_atlas = &atlas.o_asymmetric; - super::super::serialize_field_header(writer, 42_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; - } - } - - { - let payload = &self.p_asymmetric; - let payload_atlas = &atlas.p_asymmetric; - super::super::serialize_field_header(writer, 43_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; - } - } - - { - let payload = &self.q_asymmetric; - let payload_atlas = &atlas.q_asymmetric; - super::super::serialize_field_header(writer, 44_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - - { - let payload = &self.r_asymmetric; - let payload_atlas = &atlas.r_asymmetric; - super::super::serialize_field_header(writer, 45_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - - { - let payload = &self.s_asymmetric; - let payload_atlas = &atlas.s_asymmetric; - super::super::serialize_field_header(writer, 46_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - { - let varint = payload.len() as u64 as u64; - super::super::serialize_varint(varint, writer)?; - } - } - } - - { - let payload = &self.t_asymmetric; - let payload_atlas = &atlas.t_asymmetric; - super::super::serialize_field_header(writer, 47_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; - } - } - } - - { - let payload = &self.u_asymmetric; - let payload_atlas = &atlas.u_asymmetric; - super::super::serialize_field_header(writer, 48_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; - } - } - } - } - - { - let payload = &self.v_asymmetric; - let payload_atlas = &atlas.v_asymmetric; - super::super::serialize_field_header(writer, 49_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; - } - } - } - } - - { - let payload = &self.w_asymmetric; - let payload_atlas = &atlas.w_asymmetric; - super::super::serialize_field_header(writer, 50_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; - } - } - } - } - - { - let payload = &self.x_asymmetric; - let payload_atlas = &atlas.x_asymmetric; - super::super::serialize_field_header(writer, 51_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; - } - } - } - - { - let payload = &self.y_asymmetric; - let payload_atlas = &atlas.y_asymmetric; - super::super::serialize_field_header(writer, 52_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; - } - } - } - - { - let payload = &self.z_asymmetric; - let payload_atlas = &atlas.z_asymmetric; - super::super::serialize_field_header(writer, 53_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - } - - { - let payload = &self.aa_asymmetric; - let payload_atlas = &atlas.aa_asymmetric; - super::super::serialize_field_header(writer, 54_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.a_optional, &atlas.a_optional) { - super::super::serialize_field_header(writer, 56_u64, *payload_atlas, false)?; - } - - if let (Some(payload), Some(payload_atlas)) = (&self.b_optional, &atlas.b_optional) { - super::super::serialize_field_header(writer, 57_u64, *payload_atlas, false)?; - if payload.to_bits() != 0_u64 { - writer.write_all(&payload.to_le_bytes())?; - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.c_optional, &atlas.c_optional) { - super::super::serialize_field_header(writer, 58_u64, *payload_atlas, true)?; - { - let varint = *payload; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.d_optional, &atlas.d_optional) { - super::super::serialize_field_header(writer, 59_u64, *payload_atlas, true)?; - { - let varint = super::super::zigzag_encode(*payload); - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.e_optional, &atlas.e_optional) { - super::super::serialize_field_header(writer, 60_u64, *payload_atlas, true)?; - { - let varint = *payload as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.f_optional, &atlas.f_optional) { - super::super::serialize_field_header(writer, 61_u64, *payload_atlas, false)?; - writer.write_all(payload)?; - } - - if let (Some(payload), Some(payload_atlas)) = (&self.g_optional, &atlas.g_optional) { - super::super::serialize_field_header(writer, 62_u64, *payload_atlas, false)?; - writer.write_all(payload.as_bytes())?; - } - - if let (Some(payload), Some(payload_atlas)) = (&self.h_optional, &atlas.h_optional) { - super::super::serialize_field_header(writer, 63_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - - if let (Some(payload), Some(payload_atlas)) = (&self.i_optional, &atlas.i_optional) { - super::super::serialize_field_header(writer, 64_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - - if let (Some(payload), Some(payload_atlas)) = (&self.j_optional, &atlas.j_optional) { - super::super::serialize_field_header(writer, 65_u64, *payload_atlas, false)?; - { - let varint = payload.len() as u64 as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.k_optional, &atlas.k_optional) { - super::super::serialize_field_header(writer, 66_u64, *payload_atlas, false)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.l_optional, &atlas.l_optional) { - super::super::serialize_field_header(writer, 67_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.m_optional, &atlas.m_optional) { - super::super::serialize_field_header(writer, 68_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.n_optional, &atlas.n_optional) { - super::super::serialize_field_header(writer, 69_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.o_optional, &atlas.o_optional) { - super::super::serialize_field_header(writer, 70_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.p_optional, &atlas.p_optional) { - super::super::serialize_field_header(writer, 71_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.q_optional, &atlas.q_optional) { - super::super::serialize_field_header(writer, 72_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.r_optional, &atlas.r_optional) { - super::super::serialize_field_header(writer, 73_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.s_optional, &atlas.s_optional) { - super::super::serialize_field_header(writer, 74_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - { - let varint = payload.len() as u64 as u64; - super::super::serialize_varint(varint, writer)?; - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.t_optional, &atlas.t_optional) { - super::super::serialize_field_header(writer, 75_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.u_optional, &atlas.u_optional) { - super::super::serialize_field_header(writer, 76_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; - } - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.v_optional, &atlas.v_optional) { - super::super::serialize_field_header(writer, 77_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; - } - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.w_optional, &atlas.w_optional) { - super::super::serialize_field_header(writer, 78_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; - } - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.x_optional, &atlas.x_optional) { - super::super::serialize_field_header(writer, 79_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.y_optional, &atlas.y_optional) { - super::super::serialize_field_header(writer, 80_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.z_optional, &atlas.z_optional) { - super::super::serialize_field_header(writer, 81_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - } - - if let (Some(payload), Some(payload_atlas)) = (&self.aa_optional, &atlas.aa_optional) { - super::super::serialize_field_header(writer, 82_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } - } - } - - Ok(()) - } - } - - impl FooAtlas { - pub fn size(&self) -> usize { - self._size - } - } - - #[derive(Clone, Debug)] - pub enum BarAtlas { - ARequired(usize, usize), - BRequired(usize, usize), - CRequired(usize, usize), - DRequired(usize, usize), - ERequired(usize, usize), - FRequired(usize, usize), - GRequired(usize, usize), - HRequired(usize, LocalStructAtlas), - IRequired(usize, super::super::degenerate::types::EmptyStructAtlas), - JRequired(usize, usize), - KRequired(usize, usize), - LRequired(usize, usize), - MRequired(usize, usize), - NRequired(usize, usize), - ORequired(usize, (usize, Vec)), - PRequired(usize, (usize, Vec)), - QRequired(usize, (usize, Vec)), - RRequired(usize, (usize, Vec)), - SRequired(usize, (usize, Vec)), - TRequired(usize, (usize, Vec)), - URequired(usize, (usize, Vec)), - VRequired(usize, (usize, Vec)), - WRequired(usize, (usize, Vec)), - XRequired(usize, (usize, Vec<(usize, Vec)>)), - YRequired(usize, (usize, Vec<(usize, Vec)>)), - ZRequired(usize, (usize, Vec<(usize, Vec)>)), - AaRequired(usize, (usize, Vec<(usize, Vec)>)), - AAsymmetric(usize, usize, Box), - BAsymmetric(usize, usize, Box), - CAsymmetric(usize, usize, Box), - DAsymmetric(usize, usize, Box), - EAsymmetric(usize, usize, Box), - FAsymmetric(usize, usize, Box), - GAsymmetric(usize, usize, Box), - HAsymmetric(usize, LocalStructAtlas, Box), - IAsymmetric(usize, super::super::degenerate::types::EmptyStructAtlas, Box), - JAsymmetric(usize, usize, Box), - KAsymmetric(usize, usize, Box), - LAsymmetric(usize, usize, Box), - MAsymmetric(usize, usize, Box), - NAsymmetric(usize, usize, Box), - OAsymmetric(usize, (usize, Vec), Box), - PAsymmetric(usize, (usize, Vec), Box), - QAsymmetric(usize, (usize, Vec), Box), - RAsymmetric(usize, (usize, Vec), Box), - SAsymmetric(usize, (usize, Vec), Box), - TAsymmetric(usize, (usize, Vec), Box), - UAsymmetric(usize, (usize, Vec), Box), - VAsymmetric(usize, (usize, Vec), Box), - WAsymmetric(usize, (usize, Vec), Box), - XAsymmetric(usize, (usize, Vec<(usize, Vec)>), Box), - YAsymmetric(usize, (usize, Vec<(usize, Vec)>), Box), - ZAsymmetric(usize, (usize, Vec<(usize, Vec)>), Box), - AaAsymmetric(usize, (usize, Vec<(usize, Vec)>), Box), - AOptional(usize, usize, Box), - BOptional(usize, usize, Box), - COptional(usize, usize, Box), - DOptional(usize, usize, Box), - EOptional(usize, usize, Box), - FOptional(usize, usize, Box), - GOptional(usize, usize, Box), - HOptional(usize, LocalStructAtlas, Box), - IOptional(usize, super::super::degenerate::types::EmptyStructAtlas, Box), - JOptional(usize, usize, Box), - KOptional(usize, usize, Box), - LOptional(usize, usize, Box), - MOptional(usize, usize, Box), - NOptional(usize, usize, Box), - OOptional(usize, (usize, Vec), Box), - POptional(usize, (usize, Vec), Box), - QOptional(usize, (usize, Vec), Box), - ROptional(usize, (usize, Vec), Box), - SOptional(usize, (usize, Vec), Box), - TOptional(usize, (usize, Vec), Box), - UOptional(usize, (usize, Vec), Box), - VOptional(usize, (usize, Vec), Box), - WOptional(usize, (usize, Vec), Box), - XOptional(usize, (usize, Vec<(usize, Vec)>), Box), - YOptional(usize, (usize, Vec<(usize, Vec)>), Box), - ZOptional(usize, (usize, Vec<(usize, Vec)>), Box), - AaOptional(usize, (usize, Vec<(usize, Vec)>), Box), - } - - #[derive(Clone, Debug)] - pub enum BarOut { - ARequired, - BRequired(f64), - CRequired(u64), - DRequired(i64), - ERequired(bool), - FRequired(Vec), - GRequired(String), - HRequired(LocalStructOut), - IRequired(super::super::degenerate::types::EmptyStructOut), - JRequired(Vec<()>), - KRequired(Vec), - LRequired(Vec), - MRequired(Vec), - NRequired(Vec), - ORequired(Vec>), - PRequired(Vec), - QRequired(Vec), - RRequired(Vec), - SRequired(Vec>), - TRequired(Vec>), - URequired(Vec>), - VRequired(Vec>), - WRequired(Vec>), - XRequired(Vec>>), - YRequired(Vec>), - ZRequired(Vec>), - AaRequired(Vec>), - AAsymmetric(Box), - BAsymmetric(f64, Box), - CAsymmetric(u64, Box), - DAsymmetric(i64, Box), - EAsymmetric(bool, Box), - FAsymmetric(Vec, Box), - GAsymmetric(String, Box), - HAsymmetric(LocalStructOut, Box), - IAsymmetric(super::super::degenerate::types::EmptyStructOut, Box), - JAsymmetric(Vec<()>, Box), - KAsymmetric(Vec, Box), - LAsymmetric(Vec, Box), - MAsymmetric(Vec, Box), - NAsymmetric(Vec, Box), - OAsymmetric(Vec>, Box), - PAsymmetric(Vec, Box), - QAsymmetric(Vec, Box), - RAsymmetric(Vec, Box), - SAsymmetric(Vec>, Box), - TAsymmetric(Vec>, Box), - UAsymmetric(Vec>, Box), - VAsymmetric(Vec>, Box), - WAsymmetric(Vec>, Box), - XAsymmetric(Vec>>, Box), - YAsymmetric(Vec>, Box), - ZAsymmetric(Vec>, Box), - AaAsymmetric(Vec>, Box), - AOptional(Box), - BOptional(f64, Box), - COptional(u64, Box), - DOptional(i64, Box), - EOptional(bool, Box), - FOptional(Vec, Box), - GOptional(String, Box), - HOptional(LocalStructOut, Box), - IOptional(super::super::degenerate::types::EmptyStructOut, Box), - JOptional(Vec<()>, Box), - KOptional(Vec, Box), - LOptional(Vec, Box), - MOptional(Vec, Box), - NOptional(Vec, Box), - OOptional(Vec>, Box), - POptional(Vec, Box), - QOptional(Vec, Box), - ROptional(Vec, Box), - SOptional(Vec>, Box), - TOptional(Vec>, Box), - UOptional(Vec>, Box), - VOptional(Vec>, Box), - WOptional(Vec>, Box), - XOptional(Vec>>, Box), - YOptional(Vec>, Box), - ZOptional(Vec>, Box), - AaOptional(Vec>, Box), - } - - #[derive(Clone, Debug)] - pub enum BarIn { - ARequired, - BRequired(f64), - CRequired(u64), - DRequired(i64), - ERequired(bool), - FRequired(Vec), - GRequired(String), - HRequired(LocalStructIn), - IRequired(super::super::degenerate::types::EmptyStructIn), - JRequired(Vec<()>), - KRequired(Vec), - LRequired(Vec), - MRequired(Vec), - NRequired(Vec), - ORequired(Vec>), - PRequired(Vec), - QRequired(Vec), - RRequired(Vec), - SRequired(Vec>), - TRequired(Vec>), - URequired(Vec>), - VRequired(Vec>), - WRequired(Vec>), - XRequired(Vec>>), - YRequired(Vec>), - ZRequired(Vec>), - AaRequired(Vec>), - AAsymmetric, - BAsymmetric(f64), - CAsymmetric(u64), - DAsymmetric(i64), - EAsymmetric(bool), - FAsymmetric(Vec), - GAsymmetric(String), - HAsymmetric(LocalStructIn), - IAsymmetric(super::super::degenerate::types::EmptyStructIn), - JAsymmetric(Vec<()>), - KAsymmetric(Vec), - LAsymmetric(Vec), - MAsymmetric(Vec), - NAsymmetric(Vec), - OAsymmetric(Vec>), - PAsymmetric(Vec), - QAsymmetric(Vec), - RAsymmetric(Vec), - SAsymmetric(Vec>), - TAsymmetric(Vec>), - UAsymmetric(Vec>), - VAsymmetric(Vec>), - WAsymmetric(Vec>), - XAsymmetric(Vec>>), - YAsymmetric(Vec>), - ZAsymmetric(Vec>), - AaAsymmetric(Vec>), - AOptional(Box), - BOptional(f64, Box), - COptional(u64, Box), - DOptional(i64, Box), - EOptional(bool, Box), - FOptional(Vec, Box), - GOptional(String, Box), - HOptional(LocalStructIn, Box), - IOptional(super::super::degenerate::types::EmptyStructIn, Box), - JOptional(Vec<()>, Box), - KOptional(Vec, Box), - LOptional(Vec, Box), - MOptional(Vec, Box), - NOptional(Vec, Box), - OOptional(Vec>, Box), - POptional(Vec, Box), - QOptional(Vec, Box), - ROptional(Vec, Box), - SOptional(Vec>, Box), - TOptional(Vec>, Box), - UOptional(Vec>, Box), - VOptional(Vec>, Box), - WOptional(Vec>, Box), - XOptional(Vec>>, Box), - YOptional(Vec>, Box), - ZOptional(Vec>, Box), - AaOptional(Vec>, Box), - } - - impl super::super::Serialize for BarOut { - fn size(&self) -> usize { - self.atlas().size() - } - - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { - let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) - } - } - - impl super::super::Deserialize for BarIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - loop { - let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; - - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); - - match index { - 0 => { - let payload = (); - super::super::finish(&mut *reader)?; - return Ok(BarIn::ARequired); - } - 1 => { - let payload = if payload_size == 0_usize { - 0.0_f64 - } else { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - f64::from_le_bytes(buffer) - }; - super::super::finish(&mut *reader)?; - return Ok(BarIn::BRequired(payload)); - } - 2 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - super::super::finish(&mut *reader)?; - return Ok(BarIn::CRequired(payload)); - } - 3 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = super::super::zigzag_decode(payload); - super::super::finish(&mut *reader)?; - return Ok(BarIn::DRequired(payload)); - } - 4 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = payload != 0_u64; - super::super::finish(&mut *reader)?; - return Ok(BarIn::ERequired(payload)); - } - 5 => { - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - super::super::finish(&mut *reader)?; - return Ok(BarIn::FRequired(payload)); - } - 6 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(BarIn::GRequired(payload)); - } - 7 => { - let payload = ::deserialize(&mut sub_reader)?; - super::super::finish(&mut *reader)?; - return Ok(BarIn::HRequired(payload)); - } - 8 => { - let payload = ::deserialize(&mut sub_reader)?; - super::super::finish(&mut *reader)?; - return Ok(BarIn::IRequired(payload)); - } - 9 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = vec![(); payload as usize]; - super::super::finish(&mut *reader)?; - return Ok(BarIn::JRequired(payload)); - } - 10 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - let payload = f64::from_le_bytes(buffer); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::KRequired(payload)); - } - 11 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::LRequired(payload)); - } - 12 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = super::super::zigzag_decode(payload); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::MRequired(payload)); - } - 13 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = payload != 0_u64; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::NRequired(payload)); - } - 14 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::ORequired(payload)); - } - 15 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::PRequired(payload)); - } - 16 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::QRequired(payload)); - } - 17 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::RRequired(payload)); - } - 18 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = vec![(); payload as usize]; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::SRequired(payload)); - } - 19 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - let payload = f64::from_le_bytes(buffer); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::TRequired(payload)); - } - 20 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::URequired(payload)); - } - 21 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = super::super::zigzag_decode(payload); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::VRequired(payload)); - } - 22 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = payload != 0_u64; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::WRequired(payload)); - } - 23 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - payload - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::XRequired(payload)); - } - 24 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - payload - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::YRequired(payload)); - } - 25 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::ZRequired(payload)); - } - 26 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::AaRequired(payload)); - } - 28 => { - let payload = (); - super::super::finish(&mut *reader)?; - return Ok(BarIn::AAsymmetric); - } - 29 => { - let payload = if payload_size == 0_usize { - 0.0_f64 - } else { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - f64::from_le_bytes(buffer) - }; - super::super::finish(&mut *reader)?; - return Ok(BarIn::BAsymmetric(payload)); - } - 30 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - super::super::finish(&mut *reader)?; - return Ok(BarIn::CAsymmetric(payload)); - } - 31 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = super::super::zigzag_decode(payload); - super::super::finish(&mut *reader)?; - return Ok(BarIn::DAsymmetric(payload)); - } - 32 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = payload != 0_u64; - super::super::finish(&mut *reader)?; - return Ok(BarIn::EAsymmetric(payload)); - } - 33 => { - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - super::super::finish(&mut *reader)?; - return Ok(BarIn::FAsymmetric(payload)); - } - 34 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(BarIn::GAsymmetric(payload)); - } - 35 => { - let payload = ::deserialize(&mut sub_reader)?; - super::super::finish(&mut *reader)?; - return Ok(BarIn::HAsymmetric(payload)); - } - 36 => { - let payload = ::deserialize(&mut sub_reader)?; - super::super::finish(&mut *reader)?; - return Ok(BarIn::IAsymmetric(payload)); - } - 37 => { - let payload = match payload_size { - 0_usize => 0_u64, - 8_usize => { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; - u64::from_le_bytes(buffer) - } - _ => super::super::deserialize_varint(&mut sub_reader)?, - }; - let payload = vec![(); payload as usize]; - super::super::finish(&mut *reader)?; - return Ok(BarIn::JAsymmetric(payload)); - } - 38 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - let payload = f64::from_le_bytes(buffer); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::KAsymmetric(payload)); - } - 39 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::LAsymmetric(payload)); - } - 40 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = super::super::zigzag_decode(payload); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::MAsymmetric(payload)); - } - 41 => { - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = payload != 0_u64; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::NAsymmetric(payload)); - } - 42 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::OAsymmetric(payload)); - } - 43 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::PAsymmetric(payload)); - } - 44 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::QAsymmetric(payload)); - } - 45 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::RAsymmetric(payload)); - } - 46 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = vec![(); payload as usize]; - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::SAsymmetric(payload)); - } - 47 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let mut buffer = [0; 8]; - ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; - let payload = f64::from_le_bytes(buffer); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::TAsymmetric(payload)); - } - 48 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::UAsymmetric(payload)); - } - 49 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = super::super::zigzag_decode(payload); - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::VAsymmetric(payload)); - } - 50 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { - let payload = super::super::deserialize_varint(&mut sub_reader)?; - let payload = payload != 0_u64; - Ok(payload) - } - let mut payload = Vec::new(); - loop { - payload.push(match deserialize_element(&mut sub_reader) { - Ok(element) => element, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::WAsymmetric(payload)); - } - 51 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - payload - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::XAsymmetric(payload)); - } - 52 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - payload - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::YAsymmetric(payload)); - } - 53 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::ZAsymmetric(payload)); - } - 54 => { - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let mut payload = Vec::new(); - loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - return Err(err); - } - }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); - payload.push({ - let payload = ::deserialize(&mut sub_reader)?; - payload - }); - } - payload - }); - } - super::super::finish(&mut *reader)?; - return Ok(BarIn::AaAsymmetric(payload)); - } - 56 => { - let payload = (); - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::AOptional(fallback)); + 56 => { + let payload = (); + _a_optional.get_or_insert(payload); } 57 => { let payload = if payload_size == 0_usize { @@ -5546,8 +3371,7 @@ pub mod comprehensive { ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; f64::from_le_bytes(buffer) }; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::BOptional(payload, fallback)); + _b_optional.get_or_insert(payload); } 58 => { let payload = match payload_size { @@ -5559,8 +3383,7 @@ pub mod comprehensive { } _ => super::super::deserialize_varint(&mut sub_reader)?, }; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::COptional(payload, fallback)); + _c_optional.get_or_insert(payload); } 59 => { let payload = match payload_size { @@ -5573,8 +3396,7 @@ pub mod comprehensive { _ => super::super::deserialize_varint(&mut sub_reader)?, }; let payload = super::super::zigzag_decode(payload); - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::DOptional(payload, fallback)); + _d_optional.get_or_insert(payload); } 60 => { let payload = match payload_size { @@ -5587,34 +3409,27 @@ pub mod comprehensive { _ => super::super::deserialize_varint(&mut sub_reader)?, }; let payload = payload != 0_u64; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::EOptional(payload, fallback)); + _e_optional.get_or_insert(payload); } 61 => { let mut payload = vec![]; + payload.reserve_exact(payload_size); ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::FOptional(payload, fallback)); + _f_optional.get_or_insert(payload); } 62 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::GOptional(payload, fallback)); + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _g_optional.get_or_insert(payload); } 63 => { - let payload = ::deserialize(&mut sub_reader)?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::HOptional(payload, fallback)); + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + _h_optional.get_or_insert(payload); } 64 => { - let payload = ::deserialize(&mut sub_reader)?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::IOptional(payload, fallback)); + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + _i_optional.get_or_insert(payload); } 65 => { let payload = match payload_size { @@ -5627,8 +3442,7 @@ pub mod comprehensive { _ => super::super::deserialize_varint(&mut sub_reader)?, }; let payload = vec![(); payload as usize]; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::JOptional(payload, fallback)); + _j_optional.get_or_insert(payload); } 66 => { fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { @@ -5638,6 +3452,7 @@ pub mod comprehensive { Ok(payload) } let mut payload = Vec::new(); + payload.reserve_exact(payload_size); loop { payload.push(match deserialize_element(&mut sub_reader) { Ok(element) => element, @@ -5649,8 +3464,7 @@ pub mod comprehensive { } }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::KOptional(payload, fallback)); + _k_optional.get_or_insert(payload); } 67 => { fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { @@ -5669,8 +3483,7 @@ pub mod comprehensive { } }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::LOptional(payload, fallback)); + _l_optional.get_or_insert(payload); } 68 => { fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { @@ -5690,8 +3503,7 @@ pub mod comprehensive { } }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::MOptional(payload, fallback)); + _m_optional.get_or_insert(payload); } 69 => { fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { @@ -5711,14 +3523,13 @@ pub mod comprehensive { } }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::NOptional(payload, fallback)); + _n_optional.get_or_insert(payload); } 70 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5726,21 +3537,21 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = vec![]; + payload.reserve_exact(payload_size); ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::OOptional(payload, fallback)); + _o_optional.get_or_insert(payload); } 71 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5748,25 +3559,21 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::POptional(payload, fallback)); + _p_optional.get_or_insert(payload); } 72 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5774,20 +3581,19 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::QOptional(payload, fallback)); + _q_optional.get_or_insert(payload); } 73 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5795,20 +3601,19 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::ROptional(payload, fallback)); + _r_optional.get_or_insert(payload); } 74 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5816,21 +3621,20 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let payload = super::super::deserialize_varint(&mut sub_reader)?; let payload = vec![(); payload as usize]; payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::SOptional(payload, fallback)); + _s_optional.get_or_insert(payload); } 75 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5838,7 +3642,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let mut buffer = [0; 8]; @@ -5847,6 +3651,7 @@ pub mod comprehensive { Ok(payload) } let mut payload = Vec::new(); + payload.reserve_exact(payload_size); loop { payload.push(match deserialize_element(&mut sub_reader) { Ok(element) => element, @@ -5861,14 +3666,13 @@ pub mod comprehensive { payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::TOptional(payload, fallback)); + _t_optional.get_or_insert(payload); } 76 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5876,7 +3680,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; @@ -5897,14 +3701,13 @@ pub mod comprehensive { payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::UOptional(payload, fallback)); + _u_optional.get_or_insert(payload); } 77 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5912,7 +3715,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; @@ -5934,14 +3737,13 @@ pub mod comprehensive { payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::VOptional(payload, fallback)); + _v_optional.get_or_insert(payload); } 78 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5949,7 +3751,7 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { let payload = super::super::deserialize_varint(&mut sub_reader)?; @@ -5971,14 +3773,13 @@ pub mod comprehensive { payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::WOptional(payload, fallback)); + _w_optional.get_or_insert(payload); } 79 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5986,12 +3787,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -5999,9 +3800,10 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = vec![]; + payload.reserve_exact(payload_size); ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; payload }); @@ -6009,14 +3811,13 @@ pub mod comprehensive { payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::XOptional(payload, fallback)); + _x_optional.get_or_insert(payload); } 80 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -6024,12 +3825,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -6037,28 +3838,24 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; payload }); } payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::YOptional(payload, fallback)); + _y_optional.get_or_insert(payload); } 81 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -6066,12 +3863,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -6079,23 +3876,22 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::ZOptional(payload, fallback)); + _z_optional.get_or_insert(payload); } 82 => { let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -6103,12 +3899,12 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ let mut payload = Vec::new(); loop { - let element_size = match super::super::deserialize_varint(&mut sub_reader) { - Ok(element_size) => element_size, + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, Err(err) => { if let std::io::ErrorKind::UnexpectedEof = err.kind() { break; @@ -6116,1345 +3912,3530 @@ pub mod comprehensive { return Err(err); } }; - let mut sub_reader = ::std::io::Read::take(&mut sub_reader, element_size as u64); + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); payload.push({ - let payload = ::deserialize(&mut sub_reader)?; + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; payload }); } payload }); } - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(BarIn::AaOptional(payload, fallback)); + _aa_optional.get_or_insert(payload); } _ => { super::super::skip(&mut sub_reader, payload_size as usize)?; } } - } - } - } - - impl From for BarIn { - fn from(message: BarOut) -> Self { - match message { - BarOut::ARequired => BarIn::ARequired, - BarOut::BRequired(payload) => BarIn::BRequired(payload.into()), - BarOut::CRequired(payload) => BarIn::CRequired(payload.into()), - BarOut::DRequired(payload) => BarIn::DRequired(payload.into()), - BarOut::ERequired(payload) => BarIn::ERequired(payload.into()), - BarOut::FRequired(payload) => BarIn::FRequired(payload.into()), - BarOut::GRequired(payload) => BarIn::GRequired(payload.into()), - BarOut::HRequired(payload) => BarIn::HRequired(payload.into()), - BarOut::IRequired(payload) => BarIn::IRequired(payload.into()), - BarOut::JRequired(payload) => BarIn::JRequired(payload.into()), - BarOut::KRequired(payload) => BarIn::KRequired(payload.into()), - BarOut::LRequired(payload) => BarIn::LRequired(payload.into()), - BarOut::MRequired(payload) => BarIn::MRequired(payload.into()), - BarOut::NRequired(payload) => BarIn::NRequired(payload.into()), - BarOut::ORequired(payload) => BarIn::ORequired(payload.into()), - BarOut::PRequired(payload) => BarIn::PRequired(payload.into()), - BarOut::QRequired(payload) => BarIn::QRequired(payload.into_iter().map(|x| x.into()).collect::>()), - BarOut::RRequired(payload) => BarIn::RRequired(payload.into_iter().map(|x| x.into()).collect::>()), - BarOut::SRequired(payload) => BarIn::SRequired(payload.into()), - BarOut::TRequired(payload) => BarIn::TRequired(payload.into()), - BarOut::URequired(payload) => BarIn::URequired(payload.into()), - BarOut::VRequired(payload) => BarIn::VRequired(payload.into()), - BarOut::WRequired(payload) => BarIn::WRequired(payload.into()), - BarOut::XRequired(payload) => BarIn::XRequired(payload.into()), - BarOut::YRequired(payload) => BarIn::YRequired(payload.into()), - BarOut::ZRequired(payload) => BarIn::ZRequired(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), - BarOut::AaRequired(payload) => BarIn::AaRequired(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), - BarOut::AAsymmetric(fallback) => BarIn::AAsymmetric, - BarOut::BAsymmetric(payload, fallback) => BarIn::BAsymmetric(payload.into()), - BarOut::CAsymmetric(payload, fallback) => BarIn::CAsymmetric(payload.into()), - BarOut::DAsymmetric(payload, fallback) => BarIn::DAsymmetric(payload.into()), - BarOut::EAsymmetric(payload, fallback) => BarIn::EAsymmetric(payload.into()), - BarOut::FAsymmetric(payload, fallback) => BarIn::FAsymmetric(payload.into()), - BarOut::GAsymmetric(payload, fallback) => BarIn::GAsymmetric(payload.into()), - BarOut::HAsymmetric(payload, fallback) => BarIn::HAsymmetric(payload.into()), - BarOut::IAsymmetric(payload, fallback) => BarIn::IAsymmetric(payload.into()), - BarOut::JAsymmetric(payload, fallback) => BarIn::JAsymmetric(payload.into()), - BarOut::KAsymmetric(payload, fallback) => BarIn::KAsymmetric(payload.into()), - BarOut::LAsymmetric(payload, fallback) => BarIn::LAsymmetric(payload.into()), - BarOut::MAsymmetric(payload, fallback) => BarIn::MAsymmetric(payload.into()), - BarOut::NAsymmetric(payload, fallback) => BarIn::NAsymmetric(payload.into()), - BarOut::OAsymmetric(payload, fallback) => BarIn::OAsymmetric(payload.into()), - BarOut::PAsymmetric(payload, fallback) => BarIn::PAsymmetric(payload.into()), - BarOut::QAsymmetric(payload, fallback) => BarIn::QAsymmetric(payload.into_iter().map(|x| x.into()).collect::>()), - BarOut::RAsymmetric(payload, fallback) => BarIn::RAsymmetric(payload.into_iter().map(|x| x.into()).collect::>()), - BarOut::SAsymmetric(payload, fallback) => BarIn::SAsymmetric(payload.into()), - BarOut::TAsymmetric(payload, fallback) => BarIn::TAsymmetric(payload.into()), - BarOut::UAsymmetric(payload, fallback) => BarIn::UAsymmetric(payload.into()), - BarOut::VAsymmetric(payload, fallback) => BarIn::VAsymmetric(payload.into()), - BarOut::WAsymmetric(payload, fallback) => BarIn::WAsymmetric(payload.into()), - BarOut::XAsymmetric(payload, fallback) => BarIn::XAsymmetric(payload.into()), - BarOut::YAsymmetric(payload, fallback) => BarIn::YAsymmetric(payload.into()), - BarOut::ZAsymmetric(payload, fallback) => BarIn::ZAsymmetric(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), - BarOut::AaAsymmetric(payload, fallback) => BarIn::AaAsymmetric(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), - BarOut::AOptional(fallback) => BarIn::AOptional(Box::new((*fallback).into())), - BarOut::BOptional(payload, fallback) => BarIn::BOptional(payload.into(), Box::new((*fallback).into())), - BarOut::COptional(payload, fallback) => BarIn::COptional(payload.into(), Box::new((*fallback).into())), - BarOut::DOptional(payload, fallback) => BarIn::DOptional(payload.into(), Box::new((*fallback).into())), - BarOut::EOptional(payload, fallback) => BarIn::EOptional(payload.into(), Box::new((*fallback).into())), - BarOut::FOptional(payload, fallback) => BarIn::FOptional(payload.into(), Box::new((*fallback).into())), - BarOut::GOptional(payload, fallback) => BarIn::GOptional(payload.into(), Box::new((*fallback).into())), - BarOut::HOptional(payload, fallback) => BarIn::HOptional(payload.into(), Box::new((*fallback).into())), - BarOut::IOptional(payload, fallback) => BarIn::IOptional(payload.into(), Box::new((*fallback).into())), - BarOut::JOptional(payload, fallback) => BarIn::JOptional(payload.into(), Box::new((*fallback).into())), - BarOut::KOptional(payload, fallback) => BarIn::KOptional(payload.into(), Box::new((*fallback).into())), - BarOut::LOptional(payload, fallback) => BarIn::LOptional(payload.into(), Box::new((*fallback).into())), - BarOut::MOptional(payload, fallback) => BarIn::MOptional(payload.into(), Box::new((*fallback).into())), - BarOut::NOptional(payload, fallback) => BarIn::NOptional(payload.into(), Box::new((*fallback).into())), - BarOut::OOptional(payload, fallback) => BarIn::OOptional(payload.into(), Box::new((*fallback).into())), - BarOut::POptional(payload, fallback) => BarIn::POptional(payload.into(), Box::new((*fallback).into())), - BarOut::QOptional(payload, fallback) => BarIn::QOptional(payload.into_iter().map(|x| x.into()).collect::>(), Box::new((*fallback).into())), - BarOut::ROptional(payload, fallback) => BarIn::ROptional(payload.into_iter().map(|x| x.into()).collect::>(), Box::new((*fallback).into())), - BarOut::SOptional(payload, fallback) => BarIn::SOptional(payload.into(), Box::new((*fallback).into())), - BarOut::TOptional(payload, fallback) => BarIn::TOptional(payload.into(), Box::new((*fallback).into())), - BarOut::UOptional(payload, fallback) => BarIn::UOptional(payload.into(), Box::new((*fallback).into())), - BarOut::VOptional(payload, fallback) => BarIn::VOptional(payload.into(), Box::new((*fallback).into())), - BarOut::WOptional(payload, fallback) => BarIn::WOptional(payload.into(), Box::new((*fallback).into())), - BarOut::XOptional(payload, fallback) => BarIn::XOptional(payload.into(), Box::new((*fallback).into())), - BarOut::YOptional(payload, fallback) => BarIn::YOptional(payload.into(), Box::new((*fallback).into())), - BarOut::ZOptional(payload, fallback) => BarIn::ZOptional(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>(), Box::new((*fallback).into())), - BarOut::AaOptional(payload, fallback) => BarIn::AaOptional(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>(), Box::new((*fallback).into())), - } - } - } - - impl BarOut { - pub fn atlas(&self) -> BarAtlas { - match *self { - BarOut::ARequired => { + } + + if _a_required.is_none() + || _b_required.is_none() + || _c_required.is_none() + || _d_required.is_none() + || _e_required.is_none() + || _f_required.is_none() + || _g_required.is_none() + || _h_required.is_none() + || _i_required.is_none() + || _j_required.is_none() + || _k_required.is_none() + || _l_required.is_none() + || _m_required.is_none() + || _n_required.is_none() + || _o_required.is_none() + || _p_required.is_none() + || _q_required.is_none() + || _r_required.is_none() + || _s_required.is_none() + || _t_required.is_none() + || _u_required.is_none() + || _v_required.is_none() + || _w_required.is_none() + || _x_required.is_none() + || _y_required.is_none() + || _z_required.is_none() + || _aa_required.is_none() { + return Err(::std::io::Error::new( + ::std::io::ErrorKind::InvalidData, + super::super::MISSING_FIELDS_ERROR_MESSAGE, + )); + } + + Ok(FooIn { + a_required: _a_required.unwrap(), + b_required: _b_required.unwrap(), + c_required: _c_required.unwrap(), + d_required: _d_required.unwrap(), + e_required: _e_required.unwrap(), + f_required: _f_required.unwrap(), + g_required: _g_required.unwrap(), + h_required: _h_required.unwrap(), + i_required: _i_required.unwrap(), + j_required: _j_required.unwrap(), + k_required: _k_required.unwrap(), + l_required: _l_required.unwrap(), + m_required: _m_required.unwrap(), + n_required: _n_required.unwrap(), + o_required: _o_required.unwrap(), + p_required: _p_required.unwrap(), + q_required: _q_required.unwrap(), + r_required: _r_required.unwrap(), + s_required: _s_required.unwrap(), + t_required: _t_required.unwrap(), + u_required: _u_required.unwrap(), + v_required: _v_required.unwrap(), + w_required: _w_required.unwrap(), + x_required: _x_required.unwrap(), + y_required: _y_required.unwrap(), + z_required: _z_required.unwrap(), + aa_required: _aa_required.unwrap(), + a_asymmetric: _a_asymmetric, + b_asymmetric: _b_asymmetric, + c_asymmetric: _c_asymmetric, + d_asymmetric: _d_asymmetric, + e_asymmetric: _e_asymmetric, + f_asymmetric: _f_asymmetric, + g_asymmetric: _g_asymmetric, + h_asymmetric: _h_asymmetric, + i_asymmetric: _i_asymmetric, + j_asymmetric: _j_asymmetric, + k_asymmetric: _k_asymmetric, + l_asymmetric: _l_asymmetric, + m_asymmetric: _m_asymmetric, + n_asymmetric: _n_asymmetric, + o_asymmetric: _o_asymmetric, + p_asymmetric: _p_asymmetric, + q_asymmetric: _q_asymmetric, + r_asymmetric: _r_asymmetric, + s_asymmetric: _s_asymmetric, + t_asymmetric: _t_asymmetric, + u_asymmetric: _u_asymmetric, + v_asymmetric: _v_asymmetric, + w_asymmetric: _w_asymmetric, + x_asymmetric: _x_asymmetric, + y_asymmetric: _y_asymmetric, + z_asymmetric: _z_asymmetric, + aa_asymmetric: _aa_asymmetric, + a_optional: _a_optional, + b_optional: _b_optional, + c_optional: _c_optional, + d_optional: _d_optional, + e_optional: _e_optional, + f_optional: _f_optional, + g_optional: _g_optional, + h_optional: _h_optional, + i_optional: _i_optional, + j_optional: _j_optional, + k_optional: _k_optional, + l_optional: _l_optional, + m_optional: _m_optional, + n_optional: _n_optional, + o_optional: _o_optional, + p_optional: _p_optional, + q_optional: _q_optional, + r_optional: _r_optional, + s_optional: _s_optional, + t_optional: _t_optional, + u_optional: _u_optional, + v_optional: _v_optional, + w_optional: _w_optional, + x_optional: _x_optional, + y_optional: _y_optional, + z_optional: _z_optional, + aa_optional: _aa_optional, + }) + } + } + + impl FooAtlas { + pub fn size(&self) -> usize { + self._size + } + } + + #[derive(Clone, Debug)] + pub enum BarAtlas { + ARequired(usize, usize), + BRequired(usize, usize), + CRequired(usize, usize), + DRequired(usize, usize), + ERequired(usize, usize), + FRequired(usize, usize), + GRequired(usize, usize), + HRequired(usize, LocalStructAtlas), + IRequired(usize, super::super::degenerate::types::EmptyStructAtlas), + JRequired(usize, usize), + KRequired(usize, usize), + LRequired(usize, usize), + MRequired(usize, usize), + NRequired(usize, usize), + ORequired(usize, (usize, Vec)), + PRequired(usize, (usize, Vec)), + QRequired(usize, (usize, Vec)), + RRequired(usize, (usize, Vec)), + SRequired(usize, (usize, Vec)), + TRequired(usize, (usize, Vec)), + URequired(usize, (usize, Vec)), + VRequired(usize, (usize, Vec)), + WRequired(usize, (usize, Vec)), + XRequired(usize, (usize, Vec<(usize, Vec)>)), + YRequired(usize, (usize, Vec<(usize, Vec)>)), + ZRequired(usize, (usize, Vec<(usize, Vec)>)), + AaRequired(usize, (usize, Vec<(usize, Vec)>)), + AAsymmetric(usize, usize, Box), + BAsymmetric(usize, usize, Box), + CAsymmetric(usize, usize, Box), + DAsymmetric(usize, usize, Box), + EAsymmetric(usize, usize, Box), + FAsymmetric(usize, usize, Box), + GAsymmetric(usize, usize, Box), + HAsymmetric(usize, LocalStructAtlas, Box), + IAsymmetric(usize, super::super::degenerate::types::EmptyStructAtlas, Box), + JAsymmetric(usize, usize, Box), + KAsymmetric(usize, usize, Box), + LAsymmetric(usize, usize, Box), + MAsymmetric(usize, usize, Box), + NAsymmetric(usize, usize, Box), + OAsymmetric(usize, (usize, Vec), Box), + PAsymmetric(usize, (usize, Vec), Box), + QAsymmetric(usize, (usize, Vec), Box), + RAsymmetric(usize, (usize, Vec), Box), + SAsymmetric(usize, (usize, Vec), Box), + TAsymmetric(usize, (usize, Vec), Box), + UAsymmetric(usize, (usize, Vec), Box), + VAsymmetric(usize, (usize, Vec), Box), + WAsymmetric(usize, (usize, Vec), Box), + XAsymmetric(usize, (usize, Vec<(usize, Vec)>), Box), + YAsymmetric(usize, (usize, Vec<(usize, Vec)>), Box), + ZAsymmetric(usize, (usize, Vec<(usize, Vec)>), Box), + AaAsymmetric(usize, (usize, Vec<(usize, Vec)>), Box), + AOptional(usize, usize, Box), + BOptional(usize, usize, Box), + COptional(usize, usize, Box), + DOptional(usize, usize, Box), + EOptional(usize, usize, Box), + FOptional(usize, usize, Box), + GOptional(usize, usize, Box), + HOptional(usize, LocalStructAtlas, Box), + IOptional(usize, super::super::degenerate::types::EmptyStructAtlas, Box), + JOptional(usize, usize, Box), + KOptional(usize, usize, Box), + LOptional(usize, usize, Box), + MOptional(usize, usize, Box), + NOptional(usize, usize, Box), + OOptional(usize, (usize, Vec), Box), + POptional(usize, (usize, Vec), Box), + QOptional(usize, (usize, Vec), Box), + ROptional(usize, (usize, Vec), Box), + SOptional(usize, (usize, Vec), Box), + TOptional(usize, (usize, Vec), Box), + UOptional(usize, (usize, Vec), Box), + VOptional(usize, (usize, Vec), Box), + WOptional(usize, (usize, Vec), Box), + XOptional(usize, (usize, Vec<(usize, Vec)>), Box), + YOptional(usize, (usize, Vec<(usize, Vec)>), Box), + ZOptional(usize, (usize, Vec<(usize, Vec)>), Box), + AaOptional(usize, (usize, Vec<(usize, Vec)>), Box), + } + + #[derive(Clone, Debug)] + pub enum BarOut { + ARequired, + BRequired(f64), + CRequired(u64), + DRequired(i64), + ERequired(bool), + FRequired(Vec), + GRequired(String), + HRequired(LocalStructOut), + IRequired(super::super::degenerate::types::EmptyStructOut), + JRequired(Vec<()>), + KRequired(Vec), + LRequired(Vec), + MRequired(Vec), + NRequired(Vec), + ORequired(Vec>), + PRequired(Vec), + QRequired(Vec), + RRequired(Vec), + SRequired(Vec>), + TRequired(Vec>), + URequired(Vec>), + VRequired(Vec>), + WRequired(Vec>), + XRequired(Vec>>), + YRequired(Vec>), + ZRequired(Vec>), + AaRequired(Vec>), + AAsymmetric(Box), + BAsymmetric(f64, Box), + CAsymmetric(u64, Box), + DAsymmetric(i64, Box), + EAsymmetric(bool, Box), + FAsymmetric(Vec, Box), + GAsymmetric(String, Box), + HAsymmetric(LocalStructOut, Box), + IAsymmetric(super::super::degenerate::types::EmptyStructOut, Box), + JAsymmetric(Vec<()>, Box), + KAsymmetric(Vec, Box), + LAsymmetric(Vec, Box), + MAsymmetric(Vec, Box), + NAsymmetric(Vec, Box), + OAsymmetric(Vec>, Box), + PAsymmetric(Vec, Box), + QAsymmetric(Vec, Box), + RAsymmetric(Vec, Box), + SAsymmetric(Vec>, Box), + TAsymmetric(Vec>, Box), + UAsymmetric(Vec>, Box), + VAsymmetric(Vec>, Box), + WAsymmetric(Vec>, Box), + XAsymmetric(Vec>>, Box), + YAsymmetric(Vec>, Box), + ZAsymmetric(Vec>, Box), + AaAsymmetric(Vec>, Box), + AOptional(Box), + BOptional(f64, Box), + COptional(u64, Box), + DOptional(i64, Box), + EOptional(bool, Box), + FOptional(Vec, Box), + GOptional(String, Box), + HOptional(LocalStructOut, Box), + IOptional(super::super::degenerate::types::EmptyStructOut, Box), + JOptional(Vec<()>, Box), + KOptional(Vec, Box), + LOptional(Vec, Box), + MOptional(Vec, Box), + NOptional(Vec, Box), + OOptional(Vec>, Box), + POptional(Vec, Box), + QOptional(Vec, Box), + ROptional(Vec, Box), + SOptional(Vec>, Box), + TOptional(Vec>, Box), + UOptional(Vec>, Box), + VOptional(Vec>, Box), + WOptional(Vec>, Box), + XOptional(Vec>>, Box), + YOptional(Vec>, Box), + ZOptional(Vec>, Box), + AaOptional(Vec>, Box), + } + + #[derive(Clone, Debug)] + pub enum BarIn { + ARequired, + BRequired(f64), + CRequired(u64), + DRequired(i64), + ERequired(bool), + FRequired(Vec), + GRequired(String), + HRequired(LocalStructIn), + IRequired(super::super::degenerate::types::EmptyStructIn), + JRequired(Vec<()>), + KRequired(Vec), + LRequired(Vec), + MRequired(Vec), + NRequired(Vec), + ORequired(Vec>), + PRequired(Vec), + QRequired(Vec), + RRequired(Vec), + SRequired(Vec>), + TRequired(Vec>), + URequired(Vec>), + VRequired(Vec>), + WRequired(Vec>), + XRequired(Vec>>), + YRequired(Vec>), + ZRequired(Vec>), + AaRequired(Vec>), + AAsymmetric, + BAsymmetric(f64), + CAsymmetric(u64), + DAsymmetric(i64), + EAsymmetric(bool), + FAsymmetric(Vec), + GAsymmetric(String), + HAsymmetric(LocalStructIn), + IAsymmetric(super::super::degenerate::types::EmptyStructIn), + JAsymmetric(Vec<()>), + KAsymmetric(Vec), + LAsymmetric(Vec), + MAsymmetric(Vec), + NAsymmetric(Vec), + OAsymmetric(Vec>), + PAsymmetric(Vec), + QAsymmetric(Vec), + RAsymmetric(Vec), + SAsymmetric(Vec>), + TAsymmetric(Vec>), + UAsymmetric(Vec>), + VAsymmetric(Vec>), + WAsymmetric(Vec>), + XAsymmetric(Vec>>), + YAsymmetric(Vec>), + ZAsymmetric(Vec>), + AaAsymmetric(Vec>), + AOptional(Box), + BOptional(f64, Box), + COptional(u64, Box), + DOptional(i64, Box), + EOptional(bool, Box), + FOptional(Vec, Box), + GOptional(String, Box), + HOptional(LocalStructIn, Box), + IOptional(super::super::degenerate::types::EmptyStructIn, Box), + JOptional(Vec<()>, Box), + KOptional(Vec, Box), + LOptional(Vec, Box), + MOptional(Vec, Box), + NOptional(Vec, Box), + OOptional(Vec>, Box), + POptional(Vec, Box), + QOptional(Vec, Box), + ROptional(Vec, Box), + SOptional(Vec>, Box), + TOptional(Vec>, Box), + UOptional(Vec>, Box), + VOptional(Vec>, Box), + WOptional(Vec>, Box), + XOptional(Vec>>, Box), + YOptional(Vec>, Box), + ZOptional(Vec>, Box), + AaOptional(Vec>, Box), + } + + impl super::super::Serialize for BarOut { + fn size(&self) -> usize { + self.atlas().size() + } + + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { + let atlas = self.atlas(); + self.serialize_with_atlas(&mut writer, &atlas) + } + } + + impl super::super::Deserialize for BarIn { + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) + } + } + + impl From for BarIn { + fn from(message: BarOut) -> Self { + match message { + BarOut::ARequired => BarIn::ARequired, + BarOut::BRequired(payload) => BarIn::BRequired(payload.into()), + BarOut::CRequired(payload) => BarIn::CRequired(payload.into()), + BarOut::DRequired(payload) => BarIn::DRequired(payload.into()), + BarOut::ERequired(payload) => BarIn::ERequired(payload.into()), + BarOut::FRequired(payload) => BarIn::FRequired(payload.into()), + BarOut::GRequired(payload) => BarIn::GRequired(payload.into()), + BarOut::HRequired(payload) => BarIn::HRequired(payload.into()), + BarOut::IRequired(payload) => BarIn::IRequired(payload.into()), + BarOut::JRequired(payload) => BarIn::JRequired(payload.into()), + BarOut::KRequired(payload) => BarIn::KRequired(payload.into()), + BarOut::LRequired(payload) => BarIn::LRequired(payload.into()), + BarOut::MRequired(payload) => BarIn::MRequired(payload.into()), + BarOut::NRequired(payload) => BarIn::NRequired(payload.into()), + BarOut::ORequired(payload) => BarIn::ORequired(payload.into()), + BarOut::PRequired(payload) => BarIn::PRequired(payload.into()), + BarOut::QRequired(payload) => BarIn::QRequired(payload.into_iter().map(|x| x.into()).collect::>()), + BarOut::RRequired(payload) => BarIn::RRequired(payload.into_iter().map(|x| x.into()).collect::>()), + BarOut::SRequired(payload) => BarIn::SRequired(payload.into()), + BarOut::TRequired(payload) => BarIn::TRequired(payload.into()), + BarOut::URequired(payload) => BarIn::URequired(payload.into()), + BarOut::VRequired(payload) => BarIn::VRequired(payload.into()), + BarOut::WRequired(payload) => BarIn::WRequired(payload.into()), + BarOut::XRequired(payload) => BarIn::XRequired(payload.into()), + BarOut::YRequired(payload) => BarIn::YRequired(payload.into()), + BarOut::ZRequired(payload) => BarIn::ZRequired(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), + BarOut::AaRequired(payload) => BarIn::AaRequired(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), + BarOut::AAsymmetric(fallback) => BarIn::AAsymmetric, + BarOut::BAsymmetric(payload, fallback) => BarIn::BAsymmetric(payload.into()), + BarOut::CAsymmetric(payload, fallback) => BarIn::CAsymmetric(payload.into()), + BarOut::DAsymmetric(payload, fallback) => BarIn::DAsymmetric(payload.into()), + BarOut::EAsymmetric(payload, fallback) => BarIn::EAsymmetric(payload.into()), + BarOut::FAsymmetric(payload, fallback) => BarIn::FAsymmetric(payload.into()), + BarOut::GAsymmetric(payload, fallback) => BarIn::GAsymmetric(payload.into()), + BarOut::HAsymmetric(payload, fallback) => BarIn::HAsymmetric(payload.into()), + BarOut::IAsymmetric(payload, fallback) => BarIn::IAsymmetric(payload.into()), + BarOut::JAsymmetric(payload, fallback) => BarIn::JAsymmetric(payload.into()), + BarOut::KAsymmetric(payload, fallback) => BarIn::KAsymmetric(payload.into()), + BarOut::LAsymmetric(payload, fallback) => BarIn::LAsymmetric(payload.into()), + BarOut::MAsymmetric(payload, fallback) => BarIn::MAsymmetric(payload.into()), + BarOut::NAsymmetric(payload, fallback) => BarIn::NAsymmetric(payload.into()), + BarOut::OAsymmetric(payload, fallback) => BarIn::OAsymmetric(payload.into()), + BarOut::PAsymmetric(payload, fallback) => BarIn::PAsymmetric(payload.into()), + BarOut::QAsymmetric(payload, fallback) => BarIn::QAsymmetric(payload.into_iter().map(|x| x.into()).collect::>()), + BarOut::RAsymmetric(payload, fallback) => BarIn::RAsymmetric(payload.into_iter().map(|x| x.into()).collect::>()), + BarOut::SAsymmetric(payload, fallback) => BarIn::SAsymmetric(payload.into()), + BarOut::TAsymmetric(payload, fallback) => BarIn::TAsymmetric(payload.into()), + BarOut::UAsymmetric(payload, fallback) => BarIn::UAsymmetric(payload.into()), + BarOut::VAsymmetric(payload, fallback) => BarIn::VAsymmetric(payload.into()), + BarOut::WAsymmetric(payload, fallback) => BarIn::WAsymmetric(payload.into()), + BarOut::XAsymmetric(payload, fallback) => BarIn::XAsymmetric(payload.into()), + BarOut::YAsymmetric(payload, fallback) => BarIn::YAsymmetric(payload.into()), + BarOut::ZAsymmetric(payload, fallback) => BarIn::ZAsymmetric(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), + BarOut::AaAsymmetric(payload, fallback) => BarIn::AaAsymmetric(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>()), + BarOut::AOptional(fallback) => BarIn::AOptional(Box::new((*fallback).into())), + BarOut::BOptional(payload, fallback) => BarIn::BOptional(payload.into(), Box::new((*fallback).into())), + BarOut::COptional(payload, fallback) => BarIn::COptional(payload.into(), Box::new((*fallback).into())), + BarOut::DOptional(payload, fallback) => BarIn::DOptional(payload.into(), Box::new((*fallback).into())), + BarOut::EOptional(payload, fallback) => BarIn::EOptional(payload.into(), Box::new((*fallback).into())), + BarOut::FOptional(payload, fallback) => BarIn::FOptional(payload.into(), Box::new((*fallback).into())), + BarOut::GOptional(payload, fallback) => BarIn::GOptional(payload.into(), Box::new((*fallback).into())), + BarOut::HOptional(payload, fallback) => BarIn::HOptional(payload.into(), Box::new((*fallback).into())), + BarOut::IOptional(payload, fallback) => BarIn::IOptional(payload.into(), Box::new((*fallback).into())), + BarOut::JOptional(payload, fallback) => BarIn::JOptional(payload.into(), Box::new((*fallback).into())), + BarOut::KOptional(payload, fallback) => BarIn::KOptional(payload.into(), Box::new((*fallback).into())), + BarOut::LOptional(payload, fallback) => BarIn::LOptional(payload.into(), Box::new((*fallback).into())), + BarOut::MOptional(payload, fallback) => BarIn::MOptional(payload.into(), Box::new((*fallback).into())), + BarOut::NOptional(payload, fallback) => BarIn::NOptional(payload.into(), Box::new((*fallback).into())), + BarOut::OOptional(payload, fallback) => BarIn::OOptional(payload.into(), Box::new((*fallback).into())), + BarOut::POptional(payload, fallback) => BarIn::POptional(payload.into(), Box::new((*fallback).into())), + BarOut::QOptional(payload, fallback) => BarIn::QOptional(payload.into_iter().map(|x| x.into()).collect::>(), Box::new((*fallback).into())), + BarOut::ROptional(payload, fallback) => BarIn::ROptional(payload.into_iter().map(|x| x.into()).collect::>(), Box::new((*fallback).into())), + BarOut::SOptional(payload, fallback) => BarIn::SOptional(payload.into(), Box::new((*fallback).into())), + BarOut::TOptional(payload, fallback) => BarIn::TOptional(payload.into(), Box::new((*fallback).into())), + BarOut::UOptional(payload, fallback) => BarIn::UOptional(payload.into(), Box::new((*fallback).into())), + BarOut::VOptional(payload, fallback) => BarIn::VOptional(payload.into(), Box::new((*fallback).into())), + BarOut::WOptional(payload, fallback) => BarIn::WOptional(payload.into(), Box::new((*fallback).into())), + BarOut::XOptional(payload, fallback) => BarIn::XOptional(payload.into(), Box::new((*fallback).into())), + BarOut::YOptional(payload, fallback) => BarIn::YOptional(payload.into(), Box::new((*fallback).into())), + BarOut::ZOptional(payload, fallback) => BarIn::ZOptional(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>(), Box::new((*fallback).into())), + BarOut::AaOptional(payload, fallback) => BarIn::AaOptional(payload.into_iter().map(|x| x.into_iter().map(|x| x.into()).collect::>()).collect::>(), Box::new((*fallback).into())), + } + } + } + + impl BarOut { + pub fn atlas(&self) -> BarAtlas { + match *self { + BarOut::ARequired => { + let payload = &(); + let payload_atlas = (0_usize); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::ARequired(super::super::field_header_size(0_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::BRequired(ref payload) => { + let payload_atlas = (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::BRequired(super::super::field_header_size(1_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::CRequired(ref payload) => { + let payload_atlas = (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::CRequired(super::super::field_header_size(2_u64, payload_size, true) + payload_size, payload_atlas) + } + BarOut::DRequired(ref payload) => { + let payload_atlas = ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::DRequired(super::super::field_header_size(3_u64, payload_size, true) + payload_size, payload_atlas) + } + BarOut::ERequired(ref payload) => { + let payload_atlas = (if *payload { 1_usize } else { 0_usize }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::ERequired(super::super::field_header_size(4_u64, payload_size, true) + payload_size, payload_atlas) + } + BarOut::FRequired(ref payload) => { + let payload_atlas = (payload.len()); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::FRequired(super::super::field_header_size(5_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::GRequired(ref payload) => { + let payload_atlas = (payload.len()); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::GRequired(super::super::field_header_size(6_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::HRequired(ref payload) => { + let payload_atlas = (payload.atlas()); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; + BarAtlas::HRequired(super::super::field_header_size(7_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::IRequired(ref payload) => { + let payload_atlas = (payload.atlas()); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; + BarAtlas::IRequired(super::super::field_header_size(8_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::JRequired(ref payload) => { + let payload_atlas = ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::JRequired(super::super::field_header_size(9_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::KRequired(ref payload) => { + let payload_atlas = (8_usize * payload.len()); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::KRequired(super::super::field_header_size(10_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::LRequired(ref payload) => { + let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload)))); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::LRequired(super::super::field_header_size(11_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::MRequired(ref payload) => { + let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::MRequired(super::super::field_header_size(12_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::NRequired(ref payload) => { + let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (1_usize))); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + BarAtlas::NRequired(super::super::field_header_size(13_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::ORequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::ORequired(super::super::field_header_size(14_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::PRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::PRequired(super::super::field_header_size(15_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::QRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::QRequired(super::super::field_header_size(16_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::RRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::RRequired(super::super::field_header_size(17_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::SRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::SRequired(super::super::field_header_size(18_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::TRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::TRequired(super::super::field_header_size(19_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::URequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::URequired(super::super::field_header_size(20_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::VRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::VRequired(super::super::field_header_size(21_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::WRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::WRequired(super::super::field_header_size(22_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::XRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::XRequired(super::super::field_header_size(23_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::YRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::YRequired(super::super::field_header_size(24_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::ZRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::ZRequired(super::super::field_header_size(25_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::AaRequired(ref payload) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + BarAtlas::AaRequired(super::super::field_header_size(26_u64, payload_size, false) + payload_size, payload_atlas) + } + BarOut::AAsymmetric(ref fallback) => { + let payload = &(); + let payload_atlas = (0_usize); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::AAsymmetric(super::super::field_header_size(28_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::BAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::BAsymmetric(super::super::field_header_size(29_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::CAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::CAsymmetric(super::super::field_header_size(30_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::DAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::DAsymmetric(super::super::field_header_size(31_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::EAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (if *payload { 1_usize } else { 0_usize }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::EAsymmetric(super::super::field_header_size(32_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::FAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (payload.len()); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::FAsymmetric(super::super::field_header_size(33_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::GAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (payload.len()); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::GAsymmetric(super::super::field_header_size(34_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::HAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (payload.atlas()); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; + let fallback_atlas = fallback.atlas(); + BarAtlas::HAsymmetric(super::super::field_header_size(35_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::IAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (payload.atlas()); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; + let fallback_atlas = fallback.atlas(); + BarAtlas::IAsymmetric(super::super::field_header_size(36_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::JAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::JAsymmetric(super::super::field_header_size(37_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::KAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (8_usize * payload.len()); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::KAsymmetric(super::super::field_header_size(38_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::LAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload)))); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::LAsymmetric(super::super::field_header_size(39_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::MAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::MAsymmetric(super::super::field_header_size(40_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::NAsymmetric(ref payload, ref fallback) => { + let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (1_usize))); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::NAsymmetric(super::super::field_header_size(41_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::OAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::OAsymmetric(super::super::field_header_size(42_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::PAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::PAsymmetric(super::super::field_header_size(43_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::QAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::QAsymmetric(super::super::field_header_size(44_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::RAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::RAsymmetric(super::super::field_header_size(45_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::SAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::SAsymmetric(super::super::field_header_size(46_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::TAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::TAsymmetric(super::super::field_header_size(47_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::UAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::UAsymmetric(super::super::field_header_size(48_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::VAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::VAsymmetric(super::super::field_header_size(49_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::WAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::WAsymmetric(super::super::field_header_size(50_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::XAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::XAsymmetric(super::super::field_header_size(51_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::YAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::YAsymmetric(super::super::field_header_size(52_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::ZAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::ZAsymmetric(super::super::field_header_size(53_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::AaAsymmetric(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::AaAsymmetric(super::super::field_header_size(54_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::AOptional(ref fallback) => { let payload = &(); let payload_atlas = (0_usize); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::ARequired(super::super::field_header_size(0_u64, payload_size, false) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::AOptional(super::super::field_header_size(56_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::BRequired(ref payload) => { + BarOut::BOptional(ref payload, ref fallback) => { let payload_atlas = (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize }); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::BRequired(super::super::field_header_size(1_u64, payload_size, false) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::BOptional(super::super::field_header_size(57_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::CRequired(ref payload) => { + BarOut::COptional(ref payload, ref fallback) => { let payload_atlas = (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::CRequired(super::super::field_header_size(2_u64, payload_size, true) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::COptional(super::super::field_header_size(58_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::DRequired(ref payload) => { + BarOut::DOptional(ref payload, ref fallback) => { let payload_atlas = ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::DRequired(super::super::field_header_size(3_u64, payload_size, true) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::DOptional(super::super::field_header_size(59_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::ERequired(ref payload) => { + BarOut::EOptional(ref payload, ref fallback) => { let payload_atlas = (if *payload { 1_usize } else { 0_usize }); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::ERequired(super::super::field_header_size(4_u64, payload_size, true) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::EOptional(super::super::field_header_size(60_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::FRequired(ref payload) => { + BarOut::FOptional(ref payload, ref fallback) => { let payload_atlas = (payload.len()); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::FRequired(super::super::field_header_size(5_u64, payload_size, false) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::FOptional(super::super::field_header_size(61_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::GRequired(ref payload) => { + BarOut::GOptional(ref payload, ref fallback) => { let payload_atlas = (payload.len()); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::GRequired(super::super::field_header_size(6_u64, payload_size, false) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::GOptional(super::super::field_header_size(62_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::HRequired(ref payload) => { + BarOut::HOptional(ref payload, ref fallback) => { let payload_atlas = (payload.atlas()); let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; - BarAtlas::HRequired(super::super::field_header_size(7_u64, payload_size, false) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::HOptional(super::super::field_header_size(63_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::IRequired(ref payload) => { + BarOut::IOptional(ref payload, ref fallback) => { let payload_atlas = (payload.atlas()); let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; - BarAtlas::IRequired(super::super::field_header_size(8_u64, payload_size, false) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::IOptional(super::super::field_header_size(64_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::JRequired(ref payload) => { + BarOut::JOptional(ref payload, ref fallback) => { let payload_atlas = ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::JRequired(super::super::field_header_size(9_u64, payload_size, false) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::JOptional(super::super::field_header_size(65_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::KRequired(ref payload) => { + BarOut::KOptional(ref payload, ref fallback) => { let payload_atlas = (8_usize * payload.len()); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::KRequired(super::super::field_header_size(10_u64, payload_size, false) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::KOptional(super::super::field_header_size(66_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) } - BarOut::LRequired(ref payload) => { + BarOut::LOptional(ref payload, ref fallback) => { let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload)))); let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::LRequired(super::super::field_header_size(11_u64, payload_size, false) + payload_size, payload_atlas) + let fallback_atlas = fallback.atlas(); + BarAtlas::LOptional(super::super::field_header_size(67_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::MOptional(ref payload, ref fallback) => { + let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::MOptional(super::super::field_header_size(68_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::NOptional(ref payload, ref fallback) => { + let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (1_usize))); + let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; + let fallback_atlas = fallback.atlas(); + BarAtlas::NOptional(super::super::field_header_size(69_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::OOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::OOptional(super::super::field_header_size(70_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::POptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::POptional(super::super::field_header_size(71_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::QOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::QOptional(super::super::field_header_size(72_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::ROptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::ROptional(super::super::field_header_size(73_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::SOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::SOptional(super::super::field_header_size(74_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::TOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::TOptional(super::super::field_header_size(75_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::UOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::UOptional(super::super::field_header_size(76_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::VOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::VOptional(super::super::field_header_size(77_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::WOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::WOptional(super::super::field_header_size(78_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::XOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::XOptional(super::super::field_header_size(79_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::YOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::YOptional(super::super::field_header_size(80_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::ZOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::ZOptional(super::super::field_header_size(81_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + BarOut::AaOptional(ref payload, ref fallback) => { + let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); + let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; + let fallback_atlas = fallback.atlas(); + BarAtlas::AaOptional(super::super::field_header_size(82_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + } + } + } + + pub fn serialize_with_atlas( + &self, + writer: &mut T, + atlas: &BarAtlas, + ) -> ::std::io::Result<()> { + match (self, atlas) { + (BarOut::ARequired, BarAtlas::ARequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 0_u64, *payload_atlas, false)?; + Ok(()) + } + (BarOut::BRequired(payload), BarAtlas::BRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 1_u64, *payload_atlas, false)?; + if payload.to_bits() != 0_u64 { + writer.write_all(&payload.to_le_bytes())?; + } + Ok(()) + } + (BarOut::CRequired(payload), BarAtlas::CRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 2_u64, *payload_atlas, true)?; + { + let varint = *payload; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + Ok(()) + } + (BarOut::DRequired(payload), BarAtlas::DRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 3_u64, *payload_atlas, true)?; + { + let varint = super::super::zigzag_encode(*payload); + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + Ok(()) + } + (BarOut::ERequired(payload), BarAtlas::ERequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 4_u64, *payload_atlas, true)?; + { + let varint = *payload as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + Ok(()) + } + (BarOut::FRequired(payload), BarAtlas::FRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 5_u64, *payload_atlas, false)?; + writer.write_all(payload)?; + Ok(()) + } + (BarOut::GRequired(payload), BarAtlas::GRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 6_u64, *payload_atlas, false)?; + writer.write_all(payload.as_bytes())?; + Ok(()) + } + (BarOut::HRequired(payload), BarAtlas::HRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 7_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + Ok(()) + } + (BarOut::IRequired(payload), BarAtlas::IRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 8_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + Ok(()) + } + (BarOut::JRequired(payload), BarAtlas::JRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 9_u64, *payload_atlas, false)?; + { + let varint = payload.len() as u64 as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + Ok(()) } - BarOut::MRequired(ref payload) => { - let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::MRequired(super::super::field_header_size(12_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::KRequired(payload), BarAtlas::KRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 10_u64, *payload_atlas, false)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + Ok(()) } - BarOut::NRequired(ref payload) => { - let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (1_usize))); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - BarAtlas::NRequired(super::super::field_header_size(13_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::LRequired(payload), BarAtlas::LRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 11_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; + } + } + Ok(()) } - BarOut::ORequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::ORequired(super::super::field_header_size(14_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::MRequired(payload), BarAtlas::MRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 12_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; + } + } + Ok(()) } - BarOut::PRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::PRequired(super::super::field_header_size(15_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::NRequired(payload), BarAtlas::NRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 13_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; + } + } + Ok(()) } - BarOut::QRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::QRequired(super::super::field_header_size(16_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::ORequired(payload), BarAtlas::ORequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 14_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + Ok(()) } - BarOut::RRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::RRequired(super::super::field_header_size(17_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::PRequired(payload), BarAtlas::PRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 15_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + Ok(()) } - BarOut::SRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::SRequired(super::super::field_header_size(18_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::QRequired(payload), BarAtlas::QRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 16_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + Ok(()) } - BarOut::TRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::TRequired(super::super::field_header_size(19_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::RRequired(payload), BarAtlas::RRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 17_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + Ok(()) } - BarOut::URequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::URequired(super::super::field_header_size(20_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::SRequired(payload), BarAtlas::SRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 18_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + { + let varint = payload.len() as u64 as u64; + super::super::serialize_varint(varint, writer)?; + } + } + Ok(()) } - BarOut::VRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::VRequired(super::super::field_header_size(21_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::TRequired(payload), BarAtlas::TRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 19_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + } + Ok(()) } - BarOut::WRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::WRequired(super::super::field_header_size(22_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::URequired(payload), BarAtlas::URequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 20_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; + } + } + } + Ok(()) } - BarOut::XRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::XRequired(super::super::field_header_size(23_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::VRequired(payload), BarAtlas::VRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 21_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; + } + } + } + Ok(()) } - BarOut::YRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::YRequired(super::super::field_header_size(24_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::WRequired(payload), BarAtlas::WRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 22_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; + } + } + } + Ok(()) } - BarOut::ZRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::ZRequired(super::super::field_header_size(25_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::XRequired(payload), BarAtlas::XRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 23_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + } + Ok(()) } - BarOut::AaRequired(ref payload) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - BarAtlas::AaRequired(super::super::field_header_size(26_u64, payload_size, false) + payload_size, payload_atlas) + (BarOut::YRequired(payload), BarAtlas::YRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 24_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + } + Ok(()) } - BarOut::AAsymmetric(ref fallback) => { - let payload = &(); - let payload_atlas = (0_usize); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::AAsymmetric(super::super::field_header_size(28_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::ZRequired(payload), BarAtlas::ZRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 25_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + Ok(()) } - BarOut::BAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::BAsymmetric(super::super::field_header_size(29_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::AaRequired(payload), BarAtlas::AaRequired(_, payload_atlas)) => { + super::super::serialize_field_header(writer, 26_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + Ok(()) } - BarOut::CAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::CAsymmetric(super::super::field_header_size(30_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::AAsymmetric(fallback), BarAtlas::AAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 28_u64, *payload_atlas, false)?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::DAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::DAsymmetric(super::super::field_header_size(31_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::BAsymmetric(payload, fallback), BarAtlas::BAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 29_u64, *payload_atlas, false)?; + if payload.to_bits() != 0_u64 { + writer.write_all(&payload.to_le_bytes())?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::EAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (if *payload { 1_usize } else { 0_usize }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::EAsymmetric(super::super::field_header_size(32_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::CAsymmetric(payload, fallback), BarAtlas::CAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 30_u64, *payload_atlas, true)?; + { + let varint = *payload; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::FAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (payload.len()); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::FAsymmetric(super::super::field_header_size(33_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::DAsymmetric(payload, fallback), BarAtlas::DAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 31_u64, *payload_atlas, true)?; + { + let varint = super::super::zigzag_encode(*payload); + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::GAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (payload.len()); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::GAsymmetric(super::super::field_header_size(34_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::EAsymmetric(payload, fallback), BarAtlas::EAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 32_u64, *payload_atlas, true)?; + { + let varint = *payload as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::HAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (payload.atlas()); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; - let fallback_atlas = fallback.atlas(); - BarAtlas::HAsymmetric(super::super::field_header_size(35_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::FAsymmetric(payload, fallback), BarAtlas::FAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 33_u64, *payload_atlas, false)?; + writer.write_all(payload)?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::IAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (payload.atlas()); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; - let fallback_atlas = fallback.atlas(); - BarAtlas::IAsymmetric(super::super::field_header_size(36_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::GAsymmetric(payload, fallback), BarAtlas::GAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 34_u64, *payload_atlas, false)?; + writer.write_all(payload.as_bytes())?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::JAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::JAsymmetric(super::super::field_header_size(37_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::HAsymmetric(payload, fallback), BarAtlas::HAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 35_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::KAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (8_usize * payload.len()); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::KAsymmetric(super::super::field_header_size(38_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::IAsymmetric(payload, fallback), BarAtlas::IAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 36_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::LAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload)))); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::LAsymmetric(super::super::field_header_size(39_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::JAsymmetric(payload, fallback), BarAtlas::JAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 37_u64, *payload_atlas, false)?; + { + let varint = payload.len() as u64 as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::MAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::MAsymmetric(super::super::field_header_size(40_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::KAsymmetric(payload, fallback), BarAtlas::KAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 38_u64, *payload_atlas, false)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::NAsymmetric(ref payload, ref fallback) => { - let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (1_usize))); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::NAsymmetric(super::super::field_header_size(41_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::LAsymmetric(payload, fallback), BarAtlas::LAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 39_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::OAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::OAsymmetric(super::super::field_header_size(42_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::MAsymmetric(payload, fallback), BarAtlas::MAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 40_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::PAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::PAsymmetric(super::super::field_header_size(43_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::NAsymmetric(payload, fallback), BarAtlas::NAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 41_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::QAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::QAsymmetric(super::super::field_header_size(44_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::OAsymmetric(payload, fallback), BarAtlas::OAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 42_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::RAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::RAsymmetric(super::super::field_header_size(45_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::PAsymmetric(payload, fallback), BarAtlas::PAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 43_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::SAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::SAsymmetric(super::super::field_header_size(46_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::QAsymmetric(payload, fallback), BarAtlas::QAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 44_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::TAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::TAsymmetric(super::super::field_header_size(47_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::RAsymmetric(payload, fallback), BarAtlas::RAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 45_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::UAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::UAsymmetric(super::super::field_header_size(48_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::SAsymmetric(payload, fallback), BarAtlas::SAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 46_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + { + let varint = payload.len() as u64 as u64; + super::super::serialize_varint(varint, writer)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::VAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::VAsymmetric(super::super::field_header_size(49_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::TAsymmetric(payload, fallback), BarAtlas::TAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 47_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::WAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::WAsymmetric(super::super::field_header_size(50_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::UAsymmetric(payload, fallback), BarAtlas::UAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 48_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; + } + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::XAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::XAsymmetric(super::super::field_header_size(51_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::VAsymmetric(payload, fallback), BarAtlas::VAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 49_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; + } + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::YAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::YAsymmetric(super::super::field_header_size(52_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::WAsymmetric(payload, fallback), BarAtlas::WAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 50_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; + } + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::ZAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::ZAsymmetric(super::super::field_header_size(53_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::XAsymmetric(payload, fallback), BarAtlas::XAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 51_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::AaAsymmetric(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::AaAsymmetric(super::super::field_header_size(54_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::YAsymmetric(payload, fallback), BarAtlas::YAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 52_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::AOptional(ref fallback) => { - let payload = &(); - let payload_atlas = (0_usize); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::AOptional(super::super::field_header_size(56_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::ZAsymmetric(payload, fallback), BarAtlas::ZAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 53_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::BOptional(ref payload, ref fallback) => { - let payload_atlas = (if payload.to_bits() == 0_u64 { 0_usize } else { 8_usize }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::BOptional(super::super::field_header_size(57_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::AaAsymmetric(payload, fallback), BarAtlas::AaAsymmetric(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 54_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::COptional(ref payload, ref fallback) => { - let payload_atlas = (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::COptional(super::super::field_header_size(58_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::AOptional(fallback), BarAtlas::AOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 56_u64, *payload_atlas, false)?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::DOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::DOptional(super::super::field_header_size(59_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::BOptional(payload, fallback), BarAtlas::BOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 57_u64, *payload_atlas, false)?; + if payload.to_bits() != 0_u64 { + writer.write_all(&payload.to_le_bytes())?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::EOptional(ref payload, ref fallback) => { - let payload_atlas = (if *payload { 1_usize } else { 0_usize }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::EOptional(super::super::field_header_size(60_u64, payload_size, true) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::COptional(payload, fallback), BarAtlas::COptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 58_u64, *payload_atlas, true)?; + { + let varint = *payload; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::FOptional(ref payload, ref fallback) => { - let payload_atlas = (payload.len()); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::FOptional(super::super::field_header_size(61_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::DOptional(payload, fallback), BarAtlas::DOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 59_u64, *payload_atlas, true)?; + { + let varint = super::super::zigzag_encode(*payload); + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::GOptional(ref payload, ref fallback) => { - let payload_atlas = (payload.len()); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::GOptional(super::super::field_header_size(62_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::EOptional(payload, fallback), BarAtlas::EOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 60_u64, *payload_atlas, true)?; + { + let varint = *payload as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::HOptional(ref payload, ref fallback) => { - let payload_atlas = (payload.atlas()); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; - let fallback_atlas = fallback.atlas(); - BarAtlas::HOptional(super::super::field_header_size(63_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::FOptional(payload, fallback), BarAtlas::FOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 61_u64, *payload_atlas, false)?; + writer.write_all(payload)?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::IOptional(ref payload, ref fallback) => { - let payload_atlas = (payload.atlas()); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.size() }; - let fallback_atlas = fallback.atlas(); - BarAtlas::IOptional(super::super::field_header_size(64_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::GOptional(payload, fallback), BarAtlas::GOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 62_u64, *payload_atlas, false)?; + writer.write_all(payload.as_bytes())?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::JOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let payload = &(payload.len() as u64); (match *payload { 0_u64 => { 0_usize }, 1_u64..=567_382_630_219_903_u64 => { super::super::varint_size_from_value(*payload) }, 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => { 8_usize } }) }); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::JOptional(super::super::field_header_size(65_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::HOptional(payload, fallback), BarAtlas::HOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 63_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::KOptional(ref payload, ref fallback) => { - let payload_atlas = (8_usize * payload.len()); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::KOptional(super::super::field_header_size(66_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::IOptional(payload, fallback), BarAtlas::IOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 64_u64, payload_atlas.size(), false)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::LOptional(ref payload, ref fallback) => { - let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload)))); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::LOptional(super::super::field_header_size(67_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::JOptional(payload, fallback), BarAtlas::JOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 65_u64, *payload_atlas, false)?; + { + let varint = payload.len() as u64 as u64; + match varint { + 0_u64 => {} + 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, + 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::MOptional(ref payload, ref fallback) => { - let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) }))); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::MOptional(super::super::field_header_size(68_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::KOptional(payload, fallback), BarAtlas::KOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 66_u64, *payload_atlas, false)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::NOptional(ref payload, ref fallback) => { - let payload_atlas = (payload.iter().fold(0_usize, |x, payload| x + (1_usize))); - let payload_size = { let payload_atlas = &payload_atlas; *payload_atlas }; - let fallback_atlas = fallback.atlas(); - BarAtlas::NOptional(super::super::field_header_size(69_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::LOptional(payload, fallback), BarAtlas::LOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 67_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::OOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::OOptional(super::super::field_header_size(70_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::MOptional(payload, fallback), BarAtlas::MOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 68_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::POptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::POptional(super::super::field_header_size(71_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::NOptional(payload, fallback), BarAtlas::NOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 69_u64, *payload_atlas, false)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) + } + (BarOut::OOptional(payload, fallback), BarAtlas::OOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 70_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::QOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::QOptional(super::super::field_header_size(72_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::POptional(payload, fallback), BarAtlas::POptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 71_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::ROptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::ROptional(super::super::field_header_size(73_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::QOptional(payload, fallback), BarAtlas::QOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 72_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::SOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let payload = &(payload.len() as u64); (super::super::varint_size_from_value(*payload)) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::SOptional(super::super::field_header_size(74_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::ROptional(payload, fallback), BarAtlas::ROptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 73_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::TOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (8_usize * payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::TOptional(super::super::field_header_size(75_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::SOptional(payload, fallback), BarAtlas::SOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 74_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + { + let varint = payload.len() as u64 as u64; + super::super::serialize_varint(varint, writer)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::UOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (super::super::varint_size_from_value(*payload))))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::UOptional(super::super::field_header_size(76_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::TOptional(payload, fallback), BarAtlas::TOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 75_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + writer.write_all(&payload.to_le_bytes())?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::VOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + ({ let zigzag = super::super::zigzag_encode(*payload); let payload = &zigzag; (super::super::varint_size_from_value(*payload)) })))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::VOptional(super::super::field_header_size(77_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::UOptional(payload, fallback), BarAtlas::UOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 76_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload; + super::super::serialize_varint(varint, writer)?; + } + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::WOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| (payload.iter().fold(0_usize, |x, payload| x + (1_usize)))).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::WOptional(super::super::field_header_size(78_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::VOptional(payload, fallback), BarAtlas::VOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 77_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = super::super::zigzag_encode(*payload); + super::super::serialize_varint(varint, writer)?; + } + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::XOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::XOptional(super::super::field_header_size(79_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::WOptional(payload, fallback), BarAtlas::WOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 78_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + for payload in payload { + { + let varint = *payload as u64; + super::super::serialize_varint(varint, writer)?; + } + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::YOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.len())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = *payload_atlas; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::YOptional(super::super::field_header_size(80_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::XOptional(payload, fallback), BarAtlas::XOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 79_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::ZOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::ZOptional(super::super::field_header_size(81_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::YOptional(payload, fallback), BarAtlas::YOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 80_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(*payload_atlas as u64, writer)?; + writer.write_all(payload.as_bytes())?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } - BarOut::AaOptional(ref payload, ref fallback) => { - let payload_atlas = ({ let atlases = payload.iter().map(|payload| ({ let atlases = payload.iter().map(|payload| (payload.atlas())).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.size(); x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) })).collect::>(); (atlases.iter().fold(0_usize, |x, payload_atlas| { let atlas_size = payload_atlas.0; x + super::super::varint_size_from_value(atlas_size as u64) + atlas_size }), atlases) }); - let payload_size = { let payload_atlas = &payload_atlas; payload_atlas.0 }; - let fallback_atlas = fallback.atlas(); - BarAtlas::AaOptional(super::super::field_header_size(82_u64, payload_size, false) + payload_size + fallback_atlas.size(), payload_atlas, Box::new(fallback_atlas)) + (BarOut::ZOptional(payload, fallback), BarAtlas::ZOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 81_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) + } + (BarOut::AaOptional(payload, fallback), BarAtlas::AaOptional(_, payload_atlas, fallback_atlas)) => { + super::super::serialize_field_header(writer, 82_u64, payload_atlas.0, false)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.0 as u64, writer)?; + for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { + super::super::serialize_varint(payload_atlas.size() as u64, writer)?; + payload.serialize_with_atlas(writer, payload_atlas)?; + } + } + fallback.serialize_with_atlas(writer, fallback_atlas) } + (_, _) => panic!(), } } + } - pub fn serialize_with_atlas( - &self, - writer: &mut T, - atlas: &BarAtlas, - ) -> ::std::io::Result<()> { - match (self, atlas) { - (BarOut::ARequired, BarAtlas::ARequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 0_u64, *payload_atlas, false)?; - Ok(()) - } - (BarOut::BRequired(payload), BarAtlas::BRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 1_u64, *payload_atlas, false)?; - if payload.to_bits() != 0_u64 { - writer.write_all(&payload.to_le_bytes())?; + impl BarIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + loop { + let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + 0 => { + let payload = (); + super::super::finish(&mut *reader)?; + return Ok(BarIn::ARequired); + } + 1 => { + let payload = if payload_size == 0_usize { + 0.0_f64 + } else { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + f64::from_le_bytes(buffer) + }; + super::super::finish(&mut *reader)?; + return Ok(BarIn::BRequired(payload)); + } + 2 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + super::super::finish(&mut *reader)?; + return Ok(BarIn::CRequired(payload)); + } + 3 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = super::super::zigzag_decode(payload); + super::super::finish(&mut *reader)?; + return Ok(BarIn::DRequired(payload)); + } + 4 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = payload != 0_u64; + super::super::finish(&mut *reader)?; + return Ok(BarIn::ERequired(payload)); + } + 5 => { + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(BarIn::FRequired(payload)); + } + 6 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(BarIn::GRequired(payload)); + } + 7 => { + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + super::super::finish(&mut *reader)?; + return Ok(BarIn::HRequired(payload)); + } + 8 => { + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + super::super::finish(&mut *reader)?; + return Ok(BarIn::IRequired(payload)); + } + 9 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = vec![(); payload as usize]; + super::super::finish(&mut *reader)?; + return Ok(BarIn::JRequired(payload)); + } + 10 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + let payload = f64::from_le_bytes(buffer); + Ok(payload) + } + let mut payload = Vec::new(); + payload.reserve_exact(payload_size); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::KRequired(payload)); + } + 11 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::LRequired(payload)); + } + 12 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = super::super::zigzag_decode(payload); + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::MRequired(payload)); + } + 13 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = payload != 0_u64; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::NRequired(payload)); + } + 14 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::ORequired(payload)); + } + 15 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::PRequired(payload)); + } + 16 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::QRequired(payload)); + } + 17 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::RRequired(payload)); + } + 18 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = vec![(); payload as usize]; + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::SRequired(payload)); + } + 19 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + let payload = f64::from_le_bytes(buffer); + Ok(payload) + } + let mut payload = Vec::new(); + payload.reserve_exact(payload_size); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::TRequired(payload)); + } + 20 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::URequired(payload)); } - Ok(()) - } - (BarOut::CRequired(payload), BarAtlas::CRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 2_u64, *payload_atlas, true)?; - { - let varint = *payload; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 21 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = super::super::zigzag_decode(payload); + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::VRequired(payload)); } - Ok(()) - } - (BarOut::DRequired(payload), BarAtlas::DRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 3_u64, *payload_atlas, true)?; - { - let varint = super::super::zigzag_encode(*payload); - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 22 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = payload != 0_u64; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::WRequired(payload)); } - Ok(()) - } - (BarOut::ERequired(payload), BarAtlas::ERequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 4_u64, *payload_atlas, true)?; - { - let varint = *payload as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 23 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + payload + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::XRequired(payload)); } - Ok(()) - } - (BarOut::FRequired(payload), BarAtlas::FRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 5_u64, *payload_atlas, false)?; - writer.write_all(payload)?; - Ok(()) - } - (BarOut::GRequired(payload), BarAtlas::GRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 6_u64, *payload_atlas, false)?; - writer.write_all(payload.as_bytes())?; - Ok(()) - } - (BarOut::HRequired(payload), BarAtlas::HRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 7_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - Ok(()) - } - (BarOut::IRequired(payload), BarAtlas::IRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 8_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - Ok(()) - } - (BarOut::JRequired(payload), BarAtlas::JRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 9_u64, *payload_atlas, false)?; - { - let varint = payload.len() as u64 as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 24 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + payload + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::YRequired(payload)); } - Ok(()) - } - (BarOut::KRequired(payload), BarAtlas::KRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 10_u64, *payload_atlas, false)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; + 25 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::ZRequired(payload)); } - Ok(()) - } - (BarOut::LRequired(payload), BarAtlas::LRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 11_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; + 26 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::AaRequired(payload)); } - Ok(()) - } - (BarOut::MRequired(payload), BarAtlas::MRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 12_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; - } + 28 => { + let payload = (); + super::super::finish(&mut *reader)?; + return Ok(BarIn::AAsymmetric); } - Ok(()) - } - (BarOut::NRequired(payload), BarAtlas::NRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 13_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; - } + 29 => { + let payload = if payload_size == 0_usize { + 0.0_f64 + } else { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + f64::from_le_bytes(buffer) + }; + super::super::finish(&mut *reader)?; + return Ok(BarIn::BAsymmetric(payload)); } - Ok(()) - } - (BarOut::ORequired(payload), BarAtlas::ORequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 14_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; + 30 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + super::super::finish(&mut *reader)?; + return Ok(BarIn::CAsymmetric(payload)); } - Ok(()) - } - (BarOut::PRequired(payload), BarAtlas::PRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 15_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; + 31 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = super::super::zigzag_decode(payload); + super::super::finish(&mut *reader)?; + return Ok(BarIn::DAsymmetric(payload)); } - Ok(()) - } - (BarOut::QRequired(payload), BarAtlas::QRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 16_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + 32 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = payload != 0_u64; + super::super::finish(&mut *reader)?; + return Ok(BarIn::EAsymmetric(payload)); } - Ok(()) - } - (BarOut::RRequired(payload), BarAtlas::RRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 17_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + 33 => { + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(BarIn::FAsymmetric(payload)); } - Ok(()) - } - (BarOut::SRequired(payload), BarAtlas::SRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 18_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - { - let varint = payload.len() as u64 as u64; - super::super::serialize_varint(varint, writer)?; - } + 34 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(BarIn::GAsymmetric(payload)); } - Ok(()) - } - (BarOut::TRequired(payload), BarAtlas::TRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 19_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; - } + 35 => { + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + super::super::finish(&mut *reader)?; + return Ok(BarIn::HAsymmetric(payload)); } - Ok(()) - } - (BarOut::URequired(payload), BarAtlas::URequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 20_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; - } - } + 36 => { + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + super::super::finish(&mut *reader)?; + return Ok(BarIn::IAsymmetric(payload)); } - Ok(()) - } - (BarOut::VRequired(payload), BarAtlas::VRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 21_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; + 37 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) } - } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = vec![(); payload as usize]; + super::super::finish(&mut *reader)?; + return Ok(BarIn::JAsymmetric(payload)); } - Ok(()) - } - (BarOut::WRequired(payload), BarAtlas::WRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 22_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; - } + 38 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + let payload = f64::from_le_bytes(buffer); + Ok(payload) + } + let mut payload = Vec::new(); + payload.reserve_exact(payload_size); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::KAsymmetric(payload)); } - Ok(()) - } - (BarOut::XRequired(payload), BarAtlas::XRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 23_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; + 39 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::LAsymmetric(payload)); } - Ok(()) - } - (BarOut::YRequired(payload), BarAtlas::YRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 24_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; + 40 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = super::super::zigzag_decode(payload); + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::MAsymmetric(payload)); } - Ok(()) - } - (BarOut::ZRequired(payload), BarAtlas::ZRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 25_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + 41 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = payload != 0_u64; + Ok(payload) } - } - Ok(()) - } - (BarOut::AaRequired(payload), BarAtlas::AaRequired(_, payload_atlas)) => { - super::super::serialize_field_header(writer, 26_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::NAsymmetric(payload)); } - Ok(()) - } - (BarOut::AAsymmetric(fallback), BarAtlas::AAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 28_u64, *payload_atlas, false)?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::BAsymmetric(payload, fallback), BarAtlas::BAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 29_u64, *payload_atlas, false)?; - if payload.to_bits() != 0_u64 { - writer.write_all(&payload.to_le_bytes())?; + 42 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::OAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::CAsymmetric(payload, fallback), BarAtlas::CAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 30_u64, *payload_atlas, true)?; - { - let varint = *payload; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 43 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::PAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::DAsymmetric(payload, fallback), BarAtlas::DAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 31_u64, *payload_atlas, true)?; - { - let varint = super::super::zigzag_encode(*payload); - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 44 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::QAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::EAsymmetric(payload, fallback), BarAtlas::EAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 32_u64, *payload_atlas, true)?; - { - let varint = *payload as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 45 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::RAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::FAsymmetric(payload, fallback), BarAtlas::FAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 33_u64, *payload_atlas, false)?; - writer.write_all(payload)?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::GAsymmetric(payload, fallback), BarAtlas::GAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 34_u64, *payload_atlas, false)?; - writer.write_all(payload.as_bytes())?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::HAsymmetric(payload, fallback), BarAtlas::HAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 35_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::IAsymmetric(payload, fallback), BarAtlas::IAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 36_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::JAsymmetric(payload, fallback), BarAtlas::JAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 37_u64, *payload_atlas, false)?; - { - let varint = payload.len() as u64 as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 46 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = vec![(); payload as usize]; + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::SAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::KAsymmetric(payload, fallback), BarAtlas::KAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 38_u64, *payload_atlas, false)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; + 47 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + let payload = f64::from_le_bytes(buffer); + Ok(payload) + } + let mut payload = Vec::new(); + payload.reserve_exact(payload_size); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::TAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::LAsymmetric(payload, fallback), BarAtlas::LAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 39_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; + 48 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::UAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::MAsymmetric(payload, fallback), BarAtlas::MAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 40_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; + 49 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = super::super::zigzag_decode(payload); + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::VAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::NAsymmetric(payload, fallback), BarAtlas::NAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 41_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; + 50 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = payload != 0_u64; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::WAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::OAsymmetric(payload, fallback), BarAtlas::OAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 42_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; - } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::PAsymmetric(payload, fallback), BarAtlas::PAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 43_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; - } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::QAsymmetric(payload, fallback), BarAtlas::QAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 44_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + 51 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + payload + }); + } + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::XAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::RAsymmetric(payload, fallback), BarAtlas::RAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 45_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + 52 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + payload + }); + } + payload + }); + } + super::super::finish(&mut *reader)?; + return Ok(BarIn::YAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::SAsymmetric(payload, fallback), BarAtlas::SAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 46_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - { - let varint = payload.len() as u64 as u64; - super::super::serialize_varint(varint, writer)?; + 53 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::ZAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::TAsymmetric(payload, fallback), BarAtlas::TAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 47_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; + 54 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + payload + }); } + super::super::finish(&mut *reader)?; + return Ok(BarIn::AaAsymmetric(payload)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::UAsymmetric(payload, fallback), BarAtlas::UAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 48_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; - } - } + 56 => { + let payload = (); + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::AOptional(fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::VAsymmetric(payload, fallback), BarAtlas::VAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 49_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; + 57 => { + let payload = if payload_size == 0_usize { + 0.0_f64 + } else { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + f64::from_le_bytes(buffer) + }; + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::BOptional(payload, fallback)); + } + 58 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) } - } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::COptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::WAsymmetric(payload, fallback), BarAtlas::WAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 50_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; + 59 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) } - } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = super::super::zigzag_decode(payload); + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::DOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::XAsymmetric(payload, fallback), BarAtlas::XAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 51_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; - } + 60 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = payload != 0_u64; + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::EOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::YAsymmetric(payload, fallback), BarAtlas::YAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 52_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; - } + 61 => { + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::FOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::ZAsymmetric(payload, fallback), BarAtlas::ZAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 53_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } + 62 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::GOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::AaAsymmetric(payload, fallback), BarAtlas::AaAsymmetric(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 54_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - } + 63 => { + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::HOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::AOptional(fallback), BarAtlas::AOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 56_u64, *payload_atlas, false)?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::BOptional(payload, fallback), BarAtlas::BOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 57_u64, *payload_atlas, false)?; - if payload.to_bits() != 0_u64 { - writer.write_all(&payload.to_le_bytes())?; + 64 => { + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::IOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::COptional(payload, fallback), BarAtlas::COptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 58_u64, *payload_atlas, true)?; - { - let varint = *payload; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, - } + 65 => { + let payload = match payload_size { + 0_usize => 0_u64, + 8_usize => { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer[..])?; + u64::from_le_bytes(buffer) + } + _ => super::super::deserialize_varint(&mut sub_reader)?, + }; + let payload = vec![(); payload as usize]; + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::JOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::DOptional(payload, fallback), BarAtlas::DOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 59_u64, *payload_atlas, true)?; - { - let varint = super::super::zigzag_encode(*payload); - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 66 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + let payload = f64::from_le_bytes(buffer); + Ok(payload) } - } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::EOptional(payload, fallback), BarAtlas::EOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 60_u64, *payload_atlas, true)?; - { - let varint = *payload as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + let mut payload = Vec::new(); + payload.reserve_exact(payload_size); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::KOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::FOptional(payload, fallback), BarAtlas::FOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 61_u64, *payload_atlas, false)?; - writer.write_all(payload)?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::GOptional(payload, fallback), BarAtlas::GOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 62_u64, *payload_atlas, false)?; - writer.write_all(payload.as_bytes())?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::HOptional(payload, fallback), BarAtlas::HOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 63_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::IOptional(payload, fallback), BarAtlas::IOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 64_u64, payload_atlas.size(), false)?; - payload.serialize_with_atlas(writer, payload_atlas)?; - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::JOptional(payload, fallback), BarAtlas::JOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 65_u64, *payload_atlas, false)?; - { - let varint = payload.len() as u64 as u64; - match varint { - 0_u64 => {} - 1_u64..=567_382_630_219_903_u64 => super::super::serialize_varint(varint, writer)?, - 567_382_630_219_904_u64..=18_446_744_073_709_551_615_u64 => writer.write_all(&varint.to_le_bytes())?, + 67 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + Ok(payload) } - } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::KOptional(payload, fallback), BarAtlas::KOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 66_u64, *payload_atlas, false)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; - } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::LOptional(payload, fallback), BarAtlas::LOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 67_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::LOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::MOptional(payload, fallback), BarAtlas::MOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 68_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; + 68 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = super::super::zigzag_decode(payload); + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::MOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::NOptional(payload, fallback), BarAtlas::NOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 69_u64, *payload_atlas, false)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; + 69 => { + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = payload != 0_u64; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::NOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::OOptional(payload, fallback), BarAtlas::OOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 70_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; + 70 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + payload + }); + } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::OOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::POptional(payload, fallback), BarAtlas::POptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 71_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; + 71 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + payload + }); + } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::POptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::QOptional(payload, fallback), BarAtlas::QOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 72_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + 72 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::QOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::ROptional(payload, fallback), BarAtlas::ROptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 73_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + 73 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::ROptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::SOptional(payload, fallback), BarAtlas::SOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 74_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - { - let varint = payload.len() as u64 as u64; - super::super::serialize_varint(varint, writer)?; + 74 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = vec![(); payload as usize]; + payload + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::SOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::TOptional(payload, fallback), BarAtlas::TOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 75_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - writer.write_all(&payload.to_le_bytes())?; + 75 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let mut buffer = [0; 8]; + ::std::io::Read::read_exact(&mut sub_reader, &mut buffer)?; + let payload = f64::from_le_bytes(buffer); + Ok(payload) + } + let mut payload = Vec::new(); + payload.reserve_exact(payload_size); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::TOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::UOptional(payload, fallback), BarAtlas::UOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 76_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload; - super::super::serialize_varint(varint, writer)?; - } + 76 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::UOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::VOptional(payload, fallback), BarAtlas::VOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 77_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = super::super::zigzag_encode(*payload); - super::super::serialize_varint(varint, writer)?; - } + 77 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = super::super::zigzag_decode(payload); + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::VOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::WOptional(payload, fallback), BarAtlas::WOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 78_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - for payload in payload { - { - let varint = *payload as u64; - super::super::serialize_varint(varint, writer)?; - } + 78 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + fn deserialize_element(mut sub_reader: &mut T) -> ::std::io::Result { + let payload = super::super::deserialize_varint(&mut sub_reader)?; + let payload = payload != 0_u64; + Ok(payload) + } + let mut payload = Vec::new(); + loop { + payload.push(match deserialize_element(&mut sub_reader) { + Ok(element) => element, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }); + } + payload + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::WOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::XOptional(payload, fallback), BarAtlas::XOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 79_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload)?; + 79 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = vec![]; + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_end(&mut sub_reader, &mut payload)?; + payload + }); + } + payload + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::XOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::YOptional(payload, fallback), BarAtlas::YOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 80_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(*payload_atlas as u64, writer)?; - writer.write_all(payload.as_bytes())?; + 80 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + payload + }); + } + payload + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::YOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::ZOptional(payload, fallback), BarAtlas::ZOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 81_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + 81 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = LocalStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + payload + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::ZOptional(payload, fallback)); } - fallback.serialize_with_atlas(writer, fallback_atlas) - } - (BarOut::AaOptional(payload, fallback), BarAtlas::AaOptional(_, payload_atlas, fallback_atlas)) => { - super::super::serialize_field_header(writer, 82_u64, payload_atlas.0, false)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.0 as u64, writer)?; - for (payload, payload_atlas) in payload.iter().zip(payload_atlas.1.iter()) { - super::super::serialize_varint(payload_atlas.size() as u64, writer)?; - payload.serialize_with_atlas(writer, payload_atlas)?; + 82 => { + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let mut payload = Vec::new(); + loop { + let payload_size = match super::super::deserialize_varint(&mut sub_reader) { + Ok(payload_size) => payload_size as usize, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + return Err(err); + } + }; + let mut sub_reader = ::std::io::Read::take(&mut sub_reader, payload_size as u64); + payload.push({ + let payload = super::super::degenerate::types::EmptyStructIn::deserialize_from_reader_ref(&mut sub_reader)?; + payload + }); + } + payload + }); } + let fallback = Box::new(BarIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(BarIn::AaOptional(payload, fallback)); + } + _ => { + super::super::skip(&mut sub_reader, payload_size as usize)?; } - fallback.serialize_with_atlas(writer, fallback_atlas) } - (_, _) => panic!(), } } } @@ -7564,23 +7545,50 @@ pub mod degenerate { pub struct EmptyStructIn { } - impl super::super::Serialize for EmptyStructOut { - fn size(&self) -> usize { - self.atlas().size() + impl super::super::Serialize for EmptyStructOut { + fn size(&self) -> usize { + self.atlas().size() + } + + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { + let atlas = self.atlas(); + self.serialize_with_atlas(&mut writer, &atlas) + } + } + + impl super::super::Deserialize for EmptyStructIn { + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) + } + } + + impl From for EmptyStructIn { + fn from(message: EmptyStructOut) -> Self { + EmptyStructIn { + } + } + } + + impl EmptyStructOut { + pub fn atlas(&self) -> EmptyStructAtlas { + EmptyStructAtlas { + _size: 0, + } } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { - let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + pub fn serialize_with_atlas( + &self, + writer: &mut T, + atlas: &EmptyStructAtlas, + ) -> ::std::io::Result<()> { + Ok(()) } } - impl super::super::Deserialize for EmptyStructIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { + impl EmptyStructIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { loop { let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { Ok(header) => header, @@ -7607,29 +7615,6 @@ pub mod degenerate { } } - impl From for EmptyStructIn { - fn from(message: EmptyStructOut) -> Self { - EmptyStructIn { - } - } - } - - impl EmptyStructOut { - pub fn atlas(&self) -> EmptyStructAtlas { - EmptyStructAtlas { - _size: 0, - } - } - - pub fn serialize_with_atlas( - &self, - writer: &mut T, - atlas: &EmptyStructAtlas, - ) -> ::std::io::Result<()> { - Ok(()) - } - } - impl EmptyStructAtlas { pub fn size(&self) -> usize { self._size @@ -7653,29 +7638,15 @@ pub mod degenerate { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::Deserialize for EmptyChoiceIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - loop { - let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; - - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); - - match index { - _ => { - super::super::skip(&mut sub_reader, payload_size as usize)?; - } - } - } + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) } } @@ -7703,6 +7674,24 @@ pub mod degenerate { } } + impl EmptyChoiceIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + loop { + let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + _ => { + super::super::skip(&mut sub_reader, payload_size as usize)?; + } + } + } + } + } + impl EmptyChoiceAtlas { pub fn size(&self) -> usize { match *self { @@ -7765,162 +7754,15 @@ pub mod schema_evolution { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::Deserialize for ExampleStructIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - let mut _required_to_required: Option = None; - let mut _required_to_asymmetric: Option = None; - let mut _required_to_optional: Option = None; - let mut _asymmetric_to_required: Option = None; - let mut _asymmetric_to_asymmetric: Option = None; - let mut _asymmetric_to_optional: Option = None; - let mut _optional_to_required: Option = None; - let mut _optional_to_asymmetric: Option = None; - let mut _optional_to_optional: Option = None; - let mut _nonexistent_to_asymmetric: Option<()> = None; - let mut _nonexistent_to_optional: Option<()> = None; - - loop { - let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { - Ok(header) => header, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - - return Err(err); - } - }; - - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); - - match index { - 0 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _required_to_required.get_or_insert(payload); - } - 1 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _required_to_asymmetric.get_or_insert(payload); - } - 2 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _required_to_optional.get_or_insert(payload); - } - 4 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _asymmetric_to_required.get_or_insert(payload); - } - 5 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _asymmetric_to_asymmetric.get_or_insert(payload); - } - 6 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _asymmetric_to_optional.get_or_insert(payload); - } - 8 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _optional_to_required.get_or_insert(payload); - } - 9 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _optional_to_asymmetric.get_or_insert(payload); - } - 10 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _optional_to_optional.get_or_insert(payload); - } - 13 => { - let payload = (); - _nonexistent_to_asymmetric.get_or_insert(payload); - } - 14 => { - let payload = (); - _nonexistent_to_optional.get_or_insert(payload); - } - _ => { - super::super::skip(&mut sub_reader, payload_size as usize)?; - } - } - } - - if _required_to_required.is_none() - || _asymmetric_to_required.is_none() - || _optional_to_required.is_none() { - return Err(::std::io::Error::new( - ::std::io::ErrorKind::InvalidData, - super::super::MISSING_FIELDS_ERROR_MESSAGE, - )); - } - - Ok(ExampleStructIn { - required_to_required: _required_to_required.unwrap(), - required_to_asymmetric: _required_to_asymmetric, - required_to_optional: _required_to_optional, - asymmetric_to_required: _asymmetric_to_required.unwrap(), - asymmetric_to_asymmetric: _asymmetric_to_asymmetric, - asymmetric_to_optional: _asymmetric_to_optional, - optional_to_required: _optional_to_required.unwrap(), - optional_to_asymmetric: _optional_to_asymmetric, - optional_to_optional: _optional_to_optional, - nonexistent_to_asymmetric: _nonexistent_to_asymmetric, - nonexistent_to_optional: _nonexistent_to_optional, - }) + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) } } @@ -8059,6 +7901,130 @@ pub mod schema_evolution { } } + impl ExampleStructIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + let mut _required_to_required: Option = None; + let mut _required_to_asymmetric: Option = None; + let mut _required_to_optional: Option = None; + let mut _asymmetric_to_required: Option = None; + let mut _asymmetric_to_asymmetric: Option = None; + let mut _asymmetric_to_optional: Option = None; + let mut _optional_to_required: Option = None; + let mut _optional_to_asymmetric: Option = None; + let mut _optional_to_optional: Option = None; + let mut _nonexistent_to_asymmetric: Option<()> = None; + let mut _nonexistent_to_optional: Option<()> = None; + + loop { + let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { + Ok(header) => header, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + + return Err(err); + } + }; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + 0 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _required_to_required.get_or_insert(payload); + } + 1 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _required_to_asymmetric.get_or_insert(payload); + } + 2 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _required_to_optional.get_or_insert(payload); + } + 4 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _asymmetric_to_required.get_or_insert(payload); + } + 5 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _asymmetric_to_asymmetric.get_or_insert(payload); + } + 6 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _asymmetric_to_optional.get_or_insert(payload); + } + 8 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _optional_to_required.get_or_insert(payload); + } + 9 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _optional_to_asymmetric.get_or_insert(payload); + } + 10 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _optional_to_optional.get_or_insert(payload); + } + 13 => { + let payload = (); + _nonexistent_to_asymmetric.get_or_insert(payload); + } + 14 => { + let payload = (); + _nonexistent_to_optional.get_or_insert(payload); + } + _ => { + super::super::skip(&mut sub_reader, payload_size as usize)?; + } + } + } + + if _required_to_required.is_none() + || _asymmetric_to_required.is_none() + || _optional_to_required.is_none() { + return Err(::std::io::Error::new( + ::std::io::ErrorKind::InvalidData, + super::super::MISSING_FIELDS_ERROR_MESSAGE, + )); + } + + Ok(ExampleStructIn { + required_to_required: _required_to_required.unwrap(), + required_to_asymmetric: _required_to_asymmetric, + required_to_optional: _required_to_optional, + asymmetric_to_required: _asymmetric_to_required.unwrap(), + asymmetric_to_asymmetric: _asymmetric_to_asymmetric, + asymmetric_to_optional: _asymmetric_to_optional, + optional_to_required: _optional_to_required.unwrap(), + optional_to_asymmetric: _optional_to_asymmetric, + optional_to_optional: _optional_to_optional, + nonexistent_to_asymmetric: _nonexistent_to_asymmetric, + nonexistent_to_optional: _nonexistent_to_optional, + }) + } + } + impl ExampleStructAtlas { pub fn size(&self) -> usize { self._size @@ -8115,124 +8081,15 @@ pub mod schema_evolution { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } - } - - impl super::super::Deserialize for ExampleChoiceIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - loop { - let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; - - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + } - match index { - 0 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::RequiredToRequired(payload)); - } - 1 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::RequiredToAsymmetric(payload)); - } - 4 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::AsymmetricToRequired(payload)); - } - 5 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::AsymmetricToAsymmetric(payload)); - } - 6 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(ExampleChoiceIn::AsymmetricToOptional(payload, fallback)); - } - 8 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::OptionalToRequired(payload)); - } - 9 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::OptionalToAsymmetric(payload)); - } - 10 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(ExampleChoiceIn::OptionalToOptional(payload, fallback)); - } - 12 => { - let payload = (); - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::NonexistentToRequired); - } - 13 => { - let payload = (); - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::NonexistentToAsymmetric); - } - 14 => { - let payload = (); - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(ExampleChoiceIn::NonexistentToOptional(fallback)); - } - _ => { - super::super::skip(&mut sub_reader, payload_size as usize)?; - } - } - } + impl super::super::Deserialize for ExampleChoiceIn { + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) } } @@ -8388,6 +8245,95 @@ pub mod schema_evolution { } } + impl ExampleChoiceIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + loop { + let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + 0 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::RequiredToRequired(payload)); + } + 1 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::RequiredToAsymmetric(payload)); + } + 4 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::AsymmetricToRequired(payload)); + } + 5 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::AsymmetricToAsymmetric(payload)); + } + 6 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + let fallback = Box::new(ExampleChoiceIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(ExampleChoiceIn::AsymmetricToOptional(payload, fallback)); + } + 8 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::OptionalToRequired(payload)); + } + 9 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::OptionalToAsymmetric(payload)); + } + 10 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + let fallback = Box::new(ExampleChoiceIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(ExampleChoiceIn::OptionalToOptional(payload, fallback)); + } + 12 => { + let payload = (); + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::NonexistentToRequired); + } + 13 => { + let payload = (); + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::NonexistentToAsymmetric); + } + 14 => { + let payload = (); + let fallback = Box::new(ExampleChoiceIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(ExampleChoiceIn::NonexistentToOptional(fallback)); + } + _ => { + super::super::skip(&mut sub_reader, payload_size as usize)?; + } + } + } + } + } + impl ExampleChoiceAtlas { pub fn size(&self) -> usize { match *self { @@ -8462,184 +8408,15 @@ pub mod schema_evolution { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::Deserialize for ExampleStructIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - let mut _required_to_required: Option = None; - let mut _required_to_asymmetric: Option = None; - let mut _required_to_optional: Option = None; - let mut _required_to_nonexistent: Option = None; - let mut _asymmetric_to_required: Option = None; - let mut _asymmetric_to_asymmetric: Option = None; - let mut _asymmetric_to_optional: Option = None; - let mut _asymmetric_to_nonexistent: Option = None; - let mut _optional_to_required: Option = None; - let mut _optional_to_asymmetric: Option = None; - let mut _optional_to_optional: Option = None; - let mut _optional_to_nonexistent: Option = None; - - loop { - let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { - Ok(header) => header, - Err(err) => { - if let std::io::ErrorKind::UnexpectedEof = err.kind() { - break; - } - - return Err(err); - } - }; - - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); - - match index { - 0 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _required_to_required.get_or_insert(payload); - } - 1 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _required_to_asymmetric.get_or_insert(payload); - } - 2 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _required_to_optional.get_or_insert(payload); - } - 3 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _required_to_nonexistent.get_or_insert(payload); - } - 4 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _asymmetric_to_required.get_or_insert(payload); - } - 5 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _asymmetric_to_asymmetric.get_or_insert(payload); - } - 6 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _asymmetric_to_optional.get_or_insert(payload); - } - 7 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _asymmetric_to_nonexistent.get_or_insert(payload); - } - 8 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _optional_to_required.get_or_insert(payload); - } - 9 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _optional_to_asymmetric.get_or_insert(payload); - } - 10 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _optional_to_optional.get_or_insert(payload); - } - 11 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - _optional_to_nonexistent.get_or_insert(payload); - } - _ => { - super::super::skip(&mut sub_reader, payload_size as usize)?; - } - } - } - - if _required_to_required.is_none() - || _required_to_asymmetric.is_none() - || _required_to_optional.is_none() - || _required_to_nonexistent.is_none() { - return Err(::std::io::Error::new( - ::std::io::ErrorKind::InvalidData, - super::super::MISSING_FIELDS_ERROR_MESSAGE, - )); - } - - Ok(ExampleStructIn { - required_to_required: _required_to_required.unwrap(), - required_to_asymmetric: _required_to_asymmetric.unwrap(), - required_to_optional: _required_to_optional.unwrap(), - required_to_nonexistent: _required_to_nonexistent.unwrap(), - asymmetric_to_required: _asymmetric_to_required, - asymmetric_to_asymmetric: _asymmetric_to_asymmetric, - asymmetric_to_optional: _asymmetric_to_optional, - asymmetric_to_nonexistent: _asymmetric_to_nonexistent, - optional_to_required: _optional_to_required, - optional_to_asymmetric: _optional_to_asymmetric, - optional_to_optional: _optional_to_optional, - optional_to_nonexistent: _optional_to_nonexistent, - }) + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) } } @@ -8782,12 +8559,149 @@ pub mod schema_evolution { writer.write_all(payload.as_bytes())?; } - if let (Some(payload), Some(payload_atlas)) = (&self.optional_to_nonexistent, &atlas.optional_to_nonexistent) { - super::super::serialize_field_header(writer, 11_u64, *payload_atlas, false)?; - writer.write_all(payload.as_bytes())?; + if let (Some(payload), Some(payload_atlas)) = (&self.optional_to_nonexistent, &atlas.optional_to_nonexistent) { + super::super::serialize_field_header(writer, 11_u64, *payload_atlas, false)?; + writer.write_all(payload.as_bytes())?; + } + + Ok(()) + } + } + + impl ExampleStructIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + let mut _required_to_required: Option = None; + let mut _required_to_asymmetric: Option = None; + let mut _required_to_optional: Option = None; + let mut _required_to_nonexistent: Option = None; + let mut _asymmetric_to_required: Option = None; + let mut _asymmetric_to_asymmetric: Option = None; + let mut _asymmetric_to_optional: Option = None; + let mut _asymmetric_to_nonexistent: Option = None; + let mut _optional_to_required: Option = None; + let mut _optional_to_asymmetric: Option = None; + let mut _optional_to_optional: Option = None; + let mut _optional_to_nonexistent: Option = None; + + loop { + let (index, payload_size) = match super::super::deserialize_field_header(&mut *reader) { + Ok(header) => header, + Err(err) => { + if let std::io::ErrorKind::UnexpectedEof = err.kind() { + break; + } + + return Err(err); + } + }; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + 0 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _required_to_required.get_or_insert(payload); + } + 1 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _required_to_asymmetric.get_or_insert(payload); + } + 2 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _required_to_optional.get_or_insert(payload); + } + 3 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _required_to_nonexistent.get_or_insert(payload); + } + 4 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _asymmetric_to_required.get_or_insert(payload); + } + 5 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _asymmetric_to_asymmetric.get_or_insert(payload); + } + 6 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _asymmetric_to_optional.get_or_insert(payload); + } + 7 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _asymmetric_to_nonexistent.get_or_insert(payload); + } + 8 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _optional_to_required.get_or_insert(payload); + } + 9 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _optional_to_asymmetric.get_or_insert(payload); + } + 10 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _optional_to_optional.get_or_insert(payload); + } + 11 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + _optional_to_nonexistent.get_or_insert(payload); + } + _ => { + super::super::skip(&mut sub_reader, payload_size as usize)?; + } + } + } + + if _required_to_required.is_none() + || _required_to_asymmetric.is_none() + || _required_to_optional.is_none() + || _required_to_nonexistent.is_none() { + return Err(::std::io::Error::new( + ::std::io::ErrorKind::InvalidData, + super::super::MISSING_FIELDS_ERROR_MESSAGE, + )); } - Ok(()) + Ok(ExampleStructIn { + required_to_required: _required_to_required.unwrap(), + required_to_asymmetric: _required_to_asymmetric.unwrap(), + required_to_optional: _required_to_optional.unwrap(), + required_to_nonexistent: _required_to_nonexistent.unwrap(), + asymmetric_to_required: _asymmetric_to_required, + asymmetric_to_asymmetric: _asymmetric_to_asymmetric, + asymmetric_to_optional: _asymmetric_to_optional, + asymmetric_to_nonexistent: _asymmetric_to_nonexistent, + optional_to_required: _optional_to_required, + optional_to_asymmetric: _optional_to_asymmetric, + optional_to_optional: _optional_to_optional, + optional_to_nonexistent: _optional_to_nonexistent, + }) } } @@ -8844,129 +8758,15 @@ pub mod schema_evolution { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::Deserialize for ExampleChoiceIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - loop { - let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; - - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); - - match index { - 0 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::RequiredToRequired(payload)); - } - 1 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::RequiredToAsymmetric(payload)); - } - 4 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::AsymmetricToRequired(payload)); - } - 5 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::AsymmetricToAsymmetric(payload)); - } - 6 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::AsymmetricToOptional(payload)); - } - 7 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(ExampleChoiceIn::AsymmetricToNonexistent(payload)); - } - 8 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(ExampleChoiceIn::OptionalToRequired(payload, fallback)); - } - 9 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(ExampleChoiceIn::OptionalToAsymmetric(payload, fallback)); - } - 10 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(ExampleChoiceIn::OptionalToOptional(payload, fallback)); - } - 11 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - let fallback = Box::new(::deserialize(&mut *reader)?); - return Ok(ExampleChoiceIn::OptionalToNonexistent(payload, fallback)); - } - _ => { - super::super::skip(&mut sub_reader, payload_size as usize)?; - } - } - } + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) } } @@ -9112,6 +8912,94 @@ pub mod schema_evolution { } } + impl ExampleChoiceIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + loop { + let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + 0 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::RequiredToRequired(payload)); + } + 1 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::RequiredToAsymmetric(payload)); + } + 4 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::AsymmetricToRequired(payload)); + } + 5 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::AsymmetricToAsymmetric(payload)); + } + 6 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::AsymmetricToOptional(payload)); + } + 7 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(ExampleChoiceIn::AsymmetricToNonexistent(payload)); + } + 8 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + let fallback = Box::new(ExampleChoiceIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(ExampleChoiceIn::OptionalToRequired(payload, fallback)); + } + 9 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + let fallback = Box::new(ExampleChoiceIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(ExampleChoiceIn::OptionalToAsymmetric(payload, fallback)); + } + 10 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + let fallback = Box::new(ExampleChoiceIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(ExampleChoiceIn::OptionalToOptional(payload, fallback)); + } + 11 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + let fallback = Box::new(ExampleChoiceIn::deserialize_from_reader_ref(&mut *reader)?); + return Ok(ExampleChoiceIn::OptionalToNonexistent(payload, fallback)); + } + _ => { + super::super::skip(&mut sub_reader, payload_size as usize)?; + } + } + } + } + } + impl ExampleChoiceAtlas { pub fn size(&self) -> usize { match *self { @@ -9152,18 +9040,57 @@ pub mod schema_evolution { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::Deserialize for SingletonStructIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) + } + } + + impl From for SingletonStructIn { + fn from(message: SingletonStructOut) -> Self { + SingletonStructIn { + x: message.x.into(), + } + } + } + + impl SingletonStructOut { + pub fn atlas(&self) -> SingletonStructAtlas { + let _x = { let payload = &self.x; (payload.len()) }; + + SingletonStructAtlas { + _size: + { let payload_atlas = &_x; let payload_size = *payload_atlas; super::super::field_header_size(0_u64, payload_size, false) + payload_size }, + x: _x, + } + } + + pub fn serialize_with_atlas( + &self, + writer: &mut T, + atlas: &SingletonStructAtlas, + ) -> ::std::io::Result<()> { + { + let payload = &self.x; + let payload_atlas = &atlas.x; + super::super::serialize_field_header(writer, 0_u64, *payload_atlas, false)?; + writer.write_all(payload.as_bytes())?; + } + + Ok(()) + } + } + + impl SingletonStructIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { let mut _x: Option = None; loop { @@ -9182,12 +9109,9 @@ pub mod schema_evolution { match index { 0 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; _x.get_or_insert(payload); } _ => { @@ -9209,41 +9133,6 @@ pub mod schema_evolution { } } - impl From for SingletonStructIn { - fn from(message: SingletonStructOut) -> Self { - SingletonStructIn { - x: message.x.into(), - } - } - } - - impl SingletonStructOut { - pub fn atlas(&self) -> SingletonStructAtlas { - let _x = { let payload = &self.x; (payload.len()) }; - - SingletonStructAtlas { - _size: - { let payload_atlas = &_x; let payload_size = *payload_atlas; super::super::field_header_size(0_u64, payload_size, false) + payload_size }, - x: _x, - } - } - - pub fn serialize_with_atlas( - &self, - writer: &mut T, - atlas: &SingletonStructAtlas, - ) -> ::std::io::Result<()> { - { - let payload = &self.x; - let payload_atlas = &atlas.x; - super::super::serialize_field_header(writer, 0_u64, *payload_atlas, false)?; - writer.write_all(payload.as_bytes())?; - } - - Ok(()) - } - } - impl SingletonStructAtlas { pub fn size(&self) -> usize { self._size @@ -9270,39 +9159,15 @@ pub mod schema_evolution { self.atlas().size() } - fn serialize(&self, writer: &mut T) -> ::std::io::Result<()> { + fn serialize(&self, mut writer: T) -> ::std::io::Result<()> { let atlas = self.atlas(); - self.serialize_with_atlas(writer, &atlas) + self.serialize_with_atlas(&mut writer, &atlas) } } impl super::super::Deserialize for SingletonChoiceIn { - fn deserialize(reader: &mut T) -> ::std::io::Result - where - Self: Sized, - T: ::std::io::BufRead, - { - loop { - let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; - - let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); - - match index { - 0 => { - let mut buffer = vec![]; - ::std::io::Read::read_to_end(&mut sub_reader, &mut buffer)?; - let payload = std::str::from_utf8(&buffer).map_or_else( - |err| Err(::std::io::Error::new(::std::io::ErrorKind::Other, err)), - |result| Ok(result.to_owned()), - )?; - super::super::finish(&mut *reader)?; - return Ok(SingletonChoiceIn::X(payload)); - } - _ => { - super::super::skip(&mut sub_reader, payload_size as usize)?; - } - } - } + fn deserialize(mut reader: T) -> ::std::io::Result { + Self::deserialize_from_reader_ref(&mut reader) } } @@ -9341,6 +9206,31 @@ pub mod schema_evolution { } } + impl SingletonChoiceIn { + pub fn deserialize_from_reader_ref( + reader: &mut T, + ) -> ::std::io::Result { + loop { + let (index, payload_size) = super::super::deserialize_field_header(&mut *reader)?; + + let mut sub_reader = ::std::io::Read::take(&mut *reader, payload_size as u64); + + match index { + 0 => { + let mut payload = String::new(); + payload.reserve_exact(payload_size); + ::std::io::Read::read_to_string(&mut sub_reader, &mut payload)?; + super::super::finish(&mut *reader)?; + return Ok(SingletonChoiceIn::X(payload)); + } + _ => { + super::super::skip(&mut sub_reader, payload_size as usize)?; + } + } + } + } + } + impl SingletonChoiceAtlas { pub fn size(&self) -> usize { match *self {