pub struct EngineBuilder { /* private fields */ }Expand description
Builds an Engine: Engine::builder.
Implementations§
Source§impl EngineBuilder
impl EngineBuilder
Sourcepub fn signing_key(self, key: SigningKey) -> Self
pub fn signing_key(self, key: SigningKey) -> Self
The mesh’s signing key.
Sourcepub fn signing_key_file(self, path: impl Into<PathBuf>) -> Self
pub fn signing_key_file(self, path: impl Into<PathBuf>) -> Self
The mesh’s signing key, from a file holding its 32-byte seed: the 32 bytes, or 64 hex digits (an optional final newline). The only file the engine reads.
Sourcepub fn runtime(self, runtime: Arc<dyn Runtime>) -> Self
pub fn runtime(self, runtime: Arc<dyn Runtime>) -> Self
Adds a runtime, for the language its Runtime::lang names.
Sourcepub fn depth_limit(self, limit: usize) -> Self
pub fn depth_limit(self, limit: usize) -> Self
The depth limit: frames on the evaluation stack (default 10,000).
Sourcepub fn fuel(self, fuel: u64) -> Self
pub fn fuel(self, fuel: u64) -> Self
The fuel of each request: runtime steps plus input reads (default 10,000,000).
Sourcepub fn work_limit(self, units: u64) -> Self
pub fn work_limit(self, units: u64) -> Self
The work limit of each request: every evaluation attempt (those discarded by a restart
included) and the engine’s validation reads, in fuel units (default 16 times the
fuel). It bounds the total cost of a request beyond its normative fuel
(EngineError::WorkExceeded). Since 0.3.0.
Sourcepub fn memo_capacity(self, entries: usize) -> Self
pub fn memo_capacity(self, entries: usize) -> Self
How many answers the memo keeps (default 1,000,000); when full it starts afresh. 0 turns the memo off: every request then validates through the store.
Sourcepub fn licence(self, licence: impl Into<String>) -> Self
pub fn licence(self, licence: impl Into<String>) -> Self
The mesh’s own licence: an SPDX identifier or an https URL (default CC-BY-4.0).
Since 0.4.1 (spec-0.4.3, SPEC 8.5) it is the licence of computed receipts with no
input receipt (a constant, or only empty slices); a receipt with inputs inherits its
licence from theirs (see the crate documentation, “Licence inheritance”).
Sourcepub fn summary(
self,
f: impl Fn(&Cell) -> String + Send + Sync + 'static,
) -> Self
pub fn summary( self, f: impl Fn(&Cell) -> String + Send + Sync + 'static, ) -> Self
The summary of a computed receipt, from its cell. The default says which function
the mesh computed: "<namespace>/<function> computed by <mesh host>.".
Sourcepub fn clock(self, clock: Arc<dyn Clock>) -> Self
pub fn clock(self, clock: Arc<dyn Clock>) -> Self
The clock (default SystemClock).
Sourcepub fn build(self) -> Result<Engine, ConfigError>
pub fn build(self) -> Result<Engine, ConfigError>
Checks the configuration and builds the engine.