Expand description
This crate provides easy Rust interfaces to open URIs across multiple platforms.
Supports:
- macOS (via
NSWorkspace) - Android (via
android/content/Intent) - Linux (via
xdg-open) - Windows (via
start) - iOS (via
UIApplication)
URIs take many different forms: URLs (http://), tel:, mailto:, file://,
and more (see the official list of schemes).
§Examples
use robius_open::Uri;
Uri::new("tel:+61 123 456 789")
.open()
.expect("failed to open telephone URI");use robius_open::Uri;
Uri::new("http://www.google.com")
.open_with_completion(|success| {
println!("Opened URI? {success}");
})
.expect("failed to open URL");Structs§
- Uri
- A uniform resource identifier.
Enums§
- Error
- Errors encountered when opening a URI.