Struct traffic_signal_data::Plan [−][src]
pub struct Plan { pub start_time_seconds: usize, pub stages: Vec<Stage>, pub offset_seconds: usize, }
Expand description
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
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Plan
impl UnwindSafe for Plan
Blanket Implementations
Mutably borrows from an owned value. Read more