1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Property trait for typed, watchable state values
//!
//! The Property trait defines the contract for values that can be stored,
//! watched, and tracked for changes in a StateStore.
//!
//! # Example
//!
//! ```rust,ignore
//! use state_store::Property;
//!
//! #[derive(Clone, PartialEq, Debug)]
//! pub struct Temperature(pub f32);
//!
//! impl Property for Temperature {
//! const KEY: &'static str = "temperature";
//! }
//! ```
/// Marker trait for properties that can be stored and watched
///
/// Properties must be:
/// - Clone: For copying values to watchers
/// - Send + Sync: For thread-safe access
/// - PartialEq: For change detection (only emit when value actually changes)
/// - 'static: For type-erased storage using TypeId
///
/// The KEY constant provides a human-readable identifier for debugging,
/// logging, and event filtering.