Enum MessagingDomain

Source
#[repr(i32)]
pub enum MessagingDomain { Refill = 1, Ventilation = 3, Feed = 8, Heating = 9, Balling = 11, Monitors = 12, Watchdog = 13, Unknown = -1, }
Expand description

Identifies the addressee of the message

Variants§

§

Refill = 1

refill control

§

Ventilation = 3

ventilation control

§

Feed = 8

feed control

§

Heating = 9

heating control

§

Balling = 11

Balling dosing control

§

Monitors = 12

monitors

§

Watchdog = 13

watchdog communication

§

Unknown = -1

in case the numeric value in the message could not be assigned to one of the above

Implementations§

Source§

impl MessagingDomain

Source

pub fn is_domain_thread_executed( &self, execution_config: &ExecutionConfig, ) -> bool

Checks if the thread corresponding to a specific messaging domain is active.

This method consults the provided ExecutionConfig to determine if the thread responsible for handling a given MessagingDomain was started at application launch. This is useful for preventing attempts to send messages to threads that are not running, which would otherwise result in channel errors.

§Arguments
  • execution_config - A reference to the application’s runtime execution configuration, which holds the active status of each thread.
§Returns

Returns true if the thread for the domain is configured as active, and false if the thread is inactive or if the domain is MessagingDomain::Unknown.

Trait Implementations§

Source§

impl Clone for MessagingDomain

Source§

fn clone(&self) -> MessagingDomain

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 MessagingDomain

Source§

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

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

impl Display for MessagingDomain

Source§

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

Formats the MessagingDomain enum into its human-readable string representation.

This implementation allows MessagingDomain variants to be displayed directly using macros like println! or format!, returning the name of the domain.

§Arguments
  • f - A mutable reference to the formatter, as required by the fmt::Display trait.
§Returns

A fmt::Result indicating whether the formatting operation was successful.

Source§

impl From<i32> for MessagingDomain

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for MessagingDomain

Source§

fn eq(&self, other: &MessagingDomain) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for MessagingDomain

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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