[][src]Trait squark::Runtime

pub trait Runtime<A: App>: Clone + 'static {
    fn get_env<'a>(&'a self) -> &'a Env<A>;
fn handle_diff(&self, diff: Diff);
fn handle_future<T: Serialize + 'static, E: Serialize + 'static>(
        &self,
        future: Box<dyn Future<Item = T, Error = E>>
    );
fn schedule_render(&self); fn run(&self) { ... }
fn run_with_task(&self, task: Task<A::Action>) { ... }
fn on_action(&self, action: A::Action) { ... }
fn set_state(&self, new_state: A::State) { ... }
fn emit_future(&self, task: Box<dyn Future<Item = A::Action, Error = ()>>) { ... }
fn pop_handler(&self, id: &str) -> Option<Box<dyn Fn(HandlerArg)>> { ... } }

Required methods

fn get_env<'a>(&'a self) -> &'a Env<A>

fn handle_diff(&self, diff: Diff)

fn handle_future<T: Serialize + 'static, E: Serialize + 'static>(
    &self,
    future: Box<dyn Future<Item = T, Error = E>>
)

fn schedule_render(&self)

Loading content...

Provided methods

fn run(&self)

fn run_with_task(&self, task: Task<A::Action>)

fn on_action(&self, action: A::Action)

fn set_state(&self, new_state: A::State)

fn emit_future(&self, task: Box<dyn Future<Item = A::Action, Error = ()>>)

fn pop_handler(&self, id: &str) -> Option<Box<dyn Fn(HandlerArg)>>

Loading content...

Implementors

Loading content...