re_types/components/
interactive.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/components/interactive.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**: Whether the entity can be interacted with.
25///
26/// Non interactive components are still visible, but mouse interactions in the view are disabled.
27#[derive(Clone, Debug, Copy, PartialEq, Eq, PartialOrd, Ord)]
28#[repr(transparent)]
29pub struct Interactive(pub crate::datatypes::Bool);
30
31impl ::re_types_core::WrapperComponent for Interactive {
32    type Datatype = crate::datatypes::Bool;
33
34    #[inline]
35    fn name() -> ComponentType {
36        "rerun.components.Interactive".into()
37    }
38
39    #[inline]
40    fn into_inner(self) -> Self::Datatype {
41        self.0
42    }
43}
44
45::re_types_core::macros::impl_into_cow!(Interactive);
46
47impl<T: Into<crate::datatypes::Bool>> From<T> for Interactive {
48    fn from(v: T) -> Self {
49        Self(v.into())
50    }
51}
52
53impl std::borrow::Borrow<crate::datatypes::Bool> for Interactive {
54    #[inline]
55    fn borrow(&self) -> &crate::datatypes::Bool {
56        &self.0
57    }
58}
59
60impl std::ops::Deref for Interactive {
61    type Target = crate::datatypes::Bool;
62
63    #[inline]
64    fn deref(&self) -> &crate::datatypes::Bool {
65        &self.0
66    }
67}
68
69impl std::ops::DerefMut for Interactive {
70    #[inline]
71    fn deref_mut(&mut self) -> &mut crate::datatypes::Bool {
72        &mut self.0
73    }
74}
75
76impl ::re_byte_size::SizeBytes for Interactive {
77    #[inline]
78    fn heap_size_bytes(&self) -> u64 {
79        self.0.heap_size_bytes()
80    }
81
82    #[inline]
83    fn is_pod() -> bool {
84        <crate::datatypes::Bool>::is_pod()
85    }
86}