pub struct WindowHint {
pub hint: HintSequence,
pub window_id: WindowId,
pub app_id: String,
pub title: String,
pub index: usize,
}Expand description
A hint assigned to a window
Associates a hint sequence with a specific window for activation.
§Examples
use open_sesame::core::{WindowHint, hint::HintSequence, WindowId};
let hint = WindowHint {
hint: HintSequence::new('f', 1),
window_id: WindowId::new("window-123"),
app_id: "firefox".to_string(),
title: "GitHub".to_string(),
index: 0,
};
assert_eq!(hint.hint_string(), "f");
assert_eq!(hint.app_id, "firefox");Fields§
§hint: HintSequenceThe hint sequence
window_id: WindowIdWindow ID for activation
app_id: StringApplication ID (as string for display)
title: StringWindow title
index: usizeOriginal index in window list
Implementations§
Source§impl WindowHint
impl WindowHint
Sourcepub fn hint_string(&self) -> String
pub fn hint_string(&self) -> String
Returns the hint as a string for display.
Trait Implementations§
Source§impl Clone for WindowHint
impl Clone for WindowHint
Source§fn clone(&self) -> WindowHint
fn clone(&self) -> WindowHint
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for WindowHint
impl RefUnwindSafe for WindowHint
impl Send for WindowHint
impl Sync for WindowHint
impl Unpin for WindowHint
impl UnwindSafe for WindowHint
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.