Skip to main content

Opener

Trait Opener 

Source
pub trait Opener:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn open_url<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Opens a URL in the user’s browser.

Scoped deliberately narrowly: this is not a general shell escape. Anything that executes local programs needs its own contract and its own capability (ADR-0007).

Required Methods§

Source

fn open_url<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§