pub struct HotKeysStartOptions { /* private fields */ }Expand description
Options for the hotkeys_start command.
Implementations§
Source§impl HotKeysStartOptions
impl HotKeysStartOptions
Sourcepub fn duration(self, seconds: u64) -> Self
pub fn duration(self, seconds: u64) -> Self
For how long, in seconds, tracking runs before it stops on its own.
Defaults to 0, which tracks until
hotkeys_stop is called.
Sourcepub fn sample(self, ratio: u32) -> Self
pub fn sample(self, ratio: u32) -> Self
Keys are tracked with probability 1/ratio. Defaults to 1, which tracks
every key.
Sourcepub fn slots(self, slots: impl IntoIterator<Item = u16>) -> Self
pub fn slots(self, slots: impl IntoIterator<Item = u16>) -> Self
Restricts tracking to keys hashing to the given slots. Cluster mode only; the server rejects it otherwise. Defaults to all slots.
Trait Implementations§
Source§impl Default for HotKeysStartOptions
impl Default for HotKeysStartOptions
Auto Trait Implementations§
impl Freeze for HotKeysStartOptions
impl RefUnwindSafe for HotKeysStartOptions
impl Send for HotKeysStartOptions
impl Sync for HotKeysStartOptions
impl Unpin for HotKeysStartOptions
impl UnsafeUnpin for HotKeysStartOptions
impl UnwindSafe for HotKeysStartOptions
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