Skip to main content

DeepLinkEnv

Trait DeepLinkEnv 

Source
pub trait DeepLinkEnv {
    // Required methods
    fn handler_registered(&self) -> bool;
    fn open_url(&self, url: &str) -> Result<(), String>;
}
Expand description

The OS-touching seam dispatch runs over: probing whether the redui:// handler is registered, and opening a URL with the platform handler. Both branches of dispatch are driven through this trait so tests assert the decision and the emitted deep-link string without any OS state.

Required Methods§

Source

fn handler_registered(&self) -> bool

Whether a handler for the redui:// URL scheme is registered (i.e. the desktop app is installed).

Source

fn open_url(&self, url: &str) -> Result<(), String>

Open url with the platform default handler (the xdg-open / open / start equivalent). Returns the spawn error on failure.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§