re_types/blueprint/views/
bar_chart_view.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/views/bar_chart.fbs".
3
4#![allow(unused_braces)]
5#![allow(unused_imports)]
6#![allow(unused_parens)]
7#![allow(clippy::clone_on_copy)]
8#![allow(clippy::cloned_instead_of_copied)]
9#![allow(clippy::map_flatten)]
10#![allow(clippy::needless_question_mark)]
11#![allow(clippy::new_without_default)]
12#![allow(clippy::redundant_closure)]
13#![allow(clippy::too_many_arguments)]
14#![allow(clippy::too_many_lines)]
15
16use ::re_types_core::try_serialize_field;
17use ::re_types_core::SerializationResult;
18use ::re_types_core::{ComponentBatch as _, SerializedComponentBatch};
19use ::re_types_core::{ComponentDescriptor, ComponentType};
20use ::re_types_core::{DeserializationError, DeserializationResult};
21
22/// **View**: A bar chart view.
23///
24/// ⚠️ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.**
25#[derive(Clone, Debug)]
26pub struct BarChartView {
27    /// Configures the legend of the plot.
28    pub plot_legend: crate::blueprint::archetypes::PlotLegend,
29}
30
31impl ::re_types_core::View for BarChartView {
32    #[inline]
33    fn identifier() -> ::re_types_core::ViewClassIdentifier {
34        "BarChart".into()
35    }
36}
37
38impl<T: Into<crate::blueprint::archetypes::PlotLegend>> From<T> for BarChartView {
39    fn from(v: T) -> Self {
40        Self {
41            plot_legend: v.into(),
42        }
43    }
44}
45
46impl std::borrow::Borrow<crate::blueprint::archetypes::PlotLegend> for BarChartView {
47    #[inline]
48    fn borrow(&self) -> &crate::blueprint::archetypes::PlotLegend {
49        &self.plot_legend
50    }
51}
52
53impl std::ops::Deref for BarChartView {
54    type Target = crate::blueprint::archetypes::PlotLegend;
55
56    #[inline]
57    fn deref(&self) -> &crate::blueprint::archetypes::PlotLegend {
58        &self.plot_legend
59    }
60}
61
62impl std::ops::DerefMut for BarChartView {
63    #[inline]
64    fn deref_mut(&mut self) -> &mut crate::blueprint::archetypes::PlotLegend {
65        &mut self.plot_legend
66    }
67}
68
69impl ::re_byte_size::SizeBytes for BarChartView {
70    #[inline]
71    fn heap_size_bytes(&self) -> u64 {
72        self.plot_legend.heap_size_bytes()
73    }
74
75    #[inline]
76    fn is_pod() -> bool {
77        <crate::blueprint::archetypes::PlotLegend>::is_pod()
78    }
79}