pub struct TrafficLightBook<'a> { /* private fields */ }
Expand description
Interface for accessing the TrafficLight in the super::RoadNetwork
Implementations§
Source§impl<'a> TrafficLightBook<'a>
impl<'a> TrafficLightBook<'a>
Sourcepub fn traffic_lights(&self) -> Vec<TrafficLight<'_>>
pub fn traffic_lights(&self) -> Vec<TrafficLight<'_>>
Sourcepub fn get_traffic_light(&self, id: &String) -> Option<TrafficLight<'_>>
pub fn get_traffic_light(&self, id: &String) -> Option<TrafficLight<'_>>
Get a TrafficLight by its id
§Arguments
id
- The id of the TrafficLight
§Return
The TrafficLight with the given id. If no TrafficLight is found with the given id, return None.
Auto Trait Implementations§
impl<'a> Freeze for TrafficLightBook<'a>
impl<'a> RefUnwindSafe for TrafficLightBook<'a>
impl<'a> !Send for TrafficLightBook<'a>
impl<'a> !Sync for TrafficLightBook<'a>
impl<'a> Unpin for TrafficLightBook<'a>
impl<'a> UnwindSafe for TrafficLightBook<'a>
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