From 775e78936d3177bb766854c1a1bc19c95771e5fb Mon Sep 17 00:00:00 2001 From: Clement Rey Date: Tue, 25 Jul 2023 16:03:30 +0200 Subject: [PATCH] Isolate testing types in Rust backend (#2810) Testing types now live under `re_types/src/testing`, which is itself feature gated behind the `testing` flag. Fixes #2809 Part of #2537 ### What ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/2810) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/2810) - [Docs preview](https://rerun.io/preview/pr%3Acmc%2Frust_exclude_fuzzy/docs) - [Examples preview](https://rerun.io/preview/pr%3Acmc%2Frust_exclude_fuzzy/examples) --- crates/re_types/.gitattributes | 9 +- crates/re_types/Cargo.toml | 17 +- crates/re_types/source_hash.txt | 2 +- crates/re_types/src/archetypes/mod.rs | 2 - crates/re_types/src/components/mod.rs | 7 - crates/re_types/src/datatypes/mod.rs | 4 - crates/re_types/src/lib.rs | 6 +- .../src/{ => testing}/archetypes/fuzzy.rs | 885 +++++++++++------- crates/re_types/src/testing/archetypes/mod.rs | 5 + .../src/{ => testing}/components/fuzzy.rs | 436 +++++---- crates/re_types/src/testing/components/mod.rs | 10 + .../src/{ => testing}/datatypes/fuzzy.rs | 646 ++++--------- crates/re_types/src/testing/datatypes/mod.rs | 7 + crates/re_types/src/testing/mod.rs | 3 + crates/re_types/tests/fuzzy.rs | 179 ++-- crates/re_types_builder/src/codegen/rust.rs | 78 +- scripts/ci/check_large_files_allow_list.txt | 6 +- 17 files changed, 1126 insertions(+), 1176 deletions(-) rename crates/re_types/src/{ => testing}/archetypes/fuzzy.rs (84%) create mode 100644 crates/re_types/src/testing/archetypes/mod.rs rename crates/re_types/src/{ => testing}/components/fuzzy.rs (89%) create mode 100644 crates/re_types/src/testing/components/mod.rs rename crates/re_types/src/{ => testing}/datatypes/fuzzy.rs (75%) create mode 100644 crates/re_types/src/testing/datatypes/mod.rs create mode 100644 crates/re_types/src/testing/mod.rs diff --git a/crates/re_types/.gitattributes b/crates/re_types/.gitattributes index 3888be540ec5..ad64e78a457d 100644 --- a/crates/re_types/.gitattributes +++ b/crates/re_types/.gitattributes @@ -1,5 +1,4 @@ .gitattributes linguist-generated=true -src/archetypes/fuzzy.rs linguist-generated=true src/archetypes/mod.rs linguist-generated=true src/archetypes/points2d.rs linguist-generated=true src/archetypes/points3d.rs linguist-generated=true @@ -7,7 +6,6 @@ src/archetypes/transform3d.rs linguist-generated=true src/components/class_id.rs linguist-generated=true src/components/color.rs linguist-generated=true src/components/draw_order.rs linguist-generated=true -src/components/fuzzy.rs linguist-generated=true src/components/instance_key.rs linguist-generated=true src/components/keypoint_id.rs linguist-generated=true src/components/label.rs linguist-generated=true @@ -17,7 +15,6 @@ src/components/point3d.rs linguist-generated=true src/components/radius.rs linguist-generated=true src/components/transform3d.rs linguist-generated=true src/datatypes/angle.rs linguist-generated=true -src/datatypes/fuzzy.rs linguist-generated=true src/datatypes/mat3x3.rs linguist-generated=true src/datatypes/mat4x4.rs linguist-generated=true src/datatypes/mod.rs linguist-generated=true @@ -33,3 +30,9 @@ src/datatypes/translation_rotation_scale3d.rs linguist-generated=true src/datatypes/vec2d.rs linguist-generated=true src/datatypes/vec3d.rs linguist-generated=true src/datatypes/vec4d.rs linguist-generated=true +src/testing/archetypes/fuzzy.rs linguist-generated=true +src/testing/archetypes/mod.rs linguist-generated=true +src/testing/components/fuzzy.rs linguist-generated=true +src/testing/components/mod.rs linguist-generated=true +src/testing/datatypes/fuzzy.rs linguist-generated=true +src/testing/datatypes/mod.rs linguist-generated=true diff --git a/crates/re_types/Cargo.toml b/crates/re_types/Cargo.toml index 93d72ad8a25f..c5c96aad5f9b 100644 --- a/crates/re_types/Cargo.toml +++ b/crates/re_types/Cargo.toml @@ -14,12 +14,17 @@ version.workspace = true [package.metadata.docs.rs] -all-features = true +all-features = false +no-default-features = true +features = ["all"] [features] default = [] +## All features except `testing`. +all = ["ecolor", "glam", "serde"] + ## Enable color conversions. ecolor = ["dep:ecolor"] @@ -29,6 +34,10 @@ glam = ["dep:glam", "dep:macaw"] ## Enable (de)serialization using serde. serde = ["dep:serde", "re_string_interner/serde"] +## Include testing archetypes/components/datatypes into the crate. +## Only useful for testing purposes. +testing = [] + [dependencies] # Rerun re_error.workspace = true @@ -74,3 +83,9 @@ re_types_builder.workspace = true # External rayon.workspace = true + + +[[test]] +name = "fuzzy" +path = "tests/fuzzy.rs" +required-features = ["testing"] diff --git a/crates/re_types/source_hash.txt b/crates/re_types/source_hash.txt index 8bfba814481f..5d62c122194d 100644 --- a/crates/re_types/source_hash.txt +++ b/crates/re_types/source_hash.txt @@ -1,4 +1,4 @@ # This is a sha256 hash for all direct and indirect dependencies of this crate's build script. # It can be safely removed at anytime to force the build script to run again. # Check out build.rs to see how it's computed. -9d4879a3a38a1cc25f2b7e975552cc3c463ecb28324f05de9856a8595ca43ae4 +f1efe3a0193d16c2345caead6ac26b5c2248f8bb80a4399484c12d5ff752e803 diff --git a/crates/re_types/src/archetypes/mod.rs b/crates/re_types/src/archetypes/mod.rs index 255acf4f3435..8d020c0a167d 100644 --- a/crates/re_types/src/archetypes/mod.rs +++ b/crates/re_types/src/archetypes/mod.rs @@ -1,11 +1,9 @@ // NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT. -mod fuzzy; mod points2d; mod points3d; mod transform3d; -pub use self::fuzzy::AffixFuzzer1; pub use self::points2d::Points2D; pub use self::points3d::Points3D; pub use self::transform3d::Transform3D; diff --git a/crates/re_types/src/components/mod.rs b/crates/re_types/src/components/mod.rs index 6669a0aead4b..2ecbf81af6c6 100644 --- a/crates/re_types/src/components/mod.rs +++ b/crates/re_types/src/components/mod.rs @@ -6,7 +6,6 @@ mod color; mod color_ext; mod draw_order; mod draw_order_ext; -mod fuzzy; mod instance_key; mod instance_key_ext; mod keypoint_id; @@ -25,12 +24,6 @@ mod transform3d_ext; pub use self::class_id::ClassId; pub use self::color::Color; pub use self::draw_order::DrawOrder; -pub use self::fuzzy::{ - AffixFuzzer1, AffixFuzzer10, AffixFuzzer11, AffixFuzzer12, AffixFuzzer13, AffixFuzzer14, - AffixFuzzer15, AffixFuzzer16, AffixFuzzer17, AffixFuzzer18, AffixFuzzer19, AffixFuzzer2, - AffixFuzzer3, AffixFuzzer4, AffixFuzzer5, AffixFuzzer6, AffixFuzzer7, AffixFuzzer8, - AffixFuzzer9, -}; pub use self::instance_key::InstanceKey; pub use self::keypoint_id::KeypointId; pub use self::label::Label; diff --git a/crates/re_types/src/datatypes/mod.rs b/crates/re_types/src/datatypes/mod.rs index 157cf6f81faf..8772ed2b24dd 100644 --- a/crates/re_types/src/datatypes/mod.rs +++ b/crates/re_types/src/datatypes/mod.rs @@ -2,7 +2,6 @@ mod angle; mod angle_ext; -mod fuzzy; mod mat3x3; mod mat3x3_ext; mod mat4x4; @@ -31,9 +30,6 @@ mod vec3d_ext; mod vec4d; pub use self::angle::Angle; -pub use self::fuzzy::{ - AffixFuzzer1, AffixFuzzer2, AffixFuzzer3, AffixFuzzer4, AffixFuzzer5, FlattenedScalar, -}; pub use self::mat3x3::Mat3x3; pub use self::mat4x4::Mat4x4; pub use self::point2d::Point2D; diff --git a/crates/re_types/src/lib.rs b/crates/re_types/src/lib.rs index 22be993e62bb..2a6b487301cb 100644 --- a/crates/re_types/src/lib.rs +++ b/crates/re_types/src/lib.rs @@ -471,10 +471,14 @@ impl ResultExt for DeserializationResult { pub const DISPLAY_PRECISION: usize = 3; pub mod archetypes; -mod component_name; pub mod components; pub mod datatypes; + +mod component_name; mod size_bytes; pub use component_name::ComponentName; pub use size_bytes::SizeBytes; + +#[cfg(feature = "testing")] +pub mod testing; diff --git a/crates/re_types/src/archetypes/fuzzy.rs b/crates/re_types/src/testing/archetypes/fuzzy.rs similarity index 84% rename from crates/re_types/src/archetypes/fuzzy.rs rename to crates/re_types/src/testing/archetypes/fuzzy.rs index 5222861c7392..55881ff57593 100644 --- a/crates/re_types/src/archetypes/fuzzy.rs +++ b/crates/re_types/src/testing/archetypes/fuzzy.rs @@ -14,79 +14,79 @@ #[derive(Clone, Debug, PartialEq)] pub struct AffixFuzzer1 { - pub fuzz1001: crate::components::AffixFuzzer1, - pub fuzz1002: crate::components::AffixFuzzer2, - pub fuzz1003: crate::components::AffixFuzzer3, - pub fuzz1004: crate::components::AffixFuzzer4, - pub fuzz1005: crate::components::AffixFuzzer5, - pub fuzz1006: crate::components::AffixFuzzer6, - pub fuzz1007: crate::components::AffixFuzzer7, - pub fuzz1008: crate::components::AffixFuzzer8, - pub fuzz1009: crate::components::AffixFuzzer9, - pub fuzz1010: crate::components::AffixFuzzer10, - pub fuzz1011: crate::components::AffixFuzzer11, - pub fuzz1012: crate::components::AffixFuzzer12, - pub fuzz1013: crate::components::AffixFuzzer13, - pub fuzz1014: crate::components::AffixFuzzer14, - pub fuzz1015: crate::components::AffixFuzzer15, - pub fuzz1016: crate::components::AffixFuzzer16, - pub fuzz1017: crate::components::AffixFuzzer17, - pub fuzz1018: crate::components::AffixFuzzer18, - pub fuzz1019: crate::components::AffixFuzzer19, - pub fuzz1101: Vec, - pub fuzz1102: Vec, - pub fuzz1103: Vec, - pub fuzz1104: Vec, - pub fuzz1105: Vec, - pub fuzz1106: Vec, - pub fuzz1107: Vec, - pub fuzz1108: Vec, - pub fuzz1109: Vec, - pub fuzz1110: Vec, - pub fuzz1111: Vec, - pub fuzz1112: Vec, - pub fuzz1113: Vec, - pub fuzz1114: Vec, - pub fuzz1115: Vec, - pub fuzz1116: Vec, - pub fuzz1117: Vec, - pub fuzz1118: Vec, - pub fuzz2001: Option, - pub fuzz2002: Option, - pub fuzz2003: Option, - pub fuzz2004: Option, - pub fuzz2005: Option, - pub fuzz2006: Option, - pub fuzz2007: Option, - pub fuzz2008: Option, - pub fuzz2009: Option, - pub fuzz2010: Option, - pub fuzz2011: Option, - pub fuzz2012: Option, - pub fuzz2013: Option, - pub fuzz2014: Option, - pub fuzz2015: Option, - pub fuzz2016: Option, - pub fuzz2017: Option, - pub fuzz2018: Option, - pub fuzz2101: Option>, - pub fuzz2102: Option>, - pub fuzz2103: Option>, - pub fuzz2104: Option>, - pub fuzz2105: Option>, - pub fuzz2106: Option>, - pub fuzz2107: Option>, - pub fuzz2108: Option>, - pub fuzz2109: Option>, - pub fuzz2110: Option>, - pub fuzz2111: Option>, - pub fuzz2112: Option>, - pub fuzz2113: Option>, - pub fuzz2114: Option>, - pub fuzz2115: Option>, - pub fuzz2116: Option>, - pub fuzz2117: Option>, - pub fuzz2118: Option>, + pub fuzz1001: crate::testing::components::AffixFuzzer1, + pub fuzz1002: crate::testing::components::AffixFuzzer2, + pub fuzz1003: crate::testing::components::AffixFuzzer3, + pub fuzz1004: crate::testing::components::AffixFuzzer4, + pub fuzz1005: crate::testing::components::AffixFuzzer5, + pub fuzz1006: crate::testing::components::AffixFuzzer6, + pub fuzz1007: crate::testing::components::AffixFuzzer7, + pub fuzz1008: crate::testing::components::AffixFuzzer8, + pub fuzz1009: crate::testing::components::AffixFuzzer9, + pub fuzz1010: crate::testing::components::AffixFuzzer10, + pub fuzz1011: crate::testing::components::AffixFuzzer11, + pub fuzz1012: crate::testing::components::AffixFuzzer12, + pub fuzz1013: crate::testing::components::AffixFuzzer13, + pub fuzz1014: crate::testing::components::AffixFuzzer14, + pub fuzz1015: crate::testing::components::AffixFuzzer15, + pub fuzz1016: crate::testing::components::AffixFuzzer16, + pub fuzz1017: crate::testing::components::AffixFuzzer17, + pub fuzz1018: crate::testing::components::AffixFuzzer18, + pub fuzz1019: crate::testing::components::AffixFuzzer19, + pub fuzz1101: Vec, + pub fuzz1102: Vec, + pub fuzz1103: Vec, + pub fuzz1104: Vec, + pub fuzz1105: Vec, + pub fuzz1106: Vec, + pub fuzz1107: Vec, + pub fuzz1108: Vec, + pub fuzz1109: Vec, + pub fuzz1110: Vec, + pub fuzz1111: Vec, + pub fuzz1112: Vec, + pub fuzz1113: Vec, + pub fuzz1114: Vec, + pub fuzz1115: Vec, + pub fuzz1116: Vec, + pub fuzz1117: Vec, + pub fuzz1118: Vec, + pub fuzz2001: Option, + pub fuzz2002: Option, + pub fuzz2003: Option, + pub fuzz2004: Option, + pub fuzz2005: Option, + pub fuzz2006: Option, + pub fuzz2007: Option, + pub fuzz2008: Option, + pub fuzz2009: Option, + pub fuzz2010: Option, + pub fuzz2011: Option, + pub fuzz2012: Option, + pub fuzz2013: Option, + pub fuzz2014: Option, + pub fuzz2015: Option, + pub fuzz2016: Option, + pub fuzz2017: Option, + pub fuzz2018: Option, + pub fuzz2101: Option>, + pub fuzz2102: Option>, + pub fuzz2103: Option>, + pub fuzz2104: Option>, + pub fuzz2105: Option>, + pub fuzz2106: Option>, + pub fuzz2107: Option>, + pub fuzz2108: Option>, + pub fuzz2109: Option>, + pub fuzz2110: Option>, + pub fuzz2111: Option>, + pub fuzz2112: Option>, + pub fuzz2113: Option>, + pub fuzz2114: Option>, + pub fuzz2115: Option>, + pub fuzz2116: Option>, + pub fuzz2117: Option>, + pub fuzz2118: Option>, } static REQUIRED_COMPONENTS: once_cell::sync::Lazy<[crate::ComponentName; 37usize]> = @@ -293,8 +293,10 @@ impl crate::Archetype for AffixFuzzer1 { Ok([ { Some({ - let array = - ::try_to_arrow([&self.fuzz1001], None); + let array = ::try_to_arrow( + [&self.fuzz1001], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer1".into(), @@ -315,8 +317,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1002], None); + let array = ::try_to_arrow( + [&self.fuzz1002], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer2".into(), @@ -337,8 +341,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1003], None); + let array = ::try_to_arrow( + [&self.fuzz1003], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer3".into(), @@ -359,8 +365,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1004], None); + let array = ::try_to_arrow( + [&self.fuzz1004], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer4".into(), @@ -381,8 +389,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1005], None); + let array = ::try_to_arrow( + [&self.fuzz1005], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer5".into(), @@ -403,8 +413,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1006], None); + let array = ::try_to_arrow( + [&self.fuzz1006], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer6".into(), @@ -425,8 +437,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1007], None); + let array = ::try_to_arrow( + [&self.fuzz1007], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer7".into(), @@ -447,8 +461,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1008], None); + let array = ::try_to_arrow( + [&self.fuzz1008], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer8".into(), @@ -469,8 +485,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1009], None); + let array = ::try_to_arrow( + [&self.fuzz1009], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer9".into(), @@ -491,8 +509,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1010], None); + let array = ::try_to_arrow( + [&self.fuzz1010], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer10".into(), @@ -513,8 +533,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1011], None); + let array = ::try_to_arrow( + [&self.fuzz1011], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer11".into(), @@ -535,8 +557,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1012], None); + let array = ::try_to_arrow( + [&self.fuzz1012], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer12".into(), @@ -557,8 +581,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1013], None); + let array = ::try_to_arrow( + [&self.fuzz1013], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer13".into(), @@ -579,8 +605,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1014], None); + let array = ::try_to_arrow( + [&self.fuzz1014], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer14".into(), @@ -601,8 +629,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1015], None); + let array = ::try_to_arrow( + [&self.fuzz1015], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer15".into(), @@ -623,8 +653,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1016], None); + let array = ::try_to_arrow( + [&self.fuzz1016], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer16".into(), @@ -645,8 +677,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1017], None); + let array = ::try_to_arrow( + [&self.fuzz1017], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer17".into(), @@ -667,8 +701,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1018], None); + let array = ::try_to_arrow( + [&self.fuzz1018], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer18".into(), @@ -689,8 +725,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow([&self.fuzz1019], None); + let array = ::try_to_arrow( + [&self.fuzz1019], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer19".into(), @@ -711,8 +749,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow(self.fuzz1101.iter(), None); + let array = ::try_to_arrow( + self.fuzz1101.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer1".into(), @@ -733,8 +773,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow(self.fuzz1102.iter(), None); + let array = ::try_to_arrow( + self.fuzz1102.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer2".into(), @@ -755,8 +797,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow(self.fuzz1103.iter(), None); + let array = ::try_to_arrow( + self.fuzz1103.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer3".into(), @@ -777,8 +821,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow(self.fuzz1104.iter(), None); + let array = ::try_to_arrow( + self.fuzz1104.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer4".into(), @@ -799,8 +845,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow(self.fuzz1105.iter(), None); + let array = ::try_to_arrow( + self.fuzz1105.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer5".into(), @@ -821,8 +869,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow(self.fuzz1106.iter(), None); + let array = ::try_to_arrow( + self.fuzz1106.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer6".into(), @@ -843,8 +893,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow(self.fuzz1107.iter(), None); + let array = ::try_to_arrow( + self.fuzz1107.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer7".into(), @@ -865,8 +917,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow(self.fuzz1108.iter(), None); + let array = ::try_to_arrow( + self.fuzz1108.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer8".into(), @@ -887,8 +941,10 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = - ::try_to_arrow(self.fuzz1109.iter(), None); + let array = ::try_to_arrow( + self.fuzz1109.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer9".into(), @@ -909,7 +965,7 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = ::try_to_arrow( + let array = ::try_to_arrow( self.fuzz1110.iter(), None, ); @@ -933,7 +989,7 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = ::try_to_arrow( + let array = ::try_to_arrow( self.fuzz1111.iter(), None, ); @@ -957,7 +1013,7 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = ::try_to_arrow( + let array = ::try_to_arrow( self.fuzz1112.iter(), None, ); @@ -981,7 +1037,7 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = ::try_to_arrow( + let array = ::try_to_arrow( self.fuzz1113.iter(), None, ); @@ -1005,7 +1061,7 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = ::try_to_arrow( + let array = ::try_to_arrow( self.fuzz1114.iter(), None, ); @@ -1029,7 +1085,7 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = ::try_to_arrow( + let array = ::try_to_arrow( self.fuzz1115.iter(), None, ); @@ -1053,7 +1109,7 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = ::try_to_arrow( + let array = ::try_to_arrow( self.fuzz1116.iter(), None, ); @@ -1077,7 +1133,7 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = ::try_to_arrow( + let array = ::try_to_arrow( self.fuzz1117.iter(), None, ); @@ -1101,7 +1157,7 @@ impl crate::Archetype for AffixFuzzer1 { }, { Some({ - let array = ::try_to_arrow( + let array = ::try_to_arrow( self.fuzz1118.iter(), None, ); @@ -1127,7 +1183,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2001 .as_ref() .map(|single| { - let array = ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer1".into(), @@ -1150,7 +1209,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2002 .as_ref() .map(|single| { - let array = ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer2".into(), @@ -1173,7 +1235,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2003 .as_ref() .map(|single| { - let array = ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer3".into(), @@ -1196,7 +1261,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2004 .as_ref() .map(|single| { - let array = ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer4".into(), @@ -1219,7 +1287,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2005 .as_ref() .map(|single| { - let array = ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer5".into(), @@ -1242,7 +1313,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2006 .as_ref() .map(|single| { - let array = ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer6".into(), @@ -1265,7 +1339,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2007 .as_ref() .map(|single| { - let array = ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer7".into(), @@ -1288,7 +1365,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2008 .as_ref() .map(|single| { - let array = ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer8".into(), @@ -1311,7 +1391,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2009 .as_ref() .map(|single| { - let array = ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer9".into(), @@ -1334,8 +1417,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2010 .as_ref() .map(|single| { - let array = - ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer10".into(), @@ -1358,8 +1443,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2011 .as_ref() .map(|single| { - let array = - ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer11".into(), @@ -1382,8 +1469,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2012 .as_ref() .map(|single| { - let array = - ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer12".into(), @@ -1406,8 +1495,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2013 .as_ref() .map(|single| { - let array = - ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer13".into(), @@ -1430,8 +1521,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2014 .as_ref() .map(|single| { - let array = - ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer14".into(), @@ -1454,8 +1547,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2015 .as_ref() .map(|single| { - let array = - ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer15".into(), @@ -1478,8 +1573,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2016 .as_ref() .map(|single| { - let array = - ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer16".into(), @@ -1502,8 +1599,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2017 .as_ref() .map(|single| { - let array = - ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer17".into(), @@ -1526,8 +1625,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2018 .as_ref() .map(|single| { - let array = - ::try_to_arrow([single], None); + let array = ::try_to_arrow( + [single], + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer18".into(), @@ -1550,8 +1651,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2101 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer1".into(), @@ -1574,8 +1677,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2102 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer2".into(), @@ -1598,8 +1703,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2103 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer3".into(), @@ -1622,8 +1729,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2104 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer4".into(), @@ -1646,8 +1755,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2105 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer5".into(), @@ -1670,8 +1781,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2106 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer6".into(), @@ -1694,8 +1807,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2107 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer7".into(), @@ -1718,8 +1833,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2108 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer8".into(), @@ -1742,8 +1859,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2109 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer9".into(), @@ -1766,8 +1885,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2110 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer10".into(), @@ -1790,8 +1911,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2111 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer11".into(), @@ -1814,8 +1937,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2112 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer12".into(), @@ -1838,8 +1963,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2113 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer13".into(), @@ -1862,8 +1989,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2114 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer14".into(), @@ -1886,8 +2015,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2115 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer15".into(), @@ -1910,8 +2041,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2116 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer16".into(), @@ -1934,8 +2067,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2117 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer17".into(), @@ -1958,8 +2093,10 @@ impl crate::Archetype for AffixFuzzer1 { self.fuzz2118 .as_ref() .map(|many| { - let array = - ::try_to_arrow(many.iter(), None); + let array = ::try_to_arrow( + many.iter(), + None, + ); array.map(|array| { let datatype = ::arrow2::datatypes::DataType::Extension( "rerun.testing.components.AffixFuzzer18".into(), @@ -2003,7 +2140,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1001".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1001".into(), source: Box::new(err), @@ -2029,7 +2166,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1002".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1002".into(), source: Box::new(err), @@ -2055,7 +2192,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1003".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1003".into(), source: Box::new(err), @@ -2081,7 +2218,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1004".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1004".into(), source: Box::new(err), @@ -2107,7 +2244,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1005".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1005".into(), source: Box::new(err), @@ -2133,7 +2270,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1006".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1006".into(), source: Box::new(err), @@ -2159,7 +2296,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1007".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1007".into(), source: Box::new(err), @@ -2185,7 +2322,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1008".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1008".into(), source: Box::new(err), @@ -2211,7 +2348,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1009".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1009".into(), source: Box::new(err), @@ -2237,7 +2374,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1010".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1010".into(), source: Box::new(err), @@ -2263,7 +2400,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1011".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1011".into(), source: Box::new(err), @@ -2289,7 +2426,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1012".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1012".into(), source: Box::new(err), @@ -2315,7 +2452,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1013".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1013".into(), source: Box::new(err), @@ -2341,7 +2478,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1014".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1014".into(), source: Box::new(err), @@ -2367,7 +2504,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1015".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1015".into(), source: Box::new(err), @@ -2393,7 +2530,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1016".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1016".into(), source: Box::new(err), @@ -2419,7 +2556,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1017".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1017".into(), source: Box::new(err), @@ -2445,7 +2582,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1018".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1018".into(), source: Box::new(err), @@ -2471,7 +2608,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1019".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1019".into(), source: Box::new(err), @@ -2497,7 +2634,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1101".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1101".into(), source: Box::new(err), @@ -2524,7 +2661,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1102".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1102".into(), source: Box::new(err), @@ -2551,7 +2688,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1103".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1103".into(), source: Box::new(err), @@ -2578,7 +2715,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1104".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1104".into(), source: Box::new(err), @@ -2605,7 +2742,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1105".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1105".into(), source: Box::new(err), @@ -2632,7 +2769,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1106".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1106".into(), source: Box::new(err), @@ -2659,7 +2796,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1107".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1107".into(), source: Box::new(err), @@ -2686,7 +2823,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1108".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1108".into(), source: Box::new(err), @@ -2713,7 +2850,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1109".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1109".into(), source: Box::new(err), @@ -2740,7 +2877,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1110".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1110".into(), source: Box::new(err), @@ -2767,7 +2904,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1111".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1111".into(), source: Box::new(err), @@ -2794,7 +2931,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1112".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1112".into(), source: Box::new(err), @@ -2821,7 +2958,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1113".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1113".into(), source: Box::new(err), @@ -2848,7 +2985,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1114".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1114".into(), source: Box::new(err), @@ -2875,7 +3012,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1115".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1115".into(), source: Box::new(err), @@ -2902,7 +3039,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1116".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1116".into(), source: Box::new(err), @@ -2929,7 +3066,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1117".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1117".into(), source: Box::new(err), @@ -2956,7 +3093,7 @@ impl crate::Archetype for AffixFuzzer1 { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1118".into(), source: Box::new(err), })?; - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz1118".into(), source: Box::new(err), @@ -2975,7 +3112,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2001 = if let Some(array) = arrays_by_name.get("fuzz2001") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2001".into(), source: Box::new(err), @@ -2996,7 +3133,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2002 = if let Some(array) = arrays_by_name.get("fuzz2002") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2002".into(), source: Box::new(err), @@ -3017,7 +3154,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2003 = if let Some(array) = arrays_by_name.get("fuzz2003") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2003".into(), source: Box::new(err), @@ -3038,7 +3175,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2004 = if let Some(array) = arrays_by_name.get("fuzz2004") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2004".into(), source: Box::new(err), @@ -3059,7 +3196,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2005 = if let Some(array) = arrays_by_name.get("fuzz2005") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2005".into(), source: Box::new(err), @@ -3080,7 +3217,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2006 = if let Some(array) = arrays_by_name.get("fuzz2006") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2006".into(), source: Box::new(err), @@ -3101,7 +3238,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2007 = if let Some(array) = arrays_by_name.get("fuzz2007") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2007".into(), source: Box::new(err), @@ -3122,7 +3259,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2008 = if let Some(array) = arrays_by_name.get("fuzz2008") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2008".into(), source: Box::new(err), @@ -3143,7 +3280,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2009 = if let Some(array) = arrays_by_name.get("fuzz2009") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2009".into(), source: Box::new(err), @@ -3164,7 +3301,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2010 = if let Some(array) = arrays_by_name.get("fuzz2010") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2010".into(), source: Box::new(err), @@ -3185,7 +3322,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2011 = if let Some(array) = arrays_by_name.get("fuzz2011") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2011".into(), source: Box::new(err), @@ -3206,7 +3343,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2012 = if let Some(array) = arrays_by_name.get("fuzz2012") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2012".into(), source: Box::new(err), @@ -3227,7 +3364,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2013 = if let Some(array) = arrays_by_name.get("fuzz2013") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2013".into(), source: Box::new(err), @@ -3248,7 +3385,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2014 = if let Some(array) = arrays_by_name.get("fuzz2014") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2014".into(), source: Box::new(err), @@ -3269,7 +3406,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2015 = if let Some(array) = arrays_by_name.get("fuzz2015") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2015".into(), source: Box::new(err), @@ -3290,7 +3427,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2016 = if let Some(array) = arrays_by_name.get("fuzz2016") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2016".into(), source: Box::new(err), @@ -3311,7 +3448,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2017 = if let Some(array) = arrays_by_name.get("fuzz2017") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2017".into(), source: Box::new(err), @@ -3332,7 +3469,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2018 = if let Some(array) = arrays_by_name.get("fuzz2018") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2018".into(), source: Box::new(err), @@ -3353,7 +3490,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2101 = if let Some(array) = arrays_by_name.get("fuzz2101") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2101".into(), source: Box::new(err), @@ -3375,7 +3512,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2102 = if let Some(array) = arrays_by_name.get("fuzz2102") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2102".into(), source: Box::new(err), @@ -3397,7 +3534,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2103 = if let Some(array) = arrays_by_name.get("fuzz2103") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2103".into(), source: Box::new(err), @@ -3419,7 +3556,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2104 = if let Some(array) = arrays_by_name.get("fuzz2104") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2104".into(), source: Box::new(err), @@ -3441,7 +3578,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2105 = if let Some(array) = arrays_by_name.get("fuzz2105") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2105".into(), source: Box::new(err), @@ -3463,7 +3600,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2106 = if let Some(array) = arrays_by_name.get("fuzz2106") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2106".into(), source: Box::new(err), @@ -3485,7 +3622,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2107 = if let Some(array) = arrays_by_name.get("fuzz2107") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2107".into(), source: Box::new(err), @@ -3507,7 +3644,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2108 = if let Some(array) = arrays_by_name.get("fuzz2108") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2108".into(), source: Box::new(err), @@ -3529,7 +3666,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2109 = if let Some(array) = arrays_by_name.get("fuzz2109") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2109".into(), source: Box::new(err), @@ -3551,7 +3688,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2110 = if let Some(array) = arrays_by_name.get("fuzz2110") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2110".into(), source: Box::new(err), @@ -3573,7 +3710,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2111 = if let Some(array) = arrays_by_name.get("fuzz2111") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2111".into(), source: Box::new(err), @@ -3595,7 +3732,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2112 = if let Some(array) = arrays_by_name.get("fuzz2112") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2112".into(), source: Box::new(err), @@ -3617,7 +3754,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2113 = if let Some(array) = arrays_by_name.get("fuzz2113") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2113".into(), source: Box::new(err), @@ -3639,7 +3776,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2114 = if let Some(array) = arrays_by_name.get("fuzz2114") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2114".into(), source: Box::new(err), @@ -3661,7 +3798,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2115 = if let Some(array) = arrays_by_name.get("fuzz2115") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2115".into(), source: Box::new(err), @@ -3683,7 +3820,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2116 = if let Some(array) = arrays_by_name.get("fuzz2116") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2116".into(), source: Box::new(err), @@ -3705,7 +3842,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2117 = if let Some(array) = arrays_by_name.get("fuzz2117") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2117".into(), source: Box::new(err), @@ -3727,7 +3864,7 @@ impl crate::Archetype for AffixFuzzer1 { }; let fuzz2118 = if let Some(array) = arrays_by_name.get("fuzz2118") { Some( - ::try_from_arrow_opt(&**array) + ::try_from_arrow_opt(&**array) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.archetypes.AffixFuzzer1#fuzz2118".into(), source: Box::new(err), @@ -3827,43 +3964,43 @@ impl crate::Archetype for AffixFuzzer1 { impl AffixFuzzer1 { pub fn new( - fuzz1001: impl Into, - fuzz1002: impl Into, - fuzz1003: impl Into, - fuzz1004: impl Into, - fuzz1005: impl Into, - fuzz1006: impl Into, - fuzz1007: impl Into, - fuzz1008: impl Into, - fuzz1009: impl Into, - fuzz1010: impl Into, - fuzz1011: impl Into, - fuzz1012: impl Into, - fuzz1013: impl Into, - fuzz1014: impl Into, - fuzz1015: impl Into, - fuzz1016: impl Into, - fuzz1017: impl Into, - fuzz1018: impl Into, - fuzz1019: impl Into, - fuzz1101: impl IntoIterator>, - fuzz1102: impl IntoIterator>, - fuzz1103: impl IntoIterator>, - fuzz1104: impl IntoIterator>, - fuzz1105: impl IntoIterator>, - fuzz1106: impl IntoIterator>, - fuzz1107: impl IntoIterator>, - fuzz1108: impl IntoIterator>, - fuzz1109: impl IntoIterator>, - fuzz1110: impl IntoIterator>, - fuzz1111: impl IntoIterator>, - fuzz1112: impl IntoIterator>, - fuzz1113: impl IntoIterator>, - fuzz1114: impl IntoIterator>, - fuzz1115: impl IntoIterator>, - fuzz1116: impl IntoIterator>, - fuzz1117: impl IntoIterator>, - fuzz1118: impl IntoIterator>, + fuzz1001: impl Into, + fuzz1002: impl Into, + fuzz1003: impl Into, + fuzz1004: impl Into, + fuzz1005: impl Into, + fuzz1006: impl Into, + fuzz1007: impl Into, + fuzz1008: impl Into, + fuzz1009: impl Into, + fuzz1010: impl Into, + fuzz1011: impl Into, + fuzz1012: impl Into, + fuzz1013: impl Into, + fuzz1014: impl Into, + fuzz1015: impl Into, + fuzz1016: impl Into, + fuzz1017: impl Into, + fuzz1018: impl Into, + fuzz1019: impl Into, + fuzz1101: impl IntoIterator>, + fuzz1102: impl IntoIterator>, + fuzz1103: impl IntoIterator>, + fuzz1104: impl IntoIterator>, + fuzz1105: impl IntoIterator>, + fuzz1106: impl IntoIterator>, + fuzz1107: impl IntoIterator>, + fuzz1108: impl IntoIterator>, + fuzz1109: impl IntoIterator>, + fuzz1110: impl IntoIterator>, + fuzz1111: impl IntoIterator>, + fuzz1112: impl IntoIterator>, + fuzz1113: impl IntoIterator>, + fuzz1114: impl IntoIterator>, + fuzz1115: impl IntoIterator>, + fuzz1116: impl IntoIterator>, + fuzz1117: impl IntoIterator>, + fuzz1118: impl IntoIterator>, ) -> Self { Self { fuzz1001: fuzz1001.into(), @@ -3942,99 +4079,153 @@ impl AffixFuzzer1 { } } - pub fn with_fuzz2001(mut self, fuzz2001: impl Into) -> Self { + pub fn with_fuzz2001( + mut self, + fuzz2001: impl Into, + ) -> Self { self.fuzz2001 = Some(fuzz2001.into()); self } - pub fn with_fuzz2002(mut self, fuzz2002: impl Into) -> Self { + pub fn with_fuzz2002( + mut self, + fuzz2002: impl Into, + ) -> Self { self.fuzz2002 = Some(fuzz2002.into()); self } - pub fn with_fuzz2003(mut self, fuzz2003: impl Into) -> Self { + pub fn with_fuzz2003( + mut self, + fuzz2003: impl Into, + ) -> Self { self.fuzz2003 = Some(fuzz2003.into()); self } - pub fn with_fuzz2004(mut self, fuzz2004: impl Into) -> Self { + pub fn with_fuzz2004( + mut self, + fuzz2004: impl Into, + ) -> Self { self.fuzz2004 = Some(fuzz2004.into()); self } - pub fn with_fuzz2005(mut self, fuzz2005: impl Into) -> Self { + pub fn with_fuzz2005( + mut self, + fuzz2005: impl Into, + ) -> Self { self.fuzz2005 = Some(fuzz2005.into()); self } - pub fn with_fuzz2006(mut self, fuzz2006: impl Into) -> Self { + pub fn with_fuzz2006( + mut self, + fuzz2006: impl Into, + ) -> Self { self.fuzz2006 = Some(fuzz2006.into()); self } - pub fn with_fuzz2007(mut self, fuzz2007: impl Into) -> Self { + pub fn with_fuzz2007( + mut self, + fuzz2007: impl Into, + ) -> Self { self.fuzz2007 = Some(fuzz2007.into()); self } - pub fn with_fuzz2008(mut self, fuzz2008: impl Into) -> Self { + pub fn with_fuzz2008( + mut self, + fuzz2008: impl Into, + ) -> Self { self.fuzz2008 = Some(fuzz2008.into()); self } - pub fn with_fuzz2009(mut self, fuzz2009: impl Into) -> Self { + pub fn with_fuzz2009( + mut self, + fuzz2009: impl Into, + ) -> Self { self.fuzz2009 = Some(fuzz2009.into()); self } - pub fn with_fuzz2010(mut self, fuzz2010: impl Into) -> Self { + pub fn with_fuzz2010( + mut self, + fuzz2010: impl Into, + ) -> Self { self.fuzz2010 = Some(fuzz2010.into()); self } - pub fn with_fuzz2011(mut self, fuzz2011: impl Into) -> Self { + pub fn with_fuzz2011( + mut self, + fuzz2011: impl Into, + ) -> Self { self.fuzz2011 = Some(fuzz2011.into()); self } - pub fn with_fuzz2012(mut self, fuzz2012: impl Into) -> Self { + pub fn with_fuzz2012( + mut self, + fuzz2012: impl Into, + ) -> Self { self.fuzz2012 = Some(fuzz2012.into()); self } - pub fn with_fuzz2013(mut self, fuzz2013: impl Into) -> Self { + pub fn with_fuzz2013( + mut self, + fuzz2013: impl Into, + ) -> Self { self.fuzz2013 = Some(fuzz2013.into()); self } - pub fn with_fuzz2014(mut self, fuzz2014: impl Into) -> Self { + pub fn with_fuzz2014( + mut self, + fuzz2014: impl Into, + ) -> Self { self.fuzz2014 = Some(fuzz2014.into()); self } - pub fn with_fuzz2015(mut self, fuzz2015: impl Into) -> Self { + pub fn with_fuzz2015( + mut self, + fuzz2015: impl Into, + ) -> Self { self.fuzz2015 = Some(fuzz2015.into()); self } - pub fn with_fuzz2016(mut self, fuzz2016: impl Into) -> Self { + pub fn with_fuzz2016( + mut self, + fuzz2016: impl Into, + ) -> Self { self.fuzz2016 = Some(fuzz2016.into()); self } - pub fn with_fuzz2017(mut self, fuzz2017: impl Into) -> Self { + pub fn with_fuzz2017( + mut self, + fuzz2017: impl Into, + ) -> Self { self.fuzz2017 = Some(fuzz2017.into()); self } - pub fn with_fuzz2018(mut self, fuzz2018: impl Into) -> Self { + pub fn with_fuzz2018( + mut self, + fuzz2018: impl Into, + ) -> Self { self.fuzz2018 = Some(fuzz2018.into()); self } pub fn with_fuzz2101( mut self, - fuzz2101: impl IntoIterator>, + fuzz2101: impl IntoIterator>, ) -> Self { self.fuzz2101 = Some(fuzz2101.into_iter().map(Into::into).collect()); self @@ -4042,7 +4233,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2102( mut self, - fuzz2102: impl IntoIterator>, + fuzz2102: impl IntoIterator>, ) -> Self { self.fuzz2102 = Some(fuzz2102.into_iter().map(Into::into).collect()); self @@ -4050,7 +4241,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2103( mut self, - fuzz2103: impl IntoIterator>, + fuzz2103: impl IntoIterator>, ) -> Self { self.fuzz2103 = Some(fuzz2103.into_iter().map(Into::into).collect()); self @@ -4058,7 +4249,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2104( mut self, - fuzz2104: impl IntoIterator>, + fuzz2104: impl IntoIterator>, ) -> Self { self.fuzz2104 = Some(fuzz2104.into_iter().map(Into::into).collect()); self @@ -4066,7 +4257,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2105( mut self, - fuzz2105: impl IntoIterator>, + fuzz2105: impl IntoIterator>, ) -> Self { self.fuzz2105 = Some(fuzz2105.into_iter().map(Into::into).collect()); self @@ -4074,7 +4265,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2106( mut self, - fuzz2106: impl IntoIterator>, + fuzz2106: impl IntoIterator>, ) -> Self { self.fuzz2106 = Some(fuzz2106.into_iter().map(Into::into).collect()); self @@ -4082,7 +4273,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2107( mut self, - fuzz2107: impl IntoIterator>, + fuzz2107: impl IntoIterator>, ) -> Self { self.fuzz2107 = Some(fuzz2107.into_iter().map(Into::into).collect()); self @@ -4090,7 +4281,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2108( mut self, - fuzz2108: impl IntoIterator>, + fuzz2108: impl IntoIterator>, ) -> Self { self.fuzz2108 = Some(fuzz2108.into_iter().map(Into::into).collect()); self @@ -4098,7 +4289,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2109( mut self, - fuzz2109: impl IntoIterator>, + fuzz2109: impl IntoIterator>, ) -> Self { self.fuzz2109 = Some(fuzz2109.into_iter().map(Into::into).collect()); self @@ -4106,7 +4297,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2110( mut self, - fuzz2110: impl IntoIterator>, + fuzz2110: impl IntoIterator>, ) -> Self { self.fuzz2110 = Some(fuzz2110.into_iter().map(Into::into).collect()); self @@ -4114,7 +4305,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2111( mut self, - fuzz2111: impl IntoIterator>, + fuzz2111: impl IntoIterator>, ) -> Self { self.fuzz2111 = Some(fuzz2111.into_iter().map(Into::into).collect()); self @@ -4122,7 +4313,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2112( mut self, - fuzz2112: impl IntoIterator>, + fuzz2112: impl IntoIterator>, ) -> Self { self.fuzz2112 = Some(fuzz2112.into_iter().map(Into::into).collect()); self @@ -4130,7 +4321,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2113( mut self, - fuzz2113: impl IntoIterator>, + fuzz2113: impl IntoIterator>, ) -> Self { self.fuzz2113 = Some(fuzz2113.into_iter().map(Into::into).collect()); self @@ -4138,7 +4329,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2114( mut self, - fuzz2114: impl IntoIterator>, + fuzz2114: impl IntoIterator>, ) -> Self { self.fuzz2114 = Some(fuzz2114.into_iter().map(Into::into).collect()); self @@ -4146,7 +4337,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2115( mut self, - fuzz2115: impl IntoIterator>, + fuzz2115: impl IntoIterator>, ) -> Self { self.fuzz2115 = Some(fuzz2115.into_iter().map(Into::into).collect()); self @@ -4154,7 +4345,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2116( mut self, - fuzz2116: impl IntoIterator>, + fuzz2116: impl IntoIterator>, ) -> Self { self.fuzz2116 = Some(fuzz2116.into_iter().map(Into::into).collect()); self @@ -4162,7 +4353,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2117( mut self, - fuzz2117: impl IntoIterator>, + fuzz2117: impl IntoIterator>, ) -> Self { self.fuzz2117 = Some(fuzz2117.into_iter().map(Into::into).collect()); self @@ -4170,7 +4361,7 @@ impl AffixFuzzer1 { pub fn with_fuzz2118( mut self, - fuzz2118: impl IntoIterator>, + fuzz2118: impl IntoIterator>, ) -> Self { self.fuzz2118 = Some(fuzz2118.into_iter().map(Into::into).collect()); self diff --git a/crates/re_types/src/testing/archetypes/mod.rs b/crates/re_types/src/testing/archetypes/mod.rs new file mode 100644 index 000000000000..3a3275c9060a --- /dev/null +++ b/crates/re_types/src/testing/archetypes/mod.rs @@ -0,0 +1,5 @@ +// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT. + +mod fuzzy; + +pub use self::fuzzy::AffixFuzzer1; diff --git a/crates/re_types/src/components/fuzzy.rs b/crates/re_types/src/testing/components/fuzzy.rs similarity index 89% rename from crates/re_types/src/components/fuzzy.rs rename to crates/re_types/src/testing/components/fuzzy.rs index 41d33957af62..48c37fbbcd09 100644 --- a/crates/re_types/src/components/fuzzy.rs +++ b/crates/re_types/src/testing/components/fuzzy.rs @@ -13,10 +13,10 @@ #![allow(clippy::unnecessary_cast)] #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer1(pub crate::datatypes::AffixFuzzer1); +pub struct AffixFuzzer1(pub crate::testing::datatypes::AffixFuzzer1); -impl From for AffixFuzzer1 { - fn from(v: crate::datatypes::AffixFuzzer1) -> Self { +impl From for AffixFuzzer1 { + fn from(v: crate::testing::datatypes::AffixFuzzer1) -> Self { Self(v) } } @@ -108,7 +108,7 @@ impl crate::Loggable for AffixFuzzer1 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -150,7 +150,7 @@ impl crate::Loggable for AffixFuzzer1 { { _ = data0_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer1::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::try_to_arrow_opt( data0, Some("rerun.testing.components.AffixFuzzer1"), )? @@ -167,23 +167,25 @@ impl crate::Loggable for AffixFuzzer1 { { use crate::Loggable as _; use ::arrow2::{array::*, datatypes::*}; - Ok(crate::datatypes::AffixFuzzer1::try_from_arrow_opt(data) - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer1#single_required".into(), - source: Box::new(err), - })? - .into_iter() - .map(|v| { - v.ok_or_else(|| crate::DeserializationError::MissingData { - backtrace: ::backtrace::Backtrace::new_unresolved(), + Ok( + crate::testing::datatypes::AffixFuzzer1::try_from_arrow_opt(data) + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer1#single_required".into(), + source: Box::new(err), + })? + .into_iter() + .map(|v| { + v.ok_or_else(|| crate::DeserializationError::MissingData { + backtrace: ::backtrace::Backtrace::new_unresolved(), + }) }) - }) - .map(|res| res.map(|v| Some(Self(v)))) - .collect::>>>() - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer1#single_required".into(), - source: Box::new(err), - })?) + .map(|res| res.map(|v| Some(Self(v)))) + .collect::>>>() + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer1#single_required".into(), + source: Box::new(err), + })?, + ) } #[inline] @@ -205,10 +207,10 @@ impl crate::Loggable for AffixFuzzer1 { impl crate::Component for AffixFuzzer1 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer2(pub crate::datatypes::AffixFuzzer1); +pub struct AffixFuzzer2(pub crate::testing::datatypes::AffixFuzzer1); -impl From for AffixFuzzer2 { - fn from(v: crate::datatypes::AffixFuzzer1) -> Self { +impl From for AffixFuzzer2 { + fn from(v: crate::testing::datatypes::AffixFuzzer1) -> Self { Self(v) } } @@ -300,7 +302,7 @@ impl crate::Loggable for AffixFuzzer2 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -342,7 +344,7 @@ impl crate::Loggable for AffixFuzzer2 { { _ = data0_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer1::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::try_to_arrow_opt( data0, Some("rerun.testing.components.AffixFuzzer2"), )? @@ -359,23 +361,25 @@ impl crate::Loggable for AffixFuzzer2 { { use crate::Loggable as _; use ::arrow2::{array::*, datatypes::*}; - Ok(crate::datatypes::AffixFuzzer1::try_from_arrow_opt(data) - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer2#single_required".into(), - source: Box::new(err), - })? - .into_iter() - .map(|v| { - v.ok_or_else(|| crate::DeserializationError::MissingData { - backtrace: ::backtrace::Backtrace::new_unresolved(), + Ok( + crate::testing::datatypes::AffixFuzzer1::try_from_arrow_opt(data) + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer2#single_required".into(), + source: Box::new(err), + })? + .into_iter() + .map(|v| { + v.ok_or_else(|| crate::DeserializationError::MissingData { + backtrace: ::backtrace::Backtrace::new_unresolved(), + }) }) - }) - .map(|res| res.map(|v| Some(Self(v)))) - .collect::>>>() - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer2#single_required".into(), - source: Box::new(err), - })?) + .map(|res| res.map(|v| Some(Self(v)))) + .collect::>>>() + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer2#single_required".into(), + source: Box::new(err), + })?, + ) } #[inline] @@ -397,10 +401,10 @@ impl crate::Loggable for AffixFuzzer2 { impl crate::Component for AffixFuzzer2 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer3(pub crate::datatypes::AffixFuzzer1); +pub struct AffixFuzzer3(pub crate::testing::datatypes::AffixFuzzer1); -impl From for AffixFuzzer3 { - fn from(v: crate::datatypes::AffixFuzzer1) -> Self { +impl From for AffixFuzzer3 { + fn from(v: crate::testing::datatypes::AffixFuzzer1) -> Self { Self(v) } } @@ -492,7 +496,7 @@ impl crate::Loggable for AffixFuzzer3 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -534,7 +538,7 @@ impl crate::Loggable for AffixFuzzer3 { { _ = data0_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer1::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::try_to_arrow_opt( data0, Some("rerun.testing.components.AffixFuzzer3"), )? @@ -551,23 +555,25 @@ impl crate::Loggable for AffixFuzzer3 { { use crate::Loggable as _; use ::arrow2::{array::*, datatypes::*}; - Ok(crate::datatypes::AffixFuzzer1::try_from_arrow_opt(data) - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer3#single_required".into(), - source: Box::new(err), - })? - .into_iter() - .map(|v| { - v.ok_or_else(|| crate::DeserializationError::MissingData { - backtrace: ::backtrace::Backtrace::new_unresolved(), + Ok( + crate::testing::datatypes::AffixFuzzer1::try_from_arrow_opt(data) + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer3#single_required".into(), + source: Box::new(err), + })? + .into_iter() + .map(|v| { + v.ok_or_else(|| crate::DeserializationError::MissingData { + backtrace: ::backtrace::Backtrace::new_unresolved(), + }) }) - }) - .map(|res| res.map(|v| Some(Self(v)))) - .collect::>>>() - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer3#single_required".into(), - source: Box::new(err), - })?) + .map(|res| res.map(|v| Some(Self(v)))) + .collect::>>>() + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer3#single_required".into(), + source: Box::new(err), + })?, + ) } #[inline] @@ -589,10 +595,10 @@ impl crate::Loggable for AffixFuzzer3 { impl crate::Component for AffixFuzzer3 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer4(pub Option); +pub struct AffixFuzzer4(pub Option); -impl From> for AffixFuzzer4 { - fn from(v: Option) -> Self { +impl From> for AffixFuzzer4 { + fn from(v: Option) -> Self { Self(v) } } @@ -684,7 +690,7 @@ impl crate::Loggable for AffixFuzzer4 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -728,7 +734,7 @@ impl crate::Loggable for AffixFuzzer4 { { _ = data0_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer1::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::try_to_arrow_opt( data0, Some("rerun.testing.components.AffixFuzzer4"), )? @@ -745,19 +751,21 @@ impl crate::Loggable for AffixFuzzer4 { { use crate::Loggable as _; use ::arrow2::{array::*, datatypes::*}; - Ok(crate::datatypes::AffixFuzzer1::try_from_arrow_opt(data) - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer4#single_optional".into(), - source: Box::new(err), - })? - .into_iter() - .map(Ok) - .map(|res| res.map(|v| Some(Self(v)))) - .collect::>>>() - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer4#single_optional".into(), - source: Box::new(err), - })?) + Ok( + crate::testing::datatypes::AffixFuzzer1::try_from_arrow_opt(data) + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer4#single_optional".into(), + source: Box::new(err), + })? + .into_iter() + .map(Ok) + .map(|res| res.map(|v| Some(Self(v)))) + .collect::>>>() + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer4#single_optional".into(), + source: Box::new(err), + })?, + ) } #[inline] @@ -779,10 +787,10 @@ impl crate::Loggable for AffixFuzzer4 { impl crate::Component for AffixFuzzer4 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer5(pub Option); +pub struct AffixFuzzer5(pub Option); -impl From> for AffixFuzzer5 { - fn from(v: Option) -> Self { +impl From> for AffixFuzzer5 { + fn from(v: Option) -> Self { Self(v) } } @@ -874,7 +882,7 @@ impl crate::Loggable for AffixFuzzer5 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -918,7 +926,7 @@ impl crate::Loggable for AffixFuzzer5 { { _ = data0_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer1::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::try_to_arrow_opt( data0, Some("rerun.testing.components.AffixFuzzer5"), )? @@ -935,19 +943,21 @@ impl crate::Loggable for AffixFuzzer5 { { use crate::Loggable as _; use ::arrow2::{array::*, datatypes::*}; - Ok(crate::datatypes::AffixFuzzer1::try_from_arrow_opt(data) - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer5#single_optional".into(), - source: Box::new(err), - })? - .into_iter() - .map(Ok) - .map(|res| res.map(|v| Some(Self(v)))) - .collect::>>>() - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer5#single_optional".into(), - source: Box::new(err), - })?) + Ok( + crate::testing::datatypes::AffixFuzzer1::try_from_arrow_opt(data) + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer5#single_optional".into(), + source: Box::new(err), + })? + .into_iter() + .map(Ok) + .map(|res| res.map(|v| Some(Self(v)))) + .collect::>>>() + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer5#single_optional".into(), + source: Box::new(err), + })?, + ) } #[inline] @@ -969,10 +979,10 @@ impl crate::Loggable for AffixFuzzer5 { impl crate::Component for AffixFuzzer5 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer6(pub Option); +pub struct AffixFuzzer6(pub Option); -impl From> for AffixFuzzer6 { - fn from(v: Option) -> Self { +impl From> for AffixFuzzer6 { + fn from(v: Option) -> Self { Self(v) } } @@ -1064,7 +1074,7 @@ impl crate::Loggable for AffixFuzzer6 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -1108,7 +1118,7 @@ impl crate::Loggable for AffixFuzzer6 { { _ = data0_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer1::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::try_to_arrow_opt( data0, Some("rerun.testing.components.AffixFuzzer6"), )? @@ -1125,19 +1135,21 @@ impl crate::Loggable for AffixFuzzer6 { { use crate::Loggable as _; use ::arrow2::{array::*, datatypes::*}; - Ok(crate::datatypes::AffixFuzzer1::try_from_arrow_opt(data) - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer6#single_optional".into(), - source: Box::new(err), - })? - .into_iter() - .map(Ok) - .map(|res| res.map(|v| Some(Self(v)))) - .collect::>>>() - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer6#single_optional".into(), - source: Box::new(err), - })?) + Ok( + crate::testing::datatypes::AffixFuzzer1::try_from_arrow_opt(data) + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer6#single_optional".into(), + source: Box::new(err), + })? + .into_iter() + .map(Ok) + .map(|res| res.map(|v| Some(Self(v)))) + .collect::>>>() + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer6#single_optional".into(), + source: Box::new(err), + })?, + ) } #[inline] @@ -1159,10 +1171,10 @@ impl crate::Loggable for AffixFuzzer6 { impl crate::Component for AffixFuzzer6 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer7(pub Option>); +pub struct AffixFuzzer7(pub Option>); -impl From>> for AffixFuzzer7 { - fn from(v: Option>) -> Self { +impl From>> for AffixFuzzer7 { + fn from(v: Option>) -> Self { Self(v) } } @@ -1196,7 +1208,7 @@ impl crate::Loggable for AffixFuzzer7 { use ::arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), })) @@ -1254,7 +1266,8 @@ impl crate::Loggable for AffixFuzzer7 { "rerun.testing.components.AffixFuzzer7".to_owned(), Box::new(DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: + ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }))), @@ -1267,7 +1280,7 @@ impl crate::Loggable for AffixFuzzer7 { { _ = data0_inner_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer1::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer1::try_to_arrow_opt( data0_inner_data, Some("rerun.testing.components.AffixFuzzer7"), )? @@ -1302,7 +1315,7 @@ impl crate::Loggable for AffixFuzzer7 { offsets.iter().copied().zip(offsets.iter().copied().skip(1)) }; let data = &**data.values(); - let data = crate::datatypes::AffixFuzzer1::try_from_arrow_opt(data) + let data = crate::testing::datatypes::AffixFuzzer1::try_from_arrow_opt(data) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.components.AffixFuzzer7#many_optional".into(), source: Box::new(err), @@ -2418,10 +2431,10 @@ impl crate::Loggable for AffixFuzzer13 { impl crate::Component for AffixFuzzer13 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer14(pub crate::datatypes::AffixFuzzer3); +pub struct AffixFuzzer14(pub crate::testing::datatypes::AffixFuzzer3); -impl From for AffixFuzzer14 { - fn from(v: crate::datatypes::AffixFuzzer3) -> Self { +impl From for AffixFuzzer14 { + fn from(v: crate::testing::datatypes::AffixFuzzer3) -> Self { Self(v) } } @@ -2477,7 +2490,7 @@ impl crate::Loggable for AffixFuzzer14 { name: "craziness".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })), @@ -2533,7 +2546,7 @@ impl crate::Loggable for AffixFuzzer14 { { _ = data0_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer3::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer3::try_to_arrow_opt( data0, Some("rerun.testing.components.AffixFuzzer14"), )? @@ -2550,23 +2563,25 @@ impl crate::Loggable for AffixFuzzer14 { { use crate::Loggable as _; use ::arrow2::{array::*, datatypes::*}; - Ok(crate::datatypes::AffixFuzzer3::try_from_arrow_opt(data) - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer14#single_required_union".into(), - source: Box::new(err), - })? - .into_iter() - .map(|v| { - v.ok_or_else(|| crate::DeserializationError::MissingData { - backtrace: ::backtrace::Backtrace::new_unresolved(), + Ok( + crate::testing::datatypes::AffixFuzzer3::try_from_arrow_opt(data) + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer14#single_required_union".into(), + source: Box::new(err), + })? + .into_iter() + .map(|v| { + v.ok_or_else(|| crate::DeserializationError::MissingData { + backtrace: ::backtrace::Backtrace::new_unresolved(), + }) }) - }) - .map(|res| res.map(|v| Some(Self(v)))) - .collect::>>>() - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer14#single_required_union".into(), - source: Box::new(err), - })?) + .map(|res| res.map(|v| Some(Self(v)))) + .collect::>>>() + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer14#single_required_union".into(), + source: Box::new(err), + })?, + ) } #[inline] @@ -2588,10 +2603,10 @@ impl crate::Loggable for AffixFuzzer14 { impl crate::Component for AffixFuzzer14 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer15(pub Option); +pub struct AffixFuzzer15(pub Option); -impl From> for AffixFuzzer15 { - fn from(v: Option) -> Self { +impl From> for AffixFuzzer15 { + fn from(v: Option) -> Self { Self(v) } } @@ -2647,7 +2662,7 @@ impl crate::Loggable for AffixFuzzer15 { name: "craziness".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })), @@ -2705,7 +2720,7 @@ impl crate::Loggable for AffixFuzzer15 { { _ = data0_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer3::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer3::try_to_arrow_opt( data0, Some("rerun.testing.components.AffixFuzzer15"), )? @@ -2722,19 +2737,21 @@ impl crate::Loggable for AffixFuzzer15 { { use crate::Loggable as _; use ::arrow2::{array::*, datatypes::*}; - Ok(crate::datatypes::AffixFuzzer3::try_from_arrow_opt(data) - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer15#single_optional_union".into(), - source: Box::new(err), - })? - .into_iter() - .map(Ok) - .map(|res| res.map(|v| Some(Self(v)))) - .collect::>>>() - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer15#single_optional_union".into(), - source: Box::new(err), - })?) + Ok( + crate::testing::datatypes::AffixFuzzer3::try_from_arrow_opt(data) + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer15#single_optional_union".into(), + source: Box::new(err), + })? + .into_iter() + .map(Ok) + .map(|res| res.map(|v| Some(Self(v)))) + .collect::>>>() + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer15#single_optional_union".into(), + source: Box::new(err), + })?, + ) } #[inline] @@ -2756,10 +2773,10 @@ impl crate::Loggable for AffixFuzzer15 { impl crate::Component for AffixFuzzer15 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer16(pub Vec); +pub struct AffixFuzzer16(pub Vec); -impl From> for AffixFuzzer16 { - fn from(v: Vec) -> Self { +impl From> for AffixFuzzer16 { + fn from(v: Vec) -> Self { Self(v) } } @@ -2793,7 +2810,7 @@ impl crate::Loggable for AffixFuzzer16 { use ::arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })) @@ -2849,7 +2866,8 @@ impl crate::Loggable for AffixFuzzer16 { "rerun.testing.components.AffixFuzzer16".to_owned(), Box::new(DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: + ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }))), @@ -2862,7 +2880,7 @@ impl crate::Loggable for AffixFuzzer16 { { _ = data0_inner_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer3::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer3::try_to_arrow_opt( data0_inner_data, Some("rerun.testing.components.AffixFuzzer16"), )? @@ -2897,7 +2915,7 @@ impl crate::Loggable for AffixFuzzer16 { offsets.iter().copied().zip(offsets.iter().copied().skip(1)) }; let data = &**data.values(); - let data = crate::datatypes::AffixFuzzer3::try_from_arrow_opt(data) + let data = crate::testing::datatypes::AffixFuzzer3::try_from_arrow_opt(data) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.components.AffixFuzzer16#many_required_unions" .into(), @@ -2964,10 +2982,10 @@ impl crate::Loggable for AffixFuzzer16 { impl crate::Component for AffixFuzzer16 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer17(pub Option>); +pub struct AffixFuzzer17(pub Option>); -impl From>> for AffixFuzzer17 { - fn from(v: Option>) -> Self { +impl From>> for AffixFuzzer17 { + fn from(v: Option>) -> Self { Self(v) } } @@ -3001,7 +3019,7 @@ impl crate::Loggable for AffixFuzzer17 { use ::arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), })) @@ -3059,7 +3077,8 @@ impl crate::Loggable for AffixFuzzer17 { "rerun.testing.components.AffixFuzzer17".to_owned(), Box::new(DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: + ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }))), @@ -3072,7 +3091,7 @@ impl crate::Loggable for AffixFuzzer17 { { _ = data0_inner_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer3::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer3::try_to_arrow_opt( data0_inner_data, Some("rerun.testing.components.AffixFuzzer17"), )? @@ -3107,7 +3126,7 @@ impl crate::Loggable for AffixFuzzer17 { offsets.iter().copied().zip(offsets.iter().copied().skip(1)) }; let data = &**data.values(); - let data = crate::datatypes::AffixFuzzer3::try_from_arrow_opt(data) + let data = crate::testing::datatypes::AffixFuzzer3::try_from_arrow_opt(data) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.components.AffixFuzzer17#many_optional_unions" .into(), @@ -3170,10 +3189,10 @@ impl crate::Loggable for AffixFuzzer17 { impl crate::Component for AffixFuzzer17 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer18(pub Option>); +pub struct AffixFuzzer18(pub Option>); -impl From>> for AffixFuzzer18 { - fn from(v: Option>) -> Self { +impl From>> for AffixFuzzer18 { + fn from(v: Option>) -> Self { Self(v) } } @@ -3207,7 +3226,7 @@ impl crate::Loggable for AffixFuzzer18 { use ::arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), })) @@ -3265,7 +3284,8 @@ impl crate::Loggable for AffixFuzzer18 { "rerun.testing.components.AffixFuzzer18".to_owned(), Box::new(DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: + ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }))), @@ -3278,7 +3298,7 @@ impl crate::Loggable for AffixFuzzer18 { { _ = data0_inner_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer4::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer4::try_to_arrow_opt( data0_inner_data, Some("rerun.testing.components.AffixFuzzer18"), )? @@ -3313,7 +3333,7 @@ impl crate::Loggable for AffixFuzzer18 { offsets.iter().copied().zip(offsets.iter().copied().skip(1)) }; let data = &**data.values(); - let data = crate::datatypes::AffixFuzzer4::try_from_arrow_opt(data) + let data = crate::testing::datatypes::AffixFuzzer4::try_from_arrow_opt(data) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.components.AffixFuzzer18#many_optional_unions" .into(), @@ -3376,10 +3396,10 @@ impl crate::Loggable for AffixFuzzer18 { impl crate::Component for AffixFuzzer18 {} #[derive(Clone, Debug, PartialEq)] -pub struct AffixFuzzer19(pub crate::datatypes::AffixFuzzer5); +pub struct AffixFuzzer19(pub crate::testing::datatypes::AffixFuzzer5); -impl From for AffixFuzzer19 { - fn from(v: crate::datatypes::AffixFuzzer5) -> Self { +impl From for AffixFuzzer19 { + fn from(v: crate::testing::datatypes::AffixFuzzer5) -> Self { Self(v) } } @@ -3413,7 +3433,7 @@ impl crate::Loggable for AffixFuzzer19 { use ::arrow2::datatypes::*; DataType::Struct(vec![Field { name: "single_optional_union".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }]) @@ -3448,7 +3468,7 @@ impl crate::Loggable for AffixFuzzer19 { { _ = data0_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer5::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer5::try_to_arrow_opt( data0, Some("rerun.testing.components.AffixFuzzer19"), )? @@ -3465,25 +3485,27 @@ impl crate::Loggable for AffixFuzzer19 { { use crate::Loggable as _; use ::arrow2::{array::*, datatypes::*}; - Ok(crate::datatypes::AffixFuzzer5::try_from_arrow_opt(data) - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer19#just_a_table_nothing_shady" - .into(), - source: Box::new(err), - })? - .into_iter() - .map(|v| { - v.ok_or_else(|| crate::DeserializationError::MissingData { - backtrace: ::backtrace::Backtrace::new_unresolved(), + Ok( + crate::testing::datatypes::AffixFuzzer5::try_from_arrow_opt(data) + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer19#just_a_table_nothing_shady" + .into(), + source: Box::new(err), + })? + .into_iter() + .map(|v| { + v.ok_or_else(|| crate::DeserializationError::MissingData { + backtrace: ::backtrace::Backtrace::new_unresolved(), + }) }) - }) - .map(|res| res.map(|v| Some(Self(v)))) - .collect::>>>() - .map_err(|err| crate::DeserializationError::Context { - location: "rerun.testing.components.AffixFuzzer19#just_a_table_nothing_shady" - .into(), - source: Box::new(err), - })?) + .map(|res| res.map(|v| Some(Self(v)))) + .collect::>>>() + .map_err(|err| crate::DeserializationError::Context { + location: "rerun.testing.components.AffixFuzzer19#just_a_table_nothing_shady" + .into(), + source: Box::new(err), + })?, + ) } #[inline] diff --git a/crates/re_types/src/testing/components/mod.rs b/crates/re_types/src/testing/components/mod.rs new file mode 100644 index 000000000000..6d8e321f9073 --- /dev/null +++ b/crates/re_types/src/testing/components/mod.rs @@ -0,0 +1,10 @@ +// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT. + +mod fuzzy; + +pub use self::fuzzy::{ + AffixFuzzer1, AffixFuzzer10, AffixFuzzer11, AffixFuzzer12, AffixFuzzer13, AffixFuzzer14, + AffixFuzzer15, AffixFuzzer16, AffixFuzzer17, AffixFuzzer18, AffixFuzzer19, AffixFuzzer2, + AffixFuzzer3, AffixFuzzer4, AffixFuzzer5, AffixFuzzer6, AffixFuzzer7, AffixFuzzer8, + AffixFuzzer9, +}; diff --git a/crates/re_types/src/datatypes/fuzzy.rs b/crates/re_types/src/testing/datatypes/fuzzy.rs similarity index 75% rename from crates/re_types/src/datatypes/fuzzy.rs rename to crates/re_types/src/testing/datatypes/fuzzy.rs index 61083892bfd1..3822c24de834 100644 --- a/crates/re_types/src/datatypes/fuzzy.rs +++ b/crates/re_types/src/testing/datatypes/fuzzy.rs @@ -78,11 +78,11 @@ impl crate::Loggable for FlattenedScalar { (if let Some(ext) = extension_wrapper { DataType::Extension( ext.to_owned(), - Box::new(::to_arrow_datatype()), + Box::new(::to_arrow_datatype()), None, ) } else { - ::to_arrow_datatype() + ::to_arrow_datatype() }) .to_logical_type() .clone(), @@ -215,7 +215,7 @@ pub struct AffixFuzzer1 { pub many_strings_required: Vec, pub many_strings_optional: Option>, pub flattened_scalar: f32, - pub almost_flattened_scalar: crate::datatypes::FlattenedScalar, + pub almost_flattened_scalar: crate::testing::datatypes::FlattenedScalar, pub from_parent: Option, } @@ -306,7 +306,7 @@ impl crate::Loggable for AffixFuzzer1 { }, Field { name: "almost_flattened_scalar".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -345,11 +345,11 @@ impl crate::Loggable for AffixFuzzer1 { (if let Some(ext) = extension_wrapper { DataType::Extension( ext.to_owned(), - Box::new(::to_arrow_datatype()), + Box::new(::to_arrow_datatype()), None, ) } else { - ::to_arrow_datatype() + ::to_arrow_datatype() }) .to_logical_type() .clone(), @@ -779,7 +779,7 @@ impl crate::Loggable for AffixFuzzer1 { { _ = almost_flattened_scalar_bitmap; _ = extension_wrapper; - crate::datatypes::FlattenedScalar::try_to_arrow_opt( + crate::testing::datatypes::FlattenedScalar::try_to_arrow_opt( almost_flattened_scalar, None::<&str>, )? @@ -964,7 +964,7 @@ impl crate::Loggable for AffixFuzzer1 { let almost_flattened_scalar = { let data = &**arrays_by_name["almost_flattened_scalar"]; - crate::datatypes::FlattenedScalar::try_from_arrow_opt(data) + crate::testing::datatypes::FlattenedScalar::try_from_arrow_opt(data) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.datatypes.AffixFuzzer1#almost_flattened_scalar" @@ -1149,7 +1149,7 @@ impl crate::Datatype for AffixFuzzer2 {} pub enum AffixFuzzer3 { Degrees(f32), Radians(Option), - Craziness(Vec), + Craziness(Vec), FixedSizeShenanigans([f32; 3usize]), } @@ -1204,7 +1204,7 @@ impl crate::Loggable for AffixFuzzer3 { name: "craziness".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })), @@ -1249,257 +1249,83 @@ impl crate::Loggable for AffixFuzzer3 { datum }) .collect(); - UnionArray::new( - (if let Some(ext) = extension_wrapper { - DataType::Extension( - ext.to_owned(), - Box::new(::to_arrow_datatype()), - None, - ) - } else { - ::to_arrow_datatype() - }) - .to_logical_type() - .clone(), - data.iter() - .map(|a| match a.as_deref() { - None => 0, - Some(AffixFuzzer3::Degrees(_)) => 1i8, - Some(AffixFuzzer3::Radians(_)) => 2i8, - Some(AffixFuzzer3::Craziness(_)) => 3i8, - Some(AffixFuzzer3::FixedSizeShenanigans(_)) => 4i8, - }) - .collect(), - vec![ - NullArray::new(DataType::Null, data.iter().filter(|v| v.is_none()).count()) - .boxed(), - { - let (somes, degrees): (Vec<_>, Vec<_>) = data - .iter() - .filter(|datum| { - matches!(datum.as_deref(), Some(AffixFuzzer3::Degrees(_))) - }) - .map(|datum| { - let datum = match datum.as_deref() { - Some(AffixFuzzer3::Degrees(v)) => Some(v.clone()), - _ => None, - }; - (datum.is_some(), datum) - }) - .unzip(); - let degrees_bitmap: Option<::arrow2::bitmap::Bitmap> = { - let any_nones = somes.iter().any(|some| !*some); - any_nones.then(|| somes.into()) - }; - PrimitiveArray::new( - { - _ = extension_wrapper; - DataType::Float32.to_logical_type().clone() - }, - degrees.into_iter().map(|v| v.unwrap_or_default()).collect(), - degrees_bitmap, - ) - .boxed() - }, - { - let (somes, radians): (Vec<_>, Vec<_>) = data - .iter() - .filter(|datum| { - matches!(datum.as_deref(), Some(AffixFuzzer3::Radians(_))) - }) - .map(|datum| { - let datum = match datum.as_deref() { - Some(AffixFuzzer3::Radians(v)) => Some(v.clone()), - _ => None, - } - .flatten(); - (datum.is_some(), datum) - }) - .unzip(); - let radians_bitmap: Option<::arrow2::bitmap::Bitmap> = { - let any_nones = somes.iter().any(|some| !*some); - any_nones.then(|| somes.into()) - }; - PrimitiveArray::new( - { - _ = extension_wrapper; - DataType::Float32.to_logical_type().clone() - }, - radians.into_iter().map(|v| v.unwrap_or_default()).collect(), - radians_bitmap, - ) - .boxed() - }, - { - let (somes, craziness): (Vec<_>, Vec<_>) = data - .iter() - .filter(|datum| { - matches!(datum.as_deref(), Some(AffixFuzzer3::Craziness(_))) - }) - .map(|datum| { - let datum = match datum.as_deref() { - Some(AffixFuzzer3::Craziness(v)) => Some(v.clone()), - _ => None, - }; - (datum.is_some(), datum) - }) - .unzip(); - let craziness_bitmap: Option<::arrow2::bitmap::Bitmap> = { - let any_nones = somes.iter().any(|some| !*some); - any_nones.then(|| somes.into()) - }; - { - use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; - let craziness_inner_data: Vec<_> = craziness - .iter() - .flatten() - .flatten() - .cloned() - .map(Some) - .collect(); - let craziness_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( - craziness.iter().map(|opt| { - opt.as_ref().map(|datum| datum.len()).unwrap_or_default() - }), - ) - .unwrap() - .into(); - ListArray::new( - { - _ = extension_wrapper; - DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: - ::to_arrow_datatype(), - is_nullable: false, - metadata: [].into(), - })) - .to_logical_type() - .clone() - }, - offsets, - { - _ = craziness_inner_bitmap; - _ = extension_wrapper; - crate::datatypes::AffixFuzzer1::try_to_arrow_opt( - craziness_inner_data, - None::<&str>, - )? - }, - craziness_bitmap, - ) - .boxed() - } - }, - { - let (somes, fixed_size_shenanigans): (Vec<_>, Vec<_>) = data - .iter() - .filter(|datum| { - matches!( - datum.as_deref(), - Some(AffixFuzzer3::FixedSizeShenanigans(_)) - ) - }) - .map(|datum| { - let datum = match datum.as_deref() { - Some(AffixFuzzer3::FixedSizeShenanigans(v)) => Some(v.clone()), - _ => None, - }; - (datum.is_some(), datum) - }) - .unzip(); - let fixed_size_shenanigans_bitmap: Option<::arrow2::bitmap::Bitmap> = { - let any_nones = somes.iter().any(|some| !*some); - any_nones.then(|| somes.into()) - }; - { - use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; - let fixed_size_shenanigans_inner_data: Vec<_> = fixed_size_shenanigans - .iter() - .flatten() - .flatten() - .cloned() - .map(Some) - .collect(); - let fixed_size_shenanigans_inner_bitmap: Option< - ::arrow2::bitmap::Bitmap, - > = None; - FixedSizeListArray::new( - { - _ = extension_wrapper; - DataType::FixedSizeList( - Box::new(Field { - name: "item".to_owned(), - data_type: DataType::Float32, - is_nullable: false, - metadata: [].into(), - }), - 3usize, - ) - .to_logical_type() - .clone() - }, - PrimitiveArray::new( - { - _ = extension_wrapper; - DataType::Float32.to_logical_type().clone() - }, - fixed_size_shenanigans_inner_data - .into_iter() - .map(|v| v.unwrap_or_default()) - .collect(), - fixed_size_shenanigans_inner_bitmap, - ) - .boxed(), - fixed_size_shenanigans_bitmap, - ) - .boxed() - } - }, - ], - Some({ - let mut degrees_offset = 0; - let mut radians_offset = 0; - let mut craziness_offset = 0; - let mut fixed_size_shenanigans_offset = 0; - let mut nulls_offset = 0; - data.iter() - .map(|v| match v.as_deref() { - None => { - let offset = nulls_offset; - nulls_offset += 1; - offset - } + UnionArray :: new ((if let Some (ext) = extension_wrapper { DataType :: Extension (ext . to_owned () , Box :: new (< crate :: testing :: datatypes :: AffixFuzzer3 > :: to_arrow_datatype ()) , None) } - Some(AffixFuzzer3::Degrees(_)) => { - let offset = degrees_offset; - degrees_offset += 1; - offset - } + else { < crate :: testing :: datatypes :: AffixFuzzer3 > :: to_arrow_datatype () } - Some(AffixFuzzer3::Radians(_)) => { - let offset = radians_offset; - radians_offset += 1; - offset - } +) . to_logical_type () . clone () , data . iter () . map (| a | match a . as_deref () { None => 0 , Some (AffixFuzzer3 :: Degrees (_)) => 1i8 , Some (AffixFuzzer3 :: Radians (_)) => 2i8 , Some (AffixFuzzer3 :: Craziness (_)) => 3i8 , Some (AffixFuzzer3 :: FixedSizeShenanigans (_)) => 4i8 , } - Some(AffixFuzzer3::Craziness(_)) => { - let offset = craziness_offset; - craziness_offset += 1; - offset - } +) . collect () , vec ! [NullArray :: new (DataType :: Null , data . iter () . filter (| v | v . is_none ()) . count () ,) . boxed () , { let (somes , degrees) : (Vec < _ > , Vec < _ >) = data . iter () . filter (| datum | matches ! (datum . as_deref () , Some (AffixFuzzer3 :: Degrees (_)))) . map (| datum | { let datum = match datum . as_deref () { Some (AffixFuzzer3 :: Degrees (v)) => Some (v . clone ()) , _ => None , } - Some(AffixFuzzer3::FixedSizeShenanigans(_)) => { - let offset = fixed_size_shenanigans_offset; - fixed_size_shenanigans_offset += 1; - offset - } - }) - .collect() - }), - ) - .boxed() + ; (datum . is_some () , datum) } + +) . unzip () ; let degrees_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = { let any_nones = somes . iter () . any (| some | ! * some) ; any_nones . then (|| somes . into ()) } + + ; PrimitiveArray :: new ({ _ = extension_wrapper ; DataType :: Float32 . to_logical_type () . clone () } + + , degrees . into_iter () . map (| v | v . unwrap_or_default ()) . collect () , degrees_bitmap ,) . boxed () } + + , { let (somes , radians) : (Vec < _ > , Vec < _ >) = data . iter () . filter (| datum | matches ! (datum . as_deref () , Some (AffixFuzzer3 :: Radians (_)))) . map (| datum | { let datum = match datum . as_deref () { Some (AffixFuzzer3 :: Radians (v)) => Some (v . clone ()) , _ => None , } + + . flatten () ; (datum . is_some () , datum) } + +) . unzip () ; let radians_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = { let any_nones = somes . iter () . any (| some | ! * some) ; any_nones . then (|| somes . into ()) } + + ; PrimitiveArray :: new ({ _ = extension_wrapper ; DataType :: Float32 . to_logical_type () . clone () } + + , radians . into_iter () . map (| v | v . unwrap_or_default ()) . collect () , radians_bitmap ,) . boxed () } + + , { let (somes , craziness) : (Vec < _ > , Vec < _ >) = data . iter () . filter (| datum | matches ! (datum . as_deref () , Some (AffixFuzzer3 :: Craziness (_)))) . map (| datum | { let datum = match datum . as_deref () { Some (AffixFuzzer3 :: Craziness (v)) => Some (v . clone ()) , _ => None , } + + ; (datum . is_some () , datum) } + +) . unzip () ; let craziness_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = { let any_nones = somes . iter () . any (| some | ! * some) ; any_nones . then (|| somes . into ()) } + + ; { use arrow2 :: { buffer :: Buffer , offset :: OffsetsBuffer } + + ; let craziness_inner_data : Vec < _ > = craziness . iter () . flatten () . flatten () . cloned () . map (Some) . collect () ; let craziness_inner_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = None ; let offsets = :: arrow2 :: offset :: Offsets :: < i32 > :: try_from_lengths (craziness . iter () . map (| opt | opt . as_ref () . map (| datum | datum . len ()) . unwrap_or_default ())) . unwrap () . into () ; ListArray :: new ({ _ = extension_wrapper ; DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : < crate :: testing :: datatypes :: AffixFuzzer1 > :: to_arrow_datatype () , is_nullable : false , metadata : [] . into () , } + +)) . to_logical_type () . clone () } + + , offsets , { _ = craziness_inner_bitmap ; _ = extension_wrapper ; crate :: testing :: datatypes :: AffixFuzzer1 :: try_to_arrow_opt (craziness_inner_data , None :: < & str >) ? } + + , craziness_bitmap ,) . boxed () } + + } + + , { let (somes , fixed_size_shenanigans) : (Vec < _ > , Vec < _ >) = data . iter () . filter (| datum | matches ! (datum . as_deref () , Some (AffixFuzzer3 :: FixedSizeShenanigans (_)))) . map (| datum | { let datum = match datum . as_deref () { Some (AffixFuzzer3 :: FixedSizeShenanigans (v)) => Some (v . clone ()) , _ => None , } + + ; (datum . is_some () , datum) } + +) . unzip () ; let fixed_size_shenanigans_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = { let any_nones = somes . iter () . any (| some | ! * some) ; any_nones . then (|| somes . into ()) } + + ; { use arrow2 :: { buffer :: Buffer , offset :: OffsetsBuffer } + + ; let fixed_size_shenanigans_inner_data : Vec < _ > = fixed_size_shenanigans . iter () . flatten () . flatten () . cloned () . map (Some) . collect () ; let fixed_size_shenanigans_inner_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = None ; FixedSizeListArray :: new ({ _ = extension_wrapper ; DataType :: FixedSizeList (Box :: new (Field { name : "item" . to_owned () , data_type : DataType :: Float32 , is_nullable : false , metadata : [] . into () , } + +) , 3usize) . to_logical_type () . clone () } + + , PrimitiveArray :: new ({ _ = extension_wrapper ; DataType :: Float32 . to_logical_type () . clone () } + + , fixed_size_shenanigans_inner_data . into_iter () . map (| v | v . unwrap_or_default ()) . collect () , fixed_size_shenanigans_inner_bitmap ,) . boxed () , fixed_size_shenanigans_bitmap ,) . boxed () } + + } + + ,] , Some ({ let mut degrees_offset = 0 ; let mut radians_offset = 0 ; let mut craziness_offset = 0 ; let mut fixed_size_shenanigans_offset = 0 ; let mut nulls_offset = 0 ; data . iter () . map (| v | match v . as_deref () { None => { let offset = nulls_offset ; nulls_offset += 1 ; offset } + + Some (AffixFuzzer3 :: Degrees (_)) => { let offset = degrees_offset ; degrees_offset += 1 ; offset } + + , Some (AffixFuzzer3 :: Radians (_)) => { let offset = radians_offset ; radians_offset += 1 ; offset } + + , Some (AffixFuzzer3 :: Craziness (_)) => { let offset = craziness_offset ; craziness_offset += 1 ; offset } + + , Some (AffixFuzzer3 :: FixedSizeShenanigans (_)) => { let offset = fixed_size_shenanigans_offset ; fixed_size_shenanigans_offset += 1 ; offset } + + , } + +) . collect () } + +) ,) . boxed () }) } @@ -1557,7 +1383,7 @@ impl crate::Loggable for AffixFuzzer3 { else { let bitmap = data . validity () . cloned () ; let offsets = { let offsets = data . offsets () ; offsets . iter () . copied () . zip (offsets . iter () . copied () . skip (1)) } - ; let data = & * * data . values () ; let data = crate :: datatypes :: AffixFuzzer1 :: try_from_arrow_opt (data) . map_err (| err | crate :: DeserializationError :: Context { location : "rerun.testing.datatypes.AffixFuzzer3#craziness" . into () , source : Box :: new (err) , } + ; let data = & * * data . values () ; let data = crate :: testing :: datatypes :: AffixFuzzer1 :: try_from_arrow_opt (data) . map_err (| err | crate :: DeserializationError :: Context { location : "rerun.testing.datatypes.AffixFuzzer3#craziness" . into () , source : Box :: new (err) , } ) ? . into_iter () . map (| v | v . ok_or_else (|| crate :: DeserializationError :: MissingData { backtrace : :: backtrace :: Backtrace :: new_unresolved () , } @@ -1643,9 +1469,9 @@ impl crate::Datatype for AffixFuzzer3 {} #[derive(Clone, Debug, PartialEq)] pub enum AffixFuzzer4 { - SingleRequired(crate::datatypes::AffixFuzzer3), - ManyRequired(Vec), - ManyOptional(Option>), + SingleRequired(crate::testing::datatypes::AffixFuzzer3), + ManyRequired(Vec), + ManyOptional(Option>), } impl<'a> From for ::std::borrow::Cow<'a, AffixFuzzer4> { @@ -1685,7 +1511,7 @@ impl crate::Loggable for AffixFuzzer4 { }, Field { name: "single_required".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), }, @@ -1693,7 +1519,7 @@ impl crate::Loggable for AffixFuzzer4 { name: "many_required".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: false, metadata: [].into(), })), @@ -1704,7 +1530,7 @@ impl crate::Loggable for AffixFuzzer4 { name: "many_optional".to_owned(), data_type: DataType::List(Box::new(Field { name: "item".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), })), @@ -1735,217 +1561,71 @@ impl crate::Loggable for AffixFuzzer4 { datum }) .collect(); - UnionArray::new( - (if let Some(ext) = extension_wrapper { - DataType::Extension( - ext.to_owned(), - Box::new(::to_arrow_datatype()), - None, - ) - } else { - ::to_arrow_datatype() - }) - .to_logical_type() - .clone(), - data.iter() - .map(|a| match a.as_deref() { - None => 0, - Some(AffixFuzzer4::SingleRequired(_)) => 1i8, - Some(AffixFuzzer4::ManyRequired(_)) => 2i8, - Some(AffixFuzzer4::ManyOptional(_)) => 3i8, - }) - .collect(), - vec![ - NullArray::new(DataType::Null, data.iter().filter(|v| v.is_none()).count()) - .boxed(), - { - let (somes, single_required): (Vec<_>, Vec<_>) = data - .iter() - .filter(|datum| { - matches!(datum.as_deref(), Some(AffixFuzzer4::SingleRequired(_))) - }) - .map(|datum| { - let datum = match datum.as_deref() { - Some(AffixFuzzer4::SingleRequired(v)) => Some(v.clone()), - _ => None, - }; - (datum.is_some(), datum) - }) - .unzip(); - let single_required_bitmap: Option<::arrow2::bitmap::Bitmap> = { - let any_nones = somes.iter().any(|some| !*some); - any_nones.then(|| somes.into()) - }; - { - _ = single_required_bitmap; - _ = extension_wrapper; - crate::datatypes::AffixFuzzer3::try_to_arrow_opt( - single_required, - None::<&str>, - )? - } - }, - { - let (somes, many_required): (Vec<_>, Vec<_>) = data - .iter() - .filter(|datum| { - matches!(datum.as_deref(), Some(AffixFuzzer4::ManyRequired(_))) - }) - .map(|datum| { - let datum = match datum.as_deref() { - Some(AffixFuzzer4::ManyRequired(v)) => Some(v.clone()), - _ => None, - }; - (datum.is_some(), datum) - }) - .unzip(); - let many_required_bitmap: Option<::arrow2::bitmap::Bitmap> = { - let any_nones = somes.iter().any(|some| !*some); - any_nones.then(|| somes.into()) - }; - { - use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; - let many_required_inner_data: Vec<_> = many_required - .iter() - .flatten() - .flatten() - .cloned() - .map(Some) - .collect(); - let many_required_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( - many_required.iter().map(|opt| { - opt.as_ref().map(|datum| datum.len()).unwrap_or_default() - }), - ) - .unwrap() - .into(); - ListArray::new( - { - _ = extension_wrapper; - DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: - ::to_arrow_datatype(), - is_nullable: false, - metadata: [].into(), - })) - .to_logical_type() - .clone() - }, - offsets, - { - _ = many_required_inner_bitmap; - _ = extension_wrapper; - crate::datatypes::AffixFuzzer3::try_to_arrow_opt( - many_required_inner_data, - None::<&str>, - )? - }, - many_required_bitmap, - ) - .boxed() - } - }, - { - let (somes, many_optional): (Vec<_>, Vec<_>) = data - .iter() - .filter(|datum| { - matches!(datum.as_deref(), Some(AffixFuzzer4::ManyOptional(_))) - }) - .map(|datum| { - let datum = match datum.as_deref() { - Some(AffixFuzzer4::ManyOptional(v)) => Some(v.clone()), - _ => None, - } - .flatten(); - (datum.is_some(), datum) - }) - .unzip(); - let many_optional_bitmap: Option<::arrow2::bitmap::Bitmap> = { - let any_nones = somes.iter().any(|some| !*some); - any_nones.then(|| somes.into()) - }; - { - use arrow2::{buffer::Buffer, offset::OffsetsBuffer}; - let many_optional_inner_data: Vec<_> = many_optional - .iter() - .flatten() - .flatten() - .cloned() - .map(Some) - .collect(); - let many_optional_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( - many_optional.iter().map(|opt| { - opt.as_ref().map(|datum| datum.len()).unwrap_or_default() - }), - ) - .unwrap() - .into(); - ListArray::new( - { - _ = extension_wrapper; - DataType::List(Box::new(Field { - name: "item".to_owned(), - data_type: - ::to_arrow_datatype(), - is_nullable: true, - metadata: [].into(), - })) - .to_logical_type() - .clone() - }, - offsets, - { - _ = many_optional_inner_bitmap; - _ = extension_wrapper; - crate::datatypes::AffixFuzzer3::try_to_arrow_opt( - many_optional_inner_data, - None::<&str>, - )? - }, - many_optional_bitmap, - ) - .boxed() - } - }, - ], - Some({ - let mut single_required_offset = 0; - let mut many_required_offset = 0; - let mut many_optional_offset = 0; - let mut nulls_offset = 0; - data.iter() - .map(|v| match v.as_deref() { - None => { - let offset = nulls_offset; - nulls_offset += 1; - offset - } + UnionArray :: new ((if let Some (ext) = extension_wrapper { DataType :: Extension (ext . to_owned () , Box :: new (< crate :: testing :: datatypes :: AffixFuzzer4 > :: to_arrow_datatype ()) , None) } - Some(AffixFuzzer4::SingleRequired(_)) => { - let offset = single_required_offset; - single_required_offset += 1; - offset - } + else { < crate :: testing :: datatypes :: AffixFuzzer4 > :: to_arrow_datatype () } - Some(AffixFuzzer4::ManyRequired(_)) => { - let offset = many_required_offset; - many_required_offset += 1; - offset - } +) . to_logical_type () . clone () , data . iter () . map (| a | match a . as_deref () { None => 0 , Some (AffixFuzzer4 :: SingleRequired (_)) => 1i8 , Some (AffixFuzzer4 :: ManyRequired (_)) => 2i8 , Some (AffixFuzzer4 :: ManyOptional (_)) => 3i8 , } - Some(AffixFuzzer4::ManyOptional(_)) => { - let offset = many_optional_offset; - many_optional_offset += 1; - offset - } - }) - .collect() - }), - ) - .boxed() +) . collect () , vec ! [NullArray :: new (DataType :: Null , data . iter () . filter (| v | v . is_none ()) . count () ,) . boxed () , { let (somes , single_required) : (Vec < _ > , Vec < _ >) = data . iter () . filter (| datum | matches ! (datum . as_deref () , Some (AffixFuzzer4 :: SingleRequired (_)))) . map (| datum | { let datum = match datum . as_deref () { Some (AffixFuzzer4 :: SingleRequired (v)) => Some (v . clone ()) , _ => None , } + + ; (datum . is_some () , datum) } + +) . unzip () ; let single_required_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = { let any_nones = somes . iter () . any (| some | ! * some) ; any_nones . then (|| somes . into ()) } + + ; { _ = single_required_bitmap ; _ = extension_wrapper ; crate :: testing :: datatypes :: AffixFuzzer3 :: try_to_arrow_opt (single_required , None :: < & str >) ? } + + } + + , { let (somes , many_required) : (Vec < _ > , Vec < _ >) = data . iter () . filter (| datum | matches ! (datum . as_deref () , Some (AffixFuzzer4 :: ManyRequired (_)))) . map (| datum | { let datum = match datum . as_deref () { Some (AffixFuzzer4 :: ManyRequired (v)) => Some (v . clone ()) , _ => None , } + + ; (datum . is_some () , datum) } + +) . unzip () ; let many_required_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = { let any_nones = somes . iter () . any (| some | ! * some) ; any_nones . then (|| somes . into ()) } + + ; { use arrow2 :: { buffer :: Buffer , offset :: OffsetsBuffer } + + ; let many_required_inner_data : Vec < _ > = many_required . iter () . flatten () . flatten () . cloned () . map (Some) . collect () ; let many_required_inner_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = None ; let offsets = :: arrow2 :: offset :: Offsets :: < i32 > :: try_from_lengths (many_required . iter () . map (| opt | opt . as_ref () . map (| datum | datum . len ()) . unwrap_or_default ())) . unwrap () . into () ; ListArray :: new ({ _ = extension_wrapper ; DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : < crate :: testing :: datatypes :: AffixFuzzer3 > :: to_arrow_datatype () , is_nullable : false , metadata : [] . into () , } + +)) . to_logical_type () . clone () } + + , offsets , { _ = many_required_inner_bitmap ; _ = extension_wrapper ; crate :: testing :: datatypes :: AffixFuzzer3 :: try_to_arrow_opt (many_required_inner_data , None :: < & str >) ? } + + , many_required_bitmap ,) . boxed () } + + } + + , { let (somes , many_optional) : (Vec < _ > , Vec < _ >) = data . iter () . filter (| datum | matches ! (datum . as_deref () , Some (AffixFuzzer4 :: ManyOptional (_)))) . map (| datum | { let datum = match datum . as_deref () { Some (AffixFuzzer4 :: ManyOptional (v)) => Some (v . clone ()) , _ => None , } + + . flatten () ; (datum . is_some () , datum) } + +) . unzip () ; let many_optional_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = { let any_nones = somes . iter () . any (| some | ! * some) ; any_nones . then (|| somes . into ()) } + + ; { use arrow2 :: { buffer :: Buffer , offset :: OffsetsBuffer } + + ; let many_optional_inner_data : Vec < _ > = many_optional . iter () . flatten () . flatten () . cloned () . map (Some) . collect () ; let many_optional_inner_bitmap : Option < :: arrow2 :: bitmap :: Bitmap > = None ; let offsets = :: arrow2 :: offset :: Offsets :: < i32 > :: try_from_lengths (many_optional . iter () . map (| opt | opt . as_ref () . map (| datum | datum . len ()) . unwrap_or_default ())) . unwrap () . into () ; ListArray :: new ({ _ = extension_wrapper ; DataType :: List (Box :: new (Field { name : "item" . to_owned () , data_type : < crate :: testing :: datatypes :: AffixFuzzer3 > :: to_arrow_datatype () , is_nullable : true , metadata : [] . into () , } + +)) . to_logical_type () . clone () } + + , offsets , { _ = many_optional_inner_bitmap ; _ = extension_wrapper ; crate :: testing :: datatypes :: AffixFuzzer3 :: try_to_arrow_opt (many_optional_inner_data , None :: < & str >) ? } + + , many_optional_bitmap ,) . boxed () } + + } + + ,] , Some ({ let mut single_required_offset = 0 ; let mut many_required_offset = 0 ; let mut many_optional_offset = 0 ; let mut nulls_offset = 0 ; data . iter () . map (| v | match v . as_deref () { None => { let offset = nulls_offset ; nulls_offset += 1 ; offset } + + Some (AffixFuzzer4 :: SingleRequired (_)) => { let offset = single_required_offset ; single_required_offset += 1 ; offset } + + , Some (AffixFuzzer4 :: ManyRequired (_)) => { let offset = many_required_offset ; many_required_offset += 1 ; offset } + + , Some (AffixFuzzer4 :: ManyOptional (_)) => { let offset = many_optional_offset ; many_optional_offset += 1 ; offset } + + , } + +) . collect () } + +) ,) . boxed () }) } @@ -1979,7 +1659,7 @@ impl crate::Loggable for AffixFuzzer4 { let single_required = { let data = &*data_arrays[1usize]; - crate::datatypes::AffixFuzzer3::try_from_arrow_opt(data) + crate::testing::datatypes::AffixFuzzer3::try_from_arrow_opt(data) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.datatypes.AffixFuzzer4#single_required".into(), source: Box::new(err), @@ -1994,7 +1674,7 @@ impl crate::Loggable for AffixFuzzer4 { else { let bitmap = data . validity () . cloned () ; let offsets = { let offsets = data . offsets () ; offsets . iter () . copied () . zip (offsets . iter () . copied () . skip (1)) } - ; let data = & * * data . values () ; let data = crate :: datatypes :: AffixFuzzer3 :: try_from_arrow_opt (data) . map_err (| err | crate :: DeserializationError :: Context { location : "rerun.testing.datatypes.AffixFuzzer4#many_required" . into () , source : Box :: new (err) , } + ; let data = & * * data . values () ; let data = crate :: testing :: datatypes :: AffixFuzzer3 :: try_from_arrow_opt (data) . map_err (| err | crate :: DeserializationError :: Context { location : "rerun.testing.datatypes.AffixFuzzer4#many_required" . into () , source : Box :: new (err) , } ) ? . into_iter () . map (| v | v . ok_or_else (|| crate :: DeserializationError :: MissingData { backtrace : :: backtrace :: Backtrace :: new_unresolved () , } @@ -2015,7 +1695,7 @@ impl crate::Loggable for AffixFuzzer4 { else { let bitmap = data . validity () . cloned () ; let offsets = { let offsets = data . offsets () ; offsets . iter () . copied () . zip (offsets . iter () . copied () . skip (1)) } - ; let data = & * * data . values () ; let data = crate :: datatypes :: AffixFuzzer3 :: try_from_arrow_opt (data) . map_err (| err | crate :: DeserializationError :: Context { location : "rerun.testing.datatypes.AffixFuzzer4#many_optional" . into () , source : Box :: new (err) , } + ; let data = & * * data . values () ; let data = crate :: testing :: datatypes :: AffixFuzzer3 :: try_from_arrow_opt (data) . map_err (| err | crate :: DeserializationError :: Context { location : "rerun.testing.datatypes.AffixFuzzer4#many_optional" . into () , source : Box :: new (err) , } ) ? . into_iter () . map (| v | v . ok_or_else (|| crate :: DeserializationError :: MissingData { backtrace : :: backtrace :: Backtrace :: new_unresolved () , } @@ -2078,11 +1758,11 @@ impl crate::Datatype for AffixFuzzer4 {} #[derive(Clone, Debug, PartialEq)] pub struct AffixFuzzer5 { - pub single_optional_union: Option, + pub single_optional_union: Option, } -impl From> for AffixFuzzer5 { - fn from(v: Option) -> Self { +impl From> for AffixFuzzer5 { + fn from(v: Option) -> Self { Self { single_optional_union: v, } @@ -2118,7 +1798,7 @@ impl crate::Loggable for AffixFuzzer5 { use ::arrow2::datatypes::*; DataType::Struct(vec![Field { name: "single_optional_union".to_owned(), - data_type: ::to_arrow_datatype(), + data_type: ::to_arrow_datatype(), is_nullable: true, metadata: [].into(), }]) @@ -2150,11 +1830,11 @@ impl crate::Loggable for AffixFuzzer5 { (if let Some(ext) = extension_wrapper { DataType::Extension( ext.to_owned(), - Box::new(::to_arrow_datatype()), + Box::new(::to_arrow_datatype()), None, ) } else { - ::to_arrow_datatype() + ::to_arrow_datatype() }) .to_logical_type() .clone(), @@ -2182,7 +1862,7 @@ impl crate::Loggable for AffixFuzzer5 { { _ = single_optional_union_bitmap; _ = extension_wrapper; - crate::datatypes::AffixFuzzer4::try_to_arrow_opt( + crate::testing::datatypes::AffixFuzzer4::try_to_arrow_opt( single_optional_union, None::<&str>, )? @@ -2230,7 +1910,7 @@ impl crate::Loggable for AffixFuzzer5 { let single_optional_union = { let data = &**arrays_by_name["single_optional_union"]; - crate::datatypes::AffixFuzzer4::try_from_arrow_opt(data) + crate::testing::datatypes::AffixFuzzer4::try_from_arrow_opt(data) .map_err(|err| crate::DeserializationError::Context { location: "rerun.testing.datatypes.AffixFuzzer5#single_optional_union" .into(), diff --git a/crates/re_types/src/testing/datatypes/mod.rs b/crates/re_types/src/testing/datatypes/mod.rs new file mode 100644 index 000000000000..2570af8093ac --- /dev/null +++ b/crates/re_types/src/testing/datatypes/mod.rs @@ -0,0 +1,7 @@ +// NOTE: This file was autogenerated by re_types_builder; DO NOT EDIT. + +mod fuzzy; + +pub use self::fuzzy::{ + AffixFuzzer1, AffixFuzzer2, AffixFuzzer3, AffixFuzzer4, AffixFuzzer5, FlattenedScalar, +}; diff --git a/crates/re_types/src/testing/mod.rs b/crates/re_types/src/testing/mod.rs new file mode 100644 index 000000000000..928ed41f1340 --- /dev/null +++ b/crates/re_types/src/testing/mod.rs @@ -0,0 +1,3 @@ +pub mod archetypes; +pub mod components; +pub mod datatypes; diff --git a/crates/re_types/tests/fuzzy.rs b/crates/re_types/tests/fuzzy.rs index 7dd703c023f2..5ff7411d199a 100644 --- a/crates/re_types/tests/fuzzy.rs +++ b/crates/re_types/tests/fuzzy.rs @@ -2,11 +2,14 @@ use std::{collections::HashMap, f32::consts::PI}; -use re_types::{archetypes::AffixFuzzer1, Archetype as _}; +use re_types::{ + testing::{archetypes::AffixFuzzer1, components, datatypes}, + Archetype as _, +}; #[test] fn roundtrip() { - let fuzzy1 = re_types::components::AffixFuzzer1(re_types::datatypes::AffixFuzzer1 { + let fuzzy1 = components::AffixFuzzer1(datatypes::AffixFuzzer1 { single_float_optional: Some(1.0), single_string_required: "a".into(), single_string_optional: Some("a".into()), @@ -14,11 +17,11 @@ fn roundtrip() { many_strings_required: vec!["1".into(), "2".into()], many_strings_optional: Some(vec!["10".into(), "20".into()]), flattened_scalar: 42.0, - almost_flattened_scalar: re_types::datatypes::FlattenedScalar { value: 42.0 }, + almost_flattened_scalar: datatypes::FlattenedScalar { value: 42.0 }, from_parent: Some(true), }); - let fuzzy2 = re_types::components::AffixFuzzer2(re_types::datatypes::AffixFuzzer1 { + let fuzzy2 = components::AffixFuzzer2(datatypes::AffixFuzzer1 { single_float_optional: None, single_string_required: "b".into(), single_string_optional: None, @@ -26,11 +29,11 @@ fn roundtrip() { many_strings_required: vec!["3".into(), "4".into()], many_strings_optional: None, flattened_scalar: 43.0, - almost_flattened_scalar: re_types::datatypes::FlattenedScalar { value: 43.0 }, + almost_flattened_scalar: datatypes::FlattenedScalar { value: 43.0 }, from_parent: Some(false), }); - let fuzzy3 = re_types::components::AffixFuzzer3(re_types::datatypes::AffixFuzzer1 { + let fuzzy3 = components::AffixFuzzer3(datatypes::AffixFuzzer1 { single_float_optional: Some(3.0), single_string_required: "c".into(), single_string_optional: Some("c".into()), @@ -38,11 +41,11 @@ fn roundtrip() { many_strings_required: vec!["5".into(), "6".into()], many_strings_optional: Some(vec!["50".into(), "60".into()]), flattened_scalar: 44.0, - almost_flattened_scalar: re_types::datatypes::FlattenedScalar { value: 44.0 }, + almost_flattened_scalar: datatypes::FlattenedScalar { value: 44.0 }, from_parent: None, }); - let fuzzy4 = re_types::components::AffixFuzzer4(Some(re_types::datatypes::AffixFuzzer1 { + let fuzzy4 = components::AffixFuzzer4(Some(datatypes::AffixFuzzer1 { single_float_optional: None, single_string_required: "d".into(), single_string_optional: None, @@ -50,12 +53,12 @@ fn roundtrip() { many_strings_required: vec!["7".into(), "8".into()], many_strings_optional: None, flattened_scalar: 45.0, - almost_flattened_scalar: re_types::datatypes::FlattenedScalar { value: 45.0 }, + almost_flattened_scalar: datatypes::FlattenedScalar { value: 45.0 }, from_parent: None, })); - let fuzzy5 = re_types::components::AffixFuzzer5(None); - // let fuzzy5 = re_types::components::AffixFuzzer5(Some(re_types::datatypes::AffixFuzzer1 { + let fuzzy5 = components::AffixFuzzer5(None); + // let fuzzy5 = components::AffixFuzzer5(Some(datatypes::AffixFuzzer1 { // single_float_optional: None, // single_string_required: "d".into(), // single_string_optional: None, @@ -64,9 +67,9 @@ fn roundtrip() { // many_strings_optional: None, // })); - let fuzzy6 = re_types::components::AffixFuzzer6(None); - // let fuzzy6 = re_types::components::AffixFuzzer6 { - // single_optional: Some(re_types::datatypes::AffixFuzzer1 { + let fuzzy6 = components::AffixFuzzer6(None); + // let fuzzy6 = components::AffixFuzzer6 { + // single_optional: Some(datatypes::AffixFuzzer1 { // // single_float_optional: None, // single_string_required: "d".into(), // // single_string_optional: None, @@ -76,78 +79,72 @@ fn roundtrip() { // }), // }; - let fuzzy7_1 = re_types::components::AffixFuzzer7(None); - let fuzzy7_2 = - re_types::components::AffixFuzzer7(Some(vec![re_types::datatypes::AffixFuzzer1 { - single_float_optional: None, - single_string_required: "d".into(), - single_string_optional: None, - many_floats_optional: Some(vec![4.0, 40.0, 400.0]), - many_strings_required: vec!["7".into(), "8".into()], - many_strings_optional: None, - flattened_scalar: 46.0, - almost_flattened_scalar: re_types::datatypes::FlattenedScalar { value: 46.0 }, - from_parent: Some(false), - }])); + let fuzzy7_1 = components::AffixFuzzer7(None); + let fuzzy7_2 = components::AffixFuzzer7(Some(vec![datatypes::AffixFuzzer1 { + single_float_optional: None, + single_string_required: "d".into(), + single_string_optional: None, + many_floats_optional: Some(vec![4.0, 40.0, 400.0]), + many_strings_required: vec!["7".into(), "8".into()], + many_strings_optional: None, + flattened_scalar: 46.0, + almost_flattened_scalar: datatypes::FlattenedScalar { value: 46.0 }, + from_parent: Some(false), + }])); - let fuzzy8_1 = re_types::components::AffixFuzzer8(None); - let fuzzy8_2 = re_types::components::AffixFuzzer8(Some(1.0)); + let fuzzy8_1 = components::AffixFuzzer8(None); + let fuzzy8_2 = components::AffixFuzzer8(Some(1.0)); - let fuzzy9_1 = re_types::components::AffixFuzzer9("b".into()); - let fuzzy9_2 = re_types::components::AffixFuzzer9("a".into()); + let fuzzy9_1 = components::AffixFuzzer9("b".into()); + let fuzzy9_2 = components::AffixFuzzer9("a".into()); - let fuzzy10_1 = re_types::components::AffixFuzzer10(None); - let fuzzy10_2 = re_types::components::AffixFuzzer10(Some("a".into())); + let fuzzy10_1 = components::AffixFuzzer10(None); + let fuzzy10_2 = components::AffixFuzzer10(Some("a".into())); - let fuzzy11_1 = re_types::components::AffixFuzzer11(Some(vec![1.0, 10.0])); - let fuzzy11_2 = re_types::components::AffixFuzzer11(Some(vec![2.0, 20.0, 200.0])); + let fuzzy11_1 = components::AffixFuzzer11(Some(vec![1.0, 10.0])); + let fuzzy11_2 = components::AffixFuzzer11(Some(vec![2.0, 20.0, 200.0])); - let fuzzy12_1 = re_types::components::AffixFuzzer12(vec!["1".into(), "10".into()]); - let fuzzy12_2 = - re_types::components::AffixFuzzer12(vec!["20".into(), "200".into(), "2000".into()]); + let fuzzy12_1 = components::AffixFuzzer12(vec!["1".into(), "10".into()]); + let fuzzy12_2 = components::AffixFuzzer12(vec!["20".into(), "200".into(), "2000".into()]); - let fuzzy13_1 = re_types::components::AffixFuzzer13(None); - let fuzzy13_2 = re_types::components::AffixFuzzer13(Some(vec![ + let fuzzy13_1 = components::AffixFuzzer13(None); + let fuzzy13_2 = components::AffixFuzzer13(Some(vec![ "30".into(), "300".into(), "3000".into(), "30000".into(), ])); - let fuzzy14_1 = - re_types::components::AffixFuzzer14(re_types::datatypes::AffixFuzzer3::Degrees(90.0)); - let fuzzy14_2 = - re_types::components::AffixFuzzer14(re_types::datatypes::AffixFuzzer3::Radians(Some(PI))); - let fuzzy14_3 = - re_types::components::AffixFuzzer14(re_types::datatypes::AffixFuzzer3::Radians(None)); + let fuzzy14_1 = components::AffixFuzzer14(datatypes::AffixFuzzer3::Degrees(90.0)); + let fuzzy14_2 = components::AffixFuzzer14(datatypes::AffixFuzzer3::Radians(Some(PI))); + let fuzzy14_3 = components::AffixFuzzer14(datatypes::AffixFuzzer3::Radians(None)); - let fuzzy15_1 = re_types::components::AffixFuzzer15(None); - let fuzzy15_2 = re_types::components::AffixFuzzer15(Some( - re_types::datatypes::AffixFuzzer3::Radians(Some(PI / 4.0)), - )); + let fuzzy15_1 = components::AffixFuzzer15(None); + let fuzzy15_2 = + components::AffixFuzzer15(Some(datatypes::AffixFuzzer3::Radians(Some(PI / 4.0)))); - let fuzzy16_1 = re_types::components::AffixFuzzer16(vec![ - re_types::datatypes::AffixFuzzer3::Radians(None), // - re_types::datatypes::AffixFuzzer3::Degrees(45.0), // - re_types::datatypes::AffixFuzzer3::Radians(Some(PI * 2.0)), // + let fuzzy16_1 = components::AffixFuzzer16(vec![ + datatypes::AffixFuzzer3::Radians(None), // + datatypes::AffixFuzzer3::Degrees(45.0), // + datatypes::AffixFuzzer3::Radians(Some(PI * 2.0)), // ]); - let fuzzy16_2 = re_types::components::AffixFuzzer16(vec![ - re_types::datatypes::AffixFuzzer3::Degrees(20.0), // - re_types::datatypes::AffixFuzzer3::Degrees(30.0), // - re_types::datatypes::AffixFuzzer3::Radians(Some(0.424242)), // + let fuzzy16_2 = components::AffixFuzzer16(vec![ + datatypes::AffixFuzzer3::Degrees(20.0), // + datatypes::AffixFuzzer3::Degrees(30.0), // + datatypes::AffixFuzzer3::Radians(Some(0.424242)), // ]); - let fuzzy17_1 = re_types::components::AffixFuzzer17(None); - let fuzzy17_2 = re_types::components::AffixFuzzer17(Some(vec![ - re_types::datatypes::AffixFuzzer3::Degrees(20.0), // - re_types::datatypes::AffixFuzzer3::Degrees(30.0), // - re_types::datatypes::AffixFuzzer3::Radians(None), // + let fuzzy17_1 = components::AffixFuzzer17(None); + let fuzzy17_2 = components::AffixFuzzer17(Some(vec![ + datatypes::AffixFuzzer3::Degrees(20.0), // + datatypes::AffixFuzzer3::Degrees(30.0), // + datatypes::AffixFuzzer3::Radians(None), // ])); - let fuzzy18_1 = re_types::components::AffixFuzzer18(None); - let fuzzy18_2 = re_types::components::AffixFuzzer18(Some(vec![ - re_types::datatypes::AffixFuzzer4::SingleRequired( - re_types::datatypes::AffixFuzzer3::Craziness(vec![re_types::datatypes::AffixFuzzer1 { + let fuzzy18_1 = components::AffixFuzzer18(None); + let fuzzy18_2 = components::AffixFuzzer18(Some(vec![ + datatypes::AffixFuzzer4::SingleRequired(datatypes::AffixFuzzer3::Craziness(vec![ + datatypes::AffixFuzzer1 { single_float_optional: None, single_string_required: "d".into(), single_string_optional: None, @@ -155,23 +152,19 @@ fn roundtrip() { many_strings_required: vec!["7".into(), "8".into()], many_strings_optional: None, flattened_scalar: 46.0, - almost_flattened_scalar: re_types::datatypes::FlattenedScalar { value: 46.0 }, + almost_flattened_scalar: datatypes::FlattenedScalar { value: 46.0 }, from_parent: Some(true), - }]), - ), // - re_types::datatypes::AffixFuzzer4::SingleRequired( - re_types::datatypes::AffixFuzzer3::Degrees(30.0), - ), // - re_types::datatypes::AffixFuzzer4::SingleRequired( - re_types::datatypes::AffixFuzzer3::Radians(None), - ), // + }, + ])), // + datatypes::AffixFuzzer4::SingleRequired(datatypes::AffixFuzzer3::Degrees(30.0)), // + datatypes::AffixFuzzer4::SingleRequired(datatypes::AffixFuzzer3::Radians(None)), // ])); - let fuzzy18_3 = re_types::components::AffixFuzzer18(Some(vec![ - re_types::datatypes::AffixFuzzer4::ManyRequired(vec![ - re_types::datatypes::AffixFuzzer3::Radians(None), // - re_types::datatypes::AffixFuzzer3::Degrees(45.0), // - re_types::datatypes::AffixFuzzer3::Radians(Some(PI * 2.0)), // - re_types::datatypes::AffixFuzzer3::Craziness(vec![re_types::datatypes::AffixFuzzer1 { + let fuzzy18_3 = components::AffixFuzzer18(Some(vec![ + datatypes::AffixFuzzer4::ManyRequired(vec![ + datatypes::AffixFuzzer3::Radians(None), // + datatypes::AffixFuzzer3::Degrees(45.0), // + datatypes::AffixFuzzer3::Radians(Some(PI * 2.0)), // + datatypes::AffixFuzzer3::Craziness(vec![datatypes::AffixFuzzer1 { single_float_optional: Some(3.0), single_string_required: "c".into(), single_string_optional: Some("c".into()), @@ -179,22 +172,20 @@ fn roundtrip() { many_strings_required: vec!["5".into(), "6".into()], many_strings_optional: Some(vec!["50".into(), "60".into()]), flattened_scalar: 44.0, - almost_flattened_scalar: re_types::datatypes::FlattenedScalar { value: 44.0 }, + almost_flattened_scalar: datatypes::FlattenedScalar { value: 44.0 }, from_parent: None, }]), ]), // - re_types::datatypes::AffixFuzzer4::ManyOptional(Some(vec![ - re_types::datatypes::AffixFuzzer3::Radians(None), - ])), // - re_types::datatypes::AffixFuzzer4::ManyOptional(None), // + datatypes::AffixFuzzer4::ManyOptional(Some(vec![datatypes::AffixFuzzer3::Radians(None)])), // + datatypes::AffixFuzzer4::ManyOptional(None), // ])); - let fuzzy19_1 = re_types::components::AffixFuzzer19(re_types::datatypes::AffixFuzzer5 { - single_optional_union: Some(re_types::datatypes::AffixFuzzer4::ManyRequired(vec![ - re_types::datatypes::AffixFuzzer3::Radians(None), // - re_types::datatypes::AffixFuzzer3::Degrees(45.0), // - re_types::datatypes::AffixFuzzer3::Radians(Some(PI * 2.0)), // - re_types::datatypes::AffixFuzzer3::Craziness(vec![re_types::datatypes::AffixFuzzer1 { + let fuzzy19_1 = components::AffixFuzzer19(datatypes::AffixFuzzer5 { + single_optional_union: Some(datatypes::AffixFuzzer4::ManyRequired(vec![ + datatypes::AffixFuzzer3::Radians(None), // + datatypes::AffixFuzzer3::Degrees(45.0), // + datatypes::AffixFuzzer3::Radians(Some(PI * 2.0)), // + datatypes::AffixFuzzer3::Craziness(vec![datatypes::AffixFuzzer1 { single_float_optional: Some(3.0), single_string_required: "c".into(), single_string_optional: Some("c".into()), @@ -202,7 +193,7 @@ fn roundtrip() { many_strings_required: vec!["5".into(), "6".into()], many_strings_optional: Some(vec!["50".into(), "60".into()]), flattened_scalar: 44.0, - almost_flattened_scalar: re_types::datatypes::FlattenedScalar { value: 44.0 }, + almost_flattened_scalar: datatypes::FlattenedScalar { value: 44.0 }, from_parent: None, }]), ])), // diff --git a/crates/re_types_builder/src/codegen/rust.rs b/crates/re_types_builder/src/codegen/rust.rs index 5136898445f4..91251961ab94 100644 --- a/crates/re_types_builder/src/codegen/rust.rs +++ b/crates/re_types_builder/src/codegen/rust.rs @@ -44,24 +44,30 @@ impl CodeGenerator for RustCodeGenerator { let mut files_to_write: BTreeMap = Default::default(); let datatypes_path = self.crate_path.join("src/datatypes"); + let datatypes_testing_path = self.crate_path.join("src/testing/datatypes"); files_to_write.extend(create_files( datatypes_path, + datatypes_testing_path, arrow_registry, objects, &objects.ordered_objects(ObjectKind::Datatype.into()), )); let components_path = self.crate_path.join("src/components"); + let components_testing_path = self.crate_path.join("src/testing/components"); files_to_write.extend(create_files( components_path, + components_testing_path, arrow_registry, objects, &objects.ordered_objects(ObjectKind::Component.into()), )); let archetypes_path = self.crate_path.join("src/archetypes"); + let archetypes_testing_path = self.crate_path.join("src/testing/archetypes"); files_to_write.extend(create_files( archetypes_path, + archetypes_testing_path, arrow_registry, objects, &objects.ordered_objects(ObjectKind::Archetype.into()), @@ -84,37 +90,63 @@ impl CodeGenerator for RustCodeGenerator { fn create_files( out_path: impl AsRef, + out_testing_path: impl AsRef, arrow_registry: &ArrowRegistry, objects: &Objects, objs: &[&Object], ) -> BTreeMap { let out_path = out_path.as_ref(); + let out_testing_path = out_testing_path.as_ref(); let mut files_to_write = BTreeMap::new(); let mut files = HashMap::>::new(); for obj in objs { - let obj = if obj.is_struct() { + let quoted_obj = if obj.is_struct() { QuotedObject::from_struct(arrow_registry, objects, obj) } else { QuotedObject::from_union(arrow_registry, objects, obj) }; - let filepath = out_path.join(obj.filepath.file_name().unwrap()); - files.entry(filepath.clone()).or_default().push(obj); + let filepath = if quoted_obj.is_testing { + out_testing_path.join(quoted_obj.filepath.file_name().unwrap()) + } else { + out_path.join(quoted_obj.filepath.file_name().unwrap()) + }; + files.entry(filepath.clone()).or_default().push(quoted_obj); } // (module_name, [object_name]) let mut mods = HashMap::>::new(); + let mut mods_testing = HashMap::>::new(); - // src/{datatypes|components|archetypes}/{xxx}.rs + // src/testing?/{datatypes|components|archetypes}/{xxx}.rs for (filepath, objs) in files { // NOTE: Isolating the file stem only works because we're handling datatypes, components // and archetypes separately (and even then it's a bit shady, eh). - let names = objs.iter().map(|obj| obj.name.clone()).collect::>(); - mods.entry(filepath.file_stem().unwrap().to_owned()) - .or_default() - .extend(names); + + let names = objs + .iter() + .filter(|obj| !obj.is_testing) + .map(|obj| obj.name.clone()) + .collect::>(); + if !names.is_empty() { + mods.entry(filepath.file_stem().unwrap().to_owned()) + .or_default() + .extend(names); + } + + let names_testing = objs + .iter() + .filter(|obj| obj.is_testing) + .map(|obj| obj.name.clone()) + .collect::>(); + if !names_testing.is_empty() { + mods_testing + .entry(filepath.file_stem().unwrap().to_owned()) + .or_default() + .extend(names_testing); + } let mut code = String::new(); #[rustfmt::skip] @@ -179,8 +211,7 @@ fn create_files( files_to_write.insert(filepath, code); } - // src/{datatypes|components|archetypes}/mod.rs - { + let mut generate_mod_files = |out_path: &Utf8Path, mods: &HashMap>| { let path = out_path.join("mod.rs"); let mut code = String::new(); @@ -201,13 +232,19 @@ fn create_files( code += "\n\n"; - for (module, names) in &mods { + for (module, names) in mods { let names = names.join(", "); code.push_text(format!("pub use self::{module}::{{{names}}};"), 1, 0); } files_to_write.insert(path, code); - } + }; + + // src/{datatypes|components|archetypes}/mod.rs + generate_mod_files(out_path, &mods); + + // src/testing/{datatypes|components|archetypes}/mod.rs + generate_mod_files(out_testing_path, &mods_testing); files_to_write } @@ -316,6 +353,7 @@ fn unescape_string_into(input: &str, output: &mut String) { struct QuotedObject { filepath: Utf8PathBuf, name: String, + is_testing: bool, tokens: TokenStream, } @@ -383,6 +421,7 @@ impl QuotedObject { filepath }, name: obj.name.clone(), + is_testing: obj.fqname.contains("rerun.testing"), tokens, } } @@ -465,6 +504,7 @@ impl QuotedObject { filepath }, name: obj.name.clone(), + is_testing: obj.fqname.contains("rerun.testing"), tokens, } } @@ -798,9 +838,7 @@ fn quote_trait_impls_from_obj( let is_nullable = obj_field.is_nullable; // NOTE: unwrapping is safe since the field must point to a component. - let component = obj_field.typ.fqname().unwrap(); - let component = format_ident!("{}", component.rsplit_once('.').unwrap().1); - let component = quote!(crate::components::#component); + let component = quote_fqname_as_type_path(obj_field.typ.fqname().unwrap()); let fqname = obj_field.typ.fqname().unwrap(); let legacy_fqname = objects[fqname] @@ -884,9 +922,7 @@ fn quote_trait_impls_from_obj( let is_nullable = obj_field.is_nullable; // NOTE: unwrapping is safe since the field must point to a component. - let component = obj_field.typ.fqname().unwrap(); - let component = format_ident!("{}", component.rsplit_once('.').unwrap().1); - let component = quote!(crate::components::#component); + let component = quote_fqname_as_type_path(obj_field.typ.fqname().unwrap()); let quoted_collection = if is_plural { quote! { @@ -1295,11 +1331,7 @@ impl quote::ToTokens for StrStrMapTokenizer<'_> { } fn quote_fqname_as_type_path(fqname: impl AsRef) -> TokenStream { - let fqname = fqname - .as_ref() - .replace(".testing", "") - .replace('.', "::") - .replace("rerun", "crate"); + let fqname = fqname.as_ref().replace('.', "::").replace("rerun", "crate"); let expr: syn::TypePath = syn::parse_str(&fqname).unwrap(); quote!(#expr) } diff --git a/scripts/ci/check_large_files_allow_list.txt b/scripts/ci/check_large_files_allow_list.txt index 7fb9c28549de..3dd201997dfc 100644 --- a/scripts/ci/check_large_files_allow_list.txt +++ b/scripts/ci/check_large_files_allow_list.txt @@ -1,6 +1,6 @@ Cargo.lock -crates/re_types/src/archetypes/fuzzy.rs -crates/re_types/src/components/fuzzy.rs -crates/re_types/src/datatypes/fuzzy.rs +crates/re_types/src/testing/archetypes/fuzzy.rs +crates/re_types/src/testing/components/fuzzy.rs +crates/re_types/src/testing/datatypes/fuzzy.rs crates/re_types_builder/src/reflection.rs crates/re_ui/data/Inter-Medium.otf