pub struct RealityEngine { /* private fields */ }Expand description
Reality engine that coordinates chaos, latency, and MockAI subsystems
This engine applies the appropriate settings to each subsystem based on the current reality level. It acts as a coordinator and doesn’t own the subsystems directly, but provides configuration that can be applied to them.
Implementations§
Source§impl RealityEngine
impl RealityEngine
Sourcepub fn new() -> RealityEngine
pub fn new() -> RealityEngine
Create a new reality engine with default level
Sourcepub fn with_level(level: RealityLevel) -> RealityEngine
pub fn with_level(level: RealityLevel) -> RealityEngine
Create a new reality engine with a specific level
Sourcepub async fn get_level(&self) -> RealityLevel
pub async fn get_level(&self) -> RealityLevel
Get the current reality level
Sourcepub async fn set_level(&self, level: RealityLevel)
pub async fn set_level(&self, level: RealityLevel)
Set the reality level and update configuration
Sourcepub async fn get_config(&self) -> RealityConfig
pub async fn get_config(&self) -> RealityConfig
Get the current reality configuration
Sourcepub async fn get_chaos_config(&self) -> ChaosConfig
pub async fn get_chaos_config(&self) -> ChaosConfig
Get chaos configuration for current level
Sourcepub async fn get_latency_profile(&self) -> LatencyProfile
pub async fn get_latency_profile(&self) -> LatencyProfile
Get latency profile for current level
Sourcepub async fn get_mockai_config(&self) -> IntelligentBehaviorConfig
pub async fn get_mockai_config(&self) -> IntelligentBehaviorConfig
Get MockAI configuration for current level
Sourcepub async fn create_preset(
&self,
name: String,
description: Option<String>,
) -> RealityPreset
pub async fn create_preset( &self, name: String, description: Option<String>, ) -> RealityPreset
Create a preset from current configuration
Sourcepub async fn apply_preset(&self, preset: RealityPreset)
pub async fn apply_preset(&self, preset: RealityPreset)
Apply a preset configuration
Trait Implementations§
Source§impl Clone for RealityEngine
impl Clone for RealityEngine
Source§fn clone(&self) -> RealityEngine
fn clone(&self) -> RealityEngine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RealityEngine
impl Debug for RealityEngine
Source§impl Default for RealityEngine
impl Default for RealityEngine
Source§fn default() -> RealityEngine
fn default() -> RealityEngine
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RealityEngine
impl !RefUnwindSafe for RealityEngine
impl Send for RealityEngine
impl Sync for RealityEngine
impl Unpin for RealityEngine
impl UnsafeUnpin for RealityEngine
impl !UnwindSafe for RealityEngine
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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