Expand description
Rust bindings to WebUI.
Structs§
- Event
- The event type.
- WebUI
Error - The WebUI error.
- Window
- The WebUI window type.
Enums§
- Browser
- The Browser type.
- Event
Type - The event type.
- Logger
Level - The logger level.
- Runtime
- The Runtime type.
Functions§
- browser_
exist - Check whether a specific web browser is installed on the system.
- clean⚠
- Free all memory resources used by WebUI. Should be called only once at the very end of your application, after wait() returns.
- decode
- Decode a Base64-encoded string.
- delete_
all_ profiles - Delete all local web-browser profile folders created by WebUI.
- encode
- Encode a string to Base64.
- exit
- Close all open windows. This will make wait() return (Break).
- get_
mime_ type - Get the HTTP MIME type string for a given file extension.
- get_
port - Find and return an available (unused) network port.
- open_
url - Open a URL in the operating system’s default web browser (not a WebUI window).
- set_
asynchronous_ response - Set to true if your backend uses async operations and sets responses via webui_return_x() after the callback returns. Default: false
- set_
browser_ folder - Set a custom folder path where WebUI should look for the browser executable.
- set_
default_ root_ folder - Set the web-server root folder path for all windows.
- set_
folder_ monitor - Auto-refresh the window when any file in the root folder changes. Default: false
- set_
logger - Set a custom logging function to receive WebUI’s internal log messages. Useful for debugging or integrating with your own logging system.
- set_
multi_ client - Allow multiple browser clients to connect to the same window. Useful for web apps. See documentation for details. Default: false
- set_
show_ wait_ connection - Wait for browser to connect before show() returns. Default: true
- set_
tls_ certificate - Set the SSL/TLS certificate and private key (both in PEM format). If called with empty strings, WebUI generates a self-signed certificate.
- set_
ui_ event_ blocking - Process all UI events in a single blocking thread (true) or each in a new thread (false). Applies to all windows. Default: false
- set_
use_ cookies - Use WebUI auth cookies to identify clients and block unauthorized URL access. Keep true to restrict access to one client at a time. Default: true
- wait
- Block the current thread and wait until all opened windows get closed.
- wait_
async - Non-blocking alternative to wait(). Returns true if at least one window is still open, false when all windows are closed. Call this in a loop from the main thread to interleave your own main-thread work.