pub enum HotkeyAction {
Pause,
Pause15m,
Pause30m,
Pause60m,
Resume,
TriggerMicro,
TriggerLong,
SkipMicro,
SkipLong,
CycleProfile,
}Expand description
An action a global hotkey can fire. Mirrors the local CLI actions so a chord is just another route to the same behaviour (CLI parity).
Variants§
Implementations§
Source§impl HotkeyAction
impl HotkeyAction
Sourcefn pause_duration_secs(self) -> Option<Option<u64>>
fn pause_duration_secs(self) -> Option<Option<u64>>
For a pause action, the pause length: Some(None) is an indefinite
pause, Some(Some(secs)) a timed one; None for non-pause actions.
Pure so the duration mapping is unit-testable. The timed values mirror
the entracte pause <dur> / IpcRequest::Pause { duration_secs } path.
Trait Implementations§
Source§impl Clone for HotkeyAction
impl Clone for HotkeyAction
Source§fn clone(&self) -> HotkeyAction
fn clone(&self) -> HotkeyAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for HotkeyAction
Source§impl Debug for HotkeyAction
impl Debug for HotkeyAction
Source§impl<'de> Deserialize<'de> for HotkeyAction
impl<'de> Deserialize<'de> for HotkeyAction
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 HotkeyAction
Source§impl Hash for HotkeyAction
impl Hash for HotkeyAction
Source§impl PartialEq for HotkeyAction
impl PartialEq for HotkeyAction
Source§impl Serialize for HotkeyAction
impl Serialize for HotkeyAction
impl StructuralPartialEq for HotkeyAction
Auto Trait Implementations§
impl Freeze for HotkeyAction
impl RefUnwindSafe for HotkeyAction
impl Send for HotkeyAction
impl Sync for HotkeyAction
impl Unpin for HotkeyAction
impl UnsafeUnpin for HotkeyAction
impl UnwindSafe for HotkeyAction
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<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more