pub struct KanamaruPlugin<R: Runtime> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<R: Runtime> Drop for KanamaruPlugin<R>
impl<R: Runtime> Drop for KanamaruPlugin<R>
Source§impl<R> Plugin<R> for KanamaruPlugin<R>where
R: Runtime,
impl<R> Plugin<R> for KanamaruPlugin<R>where
R: Runtime,
Source§fn initialize(
&mut self,
app: &AppHandle<R>,
config: JsonValue,
) -> Result<(), Box<dyn Error>>
fn initialize( &mut self, app: &AppHandle<R>, config: JsonValue, ) -> Result<(), Box<dyn Error>>
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: &Webview<R>, payload: &PageLoadPayload<'_>)
fn on_page_load(&mut self, window: &Webview<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 window_created(&mut self, window: Window<R>)
fn window_created(&mut self, window: Window<R>)
Callback invoked when the window is created.
Source§fn webview_created(&mut self, webview: Webview<R>)
fn webview_created(&mut self, webview: Webview<R>)
Callback invoked when the webview is created.
Callback invoked when webview tries to navigate to the given Url. Returning false cancels navigation.
Source§fn extend_api(&mut self, invoke: Invoke<R>) -> bool
fn extend_api(&mut self, invoke: Invoke<R>) -> bool
Extend commands to
crate::Builder::invoke_handler.Source§fn initialization_script_2(&self) -> Option<InitializationScript>
fn initialization_script_2(&self) -> Option<InitializationScript>
Same as
Plugin::initialization_script but returns an InitializationScript instead
We plan to replace Plugin::initialization_script with this signature in v3Auto Trait Implementations§
impl<R> !RefUnwindSafe for KanamaruPlugin<R>
impl<R> !Sync for KanamaruPlugin<R>
impl<R> !UnwindSafe for KanamaruPlugin<R>
impl<R> Freeze for KanamaruPlugin<R>
impl<R> Send for KanamaruPlugin<R>
impl<R> Unpin for KanamaruPlugin<R>
impl<R> UnsafeUnpin for KanamaruPlugin<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