Function open::that

source · []
pub fn that<T: AsRef<OsStr>>(path: T) -> Result<()>
Expand description

Open path with the default application without blocking.

Examples

let path = "http://rust-lang.org";

match open::that(path) {
    Ok(()) => println!("Opened '{}' successfully.", path),
    Err(err) => panic!("An error occurred when opening '{}': {}", path, err),
}

Errors

A std::io::Error is returned on failure. Because different operating systems handle errors differently it is recommend to not match on a certain error.