Struct map_model::edits::perma_traffic_signal::Plan
source · 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§
source§impl<'de> Deserialize<'de> for Plan
impl<'de> Deserialize<'de> for Plan
source§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
source§impl PartialEq for Plan
impl PartialEq for Plan
impl StructuralPartialEq for Plan
Auto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnwindSafe for Plan
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