infinity-bridge-wasm 0.1.1

WASM-side bridge for infinity-bridge — CommBus JSON RPC over the MSFS sandbox boundary
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use core::fmt;

pub trait CommBusBackend: 'static {
    type Error: fmt::Display + fmt::Debug;
    type Subscription: 'static;

    fn subscribe(
        event: &str,
        callback: impl Fn(&str) + 'static,
    ) -> Result<Self::Subscription, Self::Error>;
    fn call(event: &str, data: &str) -> Result<(), Self::Error>;
}