Module browser

Source
Expand description

This module contains everything needed to detect and specify different browser installations.

While most of this functionality is handled for you, you can use these to get insight on any specific tweaks you may need to apply in your own project.

let browser = get_best_browser(None);

if let Some(browser) = browser {
  match browser.kind {
    BrowserKind::Chromium => {
      apply_chromium_specific_config();
    }
    _ => {}
  }
}

Modules§

chromium
firefox

Structs§

Browser
BrowserWindowsConfig
A configuration object for a browser that contains possible locations and such, on Windows.

Enums§

BrowserKind

Functions§

get_all_existing_browsers
Get all browsers available on the system
get_best_browser
Get the best browser based on the provided kind. If no kind is provided, the first found supported browser is returned.
get_browser_path
Get the first valid path for a specific browser
get_supported_browsers
Get all supported browsers