Skip to main content

Crate webui

Crate webui 

Source
Expand description

Rust bindings to WebUI.

Structs§

Event
The event type.
WebUIError
The WebUI error.
Window
The WebUI window type.

Enums§

Browser
The Browser type.
EventType
The event type.
LoggerLevel
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.