Module global_properties

Module global_properties 

Source
Expand description

A generic mechanism for storing context-wide data.

Global properties are not mutable and represent variables that are required in a global scope during the simulation, such as simulation parameters. A global property can be of any type and is just a value stored in the context. Global properties are defined by the crate::define_global_property!() macro and can then be set in one of two ways:

Attempting to change a global property which has been set already will result in an error.

Global properties can be read with Context::get_global_property_value()

Traits§

ContextGlobalPropertiesExt
GlobalProperty
The trait representing a global property. Do not use this directly, but instead define global properties with define_global_property!.

Functions§

add_global_property
get_global_property_count
A convenience getter for NEXT_GLOBAL_PROPERTY_ID.
initialize_global_property_id
Encapsulates the synchronization logic for initializing a global property’s ID.