re_types/blueprint/components/
grid_spacing.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/components/grid_spacing.fbs".
3
4#![allow(unused_braces)]
5#![allow(unused_imports)]
6#![allow(unused_parens)]
7#![allow(clippy::allow_attributes)]
8#![allow(clippy::clone_on_copy)]
9#![allow(clippy::cloned_instead_of_copied)]
10#![allow(clippy::map_flatten)]
11#![allow(clippy::needless_question_mark)]
12#![allow(clippy::new_without_default)]
13#![allow(clippy::redundant_closure)]
14#![allow(clippy::too_many_arguments)]
15#![allow(clippy::too_many_lines)]
16#![allow(clippy::wildcard_imports)]
17
18use ::re_types_core::SerializationResult;
19use ::re_types_core::try_serialize_field;
20use ::re_types_core::{ComponentBatch as _, SerializedComponentBatch};
21use ::re_types_core::{ComponentDescriptor, ComponentType};
22use ::re_types_core::{DeserializationError, DeserializationResult};
23
24/// **Component**: Space between grid lines of one line to the next in scene units.
25///
26/// ⚠️ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
27#[derive(Clone, Debug)]
28pub struct GridSpacing(
29    /// Space between grid lines of one line to the next in scene units.
30    pub crate::datatypes::Float32,
31);
32
33impl ::re_types_core::WrapperComponent for GridSpacing {
34    type Datatype = crate::datatypes::Float32;
35
36    #[inline]
37    fn name() -> ComponentType {
38        "rerun.blueprint.components.GridSpacing".into()
39    }
40
41    #[inline]
42    fn into_inner(self) -> Self::Datatype {
43        self.0
44    }
45}
46
47::re_types_core::macros::impl_into_cow!(GridSpacing);
48
49impl<T: Into<crate::datatypes::Float32>> From<T> for GridSpacing {
50    fn from(v: T) -> Self {
51        Self(v.into())
52    }
53}
54
55impl std::borrow::Borrow<crate::datatypes::Float32> for GridSpacing {
56    #[inline]
57    fn borrow(&self) -> &crate::datatypes::Float32 {
58        &self.0
59    }
60}
61
62impl std::ops::Deref for GridSpacing {
63    type Target = crate::datatypes::Float32;
64
65    #[inline]
66    fn deref(&self) -> &crate::datatypes::Float32 {
67        &self.0
68    }
69}
70
71impl std::ops::DerefMut for GridSpacing {
72    #[inline]
73    fn deref_mut(&mut self) -> &mut crate::datatypes::Float32 {
74        &mut self.0
75    }
76}
77
78impl ::re_byte_size::SizeBytes for GridSpacing {
79    #[inline]
80    fn heap_size_bytes(&self) -> u64 {
81        self.0.heap_size_bytes()
82    }
83
84    #[inline]
85    fn is_pod() -> bool {
86        <crate::datatypes::Float32>::is_pod()
87    }
88}