Skip to main content

origin_platform/
opener.rs

1use async_trait::async_trait;
2use origin_domain::Result;
3use std::fmt::Debug;
4
5/// Opens a URL in the user's browser.
6///
7/// Scoped deliberately narrowly: this is *not* a general shell escape. Anything that
8/// executes local programs needs its own contract and its own capability (ADR-0007).
9#[async_trait]
10pub trait Opener: Debug + Send + Sync + 'static {
11    async fn open_url(&self, url: &str) -> Result<()>;
12}