Skip to main content

mur_common/
hooks_config.rs

1use serde::{Deserialize, Serialize};
2
3fn default_true() -> bool {
4    true
5}
6
7#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
8pub struct HooksConfig {
9    /// Whether the outbox `LedgerHook` runs. Default: true.
10    #[serde(default = "default_true")]
11    pub ledger: bool,
12
13    /// Whether `CompanionVoiceHook` runs.
14    /// `None` = auto-wire from `profile.companion.enabled`.
15    #[serde(default, skip_serializing_if = "Option::is_none")]
16    pub companion_voice: Option<bool>,
17
18    /// Whether `VoiceInputHook` runs.
19    /// `None` = auto-wire from `profile.voice.enabled`.
20    #[serde(default, skip_serializing_if = "Option::is_none")]
21    pub voice_input: Option<bool>,
22}
23
24impl Default for HooksConfig {
25    fn default() -> Self {
26        Self {
27            ledger: true,
28            companion_voice: None,
29            voice_input: None,
30        }
31    }
32}