Trait foxbox_thinkerbell::compile::ExecutableDevEnv
[−]
[src]
pub trait ExecutableDevEnv: Send { type WatchGuard; type API: API<WatchGuard=Self::WatchGuard>; type TimerGuard; fn api(&self) -> &Self::API; fn start_timer(&self, duration: Duration, timer: Box<ExtSender<()>>) -> Self::TimerGuard; }
The environment in which the code is meant to be executed. This can typically be instantiated either with actual bindings to devices, or with a unit-testing framework. // FIXME: Move this to run.rs
Associated Types
type WatchGuard
type API: API<WatchGuard=Self::WatchGuard>
type TimerGuard
A guard returned by start_timer
. When the guard is dropped, the timer is cancelled.
Required Methods
fn api(&self) -> &Self::API
Return a handle to the API.
fn start_timer(&self, duration: Duration, timer: Box<ExtSender<()>>) -> Self::TimerGuard
Implementors
impl ExecutableDevEnv for FakeEnv