re_types_core/view.rs
1// ---
2re_string_interner::declare_new_type!(
3 /// The unique name of a view
4 #[cfg_attr(feature = "serde", derive(::serde::Deserialize, ::serde::Serialize))]
5 pub struct ViewClassIdentifier;
6);
7
8impl ViewClassIdentifier {
9 pub fn invalid() -> Self {
10 Self::from("invalid")
11 }
12}
13
14/// Views are the panels shown in the viewer's viewport and the primary means of
15/// inspecting & visualizing previously logged data.
16///
17/// In addition to the data that it contains via `ViewContents`, each view
18/// has several view properties that configure how it behaves. Each view property
19/// is a [`crate::Archetype`] that is stored in the viewer's blueprint database.
20pub trait View {
21 fn identifier() -> ViewClassIdentifier;
22}