Struct ExecutionConfig

Source
pub struct ExecutionConfig {
Show 16 fields pub relay_manager: bool, pub data_logger: bool, pub refill: bool, pub heating: bool, pub tank_level_switch: bool, pub atlas_scientific: bool, pub sensor_manager: bool, pub feed: bool, pub balling: bool, pub monitors: bool, pub ventilation: bool, pub schedule_check: bool, pub ds18b20: bool, pub watchdog: bool, pub memory: bool, pub tcp_communication: bool,
}
Expand description

A snapshot of which application threads are configured to be active at runtime.

This struct is created at application startup from the main ConfigData. It serves as a lightweight, easily passable representation of the execution state, allowing different parts of the application (like the messaging dispatcher) to quickly check if a specific thread or module was launched without needing access to the full configuration object.

Fields§

§relay_manager: bool§data_logger: bool§refill: bool§heating: bool§tank_level_switch: bool§atlas_scientific: bool§sensor_manager: bool§feed: bool§balling: bool§monitors: bool§ventilation: bool§schedule_check: bool§ds18b20: bool§watchdog: bool§memory: bool§tcp_communication: bool

Implementations§

Source§

impl ExecutionConfig

Source

pub fn new(config: &ConfigData) -> Self

Creates a new ExecutionConfig based on the application’s configuration file.

This constructor reads the execute flag from each module’s configuration section within the provided ConfigData to build the execution state.

§Arguments
  • config - A reference to the fully parsed application configuration data.

Trait Implementations§

Source§

impl Clone for ExecutionConfig

Source§

fn clone(&self) -> ExecutionConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExecutionConfig

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for ExecutionConfig

Implements the Default trait for ExecutionConfig.

This provides a standard way to create a default instance where all modules are considered active. This is particularly useful for testing environments or as a fallback. Using the Default trait is more idiomatic than a custom default() function and allows for convenient instantiation with ExecutionConfig::default().

Source§

fn default() -> Self

Returns the “default value” for a type. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T