pub struct ShortcutBuilder { /* private fields */ }Expand description
Builder for creating shortcuts with fluent API.
Implementations§
Source§impl ShortcutBuilder
impl ShortcutBuilder
Sourcepub fn context(self, context: ShortcutContext) -> Self
pub fn context(self, context: ShortcutContext) -> Self
Set context.
Sourcepub fn for_widget(self, widget_id: WidgetId) -> Self
pub fn for_widget(self, widget_id: WidgetId) -> Self
Set context to a specific widget.
Sourcepub fn priority(self, priority: ShortcutPriority) -> Self
pub fn priority(self, priority: ShortcutPriority) -> Self
Set priority.
Sourcepub fn description(self, desc: &str) -> Self
pub fn description(self, desc: &str) -> Self
Set description.
Sourcepub fn register(
self,
manager: &mut ShortcutManager,
handler: ShortcutHandler,
) -> ShortcutId
pub fn register( self, manager: &mut ShortcutManager, handler: ShortcutHandler, ) -> ShortcutId
Register with a manager.
Trait Implementations§
Source§impl Clone for ShortcutBuilder
impl Clone for ShortcutBuilder
Source§fn clone(&self) -> ShortcutBuilder
fn clone(&self) -> ShortcutBuilder
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 ShortcutBuilder
impl RefUnwindSafe for ShortcutBuilder
impl Send for ShortcutBuilder
impl Sync for ShortcutBuilder
impl Unpin for ShortcutBuilder
impl UnwindSafe for ShortcutBuilder
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§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