pub struct Builder<R: Runtime> { /* private fields */ }Implementations§
Source§impl<R: Runtime> Builder<R>
impl<R: Runtime> Builder<R>
pub fn new() -> Self
Sourcepub fn with_shortcut<T>(self, shortcut: T) -> Result<Self, Error>
pub fn with_shortcut<T>(self, shortcut: T) -> Result<Self, Error>
Add a shortcut to be registerd.
Sourcepub fn with_shortcuts<S, T>(self, shortcuts: S) -> Result<Self, Error>
pub fn with_shortcuts<S, T>(self, shortcuts: S) -> Result<Self, Error>
Add multiple shortcuts to be registerd.
Sourcepub fn with_handler<F: Fn(&AppHandle<R>, &Shortcut, ShortcutEvent) + Send + Sync + 'static>(
self,
handler: F,
) -> Self
pub fn with_handler<F: Fn(&AppHandle<R>, &Shortcut, ShortcutEvent) + Send + Sync + 'static>( self, handler: F, ) -> Self
Specify a global shortcut handler that will be triggered for any and all shortcuts.
pub fn build(self) -> TauriPlugin<R>
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for Builder<R>
impl<R> !RefUnwindSafe for Builder<R>
impl<R> Send for Builder<R>
impl<R> Sync for Builder<R>
impl<R> Unpin for Builder<R>
impl<R> !UnwindSafe for Builder<R>
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