Struct tauri::plugin::TauriPlugin
source · pub struct TauriPlugin<R: Runtime, C: DeserializeOwned = ()> { /* private fields */ }
Expand description
Plugin struct that is returned by the Builder
. Should only be constructed through the builder.
Trait Implementations§
source§impl<R: Runtime, C: DeserializeOwned> Drop for TauriPlugin<R, C>
impl<R: Runtime, C: DeserializeOwned> Drop for TauriPlugin<R, C>
source§impl<R: Runtime, C: DeserializeOwned> Plugin<R> for TauriPlugin<R, C>
impl<R: Runtime, C: DeserializeOwned> Plugin<R> for TauriPlugin<R, C>
source§fn initialize(&mut self, app: &AppHandle<R>, config: JsonValue) -> Result<()>
fn initialize(&mut self, app: &AppHandle<R>, config: JsonValue) -> Result<()>
Initializes the plugin.
source§fn initialization_script(&self) -> Option<String>
fn initialization_script(&self) -> Option<String>
Add the provided JavaScript to a list of scripts that should be run after the global object has been created,
but before the HTML document has been parsed and before any other script included by the HTML document is run. Read more
source§fn on_page_load(&mut self, window: Window<R>, payload: PageLoadPayload)
fn on_page_load(&mut self, window: Window<R>, payload: PageLoadPayload)
Callback invoked when the webview performs a navigation to a page.
source§fn on_event(&mut self, app: &AppHandle<R>, event: &RunEvent)
fn on_event(&mut self, app: &AppHandle<R>, event: &RunEvent)
Callback invoked when the event loop receives a new event.
source§fn extend_api(&mut self, invoke: Invoke<R>)
fn extend_api(&mut self, invoke: Invoke<R>)
Extend commands to
crate::Builder::invoke_handler
.Auto Trait Implementations§
impl<R, C> Freeze for TauriPlugin<R, C>where
<R as Runtime<EventLoopMessage>>::Handle: Freeze,
<R as Runtime<EventLoopMessage>>::GlobalShortcutManager: Freeze,
impl<R, C = ()> !RefUnwindSafe for TauriPlugin<R, C>
impl<R, C> Send for TauriPlugin<R, C>
impl<R, C = ()> !Sync for TauriPlugin<R, C>
impl<R, C> Unpin for TauriPlugin<R, C>where
<R as Runtime<EventLoopMessage>>::Handle: Unpin,
<R as Runtime<EventLoopMessage>>::GlobalShortcutManager: Unpin,
impl<R, C = ()> !UnwindSafe for TauriPlugin<R, C>
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