Skip to main content

Module wasm

Module wasm 

Source
Expand description

Wasm support module for autotype. WASM bindings for the autotype IPC requests, exposed to the clients through @bitwarden/sdk-internal.

There is one driver interface per desktop process, each implemented by the user of this crate (for example, within the Bitwarden desktop app):

  • AutotypeDriver handles requests in the main process, registered with registerAutotypeHandlers.
  • AutotypeRenderDriver handles requests in the render process, registered with registerAutotypeRenderHandlers.

Structs§

AutotypeCredentials
The credentials the render process found for an AutotypeGetCredentialsRequest.
AutotypeGetCredentialsHandler 🔒
An [RpcHandler] that finds the credentials to autotype through a RawJsAutotypeRenderDriver.
AutotypeGetCredentialsRequest
A request from the main process, sent when the user presses the Autotype shortcut, asking the render process for the credentials to autotype into the focused app.
AutotypeGetCredentialsResponse
A response to an AutotypeGetCredentialsRequest.
AutotypeListRunningAppsHandler 🔒
An [RpcHandler] that lists running applications through a RawJsAutotypeDriver.
AutotypeListRunningAppsRequest
A request asking the receiving client for the applications that are currently running.
AutotypeListRunningAppsResponse
A response to an AutotypeListRunningAppsRequest.
AutotypeRunningApp
A running application.
AutotypeSetEnabledHandler 🔒
An [RpcHandler] that applies the requested state through a RawJsAutotypeDriver.
AutotypeSetEnabledRequest
A request asking the receiving client to enable or disable Autotype.
AutotypeSetEnabledResponse
A response to an AutotypeSetEnabledRequest.
AutotypeSetKeyboardShortcutHandler 🔒
An [RpcHandler] that applies the requested shortcut through a RawJsAutotypeDriver.
AutotypeSetKeyboardShortcutRequest
A request asking the receiving client to change the keyboard shortcut Autotype is triggered by.
AutotypeSetKeyboardShortcutResponse
A response to an AutotypeSetKeyboardShortcutRequest.
JsAutotypeDriver 🔒
Wraps the JavaScript driver in a [ThreadBoundRunner] so it can be used from the Send futures an [RpcHandler] is required to return.
JsAutotypeRenderDriver 🔒
Wraps the JavaScript render driver in a [ThreadBoundRunner] so it can be used from the Send futures an [RpcHandler] is required to return.
RawJsAutotypeDriver
JavaScript implementation of the various Autotype operations.
RawJsAutotypeRenderDriver
JavaScript implementation of the Autotype operations applied in the render process.

Functions§

autotype_request_get_credentials
Sends an AutotypeGetCredentialsRequest to the desktop render process, asking for the credentials to autotype into the focused app. The response’s credentials is empty when no vault item matches.
autotype_request_list_running_apps
Asks the desktop main process which applications are currently running.
autotype_request_set_enabled
Sends an AutotypeSetEnabledRequest to the desktop main process and reports whether the requested change was successful.
autotype_request_set_keyboard_shortcut
Sends an AutotypeSetKeyboardShortcutRequest to the desktop main process and reports whether the requested shortcut was applied.
from_source 🔒
Determines if a request came from the expected source.
register_autotype_handlers
This registers the Autotype handlers so the client responds to Autotype requests through the RawJsAutotypeDriver. Call this on the desktop main process’s IPC client.
register_autotype_render_handlers
This registers the Autotype handlers so the client responds to Autotype requests from the main process through the RawJsAutotypeRenderDriver. Call this on the desktop render process’s IPC client.