pub fn process(&mut self, state: &AircraftState) -> AlertState {
        let mut alert_state = alerts::AlertState::default();

        for (alert, alert_system) in self
            .functionality_mut_array()
            .iter_mut()
            .filter(|(_, alert_system)| !alert_system.is_inhibited())
        {
            if let Some(alert_level) = alert_system.process(state) {
                alert_state.insert(*alert, alert_level);
            }
        }

        alert_state
    }
/// Process a new aircraft state
///
/// This method must be called regularly for the TAWS to function properly!
/// No warnings will be emitted without calling this function.
///
/// # Arguments
///
/// * `alert_system` - The alert system which shall be uninhibited
///
/// # Example
///
/// ```
/// # use opentaws::prelude::*;
/// # let config = TawsConfig::default();
/// # let mut taws = Taws::new(config);
/// let aicraft_state = AircraftState::default();
///
/// let alert_state = taws.process(&aicraft_state);
/// println!("Received AlertState: {:?}", alert_state);
/// ```
Process a new aircraft state
This method must be called regularly for the TAWS to function properly.
No warnings will be emitted without calling this function.
Process a new aircraft state This method must be called regularly for the TAWS to function properly . No warnings will be emitted without calling this function .
pub fn process(&mut self, state: &AircraftState) -> AlertState {
        let mut alert_state = alerts::AlertState::default();
        for (alert, alert_system) in self
            .functionality_mut_array()
            .iter_mut()
            .filter(|(_, alert_system)| !alert_system.is_inhibited())
        {
            if let Some(alert_level) = alert_system.process(state) {
                alert_state.insert(*alert, alert_level);
            }
        }
        alert_state
    }
pub fn process ( & mut self , state : & AircraftState ) -> AlertState { let mut alert_state = alerts :: AlertState :: default ( ) ; for ( alert , alert_system ) in self . functionality_mut_array ( ) . iter_mut ( ) . filter ( | ( _ , alert_system ) | ! alert_system . is_inhibited ( ) ) { if let Some ( alert_level ) = alert_system . process ( state ) { alert_state . insert ( * alert , alert_level ) ; } } alert_state }
Process a new aircraft state
This method must be called regularly for the TAWS to function properly!
Process a new aircraft state This method must be called regularly for the TAWS to function properly!
&mut self
state
&AircraftState
&mut self
state
&AircraftState
example
None
use opentaws::prelude::*;
None
let config = tawsconfig::default();
None
let mut taws = taws::new(config);
let aicraft_state = AircraftState::default().

let alert_state = taws.process(&aicraft_state);
println!("Received AlertState: {:?}", alert_state);
```
let aicraft_state = AircraftState :: default () . let alert_state = taws . process ( &aicraft_state ) ; println! ( " Received AlertState : { : ? } " alert_state ) ; ` ` `