pub struct Config {
pub style: StyleConfig,
pub hotkeys: Vec<HotkeyEntry>,
pub capture: CaptureConfig,
}Fields§
§style: StyleConfig§hotkeys: Vec<HotkeyEntry>§capture: CaptureConfigImplementations§
Source§impl Config
impl Config
pub fn resolve_style(&self) -> Result<Style, ConfigError>
Sourcepub fn resolve_monitors(&self) -> Result<Vec<String>, ConfigError>
pub fn resolve_monitors(&self) -> Result<Vec<String>, ConfigError>
The monitor queries a no-flag launch should use, or an empty vec meaning all of them.
Only the shape is checked here — this crate has no idea what is
plugged in. A query that names no attached display fails at launch
with the same message --monitor gives, which is the honest place
for it: the answer depends on the hardware, not the file. What is
rejected here is a value that could never mean anything on any
machine, because a silent default is the bug class this module
exists to avoid.
Sourcepub fn resolve_bindings(
&self,
extra: &[String],
) -> Result<Vec<Binding>, ConfigError>
pub fn resolve_bindings( &self, extra: &[String], ) -> Result<Vec<Binding>, ConfigError>
Defaults, then config-file entries, then extra (CLI --bind).
Binding any key removes ALL default bindings for that key (every
edge), so rebinding [ doesn’t leave the default’s repeat-edge
rotation alive; among user bindings, later entries shadow earlier
ones per key + edge.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.