origin-platform 0.1.0

Platform contracts for Origin: the OS capabilities domain code is allowed to depend on.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use async_trait::async_trait;
use origin_domain::Result;
use std::fmt::Debug;

/// 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).
#[async_trait]
pub trait Opener: Debug + Send + Sync + 'static {
    async fn open_url(&self, url: &str) -> Result<()>;
}