cadmus_core/view/settings_editor/kinds/
identity.rs

1//! Single, deduplicated identity enum for all settings.
2//!
3//! This replaces the two parallel `Kind` enums that previously existed in
4//! `setting_row` and `setting_value`.  It is only used to route
5//! [`SettingsEvent::UpdateValue`](crate::view::settings_editor::SettingsEvent)
6//! events to the correct view — the view layer itself contains no per-setting
7//! match arms.
8
9/// Identifies a specific setting value view for targeted updates.
10///
11/// Used in [`SettingsEvent::UpdateValue`](crate::view::settings_editor::SettingsEvent)
12/// so that [`CategoryEditor`](crate::view::settings_editor::CategoryEditor) can tell
13/// exactly which [`SettingValue`](crate::view::settings_editor::SettingValue) to
14/// refresh after a setting changes.
15#[derive(Debug, Clone, PartialEq, Eq)]
16pub enum SettingIdentity {
17    KeyboardLayout,
18    Locale,
19    AutoSuspend,
20    AutoPowerOff,
21    SleepCover,
22    AutoShare,
23    ButtonScheme,
24    LoggingEnabled,
25    FinishedAction,
26    LibraryInfo(usize),
27    LibraryName(usize),
28    LibraryPath(usize),
29    LibraryFinishedAction(usize),
30    IntermissionSuspend,
31    IntermissionPowerOff,
32    IntermissionShare,
33    SettingsRetention,
34    LogLevel,
35    ImportStartupTrigger,
36    ImportSyncMetadata,
37    #[cfg(feature = "otel")]
38    OtlpEndpoint,
39    #[cfg(all(feature = "test", feature = "kobo"))]
40    EnableKernLog,
41    #[cfg(all(feature = "test", feature = "kobo"))]
42    EnableDbusLog,
43}