diff --git a/Cargo.lock b/Cargo.lock index a711ad56fc90..ad40849a0e73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4764,6 +4764,7 @@ dependencies = [ "arrow2", "backtrace", "document-features", + "once_cell", "re_error", "re_string_interner", "re_tracing", @@ -4828,6 +4829,7 @@ dependencies = [ "re_time_panel", "re_tracing", "re_types", + "re_types_core", "re_ui", "re_viewer_context", "re_viewport", @@ -4902,6 +4904,7 @@ dependencies = [ "re_space_view", "re_tracing", "re_types", + "re_types_core", "re_ui", "re_viewer_context", "serde", diff --git a/crates/re_arrow_store/Cargo.toml b/crates/re_arrow_store/Cargo.toml index 9ba9deda9675..9f1c01b5927c 100644 --- a/crates/re_arrow_store/Cargo.toml +++ b/crates/re_arrow_store/Cargo.toml @@ -40,9 +40,7 @@ re_format.workspace = true re_log_types.workspace = true re_log.workspace = true re_tracing.workspace = true -# NOTE: We're on our way to make this crate re_types-free, which is why we import both. re_types_core.workspace = true -re_types.workspace = true # External dependencies: ahash.workspace = true diff --git a/crates/re_arrow_store/src/store_write.rs b/crates/re_arrow_store/src/store_write.rs index 09adb801dff0..ab5ac5f94055 100644 --- a/crates/re_arrow_store/src/store_write.rs +++ b/crates/re_arrow_store/src/store_write.rs @@ -9,8 +9,9 @@ use re_log_types::{ DataCell, DataCellColumn, DataCellError, DataRow, DataTable, RowId, TimeInt, TimePoint, TimeRange, }; -use re_types::components::InstanceKey; -use re_types_core::{ComponentName, ComponentNameSet, Loggable, SizeBytes as _}; +use re_types_core::{ + components::InstanceKey, ComponentName, ComponentNameSet, Loggable, SizeBytes as _, +}; use crate::{ store::MetadataRegistry, DataStore, DataStoreConfig, IndexedBucket, IndexedBucketInner, diff --git a/crates/re_data_store/Cargo.toml b/crates/re_data_store/Cargo.toml index fd830ae5d46e..162172a26899 100644 --- a/crates/re_data_store/Cargo.toml +++ b/crates/re_data_store/Cargo.toml @@ -32,9 +32,7 @@ re_log_types.workspace = true re_log.workspace = true re_smart_channel.workspace = true re_tracing.workspace = true -# NOTE: We're on our way to make this crate re_types-free, which is why we import both. re_types_core.workspace = true -re_types.workspace = true document-features.workspace = true itertools.workspace = true diff --git a/crates/re_data_store/src/entity_tree.rs b/crates/re_data_store/src/entity_tree.rs index 250349ee41c5..41eb1bf5670a 100644 --- a/crates/re_data_store/src/entity_tree.rs +++ b/crates/re_data_store/src/entity_tree.rs @@ -220,8 +220,7 @@ impl EntityTree { time_point: &TimePoint, path_op: &PathOp, ) -> Vec { - use re_types::{archetypes::Clear, components::ClearIsRecursive}; - use re_types_core::Archetype as _; + use re_types_core::{archetypes::Clear, components::ClearIsRecursive, Archetype as _}; re_tracing::profile_function!(); diff --git a/crates/re_data_store/src/instance_path.rs b/crates/re_data_store/src/instance_path.rs index 57f7bd58aa5d..e95c4ef6304b 100644 --- a/crates/re_data_store/src/instance_path.rs +++ b/crates/re_data_store/src/instance_path.rs @@ -1,7 +1,7 @@ use std::{hash::Hash, str::FromStr}; use re_log_types::{DataPath, EntityPath, EntityPathHash, PathParseError, RowId}; -use re_types::components::InstanceKey; +use re_types_core::components::InstanceKey; use crate::{store_db::EntityDb, VersionedInstancePath, VersionedInstancePathHash}; diff --git a/crates/re_data_store/src/store_db.rs b/crates/re_data_store/src/store_db.rs index 55c4d9ca0738..c61708b5bf30 100644 --- a/crates/re_data_store/src/store_db.rs +++ b/crates/re_data_store/src/store_db.rs @@ -7,8 +7,7 @@ use re_log_types::{ ApplicationId, ComponentPath, DataCell, DataRow, DataTable, EntityPath, EntityPathHash, LogMsg, PathOp, RowId, SetStoreInfo, StoreId, StoreInfo, StoreKind, TimePoint, Timeline, }; -use re_types::components::InstanceKey; -use re_types_core::Loggable; +use re_types_core::{components::InstanceKey, Loggable}; use crate::{Error, TimesPerTimeline}; @@ -117,7 +116,7 @@ impl EntityDb { // Look for a `ClearIsRecursive` component, and if it's there, go through the clear path // instead. - use re_types::components::ClearIsRecursive; + use re_types_core::components::ClearIsRecursive; if let Some(idx) = row.find_cell(&ClearIsRecursive::name()) { let cell = &row.cells()[idx]; let settings = cell.try_to_native_mono::().unwrap(); diff --git a/crates/re_log_types/Cargo.toml b/crates/re_log_types/Cargo.toml index a16c30182efe..5c177b7ac111 100644 --- a/crates/re_log_types/Cargo.toml +++ b/crates/re_log_types/Cargo.toml @@ -39,7 +39,6 @@ re_log.workspace = true re_string_interner.workspace = true re_tracing.workspace = true re_tuid = { workspace = true, features = ["arrow"] } -# NOTE: We're on our way to make this crate re_types-free, which is why we import both. re_types_core.workspace = true re_types = { workspace = true, features = ["image"] } diff --git a/crates/re_log_types/src/example_components.rs b/crates/re_log_types/src/example_components.rs index e90243861df1..de340cf17e91 100644 --- a/crates/re_log_types/src/example_components.rs +++ b/crates/re_log_types/src/example_components.rs @@ -1,6 +1,27 @@ //! Example components to be used for tests and docs use arrow2_convert::{ArrowDeserialize, ArrowField, ArrowSerialize}; +use re_types::Loggable as _; + +// ---------------------------------------------------------------------------- + +pub struct MyPoints; + +impl re_types::Archetype for MyPoints { + type Indicator = re_types::GenericIndicatorComponent; + + fn name() -> re_types::ArchetypeName { + "test.MyPoints".into() + } + + fn required_components() -> ::std::borrow::Cow<'static, [re_types::ComponentName]> { + vec![MyPoint::name()].into() + } + + fn recommended_components() -> std::borrow::Cow<'static, [re_types_core::ComponentName]> { + vec![MyColor::name(), MyLabel::name()].into() + } +} // ---------------------------------------------------------------------------- @@ -10,6 +31,12 @@ pub struct MyPoint { pub y: f32, } +impl MyPoint { + pub fn new(x: f32, y: f32) -> Self { + Self { x, y } + } +} + use crate as re_log_types; re_log_types::arrow2convert_component_shim!(MyPoint as "test.Point2D"); @@ -31,6 +58,12 @@ re_log_types::arrow2convert_component_shim!(MyPoint as "test.Point2D"); #[repr(transparent)] pub struct MyColor(pub u32); +impl From for MyColor { + fn from(value: u32) -> Self { + Self(value) + } +} + re_log_types::arrow2convert_component_shim!(MyColor as "test.Color"); // ---------------------------------------------------------------------------- diff --git a/crates/re_query/Cargo.toml b/crates/re_query/Cargo.toml index bb3bf34aaf82..10e3543a7c49 100644 --- a/crates/re_query/Cargo.toml +++ b/crates/re_query/Cargo.toml @@ -29,9 +29,7 @@ re_arrow_store.workspace = true re_data_store.workspace = true re_format.workspace = true re_log_types.workspace = true -# NOTE: We're on our way to make this crate re_types-free, which is why we import both. re_types_core.workspace = true -re_types = { workspace = true, features = ["datagen"] } re_log.workspace = true re_tracing.workspace = true @@ -51,6 +49,8 @@ polars-core = { workspace = true, optional = true, features = [ [dev-dependencies] +re_types = { workspace = true, features = ["datagen"] } + criterion = "0.5" itertools = { workspace = true } mimalloc.workspace = true diff --git a/crates/re_query/src/archetype_view.rs b/crates/re_query/src/archetype_view.rs index db0ef8e04f02..2a1ee2dc9dcc 100644 --- a/crates/re_query/src/archetype_view.rs +++ b/crates/re_query/src/archetype_view.rs @@ -3,10 +3,9 @@ use std::{collections::BTreeMap, marker::PhantomData}; use arrow2::array::{Array, PrimitiveArray}; use re_format::arrow; use re_log_types::{DataCell, RowId}; -use re_types::components::InstanceKey; use re_types_core::{ - Archetype, Component, ComponentName, DeserializationError, DeserializationResult, Loggable, - SerializationResult, + components::InstanceKey, Archetype, Component, ComponentName, DeserializationError, + DeserializationResult, Loggable, SerializationResult, }; use crate::QueryError; @@ -41,7 +40,7 @@ impl ComponentWithInstances { /// Returns the array of [`InstanceKey`]s. #[inline] - pub fn instance_keys(&self) -> Vec { + pub fn instance_keys(&self) -> Vec { re_tracing::profile_function!(); self.instance_keys.to_native::() } diff --git a/crates/re_query/src/dataframe_util.rs b/crates/re_query/src/dataframe_util.rs index 6d72f06cb206..8b6e1272f916 100644 --- a/crates/re_query/src/dataframe_util.rs +++ b/crates/re_query/src/dataframe_util.rs @@ -4,8 +4,7 @@ use arrow2::{ }; use polars_core::prelude::*; use re_arrow_store::ArrayExt; -use re_types::components::InstanceKey; -use re_types_core::{Archetype, Component, Loggable}; +use re_types_core::{components::InstanceKey, Archetype, Component, Loggable}; use crate::{ArchetypeView, ComponentWithInstances, QueryError}; @@ -125,7 +124,7 @@ impl ComponentWithInstances { let array1 = self.values.as_arrow_ref(); let series0 = Series::try_from(( - re_types::components::InstanceKey::name().as_ref(), + InstanceKey::name().as_ref(), array0.as_ref().clean_for_polars(), ))?; let series1 = Series::try_from((C0::name().as_ref(), array1.as_ref().clean_for_polars()))?; @@ -145,7 +144,7 @@ impl ArchetypeView { let array1 = C1::to_arrow_opt(self.iter_optional_component::()?)?; let series0 = Series::try_from(( - re_types::components::InstanceKey::name().as_ref(), + InstanceKey::name().as_ref(), array0.as_ref().clean_for_polars(), ))?; let series1 = Series::try_from((C1::name().as_ref(), array1.as_ref().clean_for_polars()))?; @@ -165,7 +164,7 @@ impl ArchetypeView { let array2 = C2::to_arrow_opt(self.iter_optional_component::()?)?; let series0 = Series::try_from(( - re_types::components::InstanceKey::name().as_ref(), + InstanceKey::name().as_ref(), array0.as_ref().clean_for_polars(), ))?; let series1 = Series::try_from((C1::name().as_ref(), array1.as_ref().clean_for_polars()))?; diff --git a/crates/re_query/src/query.rs b/crates/re_query/src/query.rs index 3b6bbc552e7b..2ac05e8e3a59 100644 --- a/crates/re_query/src/query.rs +++ b/crates/re_query/src/query.rs @@ -1,7 +1,6 @@ use re_arrow_store::{DataStore, LatestAtQuery}; use re_log_types::{DataRow, EntityPath, RowId}; -use re_types::components::InstanceKey; -use re_types_core::{Archetype, ComponentName, Loggable}; +use re_types_core::{components::InstanceKey, Archetype, ComponentName, Loggable}; use crate::{ArchetypeView, ComponentWithInstances, QueryError}; @@ -11,9 +10,8 @@ use crate::{ArchetypeView, ComponentWithInstances, QueryError}; /// /// ``` /// # use re_arrow_store::LatestAtQuery; -/// # use re_types::components::Position2D; -/// # use re_log_types::Timeline; -/// # use re_types::Loggable as _; +/// # use re_log_types::{Timeline, example_components::{MyColor, MyPoint}}; +/// # use re_types_core::Loggable as _; /// # let store = re_query::__populate_example_store(); /// /// let ent_path = "point"; @@ -23,27 +21,27 @@ use crate::{ArchetypeView, ComponentWithInstances, QueryError}; /// &store, /// &query, /// &ent_path.into(), -/// Position2D::name(), +/// MyPoint::name(), /// ) /// .unwrap(); /// /// # #[cfg(feature = "polars")] -/// let df = component.as_df::().unwrap(); +/// let df = component.as_df::().unwrap(); /// /// //println!("{df:?}"); /// ``` /// /// Outputs: /// ```text -/// ┌──────────┬───────────┐ -/// │ instance ┆ point2d │ -/// │ --- ┆ --- │ -/// │ u64 ┆ struct[2] │ -/// ╞══════════╪═══════════╡ -/// │ 42 ┆ {1.0,2.0} │ -/// ├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┤ -/// │ 96 ┆ {3.0,4.0} │ -/// └──────────┴───────────┘ +/// ┌─────────────┬───────────┐ +/// │ InstanceKey ┆ MyPoint │ +/// │ --- ┆ --- │ +/// │ u64 ┆ struct[2] │ +/// ╞═════════════╪═══════════╡ +/// │ 42 ┆ {1.0,2.0} │ +/// ├╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┤ +/// │ 96 ┆ {3.0,4.0} │ +/// └─────────────┴───────────┘ /// ``` /// pub fn get_component_with_instances( @@ -76,16 +74,14 @@ pub fn get_component_with_instances( /// /// ``` /// # use re_arrow_store::LatestAtQuery; -/// # use re_log_types::Timeline; +/// # use re_log_types::{Timeline, example_components::{MyColor, MyPoint, MyPoints}}; /// # use re_types_core::Component; -/// # use re_types::components::{Position2D, Color}; -/// # use re_types::archetypes::Points2D; /// # let store = re_query::__populate_example_store(); /// /// let ent_path = "point"; /// let query = LatestAtQuery::new(Timeline::new_sequence("frame_nr"), 123.into()); /// -/// let arch_view = re_query::query_archetype::( +/// let arch_view = re_query::query_archetype::( /// &store, /// &query, /// &ent_path.into(), @@ -93,7 +89,7 @@ pub fn get_component_with_instances( /// .unwrap(); /// /// # #[cfg(feature = "polars")] -/// let df = arch_view.as_df2::().unwrap(); +/// let df = arch_view.as_df2::().unwrap(); /// /// //println!("{df:?}"); /// ``` @@ -101,7 +97,7 @@ pub fn get_component_with_instances( /// Outputs: /// ```text /// ┌────────────────────┬───────────────┬─────────────────┐ -/// │ rerun.components.InstanceKey ┆ rerun.components.Point2D ┆ rerun.components.Color │ +/// │ InstanceKey ┆ MyPoint ┆ MyColor │ /// │ --- ┆ --- ┆ --- │ /// │ u64 ┆ struct[2] ┆ u32 │ /// ╞════════════════════╪═══════════════╪═════════════════╡ @@ -161,7 +157,7 @@ pub fn query_archetype( /// Helper used to create an example store we can use for querying in doctests pub fn __populate_example_store() -> DataStore { use re_log_types::build_frame_nr; - use re_types::components::{Color, Position2D}; + use re_log_types::example_components::{MyColor, MyPoint}; let mut store = DataStore::new(InstanceKey::name(), Default::default()); @@ -169,7 +165,7 @@ pub fn __populate_example_store() -> DataStore { let timepoint = [build_frame_nr(123.into())]; let instances = vec![InstanceKey(42), InstanceKey(96)]; - let positions = vec![Position2D::new(1.0, 2.0), Position2D::new(3.0, 4.0)]; + let positions = vec![MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)]; let row = DataRow::from_cells2_sized( RowId::random(), @@ -182,7 +178,7 @@ pub fn __populate_example_store() -> DataStore { store.insert_row(&row).unwrap(); let instances = vec![InstanceKey(96)]; - let colors = vec![Color::from(0xff000000)]; + let colors = vec![MyColor::from(0xff000000)]; let row = DataRow::from_cells2_sized( RowId::random(), @@ -201,8 +197,8 @@ pub fn __populate_example_store() -> DataStore { #[test] fn simple_get_component() { use re_arrow_store::LatestAtQuery; + use re_log_types::example_components::MyPoint; use re_log_types::Timeline; - use re_types::components::Position2D; let store = __populate_example_store(); @@ -210,18 +206,15 @@ fn simple_get_component() { let query = LatestAtQuery::new(Timeline::new_sequence("frame_nr"), 123.into()); let (_, component) = - get_component_with_instances(&store, &query, &ent_path.into(), Position2D::name()).unwrap(); + get_component_with_instances(&store, &query, &ent_path.into(), MyPoint::name()).unwrap(); #[cfg(feature = "polars")] { - let df = component.as_df::().unwrap(); + let df = component.as_df::().unwrap(); eprintln!("{df:?}"); let instances = vec![Some(InstanceKey(42)), Some(InstanceKey(96))]; - let positions = vec![ - Some(Position2D::new(1.0, 2.0)), - Some(Position2D::new(3.0, 4.0)), - ]; + let positions = vec![Some(MyPoint::new(1.0, 2.0)), Some(MyPoint::new(3.0, 4.0))]; let expected = crate::dataframe_util::df_builder2(&instances, &positions).unwrap(); @@ -237,27 +230,26 @@ fn simple_get_component() { #[test] fn simple_query_archetype() { use re_arrow_store::LatestAtQuery; + use re_log_types::example_components::{MyColor, MyPoint, MyPoints}; use re_log_types::Timeline; - use re_types::archetypes::Points2D; - use re_types::components::{Color, Position2D}; let store = __populate_example_store(); let ent_path = "point"; let query = LatestAtQuery::new(Timeline::new_sequence("frame_nr"), 123.into()); - let arch_view = query_archetype::(&store, &query, &ent_path.into()).unwrap(); + let arch_view = query_archetype::(&store, &query, &ent_path.into()).unwrap(); - let expected_positions = [Position2D::new(1.0, 2.0), Position2D::new(3.0, 4.0)]; - let expected_colors = [None, Some(Color::from_unmultiplied_rgba(255, 0, 0, 0))]; + let expected_positions = [MyPoint::new(1.0, 2.0), MyPoint::new(3.0, 4.0)]; + let expected_colors = [None, Some(MyColor::from(0xff000000))]; let view_positions: Vec<_> = arch_view - .iter_required_component::() + .iter_required_component::() .unwrap() .collect(); let view_colors: Vec<_> = arch_view - .iter_optional_component::() + .iter_optional_component::() .unwrap() .collect(); @@ -266,7 +258,7 @@ fn simple_query_archetype() { #[cfg(feature = "polars")] { - let df = arch_view.as_df2::().unwrap(); + let df = arch_view.as_df2::().unwrap(); eprintln!("{df:?}"); } } diff --git a/crates/re_types/.gitattributes b/crates/re_types/.gitattributes new file mode 100644 index 000000000000..3daddec2d29d --- /dev/null +++ b/crates/re_types/.gitattributes @@ -0,0 +1,132 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +src/archetypes/annotation_context.rs linguist-generated=true +src/archetypes/arrows3d.rs linguist-generated=true +src/archetypes/asset3d.rs linguist-generated=true +src/archetypes/bar_chart.rs linguist-generated=true +src/archetypes/boxes2d.rs linguist-generated=true +src/archetypes/boxes3d.rs linguist-generated=true +src/archetypes/clear.rs linguist-generated=true +src/archetypes/depth_image.rs linguist-generated=true +src/archetypes/disconnected_space.rs linguist-generated=true +src/archetypes/image.rs linguist-generated=true +src/archetypes/line_strips2d.rs linguist-generated=true +src/archetypes/line_strips3d.rs linguist-generated=true +src/archetypes/mesh3d.rs linguist-generated=true +src/archetypes/mod.rs linguist-generated=true +src/archetypes/pinhole.rs linguist-generated=true +src/archetypes/points2d.rs linguist-generated=true +src/archetypes/points3d.rs linguist-generated=true +src/archetypes/segmentation_image.rs linguist-generated=true +src/archetypes/tensor.rs linguist-generated=true +src/archetypes/text_document.rs linguist-generated=true +src/archetypes/text_log.rs linguist-generated=true +src/archetypes/time_series_scalar.rs linguist-generated=true +src/archetypes/transform3d.rs linguist-generated=true +src/archetypes/view_coordinates.rs linguist-generated=true +src/blueprint/auto_space_views.rs linguist-generated=true +src/blueprint/mod.rs linguist-generated=true +src/blueprint/panel_view.rs linguist-generated=true +src/components/annotation_context.rs linguist-generated=true +src/components/blob.rs linguist-generated=true +src/components/class_id.rs linguist-generated=true +src/components/clear_is_recursive.rs linguist-generated=true +src/components/color.rs linguist-generated=true +src/components/depth_meter.rs linguist-generated=true +src/components/disconnected_space.rs linguist-generated=true +src/components/draw_order.rs linguist-generated=true +src/components/half_sizes2d.rs linguist-generated=true +src/components/half_sizes3d.rs linguist-generated=true +src/components/instance_key.rs linguist-generated=true +src/components/keypoint_id.rs linguist-generated=true +src/components/line_strip2d.rs linguist-generated=true +src/components/line_strip3d.rs linguist-generated=true +src/components/material.rs linguist-generated=true +src/components/media_type.rs linguist-generated=true +src/components/mesh_properties.rs linguist-generated=true +src/components/mod.rs linguist-generated=true +src/components/out_of_tree_transform3d.rs linguist-generated=true +src/components/pinhole_projection.rs linguist-generated=true +src/components/position2d.rs linguist-generated=true +src/components/position3d.rs linguist-generated=true +src/components/radius.rs linguist-generated=true +src/components/resolution.rs linguist-generated=true +src/components/rotation3d.rs linguist-generated=true +src/components/scalar.rs linguist-generated=true +src/components/scalar_scattering.rs linguist-generated=true +src/components/tensor_data.rs linguist-generated=true +src/components/text.rs linguist-generated=true +src/components/text_log_level.rs linguist-generated=true +src/components/transform3d.rs linguist-generated=true +src/components/vector3d.rs linguist-generated=true +src/components/view_coordinates.rs linguist-generated=true +src/datatypes/angle.rs linguist-generated=true +src/datatypes/annotation_info.rs linguist-generated=true +src/datatypes/class_description.rs linguist-generated=true +src/datatypes/class_description_map_elem.rs linguist-generated=true +src/datatypes/class_id.rs linguist-generated=true +src/datatypes/float32.rs linguist-generated=true +src/datatypes/keypoint_id.rs linguist-generated=true +src/datatypes/keypoint_pair.rs linguist-generated=true +src/datatypes/mat3x3.rs linguist-generated=true +src/datatypes/mat4x4.rs linguist-generated=true +src/datatypes/material.rs linguist-generated=true +src/datatypes/mesh_properties.rs linguist-generated=true +src/datatypes/mod.rs linguist-generated=true +src/datatypes/quaternion.rs linguist-generated=true +src/datatypes/rgba32.rs linguist-generated=true +src/datatypes/rotation3d.rs linguist-generated=true +src/datatypes/rotation_axis_angle.rs linguist-generated=true +src/datatypes/scale3d.rs linguist-generated=true +src/datatypes/tensor_buffer.rs linguist-generated=true +src/datatypes/tensor_data.rs linguist-generated=true +src/datatypes/tensor_dimension.rs linguist-generated=true +src/datatypes/transform3d.rs linguist-generated=true +src/datatypes/translation_and_mat3x3.rs linguist-generated=true +src/datatypes/translation_rotation_scale3d.rs linguist-generated=true +src/datatypes/utf8.rs linguist-generated=true +src/datatypes/uvec2d.rs linguist-generated=true +src/datatypes/uvec3d.rs linguist-generated=true +src/datatypes/uvec4d.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/affix_fuzzer1.rs linguist-generated=true +src/testing/archetypes/affix_fuzzer2.rs linguist-generated=true +src/testing/archetypes/affix_fuzzer3.rs linguist-generated=true +src/testing/archetypes/affix_fuzzer4.rs linguist-generated=true +src/testing/archetypes/mod.rs linguist-generated=true +src/testing/components/affix_fuzzer1.rs linguist-generated=true +src/testing/components/affix_fuzzer10.rs linguist-generated=true +src/testing/components/affix_fuzzer11.rs linguist-generated=true +src/testing/components/affix_fuzzer12.rs linguist-generated=true +src/testing/components/affix_fuzzer13.rs linguist-generated=true +src/testing/components/affix_fuzzer14.rs linguist-generated=true +src/testing/components/affix_fuzzer15.rs linguist-generated=true +src/testing/components/affix_fuzzer16.rs linguist-generated=true +src/testing/components/affix_fuzzer17.rs linguist-generated=true +src/testing/components/affix_fuzzer18.rs linguist-generated=true +src/testing/components/affix_fuzzer19.rs linguist-generated=true +src/testing/components/affix_fuzzer2.rs linguist-generated=true +src/testing/components/affix_fuzzer20.rs linguist-generated=true +src/testing/components/affix_fuzzer21.rs linguist-generated=true +src/testing/components/affix_fuzzer3.rs linguist-generated=true +src/testing/components/affix_fuzzer4.rs linguist-generated=true +src/testing/components/affix_fuzzer5.rs linguist-generated=true +src/testing/components/affix_fuzzer6.rs linguist-generated=true +src/testing/components/affix_fuzzer7.rs linguist-generated=true +src/testing/components/affix_fuzzer8.rs linguist-generated=true +src/testing/components/affix_fuzzer9.rs linguist-generated=true +src/testing/components/mod.rs linguist-generated=true +src/testing/datatypes/affix_fuzzer1.rs linguist-generated=true +src/testing/datatypes/affix_fuzzer2.rs linguist-generated=true +src/testing/datatypes/affix_fuzzer20.rs linguist-generated=true +src/testing/datatypes/affix_fuzzer21.rs linguist-generated=true +src/testing/datatypes/affix_fuzzer3.rs linguist-generated=true +src/testing/datatypes/affix_fuzzer4.rs linguist-generated=true +src/testing/datatypes/affix_fuzzer5.rs linguist-generated=true +src/testing/datatypes/flattened_scalar.rs linguist-generated=true +src/testing/datatypes/mod.rs linguist-generated=true +src/testing/datatypes/primitive_component.rs linguist-generated=true +src/testing/datatypes/string_component.rs linguist-generated=true diff --git a/crates/re_types/definitions/rerun/archetypes/clear.fbs b/crates/re_types/definitions/rerun/archetypes/clear.fbs index 18d2afe287bf..c15c7af00058 100644 --- a/crates/re_types/definitions/rerun/archetypes/clear.fbs +++ b/crates/re_types/definitions/rerun/archetypes/clear.fbs @@ -12,7 +12,8 @@ namespace rerun.archetypes; /// \example clear_simple title="Flat" image="https://static.rerun.io/clear_simple/2f5df95fcc53e9f0552f65670aef7f94830c5c1a/1200w.png" /// \example clear_recursive !api "Recursive" table Clear ( - "attr.rust.derive": "PartialEq, Eq" + "attr.rust.derive": "PartialEq, Eq", + "attr.rust.override_crate": "re_types_core" ) { is_recursive: rerun.components.ClearIsRecursive ("attr.rerun.component_required", order: 100); } diff --git a/crates/re_types/definitions/rerun/blueprint/auto_space_views.fbs b/crates/re_types/definitions/rerun/blueprint/auto_space_views.fbs index 26d11aaac803..2ad9bcd27aaf 100644 --- a/crates/re_types/definitions/rerun/blueprint/auto_space_views.fbs +++ b/crates/re_types/definitions/rerun/blueprint/auto_space_views.fbs @@ -15,6 +15,7 @@ namespace rerun.blueprint; struct AutoSpaceViews ( "attr.arrow.transparent", "attr.rust.derive": "Copy, Default", + "attr.rust.override_crate": "re_viewport", "attr.rust.repr": "transparent", "attr.rust.tuple_struct" ) { diff --git a/crates/re_types/definitions/rerun/blueprint/panel_view.fbs b/crates/re_types/definitions/rerun/blueprint/panel_view.fbs index f6e168cf8469..a98f56b2edcc 100644 --- a/crates/re_types/definitions/rerun/blueprint/panel_view.fbs +++ b/crates/re_types/definitions/rerun/blueprint/panel_view.fbs @@ -13,7 +13,8 @@ namespace rerun.blueprint; /// /// Unstable. Used for the ongoing blueprint experimentations. struct PanelView ( - "attr.rust.derive": "Copy" + "attr.rust.derive": "Copy", + "attr.rust.override_crate": "re_viewer" ) { is_expanded: bool (order: 100); } diff --git a/crates/re_types/definitions/rerun/components/clear_is_recursive.fbs b/crates/re_types/definitions/rerun/components/clear_is_recursive.fbs index 6cf7338d4b1c..3e23278d54f8 100644 --- a/crates/re_types/definitions/rerun/components/clear_is_recursive.fbs +++ b/crates/re_types/definitions/rerun/components/clear_is_recursive.fbs @@ -15,6 +15,7 @@ struct ClearIsRecursive ( "attr.python.aliases": "bool", "attr.python.array_aliases": "bool, npt.NDArray[np.bool_]", "attr.rust.derive": "Copy, PartialEq, Eq", + "attr.rust.override_crate": "re_types_core", "attr.rust.tuple_struct" ) { /// If true, also clears all recursive children entities. diff --git a/crates/re_types/definitions/rerun/components/instance_key.fbs b/crates/re_types/definitions/rerun/components/instance_key.fbs index 1e8ec6348bf0..c2ec78a119d9 100644 --- a/crates/re_types/definitions/rerun/components/instance_key.fbs +++ b/crates/re_types/definitions/rerun/components/instance_key.fbs @@ -13,9 +13,10 @@ namespace rerun.components; struct InstanceKey ( "attr.python.aliases": "int", "attr.python.array_aliases": "int, npt.NDArray[np.uint64]", - "attr.rust.derive": "Copy, Hash, PartialEq, Eq, PartialOrd, Ord", "attr.rust.custom_clause": - 'cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))' + 'cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))', + "attr.rust.derive": "Copy, Hash, PartialEq, Eq, PartialOrd, Ord", + "attr.rust.override_crate": "re_types_core" ) { value: uint64 (order: 100); } diff --git a/crates/re_types/definitions/rust/attributes.fbs b/crates/re_types/definitions/rust/attributes.fbs index 72d6e68c5f07..f47164afa0f8 100644 --- a/crates/re_types/definitions/rust/attributes.fbs +++ b/crates/re_types/definitions/rust/attributes.fbs @@ -34,3 +34,10 @@ attribute "attr.rust.union_default"; /// Sets the visibility of `new` to `pub(crate)` so it is only available to extension methods. attribute "attr.rust.new_pub_crate"; + +/// The object will be generated in the specified crate, instead of `re_types`. +/// +/// Everything else works the same, include how module names are derived: e.g. if you define +/// an object of kind `Blueprint` with `attr.rust.override_crate=re_viewport`, the final +/// object will be generated in `crates/re_viewport/src/blueprint`. +attribute "attr.rust.override_crate"; diff --git a/crates/re_types/src/archetypes/.gitattributes b/crates/re_types/src/archetypes/.gitattributes index 4b6035b6779b..9a47c39ac59b 100644 --- a/crates/re_types/src/archetypes/.gitattributes +++ b/crates/re_types/src/archetypes/.gitattributes @@ -7,7 +7,6 @@ asset3d.rs linguist-generated=true bar_chart.rs linguist-generated=true boxes2d.rs linguist-generated=true boxes3d.rs linguist-generated=true -clear.rs linguist-generated=true depth_image.rs linguist-generated=true disconnected_space.rs linguist-generated=true image.rs linguist-generated=true diff --git a/crates/re_types/src/archetypes/annotation_context.rs b/crates/re_types/src/archetypes/annotation_context.rs index 4642f7555a29..555b4937a7bd 100644 --- a/crates/re_types/src/archetypes/annotation_context.rs +++ b/crates/re_types/src/archetypes/annotation_context.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: The `AnnotationContext` provides additional information on how to display entities. /// /// Entities can use `ClassId`s and `KeypointId`s to provide annotations, and @@ -134,9 +136,7 @@ impl ::re_types_core::Archetype for AnnotationContext { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/arrows3d.rs b/crates/re_types/src/archetypes/arrows3d.rs index 53bfa62598d1..62866607db6c 100644 --- a/crates/re_types/src/archetypes/arrows3d.rs +++ b/crates/re_types/src/archetypes/arrows3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: 3D arrows with optional colors, radii, labels, etc. /// /// ## Example @@ -168,9 +170,7 @@ impl ::re_types_core::Archetype for Arrows3D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/asset3d.rs b/crates/re_types/src/archetypes/asset3d.rs index f92bf5dff28b..e9185cb7a059 100644 --- a/crates/re_types/src/archetypes/asset3d.rs +++ b/crates/re_types/src/archetypes/asset3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A prepacked 3D asset (`.gltf`, `.glb`, `.obj`, etc.). /// /// See also [`Mesh3D`][crate::archetypes::Mesh3D]. @@ -143,9 +145,7 @@ impl ::re_types_core::Archetype for Asset3D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/bar_chart.rs b/crates/re_types/src/archetypes/bar_chart.rs index 7015d63bd061..e460928e03aa 100644 --- a/crates/re_types/src/archetypes/bar_chart.rs +++ b/crates/re_types/src/archetypes/bar_chart.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A bar chart. /// /// The x values will be the indices of the array, and the bar heights will be the provided values. @@ -110,9 +112,7 @@ impl ::re_types_core::Archetype for BarChart { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/boxes2d.rs b/crates/re_types/src/archetypes/boxes2d.rs index ec0c00c175f6..0ab0ad6b1757 100644 --- a/crates/re_types/src/archetypes/boxes2d.rs +++ b/crates/re_types/src/archetypes/boxes2d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: 2D boxes with half-extents and optional center, rotations, rotations, colors etc. /// /// ## Example @@ -158,9 +160,7 @@ impl ::re_types_core::Archetype for Boxes2D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/boxes3d.rs b/crates/re_types/src/archetypes/boxes3d.rs index 555a3bebe455..9c92f2e8b6ee 100644 --- a/crates/re_types/src/archetypes/boxes3d.rs +++ b/crates/re_types/src/archetypes/boxes3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: 3D boxes with half-extents and optional center, rotations, rotations, colors etc. /// /// ## Example @@ -165,9 +167,7 @@ impl ::re_types_core::Archetype for Boxes3D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/depth_image.rs b/crates/re_types/src/archetypes/depth_image.rs index 0aee630a6013..d59e60e68e0c 100644 --- a/crates/re_types/src/archetypes/depth_image.rs +++ b/crates/re_types/src/archetypes/depth_image.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A depth image. /// /// The shape of the `TensorData` must be mappable to an `HxW` tensor. @@ -145,9 +147,7 @@ impl ::re_types_core::Archetype for DepthImage { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/disconnected_space.rs b/crates/re_types/src/archetypes/disconnected_space.rs index 05e81d9fd9cd..18a779e2ed10 100644 --- a/crates/re_types/src/archetypes/disconnected_space.rs +++ b/crates/re_types/src/archetypes/disconnected_space.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: Specifies that the entity path at which this is logged is disconnected from its parent. /// /// This is useful for specifying that a subgraph is independent of the rest of the scene. @@ -125,9 +127,7 @@ impl ::re_types_core::Archetype for DisconnectedSpace { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/image.rs b/crates/re_types/src/archetypes/image.rs index d9cc49d64573..a7211110cd9e 100644 --- a/crates/re_types/src/archetypes/image.rs +++ b/crates/re_types/src/archetypes/image.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A monochrome or color image. /// /// The shape of the `TensorData` must be mappable to: @@ -132,9 +134,7 @@ impl ::re_types_core::Archetype for Image { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/line_strips2d.rs b/crates/re_types/src/archetypes/line_strips2d.rs index 204dca735ae8..4bee255ccc22 100644 --- a/crates/re_types/src/archetypes/line_strips2d.rs +++ b/crates/re_types/src/archetypes/line_strips2d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: 2D line strips with positions and optional colors, radii, labels, etc. /// /// ## Example @@ -161,9 +163,7 @@ impl ::re_types_core::Archetype for LineStrips2D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/line_strips3d.rs b/crates/re_types/src/archetypes/line_strips3d.rs index 63d7785fd986..d0b1efdf2ce5 100644 --- a/crates/re_types/src/archetypes/line_strips3d.rs +++ b/crates/re_types/src/archetypes/line_strips3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: 3D line strips with positions and optional colors, radii, labels, etc. /// /// ## Example @@ -156,9 +158,7 @@ impl ::re_types_core::Archetype for LineStrips3D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/mesh3d.rs b/crates/re_types/src/archetypes/mesh3d.rs index ff8e9a7d9b9c..012d103648a9 100644 --- a/crates/re_types/src/archetypes/mesh3d.rs +++ b/crates/re_types/src/archetypes/mesh3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A 3D triangle mesh as specified by its per-mesh and per-vertex properties. /// /// See also [`Asset3D`][crate::archetypes::Asset3D]. @@ -157,9 +159,7 @@ impl ::re_types_core::Archetype for Mesh3D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/mod.rs b/crates/re_types/src/archetypes/mod.rs index 0b0bab0a1ee4..b1e2676047cd 100644 --- a/crates/re_types/src/archetypes/mod.rs +++ b/crates/re_types/src/archetypes/mod.rs @@ -10,8 +10,6 @@ mod boxes2d; mod boxes2d_ext; mod boxes3d; mod boxes3d_ext; -mod clear; -mod clear_ext; mod depth_image; mod depth_image_ext; mod disconnected_space; @@ -43,7 +41,6 @@ pub use self::asset3d::Asset3D; pub use self::bar_chart::BarChart; pub use self::boxes2d::Boxes2D; pub use self::boxes3d::Boxes3D; -pub use self::clear::Clear; pub use self::depth_image::DepthImage; pub use self::disconnected_space::DisconnectedSpace; pub use self::image::Image; diff --git a/crates/re_types/src/archetypes/pinhole.rs b/crates/re_types/src/archetypes/pinhole.rs index fdf1bf384fd5..3b49eef390d8 100644 --- a/crates/re_types/src/archetypes/pinhole.rs +++ b/crates/re_types/src/archetypes/pinhole.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: Camera perspective projection (a.k.a. intrinsics). /// /// ## Example @@ -165,9 +167,7 @@ impl ::re_types_core::Archetype for Pinhole { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/points2d.rs b/crates/re_types/src/archetypes/points2d.rs index 181515e6a371..0ed1e80779c9 100644 --- a/crates/re_types/src/archetypes/points2d.rs +++ b/crates/re_types/src/archetypes/points2d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A 2D point cloud with positions and optional colors, radii, labels, etc. /// /// ## Example @@ -170,9 +172,7 @@ impl ::re_types_core::Archetype for Points2D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/points3d.rs b/crates/re_types/src/archetypes/points3d.rs index 4e1557322c80..99563b617fac 100644 --- a/crates/re_types/src/archetypes/points3d.rs +++ b/crates/re_types/src/archetypes/points3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A 3D point cloud with positions and optional colors, radii, labels, etc. /// /// ## Example @@ -163,9 +165,7 @@ impl ::re_types_core::Archetype for Points3D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/segmentation_image.rs b/crates/re_types/src/archetypes/segmentation_image.rs index cdf516dd87c5..d629075c6169 100644 --- a/crates/re_types/src/archetypes/segmentation_image.rs +++ b/crates/re_types/src/archetypes/segmentation_image.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: An image made up of integer class-ids /// /// The shape of the `TensorData` must be mappable to an `HxW` tensor. @@ -141,9 +143,7 @@ impl ::re_types_core::Archetype for SegmentationImage { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/tensor.rs b/crates/re_types/src/archetypes/tensor.rs index 9d1953425cb2..b6504c4b968c 100644 --- a/crates/re_types/src/archetypes/tensor.rs +++ b/crates/re_types/src/archetypes/tensor.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A generic n-dimensional Tensor. /// /// ## Example @@ -112,9 +114,7 @@ impl ::re_types_core::Archetype for Tensor { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/text_document.rs b/crates/re_types/src/archetypes/text_document.rs index 10986f31d820..4727032fff2e 100644 --- a/crates/re_types/src/archetypes/text_document.rs +++ b/crates/re_types/src/archetypes/text_document.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A text element intended to be displayed in its own text-box. /// /// Supports raw text and markdown. @@ -99,9 +101,7 @@ impl ::re_types_core::Archetype for TextDocument { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/text_log.rs b/crates/re_types/src/archetypes/text_log.rs index 9fe9b69db6cd..0b0af4e01552 100644 --- a/crates/re_types/src/archetypes/text_log.rs +++ b/crates/re_types/src/archetypes/text_log.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A log entry in a text log, comprised of a text body and its log level. /// /// ## Example @@ -135,9 +137,7 @@ impl ::re_types_core::Archetype for TextLog { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/time_series_scalar.rs b/crates/re_types/src/archetypes/time_series_scalar.rs index 623877cbe896..eb6b684b88b9 100644 --- a/crates/re_types/src/archetypes/time_series_scalar.rs +++ b/crates/re_types/src/archetypes/time_series_scalar.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: Log a double-precision scalar that will be visualized as a time-series plot. /// /// The current simulation time will be used for the time/X-axis, hence scalars @@ -172,9 +174,7 @@ impl ::re_types_core::Archetype for TimeSeriesScalar { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/transform3d.rs b/crates/re_types/src/archetypes/transform3d.rs index c3b71a809ea6..3cdfea8690ac 100644 --- a/crates/re_types/src/archetypes/transform3d.rs +++ b/crates/re_types/src/archetypes/transform3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: A 3D transform. /// /// ## Example @@ -127,9 +129,7 @@ impl ::re_types_core::Archetype for Transform3D { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/archetypes/view_coordinates.rs b/crates/re_types/src/archetypes/view_coordinates.rs index 9e0de01cab63..fcef2e1c7e2e 100644 --- a/crates/re_types/src/archetypes/view_coordinates.rs +++ b/crates/re_types/src/archetypes/view_coordinates.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Archetype**: How we interpret the coordinate system of an entity/space. /// /// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? @@ -120,9 +122,7 @@ impl ::re_types_core::Archetype for ViewCoordinates { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/components/.gitattributes b/crates/re_types/src/components/.gitattributes index 0392b9d5b928..c56166b28fcb 100644 --- a/crates/re_types/src/components/.gitattributes +++ b/crates/re_types/src/components/.gitattributes @@ -4,14 +4,12 @@ annotation_context.rs linguist-generated=true blob.rs linguist-generated=true class_id.rs linguist-generated=true -clear_is_recursive.rs linguist-generated=true color.rs linguist-generated=true depth_meter.rs linguist-generated=true disconnected_space.rs linguist-generated=true draw_order.rs linguist-generated=true half_sizes2d.rs linguist-generated=true half_sizes3d.rs linguist-generated=true -instance_key.rs linguist-generated=true keypoint_id.rs linguist-generated=true line_strip2d.rs linguist-generated=true line_strip3d.rs linguist-generated=true diff --git a/crates/re_types/src/components/annotation_context.rs b/crates/re_types/src/components/annotation_context.rs index d534e21a5869..bf2ad8a52efd 100644 --- a/crates/re_types/src/components/annotation_context.rs +++ b/crates/re_types/src/components/annotation_context.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: The `AnnotationContext` provides additional information on how to display entities. /// /// Entities can use `ClassId`s and `KeypointId`s to provide annotations, and @@ -60,7 +62,7 @@ impl ::re_types_core::Loggable for AnnotationContext { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: ::arrow_datatype(), @@ -72,13 +74,13 @@ impl ::re_types_core::Loggable for AnnotationContext { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -91,7 +93,7 @@ impl ::re_types_core::Loggable for AnnotationContext { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -104,8 +106,8 @@ impl ::re_types_core::Loggable for AnnotationContext { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let data0_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), @@ -128,18 +130,18 @@ impl ::re_types_core::Loggable for AnnotationContext { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/components/blob.rs b/crates/re_types/src/components/blob.rs index af0cae7b8943..7b0623bd0827 100644 --- a/crates/re_types/src/components/blob.rs +++ b/crates/re_types/src/components/blob.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A binary blob of data. #[derive(Clone, Debug, PartialEq, Eq)] #[repr(transparent)] @@ -58,7 +60,7 @@ impl ::re_types_core::Loggable for Blob { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: DataType::UInt8, @@ -70,13 +72,13 @@ impl ::re_types_core::Loggable for Blob { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +91,7 @@ impl ::re_types_core::Loggable for Blob { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -102,9 +104,9 @@ impl ::re_types_core::Loggable for Blob { .collect::>() .concat() .into(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; + let data0_inner_bitmap: Option = None; let offsets = - ::arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { + arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) .unwrap_or_default() @@ -125,18 +127,18 @@ impl ::re_types_core::Loggable for Blob { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/components/class_id.rs b/crates/re_types/src/components/class_id.rs index 4389fd93048e..3cac91e2b20a 100644 --- a/crates/re_types/src/components/class_id.rs +++ b/crates/re_types/src/components/class_id.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A 16-bit ID representing a type of semantic class. /// /// Used to look up a [`crate::datatypes::ClassDescription`] within the [`crate::components::AnnotationContext`]. @@ -71,20 +73,20 @@ impl ::re_types_core::Loggable for ClassId { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::UInt16 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -97,7 +99,7 @@ impl ::re_types_core::Loggable for ClassId { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -122,14 +124,14 @@ impl ::re_types_core::Loggable for ClassId { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() @@ -153,14 +155,14 @@ impl ::re_types_core::Loggable for ClassId { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); diff --git a/crates/re_types/src/components/color.rs b/crates/re_types/src/components/color.rs index 8b6b32076edb..c49c1f1f626c 100644 --- a/crates/re_types/src/components/color.rs +++ b/crates/re_types/src/components/color.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha. /// /// The color is stored as a 32-bit integer, where the most significant @@ -69,20 +71,20 @@ impl ::re_types_core::Loggable for Color { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::UInt32 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -95,7 +97,7 @@ impl ::re_types_core::Loggable for Color { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -120,14 +122,14 @@ impl ::re_types_core::Loggable for Color { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() @@ -151,14 +153,14 @@ impl ::re_types_core::Loggable for Color { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); diff --git a/crates/re_types/src/components/depth_meter.rs b/crates/re_types/src/components/depth_meter.rs index 4a18925e772d..66ec22b7d721 100644 --- a/crates/re_types/src/components/depth_meter.rs +++ b/crates/re_types/src/components/depth_meter.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A component indicating how long a meter is, expressed in native units. #[derive(Clone, Debug, Copy, PartialEq, PartialOrd, bytemuck::Pod, bytemuck::Zeroable)] #[repr(transparent)] @@ -58,20 +60,20 @@ impl ::re_types_core::Loggable for DepthMeter { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Float32 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +86,7 @@ impl ::re_types_core::Loggable for DepthMeter { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -99,14 +101,14 @@ impl ::re_types_core::Loggable for DepthMeter { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() @@ -129,14 +131,14 @@ impl ::re_types_core::Loggable for DepthMeter { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); diff --git a/crates/re_types/src/components/disconnected_space.rs b/crates/re_types/src/components/disconnected_space.rs index 2ddf4c170499..1a6bcf0458eb 100644 --- a/crates/re_types/src/components/disconnected_space.rs +++ b/crates/re_types/src/components/disconnected_space.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: Specifies that the entity path at which this is logged is disconnected from its parent. /// /// This is useful for specifying that a subgraph is independent of the rest of the scene. @@ -64,20 +66,20 @@ impl ::re_types_core::Loggable for DisconnectedSpace { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Boolean } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -90,7 +92,7 @@ impl ::re_types_core::Loggable for DisconnectedSpace { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -105,14 +107,14 @@ impl ::re_types_core::Loggable for DisconnectedSpace { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_types/src/components/draw_order.rs b/crates/re_types/src/components/draw_order.rs index d4eec8821367..95f6e5eb8d36 100644 --- a/crates/re_types/src/components/draw_order.rs +++ b/crates/re_types/src/components/draw_order.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: Draw order used for the display order of 2D elements. /// /// Higher values are drawn on top of lower values. @@ -64,20 +66,20 @@ impl ::re_types_core::Loggable for DrawOrder { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Float32 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -90,7 +92,7 @@ impl ::re_types_core::Loggable for DrawOrder { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -105,14 +107,14 @@ impl ::re_types_core::Loggable for DrawOrder { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() @@ -135,14 +137,14 @@ impl ::re_types_core::Loggable for DrawOrder { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); diff --git a/crates/re_types/src/components/half_sizes2d.rs b/crates/re_types/src/components/half_sizes2d.rs index ea92ee241832..5746c91f6636 100644 --- a/crates/re_types/src/components/half_sizes2d.rs +++ b/crates/re_types/src/components/half_sizes2d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: Half-sizes (extents) of a 2D box along its local axis, starting at its local origin/center. /// /// The box extends both in negative and positive direction along each axis. @@ -68,7 +70,7 @@ impl ::re_types_core::Loggable for HalfSizes2D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -83,13 +85,13 @@ impl ::re_types_core::Loggable for HalfSizes2D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -102,7 +104,7 @@ impl ::re_types_core::Loggable for HalfSizes2D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -121,7 +123,7 @@ impl ::re_types_core::Loggable for HalfSizes2D { .flatten() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -150,18 +152,18 @@ impl ::re_types_core::Loggable for HalfSizes2D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( @@ -239,14 +241,14 @@ impl ::re_types_core::Loggable for HalfSizes2D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); @@ -256,7 +258,7 @@ impl ::re_types_core::Loggable for HalfSizes2D { let slice = { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/components/half_sizes3d.rs b/crates/re_types/src/components/half_sizes3d.rs index b14e690c51ee..577a864714cc 100644 --- a/crates/re_types/src/components/half_sizes3d.rs +++ b/crates/re_types/src/components/half_sizes3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: Half-sizes (extents) of a 3D box along its local axis, starting at its local origin/center. /// /// The box extends both in negative and positive direction along each axis. @@ -68,7 +70,7 @@ impl ::re_types_core::Loggable for HalfSizes3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -83,13 +85,13 @@ impl ::re_types_core::Loggable for HalfSizes3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -102,7 +104,7 @@ impl ::re_types_core::Loggable for HalfSizes3D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -121,7 +123,7 @@ impl ::re_types_core::Loggable for HalfSizes3D { .flatten() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -150,18 +152,18 @@ impl ::re_types_core::Loggable for HalfSizes3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( @@ -239,14 +241,14 @@ impl ::re_types_core::Loggable for HalfSizes3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); @@ -256,7 +258,7 @@ impl ::re_types_core::Loggable for HalfSizes3D { let slice = { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/components/keypoint_id.rs b/crates/re_types/src/components/keypoint_id.rs index 0ece63eea00b..be5738f31010 100644 --- a/crates/re_types/src/components/keypoint_id.rs +++ b/crates/re_types/src/components/keypoint_id.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A 16-bit ID representing a type of semantic keypoint within a class. /// /// `KeypointId`s are only meaningful within the context of a [`crate::datatypes::ClassDescription`]. @@ -73,20 +75,20 @@ impl ::re_types_core::Loggable for KeypointId { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::UInt16 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -99,7 +101,7 @@ impl ::re_types_core::Loggable for KeypointId { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -124,14 +126,14 @@ impl ::re_types_core::Loggable for KeypointId { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() @@ -155,14 +157,14 @@ impl ::re_types_core::Loggable for KeypointId { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); diff --git a/crates/re_types/src/components/line_strip2d.rs b/crates/re_types/src/components/line_strip2d.rs index 212d142cb25f..34874eea897e 100644 --- a/crates/re_types/src/components/line_strip2d.rs +++ b/crates/re_types/src/components/line_strip2d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A line strip in 2D space. /// /// A line strip is a list of points connected by line segments. It can be used to draw @@ -60,7 +62,7 @@ impl ::re_types_core::Loggable for LineStrip2D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: ::arrow_datatype(), @@ -72,13 +74,13 @@ impl ::re_types_core::Loggable for LineStrip2D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -91,7 +93,7 @@ impl ::re_types_core::Loggable for LineStrip2D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -104,8 +106,8 @@ impl ::re_types_core::Loggable for LineStrip2D { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let data0_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), @@ -130,7 +132,7 @@ impl ::re_types_core::Loggable for LineStrip2D { .flatten() .map(Some) .collect(); - let data0_inner_data_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_data_inner_bitmap: Option = data0_inner_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -171,18 +173,18 @@ impl ::re_types_core::Loggable for LineStrip2D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -203,7 +205,7 @@ impl ::re_types_core::Loggable for LineStrip2D { { let arrow_data_inner = arrow_data_inner .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/components/line_strip3d.rs b/crates/re_types/src/components/line_strip3d.rs index d08629f4b4c0..dbf779a1c6b8 100644 --- a/crates/re_types/src/components/line_strip3d.rs +++ b/crates/re_types/src/components/line_strip3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A line strip in 3D space. /// /// A line strip is a list of points connected by line segments. It can be used to draw @@ -60,7 +62,7 @@ impl ::re_types_core::Loggable for LineStrip3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: ::arrow_datatype(), @@ -72,13 +74,13 @@ impl ::re_types_core::Loggable for LineStrip3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -91,7 +93,7 @@ impl ::re_types_core::Loggable for LineStrip3D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -104,8 +106,8 @@ impl ::re_types_core::Loggable for LineStrip3D { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let data0_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), @@ -130,7 +132,7 @@ impl ::re_types_core::Loggable for LineStrip3D { .flatten() .map(Some) .collect(); - let data0_inner_data_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_data_inner_bitmap: Option = data0_inner_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -171,18 +173,18 @@ impl ::re_types_core::Loggable for LineStrip3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -203,7 +205,7 @@ impl ::re_types_core::Loggable for LineStrip3D { { let arrow_data_inner = arrow_data_inner .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/components/material.rs b/crates/re_types/src/components/material.rs index ddf2754a1107..182b4284c53d 100644 --- a/crates/re_types/src/components/material.rs +++ b/crates/re_types/src/components/material.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: Material properties of a mesh. #[derive(Clone, Debug, PartialEq, Eq)] pub struct Material(pub crate::datatypes::Material); @@ -65,7 +67,7 @@ impl ::re_types_core::Loggable for Material { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![Field { name: "albedo_factor".to_owned(), data_type: ::arrow_datatype(), @@ -77,13 +79,13 @@ impl ::re_types_core::Loggable for Material { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -96,7 +98,7 @@ impl ::re_types_core::Loggable for Material { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -109,14 +111,14 @@ impl ::re_types_core::Loggable for Material { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(crate::datatypes::Material::from_arrow_opt(arrow_data) .with_context("rerun.components.Material#material")? .into_iter() diff --git a/crates/re_types/src/components/media_type.rs b/crates/re_types/src/components/media_type.rs index 7b51ceb58280..69fa0b11f6d7 100644 --- a/crates/re_types/src/components/media_type.rs +++ b/crates/re_types/src/components/media_type.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A standardized media type (RFC2046, formerly known as MIME types), encoded as a utf8 string. /// /// The complete reference of officially registered media types is maintained by the IANA and can be @@ -69,20 +71,20 @@ impl ::re_types_core::Loggable for MediaType { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Utf8 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -95,12 +97,12 @@ impl ::re_types_core::Loggable for MediaType { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = data0 + let inner_data: arrow2::buffer::Buffer = data0 .iter() .flatten() .flat_map(|datum| { @@ -109,7 +111,7 @@ impl ::re_types_core::Loggable for MediaType { }) .collect(); let offsets = - ::arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { + arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { opt.as_ref() .map(|datum| { let crate::datatypes::Utf8(data0) = datum; @@ -136,18 +138,18 @@ impl ::re_types_core::Loggable for MediaType { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/components/mesh_properties.rs b/crates/re_types/src/components/mesh_properties.rs index 4547ccca4eaa..db3a2f9cbac2 100644 --- a/crates/re_types/src/components/mesh_properties.rs +++ b/crates/re_types/src/components/mesh_properties.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: Optional triangle indices for a mesh. #[derive(Clone, Debug, PartialEq, Eq)] pub struct MeshProperties(pub crate::datatypes::MeshProperties); @@ -65,7 +67,7 @@ impl ::re_types_core::Loggable for MeshProperties { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![Field { name: "indices".to_owned(), data_type: DataType::List(Box::new(Field { @@ -82,13 +84,13 @@ impl ::re_types_core::Loggable for MeshProperties { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -101,7 +103,7 @@ impl ::re_types_core::Loggable for MeshProperties { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -114,14 +116,14 @@ impl ::re_types_core::Loggable for MeshProperties { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(crate::datatypes::MeshProperties::from_arrow_opt(arrow_data) .with_context("rerun.components.MeshProperties#props")? .into_iter() diff --git a/crates/re_types/src/components/mod.rs b/crates/re_types/src/components/mod.rs index 132a9de350d3..a31c029aaf62 100644 --- a/crates/re_types/src/components/mod.rs +++ b/crates/re_types/src/components/mod.rs @@ -5,7 +5,6 @@ mod blob; mod blob_ext; mod class_id; mod class_id_ext; -mod clear_is_recursive; mod color; mod color_ext; mod depth_meter; @@ -18,8 +17,6 @@ mod half_sizes2d; mod half_sizes2d_ext; mod half_sizes3d; mod half_sizes3d_ext; -mod instance_key; -mod instance_key_ext; mod keypoint_id; mod keypoint_id_ext; mod line_strip2d; @@ -62,14 +59,12 @@ mod view_coordinates_ext; pub use self::annotation_context::AnnotationContext; pub use self::blob::Blob; pub use self::class_id::ClassId; -pub use self::clear_is_recursive::ClearIsRecursive; pub use self::color::Color; pub use self::depth_meter::DepthMeter; pub use self::disconnected_space::DisconnectedSpace; pub use self::draw_order::DrawOrder; pub use self::half_sizes2d::HalfSizes2D; pub use self::half_sizes3d::HalfSizes3D; -pub use self::instance_key::InstanceKey; pub use self::keypoint_id::KeypointId; pub use self::line_strip2d::LineStrip2D; pub use self::line_strip3d::LineStrip3D; diff --git a/crates/re_types/src/components/out_of_tree_transform3d.rs b/crates/re_types/src/components/out_of_tree_transform3d.rs index e2d889b00f39..e8664a7a2547 100644 --- a/crates/re_types/src/components/out_of_tree_transform3d.rs +++ b/crates/re_types/src/components/out_of_tree_transform3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: An out-of-tree affine transform between two 3D spaces, represented in a given direction. /// /// "Out-of-tree" means that the transform only affects its own entity: children don't inherit from it. @@ -70,7 +72,7 @@ impl ::re_types_core::Loggable for OutOfTreeTransform3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -100,13 +102,13 @@ impl ::re_types_core::Loggable for OutOfTreeTransform3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -119,7 +121,7 @@ impl ::re_types_core::Loggable for OutOfTreeTransform3D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -132,14 +134,14 @@ impl ::re_types_core::Loggable for OutOfTreeTransform3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(crate::datatypes::Transform3D::from_arrow_opt(arrow_data) .with_context("rerun.components.OutOfTreeTransform3D#repr")? .into_iter() diff --git a/crates/re_types/src/components/pinhole_projection.rs b/crates/re_types/src/components/pinhole_projection.rs index 97f9909724e0..1c2b0e44435b 100644 --- a/crates/re_types/src/components/pinhole_projection.rs +++ b/crates/re_types/src/components/pinhole_projection.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: Camera projection, from image coordinates to view coordinates. /// /// Child from parent. @@ -75,7 +77,7 @@ impl ::re_types_core::Loggable for PinholeProjection { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -90,13 +92,13 @@ impl ::re_types_core::Loggable for PinholeProjection { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -109,7 +111,7 @@ impl ::re_types_core::Loggable for PinholeProjection { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -128,7 +130,7 @@ impl ::re_types_core::Loggable for PinholeProjection { .flatten() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -157,18 +159,18 @@ impl ::re_types_core::Loggable for PinholeProjection { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( @@ -246,14 +248,14 @@ impl ::re_types_core::Loggable for PinholeProjection { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); @@ -263,7 +265,7 @@ impl ::re_types_core::Loggable for PinholeProjection { let slice = { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/components/position2d.rs b/crates/re_types/src/components/position2d.rs index 1b0dd92eb4d5..24ca1f6036de 100644 --- a/crates/re_types/src/components/position2d.rs +++ b/crates/re_types/src/components/position2d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A position in 2D space. #[derive(Clone, Debug, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(transparent)] @@ -66,7 +68,7 @@ impl ::re_types_core::Loggable for Position2D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -81,13 +83,13 @@ impl ::re_types_core::Loggable for Position2D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -100,7 +102,7 @@ impl ::re_types_core::Loggable for Position2D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -119,7 +121,7 @@ impl ::re_types_core::Loggable for Position2D { .flatten() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -148,18 +150,18 @@ impl ::re_types_core::Loggable for Position2D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( @@ -237,14 +239,14 @@ impl ::re_types_core::Loggable for Position2D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); @@ -254,7 +256,7 @@ impl ::re_types_core::Loggable for Position2D { let slice = { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/components/position3d.rs b/crates/re_types/src/components/position3d.rs index aa5d6797a04c..e870c7223f50 100644 --- a/crates/re_types/src/components/position3d.rs +++ b/crates/re_types/src/components/position3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A position in 3D space. #[derive(Clone, Debug, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(transparent)] @@ -66,7 +68,7 @@ impl ::re_types_core::Loggable for Position3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -81,13 +83,13 @@ impl ::re_types_core::Loggable for Position3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -100,7 +102,7 @@ impl ::re_types_core::Loggable for Position3D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -119,7 +121,7 @@ impl ::re_types_core::Loggable for Position3D { .flatten() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -148,18 +150,18 @@ impl ::re_types_core::Loggable for Position3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( @@ -237,14 +239,14 @@ impl ::re_types_core::Loggable for Position3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); @@ -254,7 +256,7 @@ impl ::re_types_core::Loggable for Position3D { let slice = { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/components/radius.rs b/crates/re_types/src/components/radius.rs index 52152bcc1fc8..475d3cd3a601 100644 --- a/crates/re_types/src/components/radius.rs +++ b/crates/re_types/src/components/radius.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A Radius component. #[derive(Clone, Debug, Copy, PartialEq, PartialOrd, bytemuck::Pod, bytemuck::Zeroable)] #[repr(transparent)] @@ -58,20 +60,20 @@ impl ::re_types_core::Loggable for Radius { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Float32 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +86,7 @@ impl ::re_types_core::Loggable for Radius { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -99,14 +101,14 @@ impl ::re_types_core::Loggable for Radius { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() @@ -129,14 +131,14 @@ impl ::re_types_core::Loggable for Radius { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); diff --git a/crates/re_types/src/components/resolution.rs b/crates/re_types/src/components/resolution.rs index 3b2d951f38ca..1e08e10a83be 100644 --- a/crates/re_types/src/components/resolution.rs +++ b/crates/re_types/src/components/resolution.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: Pixel resolution width & height, e.g. of a camera sensor. /// /// Typically in integer units, but for some use cases floating point may be used. @@ -67,7 +69,7 @@ impl ::re_types_core::Loggable for Resolution { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -82,13 +84,13 @@ impl ::re_types_core::Loggable for Resolution { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -101,7 +103,7 @@ impl ::re_types_core::Loggable for Resolution { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -120,7 +122,7 @@ impl ::re_types_core::Loggable for Resolution { .flatten() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -149,18 +151,18 @@ impl ::re_types_core::Loggable for Resolution { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( @@ -238,14 +240,14 @@ impl ::re_types_core::Loggable for Resolution { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); @@ -255,7 +257,7 @@ impl ::re_types_core::Loggable for Resolution { let slice = { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/components/rotation3d.rs b/crates/re_types/src/components/rotation3d.rs index ce098d48b3cd..0f43f0a3b7b8 100644 --- a/crates/re_types/src/components/rotation3d.rs +++ b/crates/re_types/src/components/rotation3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A 3D rotation, represented either by a quaternion or a rotation around axis. #[derive(Clone, Debug, PartialEq)] pub struct Rotation3D( @@ -68,7 +70,7 @@ impl ::re_types_core::Loggable for Rotation3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -98,13 +100,13 @@ impl ::re_types_core::Loggable for Rotation3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -117,7 +119,7 @@ impl ::re_types_core::Loggable for Rotation3D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -130,14 +132,14 @@ impl ::re_types_core::Loggable for Rotation3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(crate::datatypes::Rotation3D::from_arrow_opt(arrow_data) .with_context("rerun.components.Rotation3D#repr")? .into_iter() diff --git a/crates/re_types/src/components/scalar.rs b/crates/re_types/src/components/scalar.rs index c26293d19654..08392f143dd9 100644 --- a/crates/re_types/src/components/scalar.rs +++ b/crates/re_types/src/components/scalar.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A double-precision scalar. /// /// Used for time series plots. @@ -60,20 +62,20 @@ impl ::re_types_core::Loggable for Scalar { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Float64 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -86,7 +88,7 @@ impl ::re_types_core::Loggable for Scalar { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -101,14 +103,14 @@ impl ::re_types_core::Loggable for Scalar { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() @@ -131,14 +133,14 @@ impl ::re_types_core::Loggable for Scalar { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); diff --git a/crates/re_types/src/components/scalar_scattering.rs b/crates/re_types/src/components/scalar_scattering.rs index 1a38a5fcd645..c4b253cbd6bc 100644 --- a/crates/re_types/src/components/scalar_scattering.rs +++ b/crates/re_types/src/components/scalar_scattering.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: If true, a scalar will be shown as individual point in a scatter plot. #[derive(Clone, Debug, Copy, PartialEq, PartialOrd, Eq)] pub struct ScalarScattering(pub bool); @@ -57,20 +59,20 @@ impl ::re_types_core::Loggable for ScalarScattering { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Boolean } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,7 +85,7 @@ impl ::re_types_core::Loggable for ScalarScattering { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -98,14 +100,14 @@ impl ::re_types_core::Loggable for ScalarScattering { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_types/src/components/tensor_data.rs b/crates/re_types/src/components/tensor_data.rs index 75b6c849f9b5..bf981757b611 100644 --- a/crates/re_types/src/components/tensor_data.rs +++ b/crates/re_types/src/components/tensor_data.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A multi-dimensional `Tensor` with optionally named arguments. #[derive(Clone, Debug, PartialEq)] #[repr(transparent)] @@ -66,7 +68,7 @@ impl ::re_types_core::Loggable for TensorData { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "shape".to_owned(), @@ -91,13 +93,13 @@ impl ::re_types_core::Loggable for TensorData { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -110,7 +112,7 @@ impl ::re_types_core::Loggable for TensorData { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -123,14 +125,14 @@ impl ::re_types_core::Loggable for TensorData { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(crate::datatypes::TensorData::from_arrow_opt(arrow_data) .with_context("rerun.components.TensorData#data")? .into_iter() diff --git a/crates/re_types/src/components/text.rs b/crates/re_types/src/components/text.rs index bc0f5fb86401..240a45120e86 100644 --- a/crates/re_types/src/components/text.rs +++ b/crates/re_types/src/components/text.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A string of text, e.g. for labels and text documents #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] #[repr(transparent)] @@ -66,20 +68,20 @@ impl ::re_types_core::Loggable for Text { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Utf8 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -92,12 +94,12 @@ impl ::re_types_core::Loggable for Text { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = data0 + let inner_data: arrow2::buffer::Buffer = data0 .iter() .flatten() .flat_map(|datum| { @@ -106,7 +108,7 @@ impl ::re_types_core::Loggable for Text { }) .collect(); let offsets = - ::arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { + arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { opt.as_ref() .map(|datum| { let crate::datatypes::Utf8(data0) = datum; @@ -133,18 +135,18 @@ impl ::re_types_core::Loggable for Text { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/components/text_log_level.rs b/crates/re_types/src/components/text_log_level.rs index 1225add9b14c..9e9d1fdc288f 100644 --- a/crates/re_types/src/components/text_log_level.rs +++ b/crates/re_types/src/components/text_log_level.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: The severity level of a text log message. /// /// Recommended to be one of: @@ -74,20 +76,20 @@ impl ::re_types_core::Loggable for TextLogLevel { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Utf8 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -100,12 +102,12 @@ impl ::re_types_core::Loggable for TextLogLevel { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = data0 + let inner_data: arrow2::buffer::Buffer = data0 .iter() .flatten() .flat_map(|datum| { @@ -114,7 +116,7 @@ impl ::re_types_core::Loggable for TextLogLevel { }) .collect(); let offsets = - ::arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { + arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { opt.as_ref() .map(|datum| { let crate::datatypes::Utf8(data0) = datum; @@ -141,18 +143,18 @@ impl ::re_types_core::Loggable for TextLogLevel { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/components/transform3d.rs b/crates/re_types/src/components/transform3d.rs index d208cab42a02..b8c9ffd5b2e7 100644 --- a/crates/re_types/src/components/transform3d.rs +++ b/crates/re_types/src/components/transform3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: An affine transform between two 3D spaces, represented in a given direction. #[derive(Clone, Debug, PartialEq)] pub struct Transform3D( @@ -68,7 +70,7 @@ impl ::re_types_core::Loggable for Transform3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -98,13 +100,13 @@ impl ::re_types_core::Loggable for Transform3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -117,7 +119,7 @@ impl ::re_types_core::Loggable for Transform3D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -130,14 +132,14 @@ impl ::re_types_core::Loggable for Transform3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(crate::datatypes::Transform3D::from_arrow_opt(arrow_data) .with_context("rerun.components.Transform3D#repr")? .into_iter() diff --git a/crates/re_types/src/components/vector3d.rs b/crates/re_types/src/components/vector3d.rs index 4a6f7be4fdd3..46fe52271fa1 100644 --- a/crates/re_types/src/components/vector3d.rs +++ b/crates/re_types/src/components/vector3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: A vector in 3D space. #[derive(Clone, Debug, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(transparent)] @@ -66,7 +68,7 @@ impl ::re_types_core::Loggable for Vector3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -81,13 +83,13 @@ impl ::re_types_core::Loggable for Vector3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -100,7 +102,7 @@ impl ::re_types_core::Loggable for Vector3D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -119,7 +121,7 @@ impl ::re_types_core::Loggable for Vector3D { .flatten() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -148,18 +150,18 @@ impl ::re_types_core::Loggable for Vector3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( @@ -237,14 +239,14 @@ impl ::re_types_core::Loggable for Vector3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); @@ -254,7 +256,7 @@ impl ::re_types_core::Loggable for Vector3D { let slice = { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/components/view_coordinates.rs b/crates/re_types/src/components/view_coordinates.rs index b32ddfe8f051..3ef01a700edd 100644 --- a/crates/re_types/src/components/view_coordinates.rs +++ b/crates/re_types/src/components/view_coordinates.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Component**: How we interpret the coordinate system of an entity/space. /// /// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? @@ -76,7 +78,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -91,13 +93,13 @@ impl ::re_types_core::Loggable for ViewCoordinates { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -110,7 +112,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -123,7 +125,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -152,18 +154,18 @@ impl ::re_types_core::Loggable for ViewCoordinates { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( @@ -238,14 +240,14 @@ impl ::re_types_core::Loggable for ViewCoordinates { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { return Err(::re_types_core::DeserializationError::missing_data()); @@ -255,7 +257,7 @@ impl ::re_types_core::Loggable for ViewCoordinates { let slice = { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/angle.rs b/crates/re_types/src/datatypes/angle.rs index c96ddf4244d3..01d74ac3b162 100644 --- a/crates/re_types/src/datatypes/angle.rs +++ b/crates/re_types/src/datatypes/angle.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: Angle in either radians or degrees. #[derive(Clone, Debug, Copy, PartialEq)] pub enum Angle { @@ -46,7 +48,7 @@ impl ::re_types_core::Loggable for Angle { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -76,13 +78,13 @@ impl ::re_types_core::Loggable for Angle { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let data: Vec<_> = data .into_iter() @@ -115,7 +117,7 @@ impl ::re_types_core::Loggable for Angle { (datum.is_some(), datum) }) .unzip(); - let radians_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let radians_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -138,7 +140,7 @@ impl ::re_types_core::Loggable for Angle { (datum.is_some(), datum) }) .unzip(); - let degrees_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let degrees_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -181,18 +183,18 @@ impl ::re_types_core::Loggable for Angle { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::UnionArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Union( diff --git a/crates/re_types/src/datatypes/annotation_info.rs b/crates/re_types/src/datatypes/annotation_info.rs index e049b14fc224..d4cafbad9e16 100644 --- a/crates/re_types/src/datatypes/annotation_info.rs +++ b/crates/re_types/src/datatypes/annotation_info.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: Annotation info annotating a class id or key-point id. /// /// Color and label will be used to annotate entities/keypoints which reference the id. @@ -55,7 +57,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "id".to_owned(), @@ -81,13 +83,13 @@ impl ::re_types_core::Loggable for AnnotationInfo { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -96,7 +98,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -114,7 +116,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { (datum.is_some(), datum) }) .unzip(); - let id_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let id_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -139,12 +141,12 @@ impl ::re_types_core::Loggable for AnnotationInfo { (datum.is_some(), datum) }) .unzip(); - let label_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let label_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = label + let inner_data: arrow2::buffer::Buffer = label .iter() .flatten() .flat_map(|datum| { @@ -152,7 +154,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { data0.0.clone() }) .collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( label.iter().map(|opt| { opt.as_ref() .map(|datum| { @@ -191,7 +193,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { (datum.is_some(), datum) }) .unzip(); - let color_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let color_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -221,18 +223,18 @@ impl ::re_types_core::Loggable for AnnotationInfo { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -303,7 +305,7 @@ impl ::re_types_core::Loggable for AnnotationInfo { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/datatypes/class_description.rs b/crates/re_types/src/datatypes/class_description.rs index a4198b04ee76..5da89e6427f6 100644 --- a/crates/re_types/src/datatypes/class_description.rs +++ b/crates/re_types/src/datatypes/class_description.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: The description of a semantic Class. /// /// If an entity is annotated with a corresponding `ClassId`, rerun will use @@ -65,7 +67,7 @@ impl ::re_types_core::Loggable for ClassDescription { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "info".to_owned(), @@ -101,13 +103,13 @@ impl ::re_types_core::Loggable for ClassDescription { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -116,7 +118,7 @@ impl ::re_types_core::Loggable for ClassDescription { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -134,7 +136,7 @@ impl ::re_types_core::Loggable for ClassDescription { (datum.is_some(), datum) }) .unzip(); - let info_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let info_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -157,7 +159,7 @@ impl ::re_types_core::Loggable for ClassDescription { (datum.is_some(), datum) }) .unzip(); - let keypoint_annotations_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let keypoint_annotations_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -170,10 +172,9 @@ impl ::re_types_core::Loggable for ClassDescription { .cloned() .map(Some) .collect(); - let keypoint_annotations_inner_bitmap: Option< - ::arrow2::bitmap::Bitmap, - > = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let keypoint_annotations_inner_bitmap: Option = + None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( keypoint_annotations.iter().map(|opt| { opt.as_ref().map(|datum| datum.len()).unwrap_or_default() }), @@ -213,7 +214,7 @@ impl ::re_types_core::Loggable for ClassDescription { (datum.is_some(), datum) }) .unzip(); - let keypoint_connections_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let keypoint_connections_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -226,10 +227,9 @@ impl ::re_types_core::Loggable for ClassDescription { .cloned() .map(Some) .collect(); - let keypoint_connections_inner_bitmap: Option< - ::arrow2::bitmap::Bitmap, - > = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let keypoint_connections_inner_bitmap: Option = + None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( keypoint_connections.iter().map(|opt| { opt.as_ref().map(|datum| datum.len()).unwrap_or_default() }), @@ -264,18 +264,18 @@ impl ::re_types_core::Loggable for ClassDescription { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -347,7 +347,7 @@ impl ::re_types_core::Loggable for ClassDescription { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -423,7 +423,7 @@ impl ::re_types_core::Loggable for ClassDescription { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/datatypes/class_description_map_elem.rs b/crates/re_types/src/datatypes/class_description_map_elem.rs index ca9d74bd2c0f..7b8b468947f5 100644 --- a/crates/re_types/src/datatypes/class_description_map_elem.rs +++ b/crates/re_types/src/datatypes/class_description_map_elem.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A helper type for mapping class IDs to class descriptions. /// /// This is internal to the `AnnotationContext` structure. @@ -51,7 +53,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "class_id".to_owned(), @@ -71,13 +73,13 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -86,7 +88,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -104,7 +106,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { (datum.is_some(), datum) }) .unzip(); - let class_id_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let class_id_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -138,7 +140,7 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { (datum.is_some(), datum) }) .unzip(); - let class_description_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let class_description_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -156,18 +158,18 @@ impl ::re_types_core::Loggable for ClassDescriptionMapElem { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ diff --git a/crates/re_types/src/datatypes/class_id.rs b/crates/re_types/src/datatypes/class_id.rs index ad0eb8017590..4bd5117c7cc9 100644 --- a/crates/re_types/src/datatypes/class_id.rs +++ b/crates/re_types/src/datatypes/class_id.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A 16-bit ID representing a type of semantic class. /// /// Used to look up a [`crate::datatypes::ClassDescription`] within the [`crate::components::AnnotationContext`]. @@ -73,20 +75,20 @@ impl ::re_types_core::Loggable for ClassId { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::UInt16 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -99,7 +101,7 @@ impl ::re_types_core::Loggable for ClassId { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -114,14 +116,14 @@ impl ::re_types_core::Loggable for ClassId { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_types/src/datatypes/float32.rs b/crates/re_types/src/datatypes/float32.rs index 0c3f90e7e435..816968ab4142 100644 --- a/crates/re_types/src/datatypes/float32.rs +++ b/crates/re_types/src/datatypes/float32.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A single-precision 32-bit IEEE 754 floating point number. #[derive(Clone, Debug, Copy, PartialEq, PartialOrd)] pub struct Float32(pub f32); @@ -57,20 +59,20 @@ impl ::re_types_core::Loggable for Float32 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Float32 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,7 +85,7 @@ impl ::re_types_core::Loggable for Float32 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -98,14 +100,14 @@ impl ::re_types_core::Loggable for Float32 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_types/src/datatypes/keypoint_id.rs b/crates/re_types/src/datatypes/keypoint_id.rs index 1ad7eda03a0f..84d290575ca6 100644 --- a/crates/re_types/src/datatypes/keypoint_id.rs +++ b/crates/re_types/src/datatypes/keypoint_id.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A 16-bit ID representing a type of semantic keypoint within a class. /// /// `KeypointId`s are only meaningful within the context of a [`crate::datatypes::ClassDescription`]. @@ -75,20 +77,20 @@ impl ::re_types_core::Loggable for KeypointId { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::UInt16 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -101,7 +103,7 @@ impl ::re_types_core::Loggable for KeypointId { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -116,14 +118,14 @@ impl ::re_types_core::Loggable for KeypointId { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_types/src/datatypes/keypoint_pair.rs b/crates/re_types/src/datatypes/keypoint_pair.rs index f47291f71210..32eafddd9dfa 100644 --- a/crates/re_types/src/datatypes/keypoint_pair.rs +++ b/crates/re_types/src/datatypes/keypoint_pair.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A connection between two `Keypoints`. #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct KeypointPair { @@ -49,7 +51,7 @@ impl ::re_types_core::Loggable for KeypointPair { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "keypoint0".to_owned(), @@ -69,13 +71,13 @@ impl ::re_types_core::Loggable for KeypointPair { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +86,7 @@ impl ::re_types_core::Loggable for KeypointPair { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -102,7 +104,7 @@ impl ::re_types_core::Loggable for KeypointPair { (datum.is_some(), datum) }) .unzip(); - let keypoint0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let keypoint0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -134,7 +136,7 @@ impl ::re_types_core::Loggable for KeypointPair { (datum.is_some(), datum) }) .unzip(); - let keypoint1_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let keypoint1_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -164,18 +166,18 @@ impl ::re_types_core::Loggable for KeypointPair { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ diff --git a/crates/re_types/src/datatypes/mat3x3.rs b/crates/re_types/src/datatypes/mat3x3.rs index ad9ac77671d9..ab99ee17674d 100644 --- a/crates/re_types/src/datatypes/mat3x3.rs +++ b/crates/re_types/src/datatypes/mat3x3.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A 3x3 Matrix. /// /// Matrices in Rerun are stored as flat list of coefficients in column-major order: @@ -69,7 +71,7 @@ impl ::re_types_core::Loggable for Mat3x3 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -84,13 +86,13 @@ impl ::re_types_core::Loggable for Mat3x3 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -103,7 +105,7 @@ impl ::re_types_core::Loggable for Mat3x3 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -116,7 +118,7 @@ impl ::re_types_core::Loggable for Mat3x3 { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -145,18 +147,18 @@ impl ::re_types_core::Loggable for Mat3x3 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/mat4x4.rs b/crates/re_types/src/datatypes/mat4x4.rs index 1ecba20dd2fb..499d10073270 100644 --- a/crates/re_types/src/datatypes/mat4x4.rs +++ b/crates/re_types/src/datatypes/mat4x4.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A 4x4 Matrix. /// /// Matrices in Rerun are stored as flat list of coefficients in column-major order: @@ -70,7 +72,7 @@ impl ::re_types_core::Loggable for Mat4x4 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -85,13 +87,13 @@ impl ::re_types_core::Loggable for Mat4x4 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -104,7 +106,7 @@ impl ::re_types_core::Loggable for Mat4x4 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -117,7 +119,7 @@ impl ::re_types_core::Loggable for Mat4x4 { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -146,18 +148,18 @@ impl ::re_types_core::Loggable for Mat4x4 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/material.rs b/crates/re_types/src/datatypes/material.rs index 8ae97a90c49a..e1cb181b140b 100644 --- a/crates/re_types/src/datatypes/material.rs +++ b/crates/re_types/src/datatypes/material.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: Material properties of a mesh. #[derive(Clone, Debug, Copy, PartialEq, Eq, Hash)] pub struct Material { @@ -70,7 +72,7 @@ impl ::re_types_core::Loggable for Material { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![Field { name: "albedo_factor".to_owned(), data_type: ::arrow_datatype(), @@ -82,13 +84,13 @@ impl ::re_types_core::Loggable for Material { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -97,7 +99,7 @@ impl ::re_types_core::Loggable for Material { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -117,7 +119,7 @@ impl ::re_types_core::Loggable for Material { (datum.is_some(), datum) }) .unzip(); - let albedo_factor_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let albedo_factor_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -146,18 +148,18 @@ impl ::re_types_core::Loggable for Material { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![Field { diff --git a/crates/re_types/src/datatypes/mesh_properties.rs b/crates/re_types/src/datatypes/mesh_properties.rs index c0a2a4725bcd..c5e76d3592b7 100644 --- a/crates/re_types/src/datatypes/mesh_properties.rs +++ b/crates/re_types/src/datatypes/mesh_properties.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: Optional triangle indices for a mesh. #[derive(Clone, Debug, PartialEq, Eq)] pub struct MeshProperties { @@ -62,7 +64,7 @@ impl ::re_types_core::Loggable for MeshProperties { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![Field { name: "indices".to_owned(), data_type: DataType::List(Box::new(Field { @@ -79,13 +81,13 @@ impl ::re_types_core::Loggable for MeshProperties { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -94,7 +96,7 @@ impl ::re_types_core::Loggable for MeshProperties { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -114,7 +116,7 @@ impl ::re_types_core::Loggable for MeshProperties { (datum.is_some(), datum) }) .unzip(); - let indices_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let indices_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -127,8 +129,8 @@ impl ::re_types_core::Loggable for MeshProperties { .collect::>() .concat() .into(); - let indices_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let indices_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( indices.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -164,18 +166,18 @@ impl ::re_types_core::Loggable for MeshProperties { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![Field { @@ -215,7 +217,7 @@ impl ::re_types_core::Loggable for MeshProperties { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/datatypes/quaternion.rs b/crates/re_types/src/datatypes/quaternion.rs index 23eae8930720..0ecdf03a6a6d 100644 --- a/crates/re_types/src/datatypes/quaternion.rs +++ b/crates/re_types/src/datatypes/quaternion.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A Quaternion represented by 4 real numbers. /// /// Note: although the x,y,z,w components of the quaternion will be passed through to the @@ -60,7 +62,7 @@ impl ::re_types_core::Loggable for Quaternion { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -75,13 +77,13 @@ impl ::re_types_core::Loggable for Quaternion { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -94,7 +96,7 @@ impl ::re_types_core::Loggable for Quaternion { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -107,7 +109,7 @@ impl ::re_types_core::Loggable for Quaternion { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -136,18 +138,18 @@ impl ::re_types_core::Loggable for Quaternion { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/rgba32.rs b/crates/re_types/src/datatypes/rgba32.rs index ecd0a600a58a..d78462b40abb 100644 --- a/crates/re_types/src/datatypes/rgba32.rs +++ b/crates/re_types/src/datatypes/rgba32.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha. /// /// The color is stored as a 32-bit integer, where the most significant @@ -63,20 +65,20 @@ impl ::re_types_core::Loggable for Rgba32 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::UInt32 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +91,7 @@ impl ::re_types_core::Loggable for Rgba32 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -104,14 +106,14 @@ impl ::re_types_core::Loggable for Rgba32 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_types/src/datatypes/rotation3d.rs b/crates/re_types/src/datatypes/rotation3d.rs index 77408660de30..b41e54182e94 100644 --- a/crates/re_types/src/datatypes/rotation3d.rs +++ b/crates/re_types/src/datatypes/rotation3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A 3D rotation. #[derive(Clone, Debug, Copy, PartialEq)] pub enum Rotation3D { @@ -49,7 +51,7 @@ impl ::re_types_core::Loggable for Rotation3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -79,13 +81,13 @@ impl ::re_types_core::Loggable for Rotation3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let data: Vec<_> = data .into_iter() @@ -120,7 +122,7 @@ impl ::re_types_core::Loggable for Rotation3D { (datum.is_some(), datum) }) .unzip(); - let quaternion_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let quaternion_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -139,7 +141,7 @@ impl ::re_types_core::Loggable for Rotation3D { .flatten() .map(Some) .collect(); - let quaternion_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let quaternion_inner_bitmap: Option = quaternion_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -186,7 +188,7 @@ impl ::re_types_core::Loggable for Rotation3D { (datum.is_some(), datum) }) .unzip(); - let axis_angle_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let axis_angle_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -227,18 +229,18 @@ impl ::re_types_core::Loggable for Rotation3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::UnionArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Union( @@ -299,7 +301,7 @@ impl ::re_types_core::Loggable for Rotation3D { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/rotation_axis_angle.rs b/crates/re_types/src/datatypes/rotation_axis_angle.rs index 56669afaaba0..38356b5cff0e 100644 --- a/crates/re_types/src/datatypes/rotation_axis_angle.rs +++ b/crates/re_types/src/datatypes/rotation_axis_angle.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: 3D rotation represented by a rotation around a given axis. #[derive(Clone, Debug, Copy, PartialEq)] pub struct RotationAxisAngle { @@ -53,7 +55,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "axis".to_owned(), @@ -73,13 +75,13 @@ impl ::re_types_core::Loggable for RotationAxisAngle { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -88,7 +90,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -106,7 +108,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { (datum.is_some(), datum) }) .unzip(); - let axis_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let axis_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -125,7 +127,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { .flatten() .map(Some) .collect(); - let axis_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let axis_inner_bitmap: Option = axis_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -169,7 +171,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { (datum.is_some(), datum) }) .unzip(); - let angle_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let angle_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -187,18 +189,18 @@ impl ::re_types_core::Loggable for RotationAxisAngle { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -241,7 +243,7 @@ impl ::re_types_core::Loggable for RotationAxisAngle { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/scale3d.rs b/crates/re_types/src/datatypes/scale3d.rs index 95c9dbb8c50f..51ec3f0d7048 100644 --- a/crates/re_types/src/datatypes/scale3d.rs +++ b/crates/re_types/src/datatypes/scale3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: 3D scaling factor, part of a transform representation. #[derive(Clone, Debug, Copy, PartialEq)] pub enum Scale3D { @@ -49,7 +51,7 @@ impl ::re_types_core::Loggable for Scale3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -79,13 +81,13 @@ impl ::re_types_core::Loggable for Scale3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let data: Vec<_> = data .into_iter() @@ -118,7 +120,7 @@ impl ::re_types_core::Loggable for Scale3D { (datum.is_some(), datum) }) .unzip(); - let three_d_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let three_d_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -137,7 +139,7 @@ impl ::re_types_core::Loggable for Scale3D { .flatten() .map(Some) .collect(); - let three_d_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let three_d_inner_bitmap: Option = three_d_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -182,7 +184,7 @@ impl ::re_types_core::Loggable for Scale3D { (datum.is_some(), datum) }) .unzip(); - let uniform_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let uniform_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -225,18 +227,18 @@ impl ::re_types_core::Loggable for Scale3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::UnionArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Union( @@ -296,7 +298,7 @@ impl ::re_types_core::Loggable for Scale3D { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/tensor_buffer.rs b/crates/re_types/src/datatypes/tensor_buffer.rs index b9547b7b910e..5a2ae2ed1ce8 100644 --- a/crates/re_types/src/datatypes/tensor_buffer.rs +++ b/crates/re_types/src/datatypes/tensor_buffer.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: The underlying storage for a `Tensor`. /// /// Tensor elements are stored in a contiguous buffer of a single type. @@ -59,7 +61,7 @@ impl ::re_types_core::Loggable for TensorBuffer { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -223,13 +225,13 @@ impl ::re_types_core::Loggable for TensorBuffer { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let data: Vec<_> = data .into_iter() @@ -273,7 +275,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let u8_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let u8_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -286,8 +288,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let u8_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let u8_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( u8.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -327,7 +329,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let u16_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let u16_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -340,8 +342,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let u16_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let u16_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( u16.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -381,7 +383,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let u32_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let u32_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -394,8 +396,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let u32_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let u32_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( u32.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -435,7 +437,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let u64_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let u64_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -448,8 +450,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let u64_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let u64_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( u64.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -489,7 +491,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let i8_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let i8_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -502,8 +504,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let i8_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let i8_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( i8.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -539,7 +541,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let i16_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let i16_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -552,8 +554,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let i16_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let i16_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( i16.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -593,7 +595,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let i32_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let i32_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -606,8 +608,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let i32_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let i32_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( i32.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -647,7 +649,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let i64_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let i64_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -660,8 +662,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let i64_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let i64_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( i64.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -701,7 +703,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let f16_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let f16_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -714,8 +716,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let f16_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let f16_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( f16.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -755,7 +757,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let f32_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let f32_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -768,8 +770,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let f32_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let f32_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( f32.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -809,7 +811,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let f64_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let f64_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -822,8 +824,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let f64_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let f64_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( f64.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -863,7 +865,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let jpeg_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let jpeg_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -876,8 +878,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let jpeg_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let jpeg_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( jpeg.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -917,7 +919,7 @@ impl ::re_types_core::Loggable for TensorBuffer { (datum.is_some(), datum) }) .unzip(); - let nv12_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let nv12_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -930,8 +932,8 @@ impl ::re_types_core::Loggable for TensorBuffer { .collect::>() .concat() .into(); - let nv12_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let nv12_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( nv12.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -1057,18 +1059,18 @@ impl ::re_types_core::Loggable for TensorBuffer { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::UnionArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Union( @@ -1262,7 +1264,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1335,7 +1337,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1408,7 +1410,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1481,7 +1483,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1554,7 +1556,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1627,7 +1629,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1700,7 +1702,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1773,7 +1775,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1846,7 +1848,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1919,7 +1921,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1992,7 +1994,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -2065,7 +2067,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -2138,7 +2140,7 @@ impl ::re_types_core::Loggable for TensorBuffer { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/datatypes/tensor_data.rs b/crates/re_types/src/datatypes/tensor_data.rs index 5437caa17e19..8c20c2e1e66d 100644 --- a/crates/re_types/src/datatypes/tensor_data.rs +++ b/crates/re_types/src/datatypes/tensor_data.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A multi-dimensional `Tensor` of data. /// /// The number of dimensions and their respective lengths is specified by the `shape` field. @@ -53,7 +55,7 @@ impl ::re_types_core::Loggable for TensorData { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "shape".to_owned(), @@ -78,13 +80,13 @@ impl ::re_types_core::Loggable for TensorData { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -93,7 +95,7 @@ impl ::re_types_core::Loggable for TensorData { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -111,7 +113,7 @@ impl ::re_types_core::Loggable for TensorData { (datum.is_some(), datum) }) .unzip(); - let shape_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let shape_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -124,14 +126,13 @@ impl ::re_types_core::Loggable for TensorData { .cloned() .map(Some) .collect(); - let shape_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( - shape.iter().map(|opt| { - opt.as_ref().map(|datum| datum.len()).unwrap_or_default() - }), - ) - .unwrap() - .into(); + let shape_inner_bitmap: Option = None; + let offsets = + arrow2::offset::Offsets::::try_from_lengths(shape.iter().map( + |opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default(), + )) + .unwrap() + .into(); ListArray::new( DataType::List(Box::new(Field { name: "item".to_owned(), @@ -163,7 +164,7 @@ impl ::re_types_core::Loggable for TensorData { (datum.is_some(), datum) }) .unzip(); - let buffer_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let buffer_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -181,18 +182,18 @@ impl ::re_types_core::Loggable for TensorData { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -241,7 +242,7 @@ impl ::re_types_core::Loggable for TensorData { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/datatypes/tensor_dimension.rs b/crates/re_types/src/datatypes/tensor_dimension.rs index b295d04467f1..7e41390aba90 100644 --- a/crates/re_types/src/datatypes/tensor_dimension.rs +++ b/crates/re_types/src/datatypes/tensor_dimension.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A single dimension within a multi-dimensional tensor. #[derive(Clone, Default, Eq, PartialEq)] pub struct TensorDimension { @@ -49,7 +51,7 @@ impl ::re_types_core::Loggable for TensorDimension { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "size".to_owned(), @@ -69,13 +71,13 @@ impl ::re_types_core::Loggable for TensorDimension { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +86,7 @@ impl ::re_types_core::Loggable for TensorDimension { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -102,7 +104,7 @@ impl ::re_types_core::Loggable for TensorDimension { (datum.is_some(), datum) }) .unzip(); - let size_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let size_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -127,14 +129,14 @@ impl ::re_types_core::Loggable for TensorDimension { (datum.is_some(), datum) }) .unzip(); - let name_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let name_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = + let inner_data: arrow2::buffer::Buffer = name.iter().flatten().flat_map(|s| s.0.clone()).collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( name.iter().map(|opt| { opt.as_ref().map(|datum| datum.0.len()).unwrap_or_default() }), @@ -162,18 +164,18 @@ impl ::re_types_core::Loggable for TensorDimension { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -238,7 +240,7 @@ impl ::re_types_core::Loggable for TensorDimension { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/datatypes/transform3d.rs b/crates/re_types/src/datatypes/transform3d.rs index 087d37735ede..98b5a9f5c013 100644 --- a/crates/re_types/src/datatypes/transform3d.rs +++ b/crates/re_types/src/datatypes/transform3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: Representation of a 3D affine transform. /// /// Rarely used directly, prefer using the underlying representation classes and pass them @@ -49,7 +51,7 @@ impl ::re_types_core::Loggable for Transform3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -79,13 +81,13 @@ impl ::re_types_core::Loggable for Transform3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let data: Vec<_> = data .into_iter() @@ -123,7 +125,7 @@ impl ::re_types_core::Loggable for Transform3D { (datum.is_some(), datum) }) .unzip(); - let translation_and_mat3x3_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let translation_and_mat3x3_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -153,7 +155,7 @@ impl ::re_types_core::Loggable for Transform3D { (datum.is_some(), datum) }) .unzip(); - let translation_rotation_scale_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let translation_rotation_scale_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -196,18 +198,18 @@ impl ::re_types_core::Loggable for Transform3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::UnionArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Union( diff --git a/crates/re_types/src/datatypes/translation_and_mat3x3.rs b/crates/re_types/src/datatypes/translation_and_mat3x3.rs index 26092eba025e..226ecf33219f 100644 --- a/crates/re_types/src/datatypes/translation_and_mat3x3.rs +++ b/crates/re_types/src/datatypes/translation_and_mat3x3.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: Representation of an affine transform via a 3x3 affine matrix paired with a translation. /// /// First applies the matrix, then the translation. @@ -57,7 +59,7 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "translation".to_owned(), @@ -83,13 +85,13 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -98,7 +100,7 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -119,7 +121,7 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { (datum.is_some(), datum) }) .unzip(); - let translation_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let translation_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -138,7 +140,7 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { .flatten() .map(Some) .collect(); - let translation_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let translation_inner_bitmap: Option = translation_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -185,7 +187,7 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { (datum.is_some(), datum) }) .unzip(); - let mat3x3_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let mat3x3_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -204,7 +206,7 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { .flatten() .map(Some) .collect(); - let mat3x3_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let mat3x3_inner_bitmap: Option = mat3x3_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -248,7 +250,7 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { (datum.is_some(), datum) }) .unzip(); - let from_parent_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let from_parent_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -271,18 +273,18 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -331,7 +333,7 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( @@ -419,7 +421,7 @@ impl ::re_types_core::Loggable for TranslationAndMat3x3 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/translation_rotation_scale3d.rs b/crates/re_types/src/datatypes/translation_rotation_scale3d.rs index a6b8a74abd4b..50d3197927e4 100644 --- a/crates/re_types/src/datatypes/translation_rotation_scale3d.rs +++ b/crates/re_types/src/datatypes/translation_rotation_scale3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: Representation of an affine transform via separate translation, rotation & scale. #[derive(Clone, Debug, Copy, PartialEq)] pub struct TranslationRotationScale3D { @@ -60,7 +62,7 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "translation".to_owned(), @@ -92,13 +94,13 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -107,7 +109,7 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -128,7 +130,7 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { (datum.is_some(), datum) }) .unzip(); - let translation_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let translation_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -147,7 +149,7 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { .flatten() .map(Some) .collect(); - let translation_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let translation_inner_bitmap: Option = translation_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -194,7 +196,7 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { (datum.is_some(), datum) }) .unzip(); - let rotation_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let rotation_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -217,7 +219,7 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { (datum.is_some(), datum) }) .unzip(); - let scale_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let scale_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -237,7 +239,7 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { (datum.is_some(), datum) }) .unzip(); - let from_parent_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let from_parent_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -260,18 +262,18 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -326,7 +328,7 @@ impl ::re_types_core::Loggable for TranslationRotationScale3D { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/utf8.rs b/crates/re_types/src/datatypes/utf8.rs index 5ff18358af4d..945e3de63137 100644 --- a/crates/re_types/src/datatypes/utf8.rs +++ b/crates/re_types/src/datatypes/utf8.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A string of text, encoded as UTF-8. #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[repr(transparent)] @@ -58,20 +60,20 @@ impl ::re_types_core::Loggable for Utf8 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Utf8 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,14 +86,14 @@ impl ::re_types_core::Loggable for Utf8 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = + let inner_data: arrow2::buffer::Buffer = data0.iter().flatten().flat_map(|s| s.0.clone()).collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.0.len()).unwrap_or_default()), @@ -115,18 +117,18 @@ impl ::re_types_core::Loggable for Utf8 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/datatypes/uvec2d.rs b/crates/re_types/src/datatypes/uvec2d.rs index b8bb1ddb5ba1..d0823f200910 100644 --- a/crates/re_types/src/datatypes/uvec2d.rs +++ b/crates/re_types/src/datatypes/uvec2d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A uint32 vector in 2D space. #[derive(Clone, Debug, Default, Copy, PartialEq, Eq, Hash, bytemuck::Pod, bytemuck::Zeroable)] #[repr(C)] @@ -58,7 +60,7 @@ impl ::re_types_core::Loggable for UVec2D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -73,13 +75,13 @@ impl ::re_types_core::Loggable for UVec2D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -92,7 +94,7 @@ impl ::re_types_core::Loggable for UVec2D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -105,7 +107,7 @@ impl ::re_types_core::Loggable for UVec2D { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -134,18 +136,18 @@ impl ::re_types_core::Loggable for UVec2D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/uvec3d.rs b/crates/re_types/src/datatypes/uvec3d.rs index fe6e21503c35..df474abc7934 100644 --- a/crates/re_types/src/datatypes/uvec3d.rs +++ b/crates/re_types/src/datatypes/uvec3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A uint32 vector in 3D space. #[derive(Clone, Debug, Default, Copy, PartialEq, Eq, Hash, bytemuck::Pod, bytemuck::Zeroable)] #[repr(C)] @@ -58,7 +60,7 @@ impl ::re_types_core::Loggable for UVec3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -73,13 +75,13 @@ impl ::re_types_core::Loggable for UVec3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -92,7 +94,7 @@ impl ::re_types_core::Loggable for UVec3D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -105,7 +107,7 @@ impl ::re_types_core::Loggable for UVec3D { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -134,18 +136,18 @@ impl ::re_types_core::Loggable for UVec3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/uvec4d.rs b/crates/re_types/src/datatypes/uvec4d.rs index 47053702f0fd..2d7d87da1d4f 100644 --- a/crates/re_types/src/datatypes/uvec4d.rs +++ b/crates/re_types/src/datatypes/uvec4d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A uint vector in 4D space. #[derive(Clone, Debug, Default, Copy, PartialEq, Eq, Hash, bytemuck::Pod, bytemuck::Zeroable)] #[repr(C)] @@ -58,7 +60,7 @@ impl ::re_types_core::Loggable for UVec4D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -73,13 +75,13 @@ impl ::re_types_core::Loggable for UVec4D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -92,7 +94,7 @@ impl ::re_types_core::Loggable for UVec4D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -105,7 +107,7 @@ impl ::re_types_core::Loggable for UVec4D { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -134,18 +136,18 @@ impl ::re_types_core::Loggable for UVec4D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/vec2d.rs b/crates/re_types/src/datatypes/vec2d.rs index 9886313e67fc..1631d4ae6091 100644 --- a/crates/re_types/src/datatypes/vec2d.rs +++ b/crates/re_types/src/datatypes/vec2d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A vector in 2D space. #[derive(Clone, Debug, Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(C)] @@ -58,7 +60,7 @@ impl ::re_types_core::Loggable for Vec2D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -73,13 +75,13 @@ impl ::re_types_core::Loggable for Vec2D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -92,7 +94,7 @@ impl ::re_types_core::Loggable for Vec2D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -105,7 +107,7 @@ impl ::re_types_core::Loggable for Vec2D { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -134,18 +136,18 @@ impl ::re_types_core::Loggable for Vec2D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/vec3d.rs b/crates/re_types/src/datatypes/vec3d.rs index 65215af189b6..04f0e75e5d69 100644 --- a/crates/re_types/src/datatypes/vec3d.rs +++ b/crates/re_types/src/datatypes/vec3d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A vector in 3D space. #[derive(Clone, Debug, Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(C)] @@ -58,7 +60,7 @@ impl ::re_types_core::Loggable for Vec3D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -73,13 +75,13 @@ impl ::re_types_core::Loggable for Vec3D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -92,7 +94,7 @@ impl ::re_types_core::Loggable for Vec3D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -105,7 +107,7 @@ impl ::re_types_core::Loggable for Vec3D { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -134,18 +136,18 @@ impl ::re_types_core::Loggable for Vec3D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/datatypes/vec4d.rs b/crates/re_types/src/datatypes/vec4d.rs index 50844b27c287..87636e52fec4 100644 --- a/crates/re_types/src/datatypes/vec4d.rs +++ b/crates/re_types/src/datatypes/vec4d.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Datatype**: A vector in 4D space. #[derive(Clone, Debug, Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(C)] @@ -58,7 +60,7 @@ impl ::re_types_core::Loggable for Vec4D { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::FixedSizeList( Box::new(Field { name: "item".to_owned(), @@ -73,13 +75,13 @@ impl ::re_types_core::Loggable for Vec4D { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -92,7 +94,7 @@ impl ::re_types_core::Loggable for Vec4D { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -105,7 +107,7 @@ impl ::re_types_core::Loggable for Vec4D { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let data0_inner_bitmap: Option = data0_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -134,18 +136,18 @@ impl ::re_types_core::Loggable for Vec4D { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( diff --git a/crates/re_types/src/lib.rs b/crates/re_types/src/lib.rs index 20266762c6b5..08ecf126f423 100644 --- a/crates/re_types/src/lib.rs +++ b/crates/re_types/src/lib.rs @@ -192,27 +192,46 @@ pub const DISPLAY_PRECISION: usize = 3; /// /// A special archetype is [`Clear`][archetypes::Clear] which resets all the components /// of an already logged entity. -pub mod archetypes; +pub mod archetypes { + + // Some archetypes (e.g. `Clear`) are so fundamental and used everywhere that we want + // them to be exposed by `re_types_core` directly; that way we don't force a dependency on the + // `re_types` behemoth just so one can use one of these fundamental types. + // + // To do so, re-inject `re_types_core`'s archetypes into our own module. + + #[path = "../archetypes/mod.rs"] + mod _archetypes; + + pub use self::_archetypes::*; + pub use re_types_core::archetypes::*; +} /// Components are the basic building blocks of [`archetypes`]. /// /// They all implement the [`Component`] trait. /// /// Each component is a wrapper around a [`datatype`][datatypes]. -pub mod components; +pub mod components { + + // Some components (e.g. `InstanceKey`) are so fundamental and used everywhere that we want + // them to be exposed by `re_types_core` directly; that way we don't force a dependency on the + // `re_types` behemoth just so one can use one of these fundamental types. + // + // To do so, re-inject `re_types_core`'s components into our own module. + + #[path = "../components/mod.rs"] + mod _components; + + pub use self::_components::*; + pub use re_types_core::components::*; +} /// The low-level datatypes that [`components`] are built from. /// /// They all implement the [`Datatype`] trait. pub mod datatypes; -/// Blueprint-related types. -/// -/// They all implement the [`Component`] trait. -/// -/// Unstable. Used for the ongoing blueprint experimentations. -pub mod blueprint; - #[cfg(feature = "datagen")] pub mod datagen; diff --git a/crates/re_types/src/testing/archetypes/affix_fuzzer1.rs b/crates/re_types/src/testing/archetypes/affix_fuzzer1.rs index c92ef04d8494..ce68e1221a01 100644 --- a/crates/re_types/src/testing/archetypes/affix_fuzzer1.rs +++ b/crates/re_types/src/testing/archetypes/affix_fuzzer1.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, PartialEq)] pub struct AffixFuzzer1 { pub fuzz1001: crate::testing::components::AffixFuzzer1, @@ -144,9 +146,7 @@ impl ::re_types_core::Archetype for AffixFuzzer1 { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/testing/archetypes/affix_fuzzer2.rs b/crates/re_types/src/testing/archetypes/affix_fuzzer2.rs index 234ae528cc7f..ed37282382bf 100644 --- a/crates/re_types/src/testing/archetypes/affix_fuzzer2.rs +++ b/crates/re_types/src/testing/archetypes/affix_fuzzer2.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, PartialEq)] pub struct AffixFuzzer2 { pub fuzz1101: Vec, @@ -135,9 +137,7 @@ impl ::re_types_core::Archetype for AffixFuzzer2 { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/testing/archetypes/affix_fuzzer3.rs b/crates/re_types/src/testing/archetypes/affix_fuzzer3.rs index 917efa6996ef..81afc9a79cac 100644 --- a/crates/re_types/src/testing/archetypes/affix_fuzzer3.rs +++ b/crates/re_types/src/testing/archetypes/affix_fuzzer3.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, PartialEq)] pub struct AffixFuzzer3 { pub fuzz2001: Option, @@ -136,9 +138,7 @@ impl ::re_types_core::Archetype for AffixFuzzer3 { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/testing/archetypes/affix_fuzzer4.rs b/crates/re_types/src/testing/archetypes/affix_fuzzer4.rs index 681e5d5c91c6..15df3c7000dc 100644 --- a/crates/re_types/src/testing/archetypes/affix_fuzzer4.rs +++ b/crates/re_types/src/testing/archetypes/affix_fuzzer4.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, PartialEq)] pub struct AffixFuzzer4 { pub fuzz2101: Option>, @@ -136,9 +138,7 @@ impl ::re_types_core::Archetype for AffixFuzzer4 { #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, + arrow_data: impl IntoIterator)>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); use ::re_types_core::{Loggable as _, ResultExt as _}; diff --git a/crates/re_types/src/testing/components/affix_fuzzer1.rs b/crates/re_types/src/testing/components/affix_fuzzer1.rs index d87d993bbf6d..83f865d88e5c 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer1.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer1.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer1(pub crate::testing::datatypes::AffixFuzzer1); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "single_float_optional".to_owned(), @@ -141,13 +143,13 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -160,7 +162,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -173,14 +175,14 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer1#single_required")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer10.rs b/crates/re_types/src/testing/components/affix_fuzzer10.rs index fdf18d086d07..8ab02ed3f156 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer10.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer10.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq, Eq)] pub struct AffixFuzzer10(pub Option<::re_types_core::ArrowString>); @@ -56,20 +58,20 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Utf8 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,14 +86,14 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = + let inner_data: arrow2::buffer::Buffer = data0.iter().flatten().flat_map(|s| s.0.clone()).collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.0.len()).unwrap_or_default()), @@ -115,18 +117,18 @@ impl ::re_types_core::Loggable for AffixFuzzer10 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/testing/components/affix_fuzzer11.rs b/crates/re_types/src/testing/components/affix_fuzzer11.rs index a97a268fd30a..52edc989e109 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer11.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer11.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer11(pub Option<::re_types_core::ArrowBuffer>); @@ -56,7 +58,7 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: DataType::Float32, @@ -68,13 +70,13 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +91,7 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -102,9 +104,9 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { .collect::>() .concat() .into(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; + let data0_inner_bitmap: Option = None; let offsets = - ::arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { + arrow2::offset::Offsets::::try_from_lengths(data0.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) .unwrap_or_default() @@ -125,18 +127,18 @@ impl ::re_types_core::Loggable for AffixFuzzer11 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/testing/components/affix_fuzzer12.rs b/crates/re_types/src/testing/components/affix_fuzzer12.rs index 53001151c6f6..0608b610fcc0 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer12.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer12.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq, Eq)] pub struct AffixFuzzer12(pub Vec<::re_types_core::ArrowString>); @@ -56,7 +58,7 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: DataType::Utf8, @@ -68,13 +70,13 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -87,7 +89,7 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -100,8 +102,8 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let data0_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), @@ -112,12 +114,12 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { Self::arrow_datatype(), offsets, { - let inner_data: ::arrow2::buffer::Buffer = data0_inner_data + let inner_data: arrow2::buffer::Buffer = data0_inner_data .iter() .flatten() .flat_map(|s| s.0.clone()) .collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0_inner_data.iter().map(|opt| { opt.as_ref().map(|datum| datum.0.len()).unwrap_or_default() }), @@ -145,18 +147,18 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -177,7 +179,7 @@ impl ::re_types_core::Loggable for AffixFuzzer12 { { let arrow_data_inner = arrow_data_inner .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/testing/components/affix_fuzzer13.rs b/crates/re_types/src/testing/components/affix_fuzzer13.rs index a8bcef468cc6..ef663db1b3ca 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer13.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer13.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq, Eq)] pub struct AffixFuzzer13(pub Option>); @@ -56,7 +58,7 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: DataType::Utf8, @@ -68,13 +70,13 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -89,7 +91,7 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -102,8 +104,8 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let data0_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), @@ -114,12 +116,12 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { Self::arrow_datatype(), offsets, { - let inner_data: ::arrow2::buffer::Buffer = data0_inner_data + let inner_data: arrow2::buffer::Buffer = data0_inner_data .iter() .flatten() .flat_map(|s| s.0.clone()) .collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0_inner_data.iter().map(|opt| { opt.as_ref().map(|datum| datum.0.len()).unwrap_or_default() }), @@ -147,18 +149,18 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -179,7 +181,7 @@ impl ::re_types_core::Loggable for AffixFuzzer13 { { let arrow_data_inner = arrow_data_inner .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/testing/components/affix_fuzzer14.rs b/crates/re_types/src/testing/components/affix_fuzzer14.rs index acb3338af6a6..4cb7bf226c61 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer14.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer14.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer14(pub crate::testing::datatypes::AffixFuzzer3); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer14 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -119,13 +121,13 @@ impl ::re_types_core::Loggable for AffixFuzzer14 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -138,7 +140,7 @@ impl ::re_types_core::Loggable for AffixFuzzer14 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -151,14 +153,14 @@ impl ::re_types_core::Loggable for AffixFuzzer14 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer3::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer14#single_required_union")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer15.rs b/crates/re_types/src/testing/components/affix_fuzzer15.rs index cbe77243302f..cb2024994a0e 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer15.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer15.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer15(pub Option); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -119,13 +121,13 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -140,7 +142,7 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -153,14 +155,14 @@ impl ::re_types_core::Loggable for AffixFuzzer15 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer3::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer15#single_optional_union")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer16.rs b/crates/re_types/src/testing/components/affix_fuzzer16.rs index 7c0c26e911f7..d606ce1ba3e7 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer16.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer16.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer16(pub Vec); @@ -50,7 +52,7 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: ::arrow_datatype(), @@ -62,13 +64,13 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -81,7 +83,7 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -94,8 +96,8 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let data0_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), @@ -118,18 +120,18 @@ impl ::re_types_core::Loggable for AffixFuzzer16 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/testing/components/affix_fuzzer17.rs b/crates/re_types/src/testing/components/affix_fuzzer17.rs index 2c3ff60b991c..9167e95b227d 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer17.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer17.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer17(pub Option>); @@ -50,7 +52,7 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: ::arrow_datatype(), @@ -62,13 +64,13 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,7 +85,7 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -96,8 +98,8 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let data0_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), @@ -120,18 +122,18 @@ impl ::re_types_core::Loggable for AffixFuzzer17 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/testing/components/affix_fuzzer18.rs b/crates/re_types/src/testing/components/affix_fuzzer18.rs index c680a8ee006d..dc3dfea5e1c1 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer18.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer18.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer18(pub Option>); @@ -50,7 +52,7 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: ::arrow_datatype(), @@ -62,13 +64,13 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,7 +85,7 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -96,8 +98,8 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let data0_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), @@ -120,18 +122,18 @@ impl ::re_types_core::Loggable for AffixFuzzer18 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/testing/components/affix_fuzzer19.rs b/crates/re_types/src/testing/components/affix_fuzzer19.rs index af8eb9f2b7b7..de18e6e470e8 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer19.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer19.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer19(pub crate::testing::datatypes::AffixFuzzer5); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer19 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![Field { name: "single_optional_union".to_owned(), data_type: ::arrow_datatype(), @@ -76,13 +78,13 @@ impl ::re_types_core::Loggable for AffixFuzzer19 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -95,7 +97,7 @@ impl ::re_types_core::Loggable for AffixFuzzer19 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -108,14 +110,14 @@ impl ::re_types_core::Loggable for AffixFuzzer19 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer5::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer19#just_a_table_nothing_shady")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer2.rs b/crates/re_types/src/testing/components/affix_fuzzer2.rs index c24981bd55ee..db1cfd81ae48 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer2.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer2.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer2(pub crate::testing::datatypes::AffixFuzzer1); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "single_float_optional".to_owned(), @@ -141,13 +143,13 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -160,7 +162,7 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -173,14 +175,14 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer2#single_required")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer20.rs b/crates/re_types/src/testing/components/affix_fuzzer20.rs index 4488e14afa1e..2c56d46f6dad 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer20.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer20.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct AffixFuzzer20(pub crate::testing::datatypes::AffixFuzzer20); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "p".to_owned(), @@ -84,13 +86,13 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -103,7 +105,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -116,14 +118,14 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer20::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer20#nested_transparent")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer21.rs b/crates/re_types/src/testing/components/affix_fuzzer21.rs index 588969e86765..63a8128d9d56 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer21.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer21.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer21(pub crate::testing::datatypes::AffixFuzzer21); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "single_half".to_owned(), @@ -89,13 +91,13 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -108,7 +110,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -121,14 +123,14 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer21::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer21#nested_halves")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer3.rs b/crates/re_types/src/testing/components/affix_fuzzer3.rs index b0db347185f2..e2643e769dce 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer3.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer3.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer3(pub crate::testing::datatypes::AffixFuzzer1); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "single_float_optional".to_owned(), @@ -141,13 +143,13 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -160,7 +162,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -173,14 +175,14 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer3#single_required")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer4.rs b/crates/re_types/src/testing/components/affix_fuzzer4.rs index 3cc131cf4dcb..53bc0616775b 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer4.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer4.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer4(pub Option); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "single_float_optional".to_owned(), @@ -141,13 +143,13 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -162,7 +164,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -175,14 +177,14 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer4#single_optional")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer5.rs b/crates/re_types/src/testing/components/affix_fuzzer5.rs index b8df770a70e6..13d9e8f55de5 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer5.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer5.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer5(pub Option); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "single_float_optional".to_owned(), @@ -141,13 +143,13 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -162,7 +164,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -175,14 +177,14 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer5#single_optional")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer6.rs b/crates/re_types/src/testing/components/affix_fuzzer6.rs index 995bdbd06f1d..b7aa4bd76053 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer6.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer6.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer6(pub Option); @@ -64,7 +66,7 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "single_float_optional".to_owned(), @@ -141,13 +143,13 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -162,7 +164,7 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -175,14 +177,14 @@ impl ::re_types_core::Loggable for AffixFuzzer6 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok( crate::testing::datatypes::AffixFuzzer1::from_arrow_opt(arrow_data) .with_context("rerun.testing.components.AffixFuzzer6#single_optional")? diff --git a/crates/re_types/src/testing/components/affix_fuzzer7.rs b/crates/re_types/src/testing/components/affix_fuzzer7.rs index 9ea51b06c80f..80f69d6c30f8 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer7.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer7.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer7(pub Option>); @@ -50,7 +52,7 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::List(Box::new(Field { name: "item".to_owned(), data_type: ::arrow_datatype(), @@ -62,13 +64,13 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,7 +85,7 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -96,8 +98,8 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { .cloned() .map(Some) .collect(); - let data0_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let data0_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.len()).unwrap_or_default()), @@ -120,18 +122,18 @@ impl ::re_types_core::Loggable for AffixFuzzer7 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/testing/components/affix_fuzzer8.rs b/crates/re_types/src/testing/components/affix_fuzzer8.rs index 418eb2a40208..25a3de15bdf9 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer8.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer8.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer8(pub Option); @@ -56,20 +58,20 @@ impl ::re_types_core::Loggable for AffixFuzzer8 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Float32 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +86,7 @@ impl ::re_types_core::Loggable for AffixFuzzer8 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -99,14 +101,14 @@ impl ::re_types_core::Loggable for AffixFuzzer8 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_types/src/testing/components/affix_fuzzer9.rs b/crates/re_types/src/testing/components/affix_fuzzer9.rs index cedb31089b48..adaa693dd168 100644 --- a/crates/re_types/src/testing/components/affix_fuzzer9.rs +++ b/crates/re_types/src/testing/components/affix_fuzzer9.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq, Eq)] pub struct AffixFuzzer9(pub ::re_types_core::ArrowString); @@ -56,20 +58,20 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Utf8 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -82,14 +84,14 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = + let inner_data: arrow2::buffer::Buffer = data0.iter().flatten().flat_map(|s| s.0.clone()).collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.0.len()).unwrap_or_default()), @@ -113,18 +115,18 @@ impl ::re_types_core::Loggable for AffixFuzzer9 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/testing/datatypes/affix_fuzzer1.rs b/crates/re_types/src/testing/datatypes/affix_fuzzer1.rs index df17b1870d22..1683574074ae 100644 --- a/crates/re_types/src/testing/datatypes/affix_fuzzer1.rs +++ b/crates/re_types/src/testing/datatypes/affix_fuzzer1.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer1 { pub single_float_optional: Option, @@ -52,7 +54,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "single_float_optional".to_owned(), @@ -129,13 +131,13 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -144,7 +146,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -168,7 +170,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let single_float_optional_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let single_float_optional_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -196,17 +198,17 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let single_string_required_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let single_string_required_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = single_string_required + let inner_data: arrow2::buffer::Buffer = single_string_required .iter() .flatten() .flat_map(|s| s.0.clone()) .collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( single_string_required.iter().map(|opt| { opt.as_ref().map(|datum| datum.0.len()).unwrap_or_default() }), @@ -242,17 +244,17 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let single_string_optional_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let single_string_optional_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = single_string_optional + let inner_data: arrow2::buffer::Buffer = single_string_optional .iter() .flatten() .flat_map(|s| s.0.clone()) .collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( single_string_optional.iter().map(|opt| { opt.as_ref().map(|datum| datum.0.len()).unwrap_or_default() }), @@ -288,7 +290,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let many_floats_optional_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let many_floats_optional_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -301,10 +303,9 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { .collect::>() .concat() .into(); - let many_floats_optional_inner_bitmap: Option< - ::arrow2::bitmap::Bitmap, - > = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let many_floats_optional_inner_bitmap: Option = + None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( many_floats_optional.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -346,7 +347,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let many_strings_required_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let many_strings_required_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -359,10 +360,9 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { .cloned() .map(Some) .collect(); - let many_strings_required_inner_bitmap: Option< - ::arrow2::bitmap::Bitmap, - > = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let many_strings_required_inner_bitmap: Option = + None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( many_strings_required.iter().map(|opt| { opt.as_ref().map(|datum| datum.len()).unwrap_or_default() }), @@ -378,22 +378,21 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { })), offsets, { - let inner_data: ::arrow2::buffer::Buffer = + let inner_data: arrow2::buffer::Buffer = many_strings_required_inner_data .iter() .flatten() .flat_map(|s| s.0.clone()) .collect(); - let offsets = - ::arrow2::offset::Offsets::::try_from_lengths( - many_strings_required_inner_data.iter().map(|opt| { - opt.as_ref() - .map(|datum| datum.0.len()) - .unwrap_or_default() - }), - ) - .unwrap() - .into(); + let offsets = arrow2::offset::Offsets::::try_from_lengths( + many_strings_required_inner_data.iter().map(|opt| { + opt.as_ref() + .map(|datum| datum.0.len()) + .unwrap_or_default() + }), + ) + .unwrap() + .into(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( @@ -427,7 +426,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let many_strings_optional_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let many_strings_optional_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -440,10 +439,9 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { .cloned() .map(Some) .collect(); - let many_strings_optional_inner_bitmap: Option< - ::arrow2::bitmap::Bitmap, - > = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let many_strings_optional_inner_bitmap: Option = + None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( many_strings_optional.iter().map(|opt| { opt.as_ref().map(|datum| datum.len()).unwrap_or_default() }), @@ -459,22 +457,21 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { })), offsets, { - let inner_data: ::arrow2::buffer::Buffer = + let inner_data: arrow2::buffer::Buffer = many_strings_optional_inner_data .iter() .flatten() .flat_map(|s| s.0.clone()) .collect(); - let offsets = - ::arrow2::offset::Offsets::::try_from_lengths( - many_strings_optional_inner_data.iter().map(|opt| { - opt.as_ref() - .map(|datum| datum.0.len()) - .unwrap_or_default() - }), - ) - .unwrap() - .into(); + let offsets = arrow2::offset::Offsets::::try_from_lengths( + many_strings_optional_inner_data.iter().map(|opt| { + opt.as_ref() + .map(|datum| datum.0.len()) + .unwrap_or_default() + }), + ) + .unwrap() + .into(); #[allow(unsafe_code, clippy::undocumented_unsafe_blocks)] unsafe { Utf8Array::::new_unchecked( @@ -504,7 +501,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let flattened_scalar_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let flattened_scalar_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -532,7 +529,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let almost_flattened_scalar_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let almost_flattened_scalar_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -557,7 +554,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { (datum.is_some(), datum) }) .unzip(); - let from_parent_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let from_parent_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -580,18 +577,18 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -714,7 +711,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, @@ -774,7 +771,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, @@ -834,7 +831,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -914,7 +911,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -937,7 +934,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { { let arrow_data_inner = arrow_data_inner .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, arrow_data_inner.data_type().clone(), @@ -1040,7 +1037,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { @@ -1063,7 +1060,7 @@ impl ::re_types_core::Loggable for AffixFuzzer1 { { let arrow_data_inner = arrow_data_inner .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, arrow_data_inner.data_type().clone(), diff --git a/crates/re_types/src/testing/datatypes/affix_fuzzer2.rs b/crates/re_types/src/testing/datatypes/affix_fuzzer2.rs index 432e7c0b5e96..cb3cc3efbff3 100644 --- a/crates/re_types/src/testing/datatypes/affix_fuzzer2.rs +++ b/crates/re_types/src/testing/datatypes/affix_fuzzer2.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer2(pub Option); @@ -56,20 +58,20 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Float32 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +86,7 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -99,14 +101,14 @@ impl ::re_types_core::Loggable for AffixFuzzer2 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_types/src/testing/datatypes/affix_fuzzer20.rs b/crates/re_types/src/testing/datatypes/affix_fuzzer20.rs index 1204be638b16..45cba834f0de 100644 --- a/crates/re_types/src/testing/datatypes/affix_fuzzer20.rs +++ b/crates/re_types/src/testing/datatypes/affix_fuzzer20.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, Eq, PartialEq)] pub struct AffixFuzzer20 { pub p: crate::testing::datatypes::PrimitiveComponent, @@ -45,7 +47,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "p".to_owned(), @@ -65,13 +67,13 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -80,7 +82,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -98,7 +100,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { (datum.is_some(), datum) }) .unzip(); - let p_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let p_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -131,12 +133,12 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { (datum.is_some(), datum) }) .unzip(); - let s_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let s_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = s + let inner_data: arrow2::buffer::Buffer = s .iter() .flatten() .flat_map(|datum| { @@ -144,7 +146,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { data0.0.clone() }) .collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( s.iter().map(|opt| { opt.as_ref() .map(|datum| { @@ -179,19 +181,19 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -254,7 +256,7 @@ impl ::re_types_core::Loggable for AffixFuzzer20 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types/src/testing/datatypes/affix_fuzzer21.rs b/crates/re_types/src/testing/datatypes/affix_fuzzer21.rs index 092dfdcceddc..306a18c0b745 100644 --- a/crates/re_types/src/testing/datatypes/affix_fuzzer21.rs +++ b/crates/re_types/src/testing/datatypes/affix_fuzzer21.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer21 { pub single_half: arrow2::types::f16, @@ -45,7 +47,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![ Field { name: "single_half".to_owned(), @@ -70,13 +72,13 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -85,7 +87,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -103,7 +105,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { (datum.is_some(), datum) }) .unzip(); - let single_half_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let single_half_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -128,7 +130,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { (datum.is_some(), datum) }) .unzip(); - let many_halves_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let many_halves_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -141,8 +143,8 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { .collect::>() .concat() .into(); - let many_halves_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let many_halves_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( many_halves.iter().map(|opt| { opt.as_ref() .map(|datum| datum.num_instances()) @@ -179,18 +181,18 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![ @@ -260,7 +262,7 @@ impl ::re_types_core::Loggable for AffixFuzzer21 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::List(Box::new(Field { diff --git a/crates/re_types/src/testing/datatypes/affix_fuzzer3.rs b/crates/re_types/src/testing/datatypes/affix_fuzzer3.rs index 319980a00587..bee9dba4eb07 100644 --- a/crates/re_types/src/testing/datatypes/affix_fuzzer3.rs +++ b/crates/re_types/src/testing/datatypes/affix_fuzzer3.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, PartialEq)] pub enum AffixFuzzer3 { Degrees(f32), @@ -47,7 +49,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -102,13 +104,13 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let data: Vec<_> = data .into_iter() @@ -145,7 +147,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { (datum.is_some(), datum) }) .unzip(); - let degrees_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let degrees_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -171,7 +173,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { (datum.is_some(), datum) }) .unzip(); - let radians_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let radians_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -196,7 +198,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { (datum.is_some(), datum) }) .unzip(); - let craziness_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let craziness_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -209,8 +211,8 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { .cloned() .map(Some) .collect(); - let craziness_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let craziness_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( craziness.iter().map(|opt| { opt.as_ref().map(|datum| datum.len()).unwrap_or_default() }), @@ -254,7 +256,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { (datum.is_some(), datum) }) .unzip(); - let fixed_size_shenanigans_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let fixed_size_shenanigans_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -268,7 +270,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { .map(Some) .collect(); let fixed_size_shenanigans_inner_bitmap: Option< - ::arrow2::bitmap::Bitmap, + arrow2::bitmap::Bitmap, > = fixed_size_shenanigans_bitmap.as_ref().map(|bitmap| { bitmap .iter() @@ -345,18 +347,18 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::UnionArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Union( @@ -452,7 +454,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| ::re_types_core::DeserializationError::datatype_mismatch( DataType::List( Box::new(Field { @@ -529,7 +531,7 @@ impl ::re_types_core::Loggable for AffixFuzzer3 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::FixedSizeListArray>() + .downcast_ref::() .ok_or_else(|| ::re_types_core::DeserializationError::datatype_mismatch( DataType::FixedSizeList( Box::new(Field { diff --git a/crates/re_types/src/testing/datatypes/affix_fuzzer4.rs b/crates/re_types/src/testing/datatypes/affix_fuzzer4.rs index ca674c6a2414..c72ccaee4529 100644 --- a/crates/re_types/src/testing/datatypes/affix_fuzzer4.rs +++ b/crates/re_types/src/testing/datatypes/affix_fuzzer4.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, PartialEq)] pub enum AffixFuzzer4 { SingleRequired(crate::testing::datatypes::AffixFuzzer3), @@ -46,7 +48,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Union( vec![ Field { @@ -92,13 +94,13 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let data: Vec<_> = data .into_iter() @@ -134,7 +136,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { (datum.is_some(), datum) }) .unzip(); - let single_required_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let single_required_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -157,7 +159,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { (datum.is_some(), datum) }) .unzip(); - let many_required_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let many_required_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -170,8 +172,8 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { .cloned() .map(Some) .collect(); - let many_required_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let many_required_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( many_required.iter().map(|opt| { opt.as_ref().map(|datum| datum.len()).unwrap_or_default() }), @@ -213,7 +215,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { (datum.is_some(), datum) }) .unzip(); - let many_optional_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let many_optional_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -226,8 +228,8 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { .cloned() .map(Some) .collect(); - let many_optional_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let many_optional_inner_bitmap: Option = None; + let offsets = arrow2::offset::Offsets::::try_from_lengths( many_optional.iter().map(|opt| { opt.as_ref().map(|datum| datum.len()).unwrap_or_default() }), @@ -292,18 +294,18 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::UnionArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Union( @@ -371,7 +373,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| ::re_types_core::DeserializationError::datatype_mismatch( DataType::List( Box::new(Field { @@ -448,7 +450,7 @@ impl ::re_types_core::Loggable for AffixFuzzer4 { { let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::ListArray>() + .downcast_ref::>() .ok_or_else(|| ::re_types_core::DeserializationError::datatype_mismatch( DataType::List( Box::new(Field { diff --git a/crates/re_types/src/testing/datatypes/affix_fuzzer5.rs b/crates/re_types/src/testing/datatypes/affix_fuzzer5.rs index 01aa44648720..885ea295ebef 100644 --- a/crates/re_types/src/testing/datatypes/affix_fuzzer5.rs +++ b/crates/re_types/src/testing/datatypes/affix_fuzzer5.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct AffixFuzzer5 { pub single_optional_union: Option, @@ -68,7 +70,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![Field { name: "single_optional_union".to_owned(), data_type: ::arrow_datatype(), @@ -80,13 +82,13 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -95,7 +97,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -118,7 +120,7 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { (datum.is_some(), datum) }) .unzip(); - let single_optional_union_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let single_optional_union_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -137,18 +139,18 @@ impl ::re_types_core::Loggable for AffixFuzzer5 { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![Field { diff --git a/crates/re_types/src/testing/datatypes/flattened_scalar.rs b/crates/re_types/src/testing/datatypes/flattened_scalar.rs index bff5f04431ff..688e46d1637d 100644 --- a/crates/re_types/src/testing/datatypes/flattened_scalar.rs +++ b/crates/re_types/src/testing/datatypes/flattened_scalar.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, PartialEq)] pub struct FlattenedScalar { pub value: f32, @@ -58,7 +60,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![Field { name: "value".to_owned(), data_type: DataType::Float32, @@ -70,13 +72,13 @@ impl ::re_types_core::Loggable for FlattenedScalar { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -85,7 +87,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -102,7 +104,7 @@ impl ::re_types_core::Loggable for FlattenedScalar { (datum.is_some(), datum) }) .unzip(); - let value_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let value_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -121,18 +123,18 @@ impl ::re_types_core::Loggable for FlattenedScalar { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![Field { diff --git a/crates/re_types/src/testing/datatypes/primitive_component.rs b/crates/re_types/src/testing/datatypes/primitive_component.rs index f82200fa1f59..067e12858b04 100644 --- a/crates/re_types/src/testing/datatypes/primitive_component.rs +++ b/crates/re_types/src/testing/datatypes/primitive_component.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, Eq, PartialEq)] #[repr(transparent)] pub struct PrimitiveComponent(pub u32); @@ -57,20 +59,20 @@ impl ::re_types_core::Loggable for PrimitiveComponent { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::UInt32 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,7 +85,7 @@ impl ::re_types_core::Loggable for PrimitiveComponent { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -98,14 +100,14 @@ impl ::re_types_core::Loggable for PrimitiveComponent { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_types/src/testing/datatypes/string_component.rs b/crates/re_types/src/testing/datatypes/string_component.rs index 758e19db178d..e5cce03c7588 100644 --- a/crates/re_types/src/testing/datatypes/string_component.rs +++ b/crates/re_types/src/testing/datatypes/string_component.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + #[derive(Clone, Debug, Default, Eq, PartialEq)] #[repr(transparent)] pub struct StringComponent(pub ::re_types_core::ArrowString); @@ -57,20 +59,20 @@ impl ::re_types_core::Loggable for StringComponent { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Utf8 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -83,14 +85,14 @@ impl ::re_types_core::Loggable for StringComponent { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; { - let inner_data: ::arrow2::buffer::Buffer = + let inner_data: arrow2::buffer::Buffer = data0.iter().flatten().flat_map(|s| s.0.clone()).collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( data0 .iter() .map(|opt| opt.as_ref().map(|datum| datum.0.len()).unwrap_or_default()), @@ -114,18 +116,18 @@ impl ::re_types_core::Loggable for StringComponent { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::Utf8Array>() + .downcast_ref::>() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Utf8, diff --git a/crates/re_types_builder/src/codegen/rust/api.rs b/crates/re_types_builder/src/codegen/rust/api.rs index e91c96a482a7..384b40632625 100644 --- a/crates/re_types_builder/src/codegen/rust/api.rs +++ b/crates/re_types_builder/src/codegen/rust/api.rs @@ -86,14 +86,14 @@ impl RustCodeGenerator { // Generate folder contents: let ordered_objects = objects.ordered_objects(object_kind.into()); for &obj in &ordered_objects { - let crate_name = "re_types"; // NOTE: this will support other values soon - let module_name = obj.kind.plural_snake_case(); + let crate_name = obj.crate_name(); + let module_name = obj.module_name(); - let crate_path = crates_root_path.join(crate_name); + let crate_path = crates_root_path.join(&crate_name); let module_path = if obj.is_testing() { - crate_path.join("src/testing").join(module_name) + crate_path.join("src/testing").join(&module_name) } else { - crate_path.join("src").join(module_name) + crate_path.join("src").join(&module_name) }; let filename_stem = obj.snake_case_name(); @@ -101,7 +101,10 @@ impl RustCodeGenerator { let filepath = module_path.join(filename); - let code = generate_object_file(reporter, objects, arrow_registry, obj); + let mut code = generate_object_file(reporter, objects, arrow_registry, obj); + if crate_name == "re_types_core" { + code = code.replace("::re_types_core", "crate"); + } all_modules.insert(( crate_name, @@ -112,10 +115,12 @@ impl RustCodeGenerator { files_to_write.insert(filepath, code); } - for (_crate_name, _module_name, is_testing, module_path) in all_modules { + for (crate_name, module_name, is_testing, module_path) in all_modules { let relevant_objs = &ordered_objects .iter() .filter(|obj| obj.is_testing() == is_testing) + .filter(|obj| obj.crate_name() == crate_name) + .filter(|obj| obj.module_name() == module_name) .copied() .collect_vec(); @@ -149,6 +154,7 @@ fn generate_object_file( code.push_str("#![allow(clippy::too_many_arguments)]\n"); code.push_str("#![allow(clippy::too_many_lines)]\n"); code.push_str("#![allow(clippy::unnecessary_cast)]\n"); + code.push_str("\nuse ::re_types_core::external::arrow2;\n"); let mut acc = TokenStream::new(); @@ -698,12 +704,14 @@ fn quote_trait_impls_from_obj( quote! { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] - fn from_arrow(arrow_data: &dyn ::arrow2::array::Array) -> ::re_types_core::DeserializationResult> + fn from_arrow( + arrow_data: &dyn arrow2::array::Array, + ) -> ::re_types_core::DeserializationResult> where Self: Sized { re_tracing::profile_function!(); - use ::arrow2::{datatypes::*, array::*, buffer::*}; + use arrow2::{datatypes::*, array::*, buffer::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; // This code-path cannot have null fields. If it does have a validity mask @@ -735,7 +743,7 @@ fn quote_trait_impls_from_obj( #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; #datatype } @@ -743,13 +751,13 @@ fn quote_trait_impls_from_obj( #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a { re_tracing::profile_function!(); - use ::arrow2::{datatypes::*, array::*}; + use arrow2::{datatypes::*, array::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; Ok(#quoted_serializer) @@ -758,14 +766,14 @@ fn quote_trait_impls_from_obj( // NOTE: Don't inline this, this gets _huge_. #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized { re_tracing::profile_function!(); - use ::arrow2::{datatypes::*, array::*, buffer::*}; + use arrow2::{datatypes::*, array::*, buffer::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; Ok(#quoted_deserializer) @@ -978,7 +986,10 @@ fn quote_trait_impls_from_obj( #[inline] fn from_arrow( - arrow_data: impl IntoIterator)>, + arrow_data: impl IntoIterator, + )>, ) -> ::re_types_core::DeserializationResult { re_tracing::profile_function!(); diff --git a/crates/re_types_builder/src/codegen/rust/deserializer.rs b/crates/re_types_builder/src/codegen/rust/deserializer.rs index 9ccb31d3b62e..e707107b5264 100644 --- a/crates/re_types_builder/src/codegen/rust/deserializer.rs +++ b/crates/re_types_builder/src/codegen/rust/deserializer.rs @@ -168,7 +168,7 @@ pub fn quote_arrow_deserializer( }); let quoted_downcast = { - let cast_as = quote!(::arrow2::array::StructArray); + let cast_as = quote!(arrow2::array::StructArray); quote_array_downcast(obj_fqname, &data_src, cast_as, datatype) }; quote! {{ @@ -286,7 +286,7 @@ pub fn quote_arrow_deserializer( }); let quoted_downcast = { - let cast_as = quote!(::arrow2::array::UnionArray); + let cast_as = quote!(arrow2::array::UnionArray); quote_array_downcast(obj_fqname, &data_src, &cast_as, datatype) }; @@ -421,7 +421,7 @@ fn quote_arrow_field_deserializer( DataType::Utf8 => { let quoted_downcast = { - let cast_as = quote!(::arrow2::array::Utf8Array); + let cast_as = quote!(arrow2::array::Utf8Array); quote_array_downcast(obj_field_fqname, data_src, cast_as, datatype) }; @@ -486,7 +486,7 @@ fn quote_arrow_field_deserializer( ); let quoted_downcast = { - let cast_as = quote!(::arrow2::array::FixedSizeListArray); + let cast_as = quote!(arrow2::array::FixedSizeListArray); quote_array_downcast(obj_field_fqname, data_src, cast_as, datatype) }; @@ -597,7 +597,7 @@ fn quote_arrow_field_deserializer( ); let quoted_downcast = { - let cast_as = quote!(::arrow2::array::ListArray); + let cast_as = quote!(arrow2::array::ListArray); quote_array_downcast(obj_field_fqname, data_src, cast_as, datatype) }; @@ -954,7 +954,7 @@ fn quote_arrow_field_deserializer_buffer_slice( ); let quoted_downcast = { - let cast_as = quote!(::arrow2::array::FixedSizeListArray); + let cast_as = quote!(arrow2::array::FixedSizeListArray); quote_array_downcast(obj_field_fqname, data_src, cast_as, datatype) }; diff --git a/crates/re_types_builder/src/codegen/rust/serializer.rs b/crates/re_types_builder/src/codegen/rust/serializer.rs index fc1f74df82fb..1ac20d506af8 100644 --- a/crates/re_types_builder/src/codegen/rust/serializer.rs +++ b/crates/re_types_builder/src/codegen/rust/serializer.rs @@ -40,7 +40,7 @@ pub fn quote_arrow_serializer( let quoted_bitmap = |var| { quote! { - let #var: Option<::arrow2::bitmap::Bitmap> = { + let #var: Option = { // NOTE: Don't compute a bitmap if there isn't at least one null element. let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) @@ -475,9 +475,10 @@ fn quote_arrow_field_serializer( quote! {{ // NOTE: Flattening to remove the guaranteed layer of nullability: we don't care // about it while building the backing buffer since it's all offsets driven. - let inner_data: ::arrow2::buffer::Buffer = #data_src.iter().flatten() #quoted_transparent_mapping.collect(); + let inner_data: arrow2::buffer::Buffer = + #data_src.iter().flatten() #quoted_transparent_mapping.collect(); - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( #data_src.iter().map(|opt| opt.as_ref() #quoted_transparent_length ) ).unwrap().into(); @@ -574,7 +575,7 @@ fn quote_arrow_field_serializer( let quoted_create = if let DataType::List(_) = datatype { quote! { - let offsets = ::arrow2::offset::Offsets::::try_from_lengths( + let offsets = arrow2::offset::Offsets::::try_from_lengths( #data_src.iter().map(|opt| opt.as_ref().map(|datum| datum. #quoted_num_instances).unwrap_or_default()) ).unwrap().into(); @@ -606,7 +607,7 @@ fn quote_arrow_field_serializer( let quoted_inner_bitmap = if let DataType::FixedSizeList(_, count) = datatype.to_logical_type() { quote! { - let #quoted_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = + let #quoted_inner_bitmap: Option = #bitmap_src.as_ref().map(|bitmap| { bitmap .iter() @@ -619,7 +620,7 @@ fn quote_arrow_field_serializer( } else { // TODO(cmc): We don't support intra-list nullability in our IDL at the moment. quote! { - let #quoted_inner_bitmap: Option<::arrow2::bitmap::Bitmap> = None; + let #quoted_inner_bitmap: Option = None; } }; diff --git a/crates/re_types_builder/src/lib.rs b/crates/re_types_builder/src/lib.rs index bfc018af3350..2afb21a26144 100644 --- a/crates/re_types_builder/src/lib.rs +++ b/crates/re_types_builder/src/lib.rs @@ -166,9 +166,10 @@ pub const ATTR_PYTHON_ARRAY_ALIASES: &str = "attr.python.array_aliases"; pub const ATTR_RUST_CUSTOM_CLAUSE: &str = "attr.rust.custom_clause"; pub const ATTR_RUST_DERIVE: &str = "attr.rust.derive"; pub const ATTR_RUST_DERIVE_ONLY: &str = "attr.rust.derive_only"; +pub const ATTR_RUST_NEW_PUB_CRATE: &str = "attr.rust.new_pub_crate"; +pub const ATTR_RUST_OVERRIDE_CRATE: &str = "attr.rust.override_crate"; pub const ATTR_RUST_REPR: &str = "attr.rust.repr"; pub const ATTR_RUST_TUPLE_STRUCT: &str = "attr.rust.tuple_struct"; -pub const ATTR_RUST_NEW_PUB_CRATE: &str = "attr.rust.new_pub_crate"; pub const ATTR_CPP_NO_FIELD_CTORS: &str = "attr.cpp.no_field_ctors"; diff --git a/crates/re_types_builder/src/objects.rs b/crates/re_types_builder/src/objects.rs index b4bdffe561c7..97c858a9926e 100644 --- a/crates/re_types_builder/src/objects.rs +++ b/crates/re_types_builder/src/objects.rs @@ -668,6 +668,19 @@ impl Object { pub fn is_testing(&self) -> bool { is_testing_fqname(&self.fqname) } + + /// Returns the crate name of an object, accounting for overrides. + pub fn crate_name(&self) -> String { + self.try_get_attr::(crate::ATTR_RUST_OVERRIDE_CRATE) + .unwrap_or_else(|| "re_types".to_owned()) + } + + /// Returns the module name of an object. + // + // NOTE: Might want a module override at some point. + pub fn module_name(&self) -> String { + self.kind.plural_snake_case().to_owned() + } } pub fn is_testing_fqname(fqname: &str) -> bool { diff --git a/crates/re_types_core/Cargo.toml b/crates/re_types_core/Cargo.toml index 24cda58479fa..81d6a1447cbb 100644 --- a/crates/re_types_core/Cargo.toml +++ b/crates/re_types_core/Cargo.toml @@ -39,6 +39,7 @@ arrow2 = { workspace = true, features = [ ] } backtrace.workspace = true document-features.workspace = true +once_cell.workspace = true smallvec.workspace = true thiserror.workspace = true diff --git a/crates/re_types_core/src/archetypes/.gitattributes b/crates/re_types_core/src/archetypes/.gitattributes new file mode 100644 index 000000000000..e4b7d1b74892 --- /dev/null +++ b/crates/re_types_core/src/archetypes/.gitattributes @@ -0,0 +1,5 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +clear.rs linguist-generated=true +mod.rs linguist-generated=true diff --git a/crates/re_types/src/archetypes/clear.rs b/crates/re_types_core/src/archetypes/clear.rs similarity index 74% rename from crates/re_types/src/archetypes/clear.rs rename to crates/re_types_core/src/archetypes/clear.rs index 49abfdc9fd57..4652c456d84d 100644 --- a/crates/re_types/src/archetypes/clear.rs +++ b/crates/re_types_core/src/archetypes/clear.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use crate::external::arrow2; + /// **Archetype**: Empties all the components of an entity. /// /// ## Example @@ -66,16 +68,16 @@ pub struct Clear { pub is_recursive: crate::components::ClearIsRecursive, } -static REQUIRED_COMPONENTS: once_cell::sync::Lazy<[::re_types_core::ComponentName; 1usize]> = +static REQUIRED_COMPONENTS: once_cell::sync::Lazy<[crate::ComponentName; 1usize]> = once_cell::sync::Lazy::new(|| ["rerun.components.ClearIsRecursive".into()]); -static RECOMMENDED_COMPONENTS: once_cell::sync::Lazy<[::re_types_core::ComponentName; 1usize]> = +static RECOMMENDED_COMPONENTS: once_cell::sync::Lazy<[crate::ComponentName; 1usize]> = once_cell::sync::Lazy::new(|| ["rerun.components.ClearIndicator".into()]); -static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[::re_types_core::ComponentName; 1usize]> = +static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[crate::ComponentName; 1usize]> = once_cell::sync::Lazy::new(|| ["rerun.components.InstanceKey".into()]); -static ALL_COMPONENTS: once_cell::sync::Lazy<[::re_types_core::ComponentName; 3usize]> = +static ALL_COMPONENTS: once_cell::sync::Lazy<[crate::ComponentName; 3usize]> = once_cell::sync::Lazy::new(|| { [ "rerun.components.ClearIsRecursive".into(), @@ -88,51 +90,49 @@ impl Clear { pub const NUM_COMPONENTS: usize = 3usize; } -/// Indicator component for the [`Clear`] [`::re_types_core::Archetype`] -pub type ClearIndicator = ::re_types_core::GenericIndicatorComponent; +/// Indicator component for the [`Clear`] [`crate::Archetype`] +pub type ClearIndicator = crate::GenericIndicatorComponent; -impl ::re_types_core::Archetype for Clear { +impl crate::Archetype for Clear { type Indicator = ClearIndicator; #[inline] - fn name() -> ::re_types_core::ArchetypeName { + fn name() -> crate::ArchetypeName { "rerun.archetypes.Clear".into() } #[inline] - fn indicator() -> ::re_types_core::MaybeOwnedComponentBatch<'static> { + fn indicator() -> crate::MaybeOwnedComponentBatch<'static> { static INDICATOR: ClearIndicator = ClearIndicator::DEFAULT; - ::re_types_core::MaybeOwnedComponentBatch::Ref(&INDICATOR) + crate::MaybeOwnedComponentBatch::Ref(&INDICATOR) } #[inline] - fn required_components() -> ::std::borrow::Cow<'static, [::re_types_core::ComponentName]> { + fn required_components() -> ::std::borrow::Cow<'static, [crate::ComponentName]> { REQUIRED_COMPONENTS.as_slice().into() } #[inline] - fn recommended_components() -> ::std::borrow::Cow<'static, [::re_types_core::ComponentName]> { + fn recommended_components() -> ::std::borrow::Cow<'static, [crate::ComponentName]> { RECOMMENDED_COMPONENTS.as_slice().into() } #[inline] - fn optional_components() -> ::std::borrow::Cow<'static, [::re_types_core::ComponentName]> { + fn optional_components() -> ::std::borrow::Cow<'static, [crate::ComponentName]> { OPTIONAL_COMPONENTS.as_slice().into() } #[inline] - fn all_components() -> ::std::borrow::Cow<'static, [::re_types_core::ComponentName]> { + fn all_components() -> ::std::borrow::Cow<'static, [crate::ComponentName]> { ALL_COMPONENTS.as_slice().into() } #[inline] fn from_arrow( - arrow_data: impl IntoIterator< - Item = (::arrow2::datatypes::Field, Box), - >, - ) -> ::re_types_core::DeserializationResult { + arrow_data: impl IntoIterator)>, + ) -> crate::DeserializationResult { re_tracing::profile_function!(); - use ::re_types_core::{Loggable as _, ResultExt as _}; + use crate::{Loggable as _, ResultExt as _}; let arrays_by_name: ::std::collections::HashMap<_, _> = arrow_data .into_iter() .map(|(field, array)| (field.name, array)) @@ -140,27 +140,27 @@ impl ::re_types_core::Archetype for Clear { let is_recursive = { let array = arrays_by_name .get("rerun.components.ClearIsRecursive") - .ok_or_else(::re_types_core::DeserializationError::missing_data) + .ok_or_else(crate::DeserializationError::missing_data) .with_context("rerun.archetypes.Clear#is_recursive")?; ::from_arrow_opt(&**array) .with_context("rerun.archetypes.Clear#is_recursive")? .into_iter() .next() .flatten() - .ok_or_else(::re_types_core::DeserializationError::missing_data) + .ok_or_else(crate::DeserializationError::missing_data) .with_context("rerun.archetypes.Clear#is_recursive")? }; Ok(Self { is_recursive }) } } -impl ::re_types_core::AsComponents for Clear { - fn as_component_batches(&self) -> Vec<::re_types_core::MaybeOwnedComponentBatch<'_>> { +impl crate::AsComponents for Clear { + fn as_component_batches(&self) -> Vec> { re_tracing::profile_function!(); - use ::re_types_core::Archetype as _; + use crate::Archetype as _; [ Some(Self::indicator()), - Some((&self.is_recursive as &dyn ::re_types_core::ComponentBatch).into()), + Some((&self.is_recursive as &dyn crate::ComponentBatch).into()), ] .into_iter() .flatten() diff --git a/crates/re_types/src/archetypes/clear_ext.rs b/crates/re_types_core/src/archetypes/clear_ext.rs similarity index 100% rename from crates/re_types/src/archetypes/clear_ext.rs rename to crates/re_types_core/src/archetypes/clear_ext.rs diff --git a/crates/re_types_core/src/archetypes/mod.rs b/crates/re_types_core/src/archetypes/mod.rs new file mode 100644 index 000000000000..ef1ac6dfcf7b --- /dev/null +++ b/crates/re_types_core/src/archetypes/mod.rs @@ -0,0 +1,6 @@ +// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/rust/api.rs + +mod clear; +mod clear_ext; + +pub use self::clear::Clear; diff --git a/crates/re_types_core/src/components/.gitattributes b/crates/re_types_core/src/components/.gitattributes new file mode 100644 index 000000000000..065fde3b74b8 --- /dev/null +++ b/crates/re_types_core/src/components/.gitattributes @@ -0,0 +1,6 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +clear_is_recursive.rs linguist-generated=true +instance_key.rs linguist-generated=true +mod.rs linguist-generated=true diff --git a/crates/re_types/src/components/clear_is_recursive.rs b/crates/re_types_core/src/components/clear_is_recursive.rs similarity index 80% rename from crates/re_types/src/components/clear_is_recursive.rs rename to crates/re_types_core/src/components/clear_is_recursive.rs index 2c4d5f2d6cbc..093b97ea5bb6 100644 --- a/crates/re_types/src/components/clear_is_recursive.rs +++ b/crates/re_types_core/src/components/clear_is_recursive.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use crate::external::arrow2; + /// **Component**: Configures how a clear operation should behave - recursive or not? #[derive(Clone, Debug, Copy, PartialEq, Eq)] pub struct ClearIsRecursive( @@ -49,8 +51,8 @@ impl<'a> From<&'a ClearIsRecursive> for ::std::borrow::Cow<'a, ClearIsRecursive> } } -impl ::re_types_core::Loggable for ClearIsRecursive { - type Name = ::re_types_core::ComponentName; +impl crate::Loggable for ClearIsRecursive { + type Name = crate::ComponentName; #[inline] fn name() -> Self::Name { @@ -60,20 +62,20 @@ impl ::re_types_core::Loggable for ClearIsRecursive { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Boolean } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> crate::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; - use ::re_types_core::{Loggable as _, ResultExt as _}; + use crate::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -86,7 +88,7 @@ impl ::re_types_core::Loggable for ClearIsRecursive { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -101,28 +103,28 @@ impl ::re_types_core::Loggable for ClearIsRecursive { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, - ) -> ::re_types_core::DeserializationResult>> + arrow_data: &dyn arrow2::array::Array, + ) -> crate::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; - use ::re_types_core::{Loggable as _, ResultExt as _}; + use crate::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - ::re_types_core::DeserializationError::datatype_mismatch( + crate::DeserializationError::datatype_mismatch( DataType::Boolean, arrow_data.data_type().clone(), ) }) .with_context("rerun.components.ClearIsRecursive#recursive")? .into_iter() - .map(|v| v.ok_or_else(::re_types_core::DeserializationError::missing_data)) + .map(|v| v.ok_or_else(crate::DeserializationError::missing_data)) .map(|res| res.map(|v| Some(Self(v)))) - .collect::<::re_types_core::DeserializationResult>>>() + .collect::>>>() .with_context("rerun.components.ClearIsRecursive#recursive") .with_context("rerun.components.ClearIsRecursive")?) } diff --git a/crates/re_types/src/components/instance_key.rs b/crates/re_types_core/src/components/instance_key.rs similarity index 77% rename from crates/re_types/src/components/instance_key.rs rename to crates/re_types_core/src/components/instance_key.rs index ef5d7881df14..66a41ea0d9ed 100644 --- a/crates/re_types/src/components/instance_key.rs +++ b/crates/re_types_core/src/components/instance_key.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use crate::external::arrow2; + /// **Component**: A unique numeric identifier for each individual instance within a batch. #[derive(Clone, Debug, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)] #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] @@ -47,8 +49,8 @@ impl<'a> From<&'a InstanceKey> for ::std::borrow::Cow<'a, InstanceKey> { } } -impl ::re_types_core::Loggable for InstanceKey { - type Name = ::re_types_core::ComponentName; +impl crate::Loggable for InstanceKey { + type Name = crate::ComponentName; #[inline] fn name() -> Self::Name { @@ -58,20 +60,20 @@ impl ::re_types_core::Loggable for InstanceKey { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::UInt64 } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> crate::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; - use ::re_types_core::{Loggable as _, ResultExt as _}; + use crate::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -84,7 +86,7 @@ impl ::re_types_core::Loggable for InstanceKey { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -99,19 +101,19 @@ impl ::re_types_core::Loggable for InstanceKey { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, - ) -> ::re_types_core::DeserializationResult>> + arrow_data: &dyn arrow2::array::Array, + ) -> crate::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; - use ::re_types_core::{Loggable as _, ResultExt as _}; + use crate::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() .ok_or_else(|| { - ::re_types_core::DeserializationError::datatype_mismatch( + crate::DeserializationError::datatype_mismatch( DataType::UInt64, arrow_data.data_type().clone(), ) @@ -119,27 +121,25 @@ impl ::re_types_core::Loggable for InstanceKey { .with_context("rerun.components.InstanceKey#value")? .into_iter() .map(|opt| opt.copied()) - .map(|v| v.ok_or_else(::re_types_core::DeserializationError::missing_data)) + .map(|v| v.ok_or_else(crate::DeserializationError::missing_data)) .map(|res| res.map(|v| Some(Self(v)))) - .collect::<::re_types_core::DeserializationResult>>>() + .collect::>>>() .with_context("rerun.components.InstanceKey#value") .with_context("rerun.components.InstanceKey")?) } #[allow(unused_imports, clippy::wildcard_imports)] #[inline] - fn from_arrow( - arrow_data: &dyn ::arrow2::array::Array, - ) -> ::re_types_core::DeserializationResult> + fn from_arrow(arrow_data: &dyn arrow2::array::Array) -> crate::DeserializationResult> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; - use ::re_types_core::{Loggable as _, ResultExt as _}; + use crate::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; if let Some(validity) = arrow_data.validity() { if validity.unset_bits() != 0 { - return Err(::re_types_core::DeserializationError::missing_data()); + return Err(crate::DeserializationError::missing_data()); } } Ok({ @@ -147,7 +147,7 @@ impl ::re_types_core::Loggable for InstanceKey { .as_any() .downcast_ref::() .ok_or_else(|| { - ::re_types_core::DeserializationError::datatype_mismatch( + crate::DeserializationError::datatype_mismatch( DataType::UInt64, arrow_data.data_type().clone(), ) diff --git a/crates/re_types/src/components/instance_key_ext.rs b/crates/re_types_core/src/components/instance_key_ext.rs similarity index 100% rename from crates/re_types/src/components/instance_key_ext.rs rename to crates/re_types_core/src/components/instance_key_ext.rs diff --git a/crates/re_types_core/src/components/mod.rs b/crates/re_types_core/src/components/mod.rs new file mode 100644 index 000000000000..46881138cdd7 --- /dev/null +++ b/crates/re_types_core/src/components/mod.rs @@ -0,0 +1,8 @@ +// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/rust/api.rs + +mod clear_is_recursive; +mod instance_key; +mod instance_key_ext; + +pub use self::clear_is_recursive::ClearIsRecursive; +pub use self::instance_key::InstanceKey; diff --git a/crates/re_types_core/src/lib.rs b/crates/re_types_core/src/lib.rs index 1000809a9338..32e7c8ae3a2b 100644 --- a/crates/re_types_core/src/lib.rs +++ b/crates/re_types_core/src/lib.rs @@ -104,6 +104,18 @@ pub use self::result::{ }; pub use self::size_bytes::SizeBytes; +/// Fundamental [`Archetype`]s that are implemented in `re_types_core` directly for convenience and +/// dependency optimization. +/// +/// There are also re-exported by `re_types`. +pub mod archetypes; + +/// Fundamental [`Component`]s that are implemented in `re_types_core` directly for convenience and +/// dependency optimization. +/// +/// There are also re-exported by `re_types`. +pub mod components; + // --- mod arrow_buffer; diff --git a/crates/re_viewer/Cargo.toml b/crates/re_viewer/Cargo.toml index 05515ab455c5..03ac037eb107 100644 --- a/crates/re_viewer/Cargo.toml +++ b/crates/re_viewer/Cargo.toml @@ -59,6 +59,7 @@ re_space_view_text_log.workspace = true re_space_view_time_series.workspace = true re_time_panel.workspace = true re_tracing = { workspace = true, features = ["server"] } +re_types_core.workspace = true re_types.workspace = true re_ui = { workspace = true, features = ["eframe"] } re_viewer_context.workspace = true diff --git a/crates/re_viewer/src/app_blueprint.rs b/crates/re_viewer/src/app_blueprint.rs index 04598676c8e1..ab529f208c90 100644 --- a/crates/re_viewer/src/app_blueprint.rs +++ b/crates/re_viewer/src/app_blueprint.rs @@ -1,6 +1,6 @@ +use crate::blueprint::PanelView; use re_data_store::StoreDb; use re_log_types::{DataRow, EntityPath, RowId, TimePoint}; -use re_types::blueprint::PanelView; use re_viewer_context::{CommandSender, StoreContext, SystemCommand, SystemCommandSender}; /// Blueprint for top-level application diff --git a/crates/re_viewer/src/blueprint/.gitattributes b/crates/re_viewer/src/blueprint/.gitattributes new file mode 100644 index 000000000000..45c858ca5099 --- /dev/null +++ b/crates/re_viewer/src/blueprint/.gitattributes @@ -0,0 +1,5 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +mod.rs linguist-generated=true +panel_view.rs linguist-generated=true diff --git a/crates/re_types/src/blueprint/mod.rs b/crates/re_viewer/src/blueprint/mod.rs similarity index 70% rename from crates/re_types/src/blueprint/mod.rs rename to crates/re_viewer/src/blueprint/mod.rs index d0c8b63510c9..709b135a99b6 100644 --- a/crates/re_types/src/blueprint/mod.rs +++ b/crates/re_viewer/src/blueprint/mod.rs @@ -1,8 +1,6 @@ // DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/rust/api.rs -mod auto_space_views; mod panel_view; mod panel_view_ext; -pub use self::auto_space_views::AutoSpaceViews; pub use self::panel_view::PanelView; diff --git a/crates/re_types/src/blueprint/panel_view.rs b/crates/re_viewer/src/blueprint/panel_view.rs similarity index 93% rename from crates/re_types/src/blueprint/panel_view.rs rename to crates/re_viewer/src/blueprint/panel_view.rs index 9bbde6174018..5a7f4648ff1a 100644 --- a/crates/re_types/src/blueprint/panel_view.rs +++ b/crates/re_viewer/src/blueprint/panel_view.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Blueprint**: The state of the panels. /// /// Unstable. Used for the ongoing blueprint experimentations. @@ -61,7 +63,7 @@ impl ::re_types_core::Loggable for PanelView { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Struct(vec![Field { name: "is_expanded".to_owned(), data_type: DataType::Boolean, @@ -73,13 +75,13 @@ impl ::re_types_core::Loggable for PanelView { #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data): (Vec<_>, Vec<_>) = data .into_iter() @@ -88,7 +90,7 @@ impl ::re_types_core::Loggable for PanelView { (datum.is_some(), datum) }) .unzip(); - let bitmap: Option<::arrow2::bitmap::Bitmap> = { + let bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -105,7 +107,7 @@ impl ::re_types_core::Loggable for PanelView { (datum.is_some(), datum) }) .unzip(); - let is_expanded_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let is_expanded_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -127,18 +129,18 @@ impl ::re_types_core::Loggable for PanelView { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok({ let arrow_data = arrow_data .as_any() - .downcast_ref::<::arrow2::array::StructArray>() + .downcast_ref::() .ok_or_else(|| { ::re_types_core::DeserializationError::datatype_mismatch( DataType::Struct(vec![Field { diff --git a/crates/re_types/src/blueprint/panel_view_ext.rs b/crates/re_viewer/src/blueprint/panel_view_ext.rs similarity index 100% rename from crates/re_types/src/blueprint/panel_view_ext.rs rename to crates/re_viewer/src/blueprint/panel_view_ext.rs diff --git a/crates/re_viewer/src/lib.rs b/crates/re_viewer/src/lib.rs index 948a0d3151c0..f0ad7dca4aac 100644 --- a/crates/re_viewer/src/lib.rs +++ b/crates/re_viewer/src/lib.rs @@ -16,6 +16,13 @@ mod store_hub; mod ui; mod viewer_analytics; +/// Auto-generated blueprint-related types. +/// +/// They all implement the [`re_types_core::Component`] trait. +/// +/// Unstable. Used for the ongoing blueprint experimentations. +pub mod blueprint; + pub(crate) use { app_state::AppState, ui::{memory_panel, selection_panel}, diff --git a/crates/re_viewport/Cargo.toml b/crates/re_viewport/Cargo.toml index 56abe4473aa2..56eaaaab5787 100644 --- a/crates/re_viewport/Cargo.toml +++ b/crates/re_viewport/Cargo.toml @@ -28,6 +28,7 @@ re_renderer = { workspace = true, default-features = false, features = [ "serde", ] } re_tracing.workspace = true +re_types_core.workspace = true re_types.workspace = true re_ui.workspace = true re_viewer_context.workspace = true diff --git a/crates/re_types/src/blueprint/.gitattributes b/crates/re_viewport/src/blueprint/.gitattributes similarity index 83% rename from crates/re_types/src/blueprint/.gitattributes rename to crates/re_viewport/src/blueprint/.gitattributes index b46991b3b487..ca076dd39f48 100644 --- a/crates/re_types/src/blueprint/.gitattributes +++ b/crates/re_viewport/src/blueprint/.gitattributes @@ -3,4 +3,3 @@ .gitattributes linguist-generated=true auto_space_views.rs linguist-generated=true mod.rs linguist-generated=true -panel_view.rs linguist-generated=true diff --git a/crates/re_types/src/blueprint/auto_space_views.rs b/crates/re_viewport/src/blueprint/auto_space_views.rs similarity index 91% rename from crates/re_types/src/blueprint/auto_space_views.rs rename to crates/re_viewport/src/blueprint/auto_space_views.rs index d8827ef7461e..7a18beecf155 100644 --- a/crates/re_types/src/blueprint/auto_space_views.rs +++ b/crates/re_viewport/src/blueprint/auto_space_views.rs @@ -14,6 +14,8 @@ #![allow(clippy::too_many_lines)] #![allow(clippy::unnecessary_cast)] +use ::re_types_core::external::arrow2; + /// **Blueprint**: A flag indicating space views should be automatically populated. /// /// Unstable. Used for the ongoing blueprint experimentations. @@ -60,20 +62,20 @@ impl ::re_types_core::Loggable for AutoSpaceViews { #[allow(unused_imports, clippy::wildcard_imports)] #[inline] fn arrow_datatype() -> arrow2::datatypes::DataType { - use ::arrow2::datatypes::*; + use arrow2::datatypes::*; DataType::Boolean } #[allow(unused_imports, clippy::wildcard_imports)] fn to_arrow_opt<'a>( data: impl IntoIterator>>>, - ) -> ::re_types_core::SerializationResult> + ) -> ::re_types_core::SerializationResult> where Self: Clone + 'a, { re_tracing::profile_function!(); - use ::arrow2::{array::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, datatypes::*}; Ok({ let (somes, data0): (Vec<_>, Vec<_>) = data .into_iter() @@ -86,7 +88,7 @@ impl ::re_types_core::Loggable for AutoSpaceViews { (datum.is_some(), datum) }) .unzip(); - let data0_bitmap: Option<::arrow2::bitmap::Bitmap> = { + let data0_bitmap: Option = { let any_nones = somes.iter().any(|some| !*some); any_nones.then(|| somes.into()) }; @@ -101,14 +103,14 @@ impl ::re_types_core::Loggable for AutoSpaceViews { #[allow(unused_imports, clippy::wildcard_imports)] fn from_arrow_opt( - arrow_data: &dyn ::arrow2::array::Array, + arrow_data: &dyn arrow2::array::Array, ) -> ::re_types_core::DeserializationResult>> where Self: Sized, { re_tracing::profile_function!(); - use ::arrow2::{array::*, buffer::*, datatypes::*}; use ::re_types_core::{Loggable as _, ResultExt as _}; + use arrow2::{array::*, buffer::*, datatypes::*}; Ok(arrow_data .as_any() .downcast_ref::() diff --git a/crates/re_viewport/src/blueprint/mod.rs b/crates/re_viewport/src/blueprint/mod.rs new file mode 100644 index 000000000000..498d67ee8c94 --- /dev/null +++ b/crates/re_viewport/src/blueprint/mod.rs @@ -0,0 +1,5 @@ +// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/rust/api.rs + +mod auto_space_views; + +pub use self::auto_space_views::AutoSpaceViews; diff --git a/crates/re_viewport/src/lib.rs b/crates/re_viewport/src/lib.rs index b41ae8ad80cf..a2327b2ac23a 100644 --- a/crates/re_viewport/src/lib.rs +++ b/crates/re_viewport/src/lib.rs @@ -12,7 +12,13 @@ mod viewport; mod viewport_blueprint; mod viewport_blueprint_ui; -pub mod blueprint_components; +/// Auto-generated blueprint-related types. +/// +/// They all implement the [`re_types_core::Component`] trait. +/// +/// Unstable. Used for the ongoing blueprint experimentations. +pub mod blueprint; +pub mod blueprint_components; // NOTE: will be merged into `mod blueprint` soon pub use space_info::SpaceInfoCollection; pub use space_view::SpaceViewBlueprint; diff --git a/crates/re_viewport/src/viewport_blueprint.rs b/crates/re_viewport/src/viewport_blueprint.rs index 9592380625c7..905b055f1fc0 100644 --- a/crates/re_viewport/src/viewport_blueprint.rs +++ b/crates/re_viewport/src/viewport_blueprint.rs @@ -5,13 +5,14 @@ use arrow2_convert::field::ArrowField; use re_data_store::{EntityPath, StoreDb}; use re_log_types::{DataCell, DataRow, RowId, TimePoint}; -use re_types::{blueprint::AutoSpaceViews, Loggable as _}; +use re_types::Loggable as _; use re_viewer_context::{ CommandSender, Item, SpaceViewClassName, SpaceViewId, SystemCommand, SystemCommandSender, ViewerContext, }; use crate::{ + blueprint::AutoSpaceViews, blueprint_components::{SpaceViewComponent, SpaceViewMaximized, ViewportLayout, VIEWPORT_PATH}, space_info::SpaceInfoCollection, space_view::SpaceViewBlueprint, diff --git a/crates/rerun/src/lib.rs b/crates/rerun/src/lib.rs index ddae29ead8a0..b6b32007df77 100644 --- a/crates/rerun/src/lib.rs +++ b/crates/rerun/src/lib.rs @@ -125,6 +125,8 @@ pub mod external { #[cfg(feature = "native_viewer")] pub use re_viewer; + #[cfg(feature = "native_viewer")] + pub use re_viewer::external::*; #[cfg(feature = "sdk")] pub use re_sdk::external::*; diff --git a/rerun_cpp/.gitattributes b/rerun_cpp/.gitattributes new file mode 100644 index 000000000000..40c8a42770ad --- /dev/null +++ b/rerun_cpp/.gitattributes @@ -0,0 +1,257 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +src/rerun/archetypes/annotation_context.cpp linguist-generated=true +src/rerun/archetypes/annotation_context.hpp linguist-generated=true +src/rerun/archetypes/arrows3d.cpp linguist-generated=true +src/rerun/archetypes/arrows3d.hpp linguist-generated=true +src/rerun/archetypes/asset3d.cpp linguist-generated=true +src/rerun/archetypes/asset3d.hpp linguist-generated=true +src/rerun/archetypes/bar_chart.cpp linguist-generated=true +src/rerun/archetypes/bar_chart.hpp linguist-generated=true +src/rerun/archetypes/boxes2d.cpp linguist-generated=true +src/rerun/archetypes/boxes2d.hpp linguist-generated=true +src/rerun/archetypes/boxes3d.cpp linguist-generated=true +src/rerun/archetypes/boxes3d.hpp linguist-generated=true +src/rerun/archetypes/clear.cpp linguist-generated=true +src/rerun/archetypes/clear.hpp linguist-generated=true +src/rerun/archetypes/depth_image.cpp linguist-generated=true +src/rerun/archetypes/depth_image.hpp linguist-generated=true +src/rerun/archetypes/disconnected_space.cpp linguist-generated=true +src/rerun/archetypes/disconnected_space.hpp linguist-generated=true +src/rerun/archetypes/image.cpp linguist-generated=true +src/rerun/archetypes/image.hpp linguist-generated=true +src/rerun/archetypes/line_strips2d.cpp linguist-generated=true +src/rerun/archetypes/line_strips2d.hpp linguist-generated=true +src/rerun/archetypes/line_strips3d.cpp linguist-generated=true +src/rerun/archetypes/line_strips3d.hpp linguist-generated=true +src/rerun/archetypes/mesh3d.cpp linguist-generated=true +src/rerun/archetypes/mesh3d.hpp linguist-generated=true +src/rerun/archetypes/pinhole.cpp linguist-generated=true +src/rerun/archetypes/pinhole.hpp linguist-generated=true +src/rerun/archetypes/points2d.cpp linguist-generated=true +src/rerun/archetypes/points2d.hpp linguist-generated=true +src/rerun/archetypes/points3d.cpp linguist-generated=true +src/rerun/archetypes/points3d.hpp linguist-generated=true +src/rerun/archetypes/segmentation_image.cpp linguist-generated=true +src/rerun/archetypes/segmentation_image.hpp linguist-generated=true +src/rerun/archetypes/tensor.cpp linguist-generated=true +src/rerun/archetypes/tensor.hpp linguist-generated=true +src/rerun/archetypes/text_document.cpp linguist-generated=true +src/rerun/archetypes/text_document.hpp linguist-generated=true +src/rerun/archetypes/text_log.cpp linguist-generated=true +src/rerun/archetypes/text_log.hpp linguist-generated=true +src/rerun/archetypes/time_series_scalar.cpp linguist-generated=true +src/rerun/archetypes/time_series_scalar.hpp linguist-generated=true +src/rerun/archetypes/transform3d.cpp linguist-generated=true +src/rerun/archetypes/transform3d.hpp linguist-generated=true +src/rerun/archetypes/view_coordinates.cpp linguist-generated=true +src/rerun/archetypes/view_coordinates.hpp linguist-generated=true +src/rerun/archetypes.hpp linguist-generated=true +src/rerun/blueprint/auto_space_views.cpp linguist-generated=true +src/rerun/blueprint/auto_space_views.hpp linguist-generated=true +src/rerun/blueprint/panel_view.cpp linguist-generated=true +src/rerun/blueprint/panel_view.hpp linguist-generated=true +src/rerun/blueprint/space_view_component.cpp linguist-generated=true +src/rerun/blueprint/space_view_component.hpp linguist-generated=true +src/rerun/blueprint.hpp linguist-generated=true +src/rerun/components/annotation_context.cpp linguist-generated=true +src/rerun/components/annotation_context.hpp linguist-generated=true +src/rerun/components/blob.cpp linguist-generated=true +src/rerun/components/blob.hpp linguist-generated=true +src/rerun/components/class_id.cpp linguist-generated=true +src/rerun/components/class_id.hpp linguist-generated=true +src/rerun/components/clear_is_recursive.cpp linguist-generated=true +src/rerun/components/clear_is_recursive.hpp linguist-generated=true +src/rerun/components/color.cpp linguist-generated=true +src/rerun/components/color.hpp linguist-generated=true +src/rerun/components/depth_meter.cpp linguist-generated=true +src/rerun/components/depth_meter.hpp linguist-generated=true +src/rerun/components/disconnected_space.cpp linguist-generated=true +src/rerun/components/disconnected_space.hpp linguist-generated=true +src/rerun/components/draw_order.cpp linguist-generated=true +src/rerun/components/draw_order.hpp linguist-generated=true +src/rerun/components/half_sizes2d.cpp linguist-generated=true +src/rerun/components/half_sizes2d.hpp linguist-generated=true +src/rerun/components/half_sizes3d.cpp linguist-generated=true +src/rerun/components/half_sizes3d.hpp linguist-generated=true +src/rerun/components/instance_key.cpp linguist-generated=true +src/rerun/components/instance_key.hpp linguist-generated=true +src/rerun/components/keypoint_id.cpp linguist-generated=true +src/rerun/components/keypoint_id.hpp linguist-generated=true +src/rerun/components/line_strip2d.cpp linguist-generated=true +src/rerun/components/line_strip2d.hpp linguist-generated=true +src/rerun/components/line_strip3d.cpp linguist-generated=true +src/rerun/components/line_strip3d.hpp linguist-generated=true +src/rerun/components/material.cpp linguist-generated=true +src/rerun/components/material.hpp linguist-generated=true +src/rerun/components/media_type.cpp linguist-generated=true +src/rerun/components/media_type.hpp linguist-generated=true +src/rerun/components/mesh_properties.cpp linguist-generated=true +src/rerun/components/mesh_properties.hpp linguist-generated=true +src/rerun/components/out_of_tree_transform3d.cpp linguist-generated=true +src/rerun/components/out_of_tree_transform3d.hpp linguist-generated=true +src/rerun/components/pinhole_projection.cpp linguist-generated=true +src/rerun/components/pinhole_projection.hpp linguist-generated=true +src/rerun/components/position2d.cpp linguist-generated=true +src/rerun/components/position2d.hpp linguist-generated=true +src/rerun/components/position3d.cpp linguist-generated=true +src/rerun/components/position3d.hpp linguist-generated=true +src/rerun/components/radius.cpp linguist-generated=true +src/rerun/components/radius.hpp linguist-generated=true +src/rerun/components/resolution.cpp linguist-generated=true +src/rerun/components/resolution.hpp linguist-generated=true +src/rerun/components/rotation3d.cpp linguist-generated=true +src/rerun/components/rotation3d.hpp linguist-generated=true +src/rerun/components/scalar.cpp linguist-generated=true +src/rerun/components/scalar.hpp linguist-generated=true +src/rerun/components/scalar_scattering.cpp linguist-generated=true +src/rerun/components/scalar_scattering.hpp linguist-generated=true +src/rerun/components/tensor_data.cpp linguist-generated=true +src/rerun/components/tensor_data.hpp linguist-generated=true +src/rerun/components/text.cpp linguist-generated=true +src/rerun/components/text.hpp linguist-generated=true +src/rerun/components/text_log_level.cpp linguist-generated=true +src/rerun/components/text_log_level.hpp linguist-generated=true +src/rerun/components/transform3d.cpp linguist-generated=true +src/rerun/components/transform3d.hpp linguist-generated=true +src/rerun/components/vector3d.cpp linguist-generated=true +src/rerun/components/vector3d.hpp linguist-generated=true +src/rerun/components/view_coordinates.cpp linguist-generated=true +src/rerun/components/view_coordinates.hpp linguist-generated=true +src/rerun/components.hpp linguist-generated=true +src/rerun/datatypes/angle.cpp linguist-generated=true +src/rerun/datatypes/angle.hpp linguist-generated=true +src/rerun/datatypes/annotation_info.cpp linguist-generated=true +src/rerun/datatypes/annotation_info.hpp linguist-generated=true +src/rerun/datatypes/class_description.cpp linguist-generated=true +src/rerun/datatypes/class_description.hpp linguist-generated=true +src/rerun/datatypes/class_description_map_elem.cpp linguist-generated=true +src/rerun/datatypes/class_description_map_elem.hpp linguist-generated=true +src/rerun/datatypes/class_id.cpp linguist-generated=true +src/rerun/datatypes/class_id.hpp linguist-generated=true +src/rerun/datatypes/float32.cpp linguist-generated=true +src/rerun/datatypes/float32.hpp linguist-generated=true +src/rerun/datatypes/keypoint_id.cpp linguist-generated=true +src/rerun/datatypes/keypoint_id.hpp linguist-generated=true +src/rerun/datatypes/keypoint_pair.cpp linguist-generated=true +src/rerun/datatypes/keypoint_pair.hpp linguist-generated=true +src/rerun/datatypes/mat3x3.cpp linguist-generated=true +src/rerun/datatypes/mat3x3.hpp linguist-generated=true +src/rerun/datatypes/mat4x4.cpp linguist-generated=true +src/rerun/datatypes/mat4x4.hpp linguist-generated=true +src/rerun/datatypes/material.cpp linguist-generated=true +src/rerun/datatypes/material.hpp linguist-generated=true +src/rerun/datatypes/mesh_properties.cpp linguist-generated=true +src/rerun/datatypes/mesh_properties.hpp linguist-generated=true +src/rerun/datatypes/quaternion.cpp linguist-generated=true +src/rerun/datatypes/quaternion.hpp linguist-generated=true +src/rerun/datatypes/rgba32.cpp linguist-generated=true +src/rerun/datatypes/rgba32.hpp linguist-generated=true +src/rerun/datatypes/rotation3d.cpp linguist-generated=true +src/rerun/datatypes/rotation3d.hpp linguist-generated=true +src/rerun/datatypes/rotation_axis_angle.cpp linguist-generated=true +src/rerun/datatypes/rotation_axis_angle.hpp linguist-generated=true +src/rerun/datatypes/scale3d.cpp linguist-generated=true +src/rerun/datatypes/scale3d.hpp linguist-generated=true +src/rerun/datatypes/tensor_buffer.cpp linguist-generated=true +src/rerun/datatypes/tensor_buffer.hpp linguist-generated=true +src/rerun/datatypes/tensor_data.cpp linguist-generated=true +src/rerun/datatypes/tensor_data.hpp linguist-generated=true +src/rerun/datatypes/tensor_dimension.cpp linguist-generated=true +src/rerun/datatypes/tensor_dimension.hpp linguist-generated=true +src/rerun/datatypes/transform3d.cpp linguist-generated=true +src/rerun/datatypes/transform3d.hpp linguist-generated=true +src/rerun/datatypes/translation_and_mat3x3.cpp linguist-generated=true +src/rerun/datatypes/translation_and_mat3x3.hpp linguist-generated=true +src/rerun/datatypes/translation_rotation_scale3d.cpp linguist-generated=true +src/rerun/datatypes/translation_rotation_scale3d.hpp linguist-generated=true +src/rerun/datatypes/utf8.cpp linguist-generated=true +src/rerun/datatypes/utf8.hpp linguist-generated=true +src/rerun/datatypes/uvec2d.cpp linguist-generated=true +src/rerun/datatypes/uvec2d.hpp linguist-generated=true +src/rerun/datatypes/uvec3d.cpp linguist-generated=true +src/rerun/datatypes/uvec3d.hpp linguist-generated=true +src/rerun/datatypes/uvec4d.cpp linguist-generated=true +src/rerun/datatypes/uvec4d.hpp linguist-generated=true +src/rerun/datatypes/vec2d.cpp linguist-generated=true +src/rerun/datatypes/vec2d.hpp linguist-generated=true +src/rerun/datatypes/vec3d.cpp linguist-generated=true +src/rerun/datatypes/vec3d.hpp linguist-generated=true +src/rerun/datatypes/vec4d.cpp linguist-generated=true +src/rerun/datatypes/vec4d.hpp linguist-generated=true +src/rerun/datatypes.hpp linguist-generated=true +tests/generated/archetypes/affix_fuzzer1.cpp linguist-generated=true +tests/generated/archetypes/affix_fuzzer1.hpp linguist-generated=true +tests/generated/archetypes/affix_fuzzer2.cpp linguist-generated=true +tests/generated/archetypes/affix_fuzzer2.hpp linguist-generated=true +tests/generated/archetypes/affix_fuzzer3.cpp linguist-generated=true +tests/generated/archetypes/affix_fuzzer3.hpp linguist-generated=true +tests/generated/archetypes/affix_fuzzer4.cpp linguist-generated=true +tests/generated/archetypes/affix_fuzzer4.hpp linguist-generated=true +tests/generated/archetypes.hpp linguist-generated=true +tests/generated/blueprint.hpp linguist-generated=true +tests/generated/components/affix_fuzzer1.cpp linguist-generated=true +tests/generated/components/affix_fuzzer1.hpp linguist-generated=true +tests/generated/components/affix_fuzzer10.cpp linguist-generated=true +tests/generated/components/affix_fuzzer10.hpp linguist-generated=true +tests/generated/components/affix_fuzzer11.cpp linguist-generated=true +tests/generated/components/affix_fuzzer11.hpp linguist-generated=true +tests/generated/components/affix_fuzzer12.cpp linguist-generated=true +tests/generated/components/affix_fuzzer12.hpp linguist-generated=true +tests/generated/components/affix_fuzzer13.cpp linguist-generated=true +tests/generated/components/affix_fuzzer13.hpp linguist-generated=true +tests/generated/components/affix_fuzzer14.cpp linguist-generated=true +tests/generated/components/affix_fuzzer14.hpp linguist-generated=true +tests/generated/components/affix_fuzzer15.cpp linguist-generated=true +tests/generated/components/affix_fuzzer15.hpp linguist-generated=true +tests/generated/components/affix_fuzzer16.cpp linguist-generated=true +tests/generated/components/affix_fuzzer16.hpp linguist-generated=true +tests/generated/components/affix_fuzzer17.cpp linguist-generated=true +tests/generated/components/affix_fuzzer17.hpp linguist-generated=true +tests/generated/components/affix_fuzzer18.cpp linguist-generated=true +tests/generated/components/affix_fuzzer18.hpp linguist-generated=true +tests/generated/components/affix_fuzzer19.cpp linguist-generated=true +tests/generated/components/affix_fuzzer19.hpp linguist-generated=true +tests/generated/components/affix_fuzzer2.cpp linguist-generated=true +tests/generated/components/affix_fuzzer2.hpp linguist-generated=true +tests/generated/components/affix_fuzzer20.cpp linguist-generated=true +tests/generated/components/affix_fuzzer20.hpp linguist-generated=true +tests/generated/components/affix_fuzzer21.cpp linguist-generated=true +tests/generated/components/affix_fuzzer21.hpp linguist-generated=true +tests/generated/components/affix_fuzzer3.cpp linguist-generated=true +tests/generated/components/affix_fuzzer3.hpp linguist-generated=true +tests/generated/components/affix_fuzzer4.cpp linguist-generated=true +tests/generated/components/affix_fuzzer4.hpp linguist-generated=true +tests/generated/components/affix_fuzzer5.cpp linguist-generated=true +tests/generated/components/affix_fuzzer5.hpp linguist-generated=true +tests/generated/components/affix_fuzzer6.cpp linguist-generated=true +tests/generated/components/affix_fuzzer6.hpp linguist-generated=true +tests/generated/components/affix_fuzzer7.cpp linguist-generated=true +tests/generated/components/affix_fuzzer7.hpp linguist-generated=true +tests/generated/components/affix_fuzzer8.cpp linguist-generated=true +tests/generated/components/affix_fuzzer8.hpp linguist-generated=true +tests/generated/components/affix_fuzzer9.cpp linguist-generated=true +tests/generated/components/affix_fuzzer9.hpp linguist-generated=true +tests/generated/components.hpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer1.cpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer1.hpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer2.cpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer2.hpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer20.cpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer20.hpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer21.cpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer21.hpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer3.cpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer3.hpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer4.cpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer4.hpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer5.cpp linguist-generated=true +tests/generated/datatypes/affix_fuzzer5.hpp linguist-generated=true +tests/generated/datatypes/flattened_scalar.cpp linguist-generated=true +tests/generated/datatypes/flattened_scalar.hpp linguist-generated=true +tests/generated/datatypes/primitive_component.cpp linguist-generated=true +tests/generated/datatypes/primitive_component.hpp linguist-generated=true +tests/generated/datatypes/string_component.cpp linguist-generated=true +tests/generated/datatypes/string_component.hpp linguist-generated=true +tests/generated/datatypes.hpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/blueprint/space_view_component.cpp b/rerun_cpp/src/rerun/blueprint/space_view_component.cpp new file mode 100644 index 000000000000..33ec4276c481 --- /dev/null +++ b/rerun_cpp/src/rerun/blueprint/space_view_component.cpp @@ -0,0 +1,76 @@ +// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/cpp/mod.rs +// Based on "crates/re_types/definitions/rerun/blueprint/space_view.fbs". + +#include "space_view_component.hpp" + +#include +#include + +namespace rerun { + namespace blueprint { + const std::shared_ptr &SpaceViewComponent::arrow_datatype() { + static const auto datatype = arrow::struct_({ + arrow::field( + "space_view", + arrow::list(arrow::field("item", arrow::uint8(), false)), + false + ), + }); + return datatype; + } + + Result> SpaceViewComponent::new_arrow_array_builder( + arrow::MemoryPool *memory_pool + ) { + if (!memory_pool) { + return Error(ErrorCode::UnexpectedNullArgument, "Memory pool is null."); + } + + return Result(std::make_shared( + arrow_datatype(), + memory_pool, + std::vector>({ + std::make_shared( + memory_pool, + std::make_shared(memory_pool) + ), + }) + )); + } + + Error SpaceViewComponent::fill_arrow_array_builder( + arrow::StructBuilder *builder, const SpaceViewComponent *elements, size_t num_elements + ) { + if (!builder) { + return Error(ErrorCode::UnexpectedNullArgument, "Passed array builder is null."); + } + if (!elements) { + return Error( + ErrorCode::UnexpectedNullArgument, + "Cannot serialize null pointer to arrow array." + ); + } + + { + auto field_builder = static_cast(builder->field_builder(0)); + auto value_builder = + static_cast(field_builder->value_builder()); + ARROW_RETURN_NOT_OK(field_builder->Reserve(static_cast(num_elements))); + ARROW_RETURN_NOT_OK(value_builder->Reserve(static_cast(num_elements * 2))); + + for (size_t elem_idx = 0; elem_idx < num_elements; elem_idx += 1) { + const auto &element = elements[elem_idx]; + ARROW_RETURN_NOT_OK(field_builder->Append()); + ARROW_RETURN_NOT_OK(value_builder->AppendValues( + element.space_view.data(), + static_cast(element.space_view.size()), + nullptr + )); + } + } + ARROW_RETURN_NOT_OK(builder->AppendValues(static_cast(num_elements), nullptr)); + + return Error::ok(); + } + } // namespace blueprint +} // namespace rerun diff --git a/rerun_cpp/src/rerun/blueprint/space_view_component.hpp b/rerun_cpp/src/rerun/blueprint/space_view_component.hpp new file mode 100644 index 000000000000..10c80a12fa32 --- /dev/null +++ b/rerun_cpp/src/rerun/blueprint/space_view_component.hpp @@ -0,0 +1,53 @@ +// DO NOT EDIT! This file was auto-generated by crates/re_types_builder/src/codegen/cpp/mod.rs +// Based on "crates/re_types/definitions/rerun/blueprint/space_view.fbs". + +#pragma once + +#include "../result.hpp" + +#include +#include +#include +#include + +namespace arrow { + class DataType; + class MemoryPool; + class StructBuilder; +} // namespace arrow + +namespace rerun { + namespace blueprint { + /// **Blueprint**: A view of a space. + /// + /// Unstable. Used for the ongoing blueprint experimentations. + struct SpaceViewComponent { + std::vector space_view; + + public: + SpaceViewComponent() = default; + + SpaceViewComponent(std::vector _space_view) + : space_view(std::move(_space_view)) {} + + SpaceViewComponent& operator=(std::vector _space_view) { + space_view = std::move(_space_view); + return *this; + } + + /// Returns the arrow data type this type corresponds to. + static const std::shared_ptr& arrow_datatype(); + + /// Creates a new array builder with an array of this type. + static Result> new_arrow_array_builder( + arrow::MemoryPool* memory_pool + ); + + /// Fills an arrow array builder with an array of this type. + static Error fill_arrow_array_builder( + arrow::StructBuilder* builder, const SpaceViewComponent* elements, + size_t num_elements + ); + }; + } // namespace blueprint +} // namespace rerun diff --git a/rerun_py/rerun_sdk/rerun/.gitattributes b/rerun_py/rerun_sdk/rerun/.gitattributes new file mode 100644 index 000000000000..50e2def742fb --- /dev/null +++ b/rerun_py/rerun_sdk/rerun/.gitattributes @@ -0,0 +1,95 @@ +# DO NOT EDIT! This file is generated by crates/re_types_builder/src/lib.rs + +.gitattributes linguist-generated=true +archetypes/__init__.py linguist-generated=true +archetypes/annotation_context.py linguist-generated=true +archetypes/arrows3d.py linguist-generated=true +archetypes/asset3d.py linguist-generated=true +archetypes/bar_chart.py linguist-generated=true +archetypes/boxes2d.py linguist-generated=true +archetypes/boxes3d.py linguist-generated=true +archetypes/clear.py linguist-generated=true +archetypes/depth_image.py linguist-generated=true +archetypes/disconnected_space.py linguist-generated=true +archetypes/image.py linguist-generated=true +archetypes/line_strips2d.py linguist-generated=true +archetypes/line_strips3d.py linguist-generated=true +archetypes/mesh3d.py linguist-generated=true +archetypes/pinhole.py linguist-generated=true +archetypes/points2d.py linguist-generated=true +archetypes/points3d.py linguist-generated=true +archetypes/segmentation_image.py linguist-generated=true +archetypes/tensor.py linguist-generated=true +archetypes/text_document.py linguist-generated=true +archetypes/text_log.py linguist-generated=true +archetypes/time_series_scalar.py linguist-generated=true +archetypes/transform3d.py linguist-generated=true +archetypes/view_coordinates.py linguist-generated=true +blueprint/__init__.py linguist-generated=true +blueprint/auto_space_views.py linguist-generated=true +blueprint/panel_view.py linguist-generated=true +blueprint/space_view_component.py linguist-generated=true +components/__init__.py linguist-generated=true +components/annotation_context.py linguist-generated=true +components/blob.py linguist-generated=true +components/class_id.py linguist-generated=true +components/clear_is_recursive.py linguist-generated=true +components/color.py linguist-generated=true +components/depth_meter.py linguist-generated=true +components/disconnected_space.py linguist-generated=true +components/draw_order.py linguist-generated=true +components/half_sizes2d.py linguist-generated=true +components/half_sizes3d.py linguist-generated=true +components/instance_key.py linguist-generated=true +components/keypoint_id.py linguist-generated=true +components/line_strip2d.py linguist-generated=true +components/line_strip3d.py linguist-generated=true +components/material.py linguist-generated=true +components/media_type.py linguist-generated=true +components/mesh_properties.py linguist-generated=true +components/out_of_tree_transform3d.py linguist-generated=true +components/pinhole_projection.py linguist-generated=true +components/position2d.py linguist-generated=true +components/position3d.py linguist-generated=true +components/radius.py linguist-generated=true +components/resolution.py linguist-generated=true +components/rotation3d.py linguist-generated=true +components/scalar.py linguist-generated=true +components/scalar_scattering.py linguist-generated=true +components/tensor_data.py linguist-generated=true +components/text.py linguist-generated=true +components/text_log_level.py linguist-generated=true +components/transform3d.py linguist-generated=true +components/vector3d.py linguist-generated=true +components/view_coordinates.py linguist-generated=true +datatypes/__init__.py linguist-generated=true +datatypes/angle.py linguist-generated=true +datatypes/annotation_info.py linguist-generated=true +datatypes/class_description.py linguist-generated=true +datatypes/class_description_map_elem.py linguist-generated=true +datatypes/class_id.py linguist-generated=true +datatypes/float32.py linguist-generated=true +datatypes/keypoint_id.py linguist-generated=true +datatypes/keypoint_pair.py linguist-generated=true +datatypes/mat3x3.py linguist-generated=true +datatypes/mat4x4.py linguist-generated=true +datatypes/material.py linguist-generated=true +datatypes/mesh_properties.py linguist-generated=true +datatypes/quaternion.py linguist-generated=true +datatypes/rgba32.py linguist-generated=true +datatypes/rotation3d.py linguist-generated=true +datatypes/rotation_axis_angle.py linguist-generated=true +datatypes/scale3d.py linguist-generated=true +datatypes/tensor_buffer.py linguist-generated=true +datatypes/tensor_data.py linguist-generated=true +datatypes/tensor_dimension.py linguist-generated=true +datatypes/transform3d.py linguist-generated=true +datatypes/translation_and_mat3x3.py linguist-generated=true +datatypes/translation_rotation_scale3d.py linguist-generated=true +datatypes/utf8.py linguist-generated=true +datatypes/uvec2d.py linguist-generated=true +datatypes/uvec3d.py linguist-generated=true +datatypes/uvec4d.py linguist-generated=true +datatypes/vec2d.py linguist-generated=true +datatypes/vec3d.py linguist-generated=true +datatypes/vec4d.py linguist-generated=true diff --git a/rerun_py/src/python_bridge.rs b/rerun_py/src/python_bridge.rs index c3c38b37f67b..968eae4e77cb 100644 --- a/rerun_py/src/python_bridge.rs +++ b/rerun_py/src/python_bridge.rs @@ -693,7 +693,8 @@ fn set_panels( timeline_view_expanded: Option, blueprint: Option<&PyRecordingStream>, ) { - use rerun::external::re_types::blueprint::PanelView; + // TODO(jleibs): This should go away as part of https://github.com/rerun-io/rerun/issues/2089 + use re_viewer::blueprint::PanelView; if let Some(expanded) = blueprint_view_expanded { set_panel(PanelView::BLUEPRINT_VIEW_PATH, expanded, blueprint); @@ -711,7 +712,8 @@ fn set_panel(entity_path: &str, is_expanded: bool, blueprint: Option<&PyRecordin return; }; - use rerun::external::re_types::blueprint::PanelView; + // TODO(jleibs): This should go away as part of https://github.com/rerun-io/rerun/issues/2089 + use re_viewer::blueprint::PanelView; // TODO(jleibs): Validation this is a valid blueprint path? let entity_path = parse_entity_path(entity_path); @@ -781,7 +783,8 @@ fn set_auto_space_views(enabled: bool, blueprint: Option<&PyRecordingStream>) { return; }; - use rerun::external::re_types::blueprint::AutoSpaceViews; + // TODO(jleibs): This should go away as part of https://github.com/rerun-io/rerun/issues/2089 + use re_viewport::blueprint::AutoSpaceViews; let enable_auto_space = AutoSpaceViews(enabled);