pub struct Config {
pub hotkeys: Hotkeys,
pub providers: Providers,
pub behavior: Behavior,
pub privacy: Privacy,
}Expand description
The full hyprcorrect configuration.
Fields§
§hotkeys: Hotkeys§providers: Providers§behavior: Behavior§privacy: PrivacyImplementations§
Source§impl Config
impl Config
Sourcepub fn path() -> Result<PathBuf, ConfigError>
pub fn path() -> Result<PathBuf, ConfigError>
The OS-conventional path to config.toml.
§Errors
Returns ConfigError::NoConfigDir when the platform exposes
no usable config directory (e.g. a sandbox with no $HOME).
Source§impl Config
impl Config
Sourcepub fn load() -> Result<Self, ConfigError>
pub fn load() -> Result<Self, ConfigError>
Load from the OS-conventional path. A missing file yields a
default Config (not an error).
§Errors
See ConfigError.
Sourcepub fn load_from(path: &Path) -> Result<Self, ConfigError>
pub fn load_from(path: &Path) -> Result<Self, ConfigError>
Sourcepub fn save(&self) -> Result<(), ConfigError>
pub fn save(&self) -> Result<(), ConfigError>
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.