Skip to main content

BusHost

Trait BusHost 

Source
pub trait BusHost {
    // Required methods
    fn open(&self, method: &str, params: Value, sink: Sink) -> 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§

Source

fn open(&self, method: &str, params: Value, sink: Sink) -> CallId

Source

fn live(&self, spec: &LiveSpec) -> Reader

Source

fn follow(&self, spec: ModuleSpec) -> ModuleLive

FRAME-19: a module’s collection, held by when, coalesced by debounce_ms.

Source

fn navigate(&self, route: &str)

Source

fn live_version(&self) -> String

The live version’s hash (slots_set with no version names it).

Provided Methods§

Source

fn bound(&self, _layout: &str, _slot: &str) -> Option<String>

FRAME-29: the component a mark binds layout’s slot to, when one does — slots_set on it is refused bound.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<R: Renderer, W: Wire + Clone + 'static, C: Clock + Clone + 'static> BusHost for App<R, W, C>

FRAME-12: what the bus asks of the host.