re_types/blueprint/components/
active_tab.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/active_tab.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**: The active tab in a tabbed container.
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, Default)]
28pub struct ActiveTab(
29    /// Which tab is currently active.
30    ///
31    /// This should always correspond to a tab in the container.
32    pub crate::datatypes::EntityPath,
33);
34
35impl ::re_types_core::WrapperComponent for ActiveTab {
36    type Datatype = crate::datatypes::EntityPath;
37
38    #[inline]
39    fn name() -> ComponentType {
40        "rerun.blueprint.components.ActiveTab".into()
41    }
42
43    #[inline]
44    fn into_inner(self) -> Self::Datatype {
45        self.0
46    }
47}
48
49::re_types_core::macros::impl_into_cow!(ActiveTab);
50
51impl<T: Into<crate::datatypes::EntityPath>> From<T> for ActiveTab {
52    fn from(v: T) -> Self {
53        Self(v.into())
54    }
55}
56
57impl std::borrow::Borrow<crate::datatypes::EntityPath> for ActiveTab {
58    #[inline]
59    fn borrow(&self) -> &crate::datatypes::EntityPath {
60        &self.0
61    }
62}
63
64impl std::ops::Deref for ActiveTab {
65    type Target = crate::datatypes::EntityPath;
66
67    #[inline]
68    fn deref(&self) -> &crate::datatypes::EntityPath {
69        &self.0
70    }
71}
72
73impl std::ops::DerefMut for ActiveTab {
74    #[inline]
75    fn deref_mut(&mut self) -> &mut crate::datatypes::EntityPath {
76        &mut self.0
77    }
78}
79
80impl ::re_byte_size::SizeBytes for ActiveTab {
81    #[inline]
82    fn heap_size_bytes(&self) -> u64 {
83        self.0.heap_size_bytes()
84    }
85
86    #[inline]
87    fn is_pod() -> bool {
88        <crate::datatypes::EntityPath>::is_pod()
89    }
90}