pub trait BusHost {
// Required methods
fn open(&self, method: &str, params: Value, sink: Sink) -> CallId;
fn close(&self, call: CallId);
fn live(&self, spec: &LiveSpec) -> Reader;
fn follow(&self, spec: ModuleSpec) -> ModuleLive;
fn navigate(&self, route: &str);
fn live_version(&self) -> String;
// Provided method
fn bound(&self, _layout: &str, _slot: &str) -> Option<String> { ... }
}Expand description
What the bus needs of the host: the socket, the live cache, the router and the live version.
Required Methods§
fn open(&self, method: &str, params: Value, sink: Sink) -> CallId
Sourcefn close(&self, call: CallId)
fn close(&self, call: CallId)
GAMMA-6: stops a call on the wire (an unsubscribe); its sink hears nothing more.
fn live(&self, spec: &LiveSpec) -> Reader
Sourcefn follow(&self, spec: ModuleSpec) -> ModuleLive
fn follow(&self, spec: ModuleSpec) -> ModuleLive
FRAME-19: a module’s collection, held by when, coalesced by
debounce_ms.
Sourcefn live_version(&self) -> String
fn live_version(&self) -> String
The live version’s hash (slots_set with no version names it).
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".