re_types/components/
text_log_level.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/text_log_level.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 severity level of a text log message.
25///
26/// Recommended to be one of:
27/// * `"CRITICAL"`
28/// * `"ERROR"`
29/// * `"WARN"`
30/// * `"INFO"`
31/// * `"DEBUG"`
32/// * `"TRACE"`
33#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
34#[repr(transparent)]
35pub struct TextLogLevel(pub crate::datatypes::Utf8);
36
37impl ::re_types_core::WrapperComponent for TextLogLevel {
38    type Datatype = crate::datatypes::Utf8;
39
40    #[inline]
41    fn name() -> ComponentType {
42        "rerun.components.TextLogLevel".into()
43    }
44
45    #[inline]
46    fn into_inner(self) -> Self::Datatype {
47        self.0
48    }
49}
50
51::re_types_core::macros::impl_into_cow!(TextLogLevel);
52
53impl<T: Into<crate::datatypes::Utf8>> From<T> for TextLogLevel {
54    fn from(v: T) -> Self {
55        Self(v.into())
56    }
57}
58
59impl std::borrow::Borrow<crate::datatypes::Utf8> for TextLogLevel {
60    #[inline]
61    fn borrow(&self) -> &crate::datatypes::Utf8 {
62        &self.0
63    }
64}
65
66impl std::ops::Deref for TextLogLevel {
67    type Target = crate::datatypes::Utf8;
68
69    #[inline]
70    fn deref(&self) -> &crate::datatypes::Utf8 {
71        &self.0
72    }
73}
74
75impl std::ops::DerefMut for TextLogLevel {
76    #[inline]
77    fn deref_mut(&mut self) -> &mut crate::datatypes::Utf8 {
78        &mut self.0
79    }
80}
81
82impl ::re_byte_size::SizeBytes for TextLogLevel {
83    #[inline]
84    fn heap_size_bytes(&self) -> u64 {
85        self.0.heap_size_bytes()
86    }
87
88    #[inline]
89    fn is_pod() -> bool {
90        <crate::datatypes::Utf8>::is_pod()
91    }
92}