pub struct SimulatorEngineBuilder { /* private fields */ }Expand description
Implementations§
Source§impl SimulatorEngineBuilder
impl SimulatorEngineBuilder
Sourcepub fn new() -> SimulatorEngineBuilder
pub fn new() -> SimulatorEngineBuilder
Create a new engine builder.
Sourcepub fn name(self, name: impl Into<String>) -> SimulatorEngineBuilder
pub fn name(self, name: impl Into<String>) -> SimulatorEngineBuilder
Set the engine name.
Sourcepub fn max_devices(self, max: usize) -> SimulatorEngineBuilder
pub fn max_devices(self, max: usize) -> SimulatorEngineBuilder
Set the maximum number of devices.
Sourcepub fn max_points(self, max: usize) -> SimulatorEngineBuilder
pub fn max_points(self, max: usize) -> SimulatorEngineBuilder
Set the maximum number of data points.
Sourcepub fn tick_interval(self, interval: Duration) -> SimulatorEngineBuilder
pub fn tick_interval(self, interval: Duration) -> SimulatorEngineBuilder
Set the tick interval.
Sourcepub fn tick_interval_ms(self, ms: u64) -> SimulatorEngineBuilder
pub fn tick_interval_ms(self, ms: u64) -> SimulatorEngineBuilder
Set the tick interval in milliseconds.
Sourcepub fn workers(self, count: usize) -> SimulatorEngineBuilder
pub fn workers(self, count: usize) -> SimulatorEngineBuilder
Set the number of worker threads.
Sourcepub fn enable_metrics(self, enable: bool) -> SimulatorEngineBuilder
pub fn enable_metrics(self, enable: bool) -> SimulatorEngineBuilder
Enable or disable metrics collection.
Sourcepub fn metrics_interval(self, interval: Duration) -> SimulatorEngineBuilder
pub fn metrics_interval(self, interval: Duration) -> SimulatorEngineBuilder
Set the metrics export interval.
Sourcepub fn log_level(self, level: impl Into<String>) -> SimulatorEngineBuilder
pub fn log_level(self, level: impl Into<String>) -> SimulatorEngineBuilder
Set the log level.
Sourcepub fn preset(self, preset: EnginePreset) -> SimulatorEngineBuilder
pub fn preset(self, preset: EnginePreset) -> SimulatorEngineBuilder
Apply a configuration preset.
Sourcepub fn with_config(self, config: EngineConfig) -> SimulatorEngineBuilder
pub fn with_config(self, config: EngineConfig) -> SimulatorEngineBuilder
Use an existing configuration.
Sourcepub fn build(self) -> SimulatorEngine
pub fn build(self) -> SimulatorEngine
Build the simulator engine.
Sourcepub async fn build_and_start(self) -> Result<SimulatorEngine, Error>
pub async fn build_and_start(self) -> Result<SimulatorEngine, Error>
Build and start the engine.
Trait Implementations§
Source§impl Default for SimulatorEngineBuilder
impl Default for SimulatorEngineBuilder
Source§fn default() -> SimulatorEngineBuilder
fn default() -> SimulatorEngineBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SimulatorEngineBuilder
impl RefUnwindSafe for SimulatorEngineBuilder
impl Send for SimulatorEngineBuilder
impl Sync for SimulatorEngineBuilder
impl Unpin for SimulatorEngineBuilder
impl UnsafeUnpin for SimulatorEngineBuilder
impl UnwindSafe for SimulatorEngineBuilder
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