[][src]Struct map_model::objects::traffic_signals::ControlTrafficSignal

pub struct ControlTrafficSignal {
    pub id: IntersectionID,
    pub stages: Vec<Stage>,
    pub offset: Duration,
    pub movements: BTreeMap<MovementID, Movement>,
}

Fields

id: IntersectionIDstages: Vec<Stage>offset: Durationmovements: BTreeMap<MovementID, Movement>

Implementations

impl ControlTrafficSignal[src]

pub fn new(
    map: &Map,
    id: IntersectionID,
    timer: &mut Timer
) -> ControlTrafficSignal
[src]

pub fn get_possible_policies(
    map: &Map,
    id: IntersectionID,
    timer: &mut Timer
) -> Vec<(String, ControlTrafficSignal)>
[src]

pub fn brute_force(map: &Map, id: IntersectionID)[src]

pub fn validate(self) -> Result<ControlTrafficSignal, String>[src]

pub fn convert_to_ped_scramble(&mut self) -> bool[src]

pub fn turn_to_movement(&self, turn: TurnID) -> MovementID[src]

pub fn missing_turns(&self) -> BTreeSet<MovementID>[src]

pub fn compressed_id(&self, turn: TurnID) -> CompressedMovementID[src]

impl ControlTrafficSignal[src]

pub fn export(&self, map: &Map) -> TrafficSignal[src]

pub fn import(
    raw: TrafficSignal,
    id: IntersectionID,
    map: &Map
) -> Result<ControlTrafficSignal, String>
[src]

Trait Implementations

impl Clone for ControlTrafficSignal[src]

impl Debug for ControlTrafficSignal[src]

impl<'de> Deserialize<'de> for ControlTrafficSignal[src]

impl PartialEq<ControlTrafficSignal> for ControlTrafficSignal[src]

impl Serialize for ControlTrafficSignal[src]

impl StructuralPartialEq for ControlTrafficSignal[src]

Auto Trait Implementations

impl RefUnwindSafe for ControlTrafficSignal

impl Send for ControlTrafficSignal

impl Sync for ControlTrafficSignal

impl Unpin for ControlTrafficSignal

impl UnwindSafe for ControlTrafficSignal

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,