pub struct SimEnvironment {
pub config: SimConfig,
pub clock: SimClock,
pub rng: DeterministicRng,
pub faults: Arc<FaultInjector>,
pub storage: SimStorage,
pub network: SimNetwork,
pub llm: SimLLM,
}Expand description
Environment provided to simulation tests.
TigerStyle: All simulation resources in one place.
Fields§
§config: SimConfigSimulation configuration
clock: SimClockSimulated clock
rng: DeterministicRngDeterministic RNG
faults: Arc<FaultInjector>Fault injector (shared via Arc with storage, network, and llm)
storage: SimStorageSimulated storage
network: SimNetworkSimulated network
llm: SimLLMSimulated LLM
Implementations§
Source§impl SimEnvironment
impl SimEnvironment
Sourcepub fn advance_time_ms(&self, ms: u64) -> u64
pub fn advance_time_ms(&self, ms: u64) -> u64
Advance simulated time in milliseconds.
Sourcepub fn advance_time_secs(&self, secs: f64) -> u64
pub fn advance_time_secs(&self, secs: f64) -> u64
Advance simulated time in seconds.
Auto Trait Implementations§
impl !Freeze for SimEnvironment
impl !RefUnwindSafe for SimEnvironment
impl Send for SimEnvironment
impl !Sync for SimEnvironment
impl Unpin for SimEnvironment
impl !UnwindSafe for SimEnvironment
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