diff --git a/crates/komorebi-protocol/src/types.rs b/crates/komorebi-protocol/src/types.rs index 5565774e..e86ff713 100644 --- a/crates/komorebi-protocol/src/types.rs +++ b/crates/komorebi-protocol/src/types.rs @@ -14,6 +14,24 @@ use strum::EnumString; /// state, and always when a window is shown, when a subscriber is added (so a new subscriber /// receives the state as soon as it subscribes), when a theme is set (the colors of the borders /// are not part of the state) and when the configuration is reloaded. +/// +/// # Example +/// +/// ```rust +/// use komorebi_protocol::types::SubscribeOptions; +/// +/// let options = SubscribeOptions { +/// filter_state_changes: true, +/// }; +/// assert_eq!( +/// serde_json::to_string(&options)?, +/// r#"{"filter_state_changes":true}"#, +/// ); +/// +/// assert!(!SubscribeOptions::default().filter_state_changes); +/// +/// # Ok::<(), Box>(()) +/// ``` #[derive(Default, Debug, Copy, Clone, Eq, PartialEq, Serialize, Deserialize)] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub struct SubscribeOptions {