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