pub struct HandlerContext {
pub app_handle: Arc<dyn Any + Send + Sync>,
pub webview_label: Option<String>,
}Expand description
Context passed from the plugin to #[command] handlers.
Wraps the application handle (as Arc<dyn Any>) and optionally the
webview label of the requesting window. The #[command] macro generates
code that downcasts the app handle to extract State<T>, AppHandle,
Window, or WebviewWindow parameters.
Plugin authors construct this in the protocol handler; end users never interact with it directly.
Fields§
§app_handle: Arc<dyn Any + Send + Sync>The AppHandle<Wry> (or equivalent), type-erased.
webview_label: Option<String>Label of the webview that originated the request, if known.
Implementations§
Auto Trait Implementations§
impl Freeze for HandlerContext
impl !RefUnwindSafe for HandlerContext
impl Send for HandlerContext
impl Sync for HandlerContext
impl Unpin for HandlerContext
impl UnsafeUnpin for HandlerContext
impl !UnwindSafe for HandlerContext
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