pub struct Phase { /* private fields */ }Expand description
Defines a phase in a traffic rule system.
A phase represents a specific state or configuration of traffic signals and semantic rules within a traffic control system. Each phase has a unique identifier and may include various traffic signal states and rule configurations that dictate how traffic should behave during that phase.
Implementations§
Source§impl Phase
impl Phase
Sourcepub fn discrete_value_rule_states(&self) -> HashMap<String, DiscreteValue>
pub fn discrete_value_rule_states(&self) -> HashMap<String, DiscreteValue>
Gets the states of all discrete value rules for this phase.
§Returns
A HashMap where the key is the rule ID as a String and the value is the
DiscreteValue state of that rule.
Sourcepub fn unique_bulb_ids(&self) -> Vec<UniqueBulbId>
pub fn unique_bulb_ids(&self) -> Vec<UniqueBulbId>
Sourcepub fn bulb_state(&self, unique_bulb_id: &UniqueBulbId) -> Option<BulbState>
pub fn bulb_state(&self, unique_bulb_id: &UniqueBulbId) -> Option<BulbState>
Returns the BulbState corresponding to a bulb_id.
§Arguments
unique_bulb_id- The UniqueBulbId to get the BulbState from.
§Returns
The BulbState the unique_bulb_id is in, or None if the UniqueBulbId is not in this Phase.
Auto Trait Implementations§
impl Freeze for Phase
impl RefUnwindSafe for Phase
impl !Send for Phase
impl !Sync for Phase
impl Unpin for Phase
impl UnwindSafe for Phase
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more