pub enum TreeShortcut<T> {
Delete {
id: T,
},
Copy {
id: T,
},
Cut {
id: T,
},
Paste {
id: Option<T>,
},
}Expand description
Supported platform-neutral keyboard command intent.
Paste carries the selected/active target ID or None when no target exists.
§Examples
use ailloli_ui_widgets::controls::TreeShortcut;
let shortcut = TreeShortcut::<u8>::Paste { id: None };
assert!(matches!(shortcut, TreeShortcut::Paste { id: None }));Variants§
Delete
Delete key with an enabled target.
Fields
§
id: TSelected or active item to delete.
Copy
Control-C with an enabled target.
Fields
§
id: TSelected or active item to copy.
Cut
Control-X with an enabled target.
Fields
§
id: TSelected or active item to cut.
Paste
Control-V with an optional enabled target.
Trait Implementations§
Source§impl<T: Clone> Clone for TreeShortcut<T>
impl<T: Clone> Clone for TreeShortcut<T>
Source§fn clone(&self) -> TreeShortcut<T>
fn clone(&self) -> TreeShortcut<T>
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<T: Debug> Debug for TreeShortcut<T>
impl<T: Debug> Debug for TreeShortcut<T>
Source§impl<T: PartialEq> PartialEq for TreeShortcut<T>
impl<T: PartialEq> PartialEq for TreeShortcut<T>
impl<T: Eq> Eq for TreeShortcut<T>
impl<T> StructuralPartialEq for TreeShortcut<T>
Auto Trait Implementations§
impl<T> Freeze for TreeShortcut<T>where
T: Freeze,
impl<T> RefUnwindSafe for TreeShortcut<T>where
T: RefUnwindSafe,
impl<T> Send for TreeShortcut<T>where
T: Send,
impl<T> Sync for TreeShortcut<T>where
T: Sync,
impl<T> Unpin for TreeShortcut<T>where
T: Unpin,
impl<T> UnwindSafe for TreeShortcut<T>where
T: UnwindSafe,
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<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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.