pub enum EmitPolicy {
All,
Custom(String),
Focused,
Origin,
None,
}
Expand description
Define how the plugin should emit events.
Variants§
All
Emit the event to all windows.
Custom(String)
Emit the event to the window with the specified label.
Focused
Emit the event to the focused window, if any.
Origin
Emit the event only to the window that triggered the shortcut.
None
Do not emit events.
Implementations§
source§impl EmitPolicy
impl EmitPolicy
sourcepub const fn is_custom(&self) -> bool
pub const fn is_custom(&self) -> bool
Returns true if the enum is EmitPolicy::Custom otherwise false
sourcepub const fn is_focused(&self) -> bool
pub const fn is_focused(&self) -> bool
Returns true if the enum is EmitPolicy::Focused otherwise false
Trait Implementations§
source§impl Clone for EmitPolicy
impl Clone for EmitPolicy
source§fn clone(&self) -> EmitPolicy
fn clone(&self) -> EmitPolicy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EmitPolicy
impl Debug for EmitPolicy
source§impl Default for EmitPolicy
impl Default for EmitPolicy
source§fn default() -> EmitPolicy
fn default() -> EmitPolicy
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EmitPolicy
impl RefUnwindSafe for EmitPolicy
impl Send for EmitPolicy
impl Sync for EmitPolicy
impl Unpin for EmitPolicy
impl UnwindSafe for EmitPolicy
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,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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