re_types/blueprint/views/
map_view.rs

1// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/rust/api.rs
2// Based on "crates/store/re_types/definitions/rerun/blueprint/views/map.fbs".
3
4#![allow(unused_braces)]
5#![allow(unused_imports)]
6#![allow(unused_parens)]
7#![allow(clippy::clone_on_copy)]
8#![allow(clippy::cloned_instead_of_copied)]
9#![allow(clippy::map_flatten)]
10#![allow(clippy::needless_question_mark)]
11#![allow(clippy::new_without_default)]
12#![allow(clippy::redundant_closure)]
13#![allow(clippy::too_many_arguments)]
14#![allow(clippy::too_many_lines)]
15
16use ::re_types_core::try_serialize_field;
17use ::re_types_core::SerializationResult;
18use ::re_types_core::{ComponentBatch as _, SerializedComponentBatch};
19use ::re_types_core::{ComponentDescriptor, ComponentType};
20use ::re_types_core::{DeserializationError, DeserializationResult};
21
22/// **View**: A 2D map view to display geospatial primitives.
23///
24/// ⚠️ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
25#[derive(Clone, Debug)]
26pub struct MapView {
27    /// Configures the zoom level of the map view.
28    pub zoom: crate::blueprint::archetypes::MapZoom,
29
30    /// Configuration for the background map of the map view.
31    pub background: crate::blueprint::archetypes::MapBackground,
32}
33
34impl ::re_types_core::View for MapView {
35    #[inline]
36    fn identifier() -> ::re_types_core::ViewClassIdentifier {
37        "Map".into()
38    }
39}
40
41impl ::re_byte_size::SizeBytes for MapView {
42    #[inline]
43    fn heap_size_bytes(&self) -> u64 {
44        self.zoom.heap_size_bytes() + self.background.heap_size_bytes()
45    }
46
47    #[inline]
48    fn is_pod() -> bool {
49        <crate::blueprint::archetypes::MapZoom>::is_pod()
50            && <crate::blueprint::archetypes::MapBackground>::is_pod()
51    }
52}