Skip to main content

Runtime

Trait Runtime 

Source
pub trait Runtime {
    // Required methods
    fn set_manager(self, manager: Arc<StateManager>) -> Self;
    fn manager(&self) -> &StateManager;
    fn run(&mut self) -> impl Future<Output = Result<RuntimeStatus>> + Send;

    // Provided methods
    fn prepare(&mut self) -> impl Future<Output = Result<()>> + Send { ... }
    fn setup(&mut self, setup: SetupFn<Self>) { ... }
    fn finalize(&mut self) -> impl Future<Output = Result<()>> + Send { ... }
}

Required Methods§

Source

fn set_manager(self, manager: Arc<StateManager>) -> Self

Source

fn manager(&self) -> &StateManager

Source

fn run(&mut self) -> impl Future<Output = Result<RuntimeStatus>> + Send

Provided Methods§

Source

fn prepare(&mut self) -> impl Future<Output = Result<()>> + Send

Source

fn setup(&mut self, setup: SetupFn<Self>)

Source

fn finalize(&mut self) -> impl Future<Output = Result<()>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§