Struct Config
pub struct Config {
pub default_profile: Profile,
pub profiles: Slice<Profile, smart_keymap_core::::key::tap_hold::Config::{constant#0}>,
}Expand description
Configuration settings for tap hold keys.
Config::default_profile is profile 0.
Optional Config::profiles are extra behaviors at indices 1...
Keys select a profile via Key::profile.
Nickel authoring keeps profile-0 knobs flat on config.tap_hold
(timeout, interrupt_response, …);
lowering nests them as default_profile in JSON.
Fields§
§default_profile: ProfileDefault behavior (profile index 0).
profiles: Slice<Profile, smart_keymap_core::::key::tap_hold::Config::{constant#0}>Extra behavior profiles (indices 1..=len).
Implementations§
§impl Config
impl Config
pub const fn profile(&self, profile_id: u8) -> Profile
pub const fn profile(&self, profile_id: u8) -> Profile
Resolves the behavior profile for profile_id.
0→Self::default_profile1..→Self::profilesentryid - 1
Out-of-range ids fall back to the default profile.
Trait Implementations§
impl Copy for Config
§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Config, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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