Function webbrowser::open

source ·
pub fn open(url: &str) -> Result<()>
Expand description

Opens the URL on the default browser of this platform

Returns Ok(..) so long as the browser invocation was successful. An Err(..) is returned only if there was an error in running the command, or if the browser was not found.

Equivalent to:

open_browser(Browser::Default, url);

Examples

use webbrowser;

if webbrowser::open("http://github.com").is_ok() {
    // ...
}