roopes_core/primitives/executable/
mod.rs

1//!
2#![cfg_attr(feature = "doc-images",
3  cfg_attr(
4    all(),
5    doc = ::embed_doc_image::embed_image!(
6        "executable-diagram",
7        "src/primitives/executable/executable.svg"
8)))]
9//! Provides an encapsulated unit of execution.
10//!
11//! ![executable diagram][executable-diagram]
12
13pub mod heap;
14pub mod lambda;
15
16pub use heap::Heap;
17pub use lambda::Lambda;
18
19#[cfg(test)]
20mod tests;
21
22/// Encapsulates a block of execution which may be
23/// run zero-or-more times.
24pub trait Executable
25{
26    /// Run the unit of execution.
27    fn execute(&self);
28}
29
30/// Exposes the [`Executable`] type at the library
31/// level.
32pub mod prelude
33{
34    pub use super::Executable;
35}