Crate html_view

Crate html_view 

Source
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§

BehaviourOptions
Behaviour and security configuration.
DefaultAppLocator
Default implementation of AppLocator.
DialogOptions
Dialog configuration options.
EnvironmentOptions
Environment and runtime configuration.
ToolbarOptions
Toolbar configuration options.
ViewerExitStatus
Exit status returned by the viewer application.
ViewerHandle
A handle to a running viewer process in non-blocking mode.
ViewerOptions
Options for configuring a viewer instance.
WindowOptions
Window configuration options.

Enums§

ViewerContent
The type of content to display in the viewer.
ViewerError
Errors that can occur when using the html_view library.
ViewerExitReason
The reason the viewer exited.
ViewerResult
The result of opening a viewer.
ViewerWaitMode
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