Struct traffic_signal_data::Plan [−][src]
pub struct Plan { pub start_time_seconds: usize, pub stages: Vec<Stage>, pub offset_seconds: usize, }
A plan describes how a traffic signal is configured during some period of time. Multiple plans allow a single intersection to behave differently in the middle of the night with low traffic, compared to the middle of rush hour.
Fields
start_time_seconds: usize
This plan takes effect at this local time, measured in seconds after midnight. The plan lasts until the next plan in the listed sequence starts, or ends at midnight if it’s the last plan.
stages: Vec<Stage>
The traffic signal repeatedly cycles through these stages. During each stage, only some turns are protected and permitted through the intersection.
offset_seconds: usize
Relative to a central clock, delay the first stage by this many seconds.
Trait Implementations
impl<'de> Deserialize<'de> for Plan
[src]
impl<'de> Deserialize<'de> for Plan
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,