Expand description
html_view: A lightweight, cross-platform HTML viewer for Rust.
This library provides a simple API to display HTML content in a native window,
similar to matplotlib.pyplot.show() in Python.
§Quick Start
use html_view;
fn main() -> Result<(), html_view::ViewerError> {
html_view::show("<h1>Hello, World!</h1>")?;
Ok(())
}§Features
- Display inline HTML, local files, directories, or remote URLs
- Blocking and non-blocking modes
- Window configuration (size, position, title)
- Security controls for navigation and remote content
- Cross-platform (Windows, macOS, Linux)
Structs§
- Behaviour
Options - Behaviour and security configuration.
- Default
AppLocator - Default implementation of AppLocator.
- Dialog
Options - Dialog configuration options.
- Environment
Options - Environment and runtime configuration.
- Toolbar
Options - Toolbar configuration options.
- Viewer
Exit Status - Exit status returned by the viewer application.
- Viewer
Handle - A handle to a running viewer process in non-blocking mode.
- Viewer
Options - Options for configuring a viewer instance.
- Window
Options - Window configuration options.
Enums§
- Viewer
Content - The type of content to display in the viewer.
- Viewer
Error - Errors that can occur when using the html_view library.
- Viewer
Exit Reason - The reason the viewer exited.
- Viewer
Result - The result of opening a viewer.
- Viewer
Wait Mode - Determines whether the viewer call blocks or returns immediately.
Traits§
- AppLocator
- Trait for locating the html_view_app binary.
Functions§
- open
- Open a viewer window with the given options.
- show
- Display inline HTML in a new viewer window and block until the window is closed.
- show_
with_ options