re_types/components/
half_size3d.rs1#![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#[derive(Clone, Debug, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)]
31#[repr(transparent)]
32pub struct HalfSize3D(pub crate::datatypes::Vec3D);
33
34impl ::re_types_core::WrapperComponent for HalfSize3D {
35 type Datatype = crate::datatypes::Vec3D;
36
37 #[inline]
38 fn name() -> ComponentType {
39 "rerun.components.HalfSize3D".into()
40 }
41
42 #[inline]
43 fn into_inner(self) -> Self::Datatype {
44 self.0
45 }
46}
47
48::re_types_core::macros::impl_into_cow!(HalfSize3D);
49
50impl<T: Into<crate::datatypes::Vec3D>> From<T> for HalfSize3D {
51 fn from(v: T) -> Self {
52 Self(v.into())
53 }
54}
55
56impl std::borrow::Borrow<crate::datatypes::Vec3D> for HalfSize3D {
57 #[inline]
58 fn borrow(&self) -> &crate::datatypes::Vec3D {
59 &self.0
60 }
61}
62
63impl std::ops::Deref for HalfSize3D {
64 type Target = crate::datatypes::Vec3D;
65
66 #[inline]
67 fn deref(&self) -> &crate::datatypes::Vec3D {
68 &self.0
69 }
70}
71
72impl std::ops::DerefMut for HalfSize3D {
73 #[inline]
74 fn deref_mut(&mut self) -> &mut crate::datatypes::Vec3D {
75 &mut self.0
76 }
77}
78
79impl ::re_byte_size::SizeBytes for HalfSize3D {
80 #[inline]
81 fn heap_size_bytes(&self) -> u64 {
82 self.0.heap_size_bytes()
83 }
84
85 #[inline]
86 fn is_pod() -> bool {
87 <crate::datatypes::Vec3D>::is_pod()
88 }
89}