pub trait Runtime: RuntimeDef {
const MODE: RuntimeMode = RuntimeMode::Server;
// Required methods
fn deploy<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>;
fn start<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>;
fn run_command<'a>(
&mut self,
command: RunProcess,
mode: RuntimeMode,
ctx: &mut Context<Self>,
) -> ProcessIdResponse<'a>;
// Provided methods
fn stop<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a> { ... }
fn kill_command<'a>(
&mut self,
_kill: KillProcess,
_ctx: &mut Context<Self>,
) -> EmptyResponse<'a> { ... }
fn offer<'a>(&mut self, _ctx: &mut Context<Self>) -> OutputResponse<'a> { ... }
fn test<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a> { ... }
fn join_network<'a>(
&mut self,
_network: CreateNetwork,
_ctx: &mut Context<Self>,
) -> EndpointResponse<'a> { ... }
}
Expand description
Command handling interface for runtimes
Provided Associated Constants§
const MODE: RuntimeMode = RuntimeMode::Server
Required Methods§
Sourcefn deploy<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>
fn deploy<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>
Deploy and configure the runtime
Sourcefn start<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>
fn start<'a>(&mut self, ctx: &mut Context<Self>) -> OutputResponse<'a>
Start the runtime
Sourcefn run_command<'a>(
&mut self,
command: RunProcess,
mode: RuntimeMode,
ctx: &mut Context<Self>,
) -> ProcessIdResponse<'a>
fn run_command<'a>( &mut self, command: RunProcess, mode: RuntimeMode, ctx: &mut Context<Self>, ) -> ProcessIdResponse<'a>
Start a runtime command
Provided Methods§
Sourcefn stop<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a>
fn stop<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a>
Stop the runtime
Sourcefn kill_command<'a>(
&mut self,
_kill: KillProcess,
_ctx: &mut Context<Self>,
) -> EmptyResponse<'a>
fn kill_command<'a>( &mut self, _kill: KillProcess, _ctx: &mut Context<Self>, ) -> EmptyResponse<'a>
Stop runtime command execution
Sourcefn offer<'a>(&mut self, _ctx: &mut Context<Self>) -> OutputResponse<'a>
fn offer<'a>(&mut self, _ctx: &mut Context<Self>) -> OutputResponse<'a>
Output a market Offer template stub
Sourcefn test<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a>
fn test<'a>(&mut self, _ctx: &mut Context<Self>) -> EmptyResponse<'a>
Perform a self-test
Sourcefn join_network<'a>(
&mut self,
_network: CreateNetwork,
_ctx: &mut Context<Self>,
) -> EndpointResponse<'a>
fn join_network<'a>( &mut self, _network: CreateNetwork, _ctx: &mut Context<Self>, ) -> EndpointResponse<'a>
Join a VPN network
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.