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
//! Compositor key - typed key for compositor lookup.
//!
//! Defines the typed key enum for compositor discovery.
use ServiceKey;
/// Typed key for compositor lookup.
///
/// This enum defines the purposes for which compositors can be registered.
/// Currently only `Root` is supported for the root window compositor.
///
/// # Compile-Time Safety
///
/// Using typed keys instead of strings ensures:
/// - Typos are caught at compile time (`CompositorKey::Rot` → error)
/// - Exhaustive matching in `match` statements
/// - Self-documenting API
///
/// # Example
///
/// ```ignore
/// use reovim_driver_layout::{CompositorKey, CompositorRegistry, RootCompositor};
/// use std::sync::Arc;
///
/// let registry = CompositorRegistry::new();
/// registry.register(CompositorKey::Root, Arc::new(HybridCompositor::new()));
///
/// // Lookup with typed key
/// let compositor = registry.get(&CompositorKey::Root);
/// ```