tanuki_common/property.rs
1use core::fmt::Debug;
2
3use serde::{Deserialize, Serialize};
4
5pub enum PropertyKind {
6 /// Persistent state from the entity (eg. sensor readings)
7 State,
8 /// Transient updates from the entity (eg. button presses)
9 Event,
10 /// Commands sent to the entity (eg. turn on/off)
11 Command,
12}
13
14pub trait Property: Debug + Clone + Serialize + for<'de> Deserialize<'de> {
15 const KEY: &str;
16 const KIND: PropertyKind;
17}