[−][src]Trait drone_core::proc_loop::ProcLoop
The trait for declaring a synchronous command loop.
This trait uses only associated items, thus it doesn't require the type to ever be instantiated.
Associated Types
type Context: Context<Self::Req, Self::ReqRes>
[src]
Token type that allows suspending the task while waiting for a request result.
type Cmd: Send + 'static
[src]
enum
of all possible commands.
type CmdRes: Send + 'static
[src]
union
of all possible command results.
type Req: Send + 'static
[src]
enum
of all possible requests.
type ReqRes: Send + 'static
[src]
union
of all possible request results.
Associated Constants
pub const STACK_SIZE: usize
[src]
Size of the process stack in bytes.
Required methods
pub fn run_cmd(cmd: Self::Cmd, context: Self::Context) -> Self::CmdRes
[src]
The commands runner.
See ProcLoop
for examples.
Provided methods
pub fn on_create()
[src]
Runs on the process creation.
pub fn on_enter()
[src]
Runs inside the synchronous context before the command loop.
pub fn on_drop()
[src]
Runs on the process destruction.