Skip to main content

WorldConfig

Struct WorldConfig 

Source
pub struct WorldConfig {
    pub space: Box<dyn Space>,
    pub fields: Vec<FieldDef>,
    pub propagators: Vec<Box<dyn Propagator>>,
    pub dt: f64,
    pub seed: u64,
    pub ring_buffer_size: usize,
    pub max_ingress_queue: usize,
    pub tick_rate_hz: Option<f64>,
    pub backoff: BackoffConfig,
}
Expand description

Complete configuration for constructing a simulation world.

Passed to the world constructor (WP-5b). validate() checks all structural invariants without producing intermediate artifacts.

Fields§

§space: Box<dyn Space>

Spatial topology for the simulation.

§fields: Vec<FieldDef>

Field definitions. FieldId(n) corresponds to fields[n].

§propagators: Vec<Box<dyn Propagator>>

Propagators executed in pipeline order each tick.

§dt: f64

Simulation timestep in seconds.

§seed: u64

RNG seed for deterministic simulation.

§ring_buffer_size: usize

Number of snapshots retained in the ring buffer. Default: 8. Minimum: 2.

§max_ingress_queue: usize

Maximum commands buffered in the ingress queue. Default: 1024.

§tick_rate_hz: Option<f64>

Optional target tick rate for realtime-async mode.

§backoff: BackoffConfig

Adaptive backoff configuration.

Implementations§

Source§

impl WorldConfig

Source

pub fn validate(&self) -> Result<(), ConfigError>

Validate all structural invariants.

This is a pure validation pass — it does not return a ReadResolutionPlan. The world constructor calls validate_pipeline() directly to obtain the plan.

Trait Implementations§

Source§

impl Debug for WorldConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.