pub struct RefillErrorStates {
pub error_switch_stuck_high: bool,
pub error_switch_stuck_low: bool,
pub error_receive_tank_level_switch_position: bool,
pub error_sql_update_failed: bool,
pub error_sql_get_historic_data_failed: bool,
}Expand description
Contains the error flags for the refill component.
Fields§
§error_switch_stuck_high: bool§error_switch_stuck_low: bool§error_receive_tank_level_switch_position: bool§error_sql_update_failed: bool§error_sql_get_historic_data_failed: boolImplementations§
Source§impl RefillErrorStates
impl RefillErrorStates
Sourcepub fn reset_all_errors(&mut self)
pub fn reset_all_errors(&mut self)
Resets all internal error flags to false.
This method clears all error conditions within the RefillErrors struct,
effectively setting the refill system back to a state where no current
errors are actively reported. This is typically invoked after the user having addressed
the root cause of an error.
Trait Implementations§
Source§impl Display for RefillErrorStates
impl Display for RefillErrorStates
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the RefillErrorStates struct into a concise, single-line string for development purposes.
This implementation is designed for quick inspection of the refill control’s error states. It displays the boolean value of each error flag, making it easy to see which specific error conditions are currently active.
§Arguments
f- A mutable reference to the formatter, as required by thefmt::Displaytrait.
§Returns
An empty Result (Ok(())) on successful formatting.
§Errors
Returns a fmt::Error if an I/O error occurs while writing to the formatter.