pub struct EngineBuilder<T> { /* private fields */ }
Expand description
A builder interface for configuring a new Engine
.
A new EngineBuilder
can be obtained with Engine::builder
.
Implementations§
Source§impl<T> EngineBuilder<T>
impl<T> EngineBuilder<T>
Sourcepub fn epoch_tick_interval(&mut self, interval: Duration)
pub fn epoch_tick_interval(&mut self, interval: Duration)
Sets the epoch tick internal for the built Engine
.
This is used by Store::set_deadline
to calculate the number of
“ticks” for epoch interruption, and by the default epoch ticker thread.
The default is DEFAULT_EPOCH_TICK_INTERVAL
.
See EngineBuilder::epoch_ticker_thread
and
wasmtime::Config::epoch_interruption
.
Sourcepub fn epoch_ticker_thread(&mut self, enable: bool)
pub fn epoch_ticker_thread(&mut self, enable: bool)
Configures whether the epoch ticker thread will be spawned when this
Engine
is built.
Enabled by default; if disabled, the user must arrange to call
engine.as_ref().increment_epoch()
every epoch_tick_interval
or
interrupt-based features like Store::set_deadline
will not work.
Auto Trait Implementations§
impl<T> Freeze for EngineBuilder<T>
impl<T> !RefUnwindSafe for EngineBuilder<T>
impl<T> Send for EngineBuilder<T>
impl<T> Sync for EngineBuilder<T>
impl<T> Unpin for EngineBuilder<T>
impl<T> !UnwindSafe for EngineBuilder<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more