pub struct TrafficSignBook<'a> { /* private fields */ }Expand description
Interface for accessing the TrafficSigns in the super::RoadNetwork.
Implementations§
Source§impl<'a> TrafficSignBook<'a>
impl<'a> TrafficSignBook<'a>
Sourcepub fn traffic_signs(&self) -> Vec<TrafficSign<'_>>
pub fn traffic_signs(&self) -> Vec<TrafficSign<'_>>
Sourcepub fn get_traffic_sign(&self, id: &String) -> Option<TrafficSign<'_>>
pub fn get_traffic_sign(&self, id: &String) -> Option<TrafficSign<'_>>
Gets a TrafficSign by its id.
§Arguments
id- The id of the TrafficSign.
§Returns
The TrafficSign with the given id, or None if not found.
Sourcepub fn find_by_lane(&self, lane_id: &String) -> Vec<TrafficSign<'_>>
pub fn find_by_lane(&self, lane_id: &String) -> Vec<TrafficSign<'_>>
Gets all TrafficSigns whose related_lanes() includes the given lane ID.
§Arguments
lane_id- The lane ID to filter by.
§Returns
A vector of TrafficSigns associated with the given lane.
Sourcepub fn find_by_type(&self, sign_type: &TrafficSignType) -> Vec<TrafficSign<'_>>
pub fn find_by_type(&self, sign_type: &TrafficSignType) -> Vec<TrafficSign<'_>>
Gets all TrafficSigns of the given TrafficSignType.
§Arguments
sign_type- The TrafficSignType to filter by.
§Returns
A vector of TrafficSigns of the given type.
Auto Trait Implementations§
impl<'a> Freeze for TrafficSignBook<'a>
impl<'a> RefUnwindSafe for TrafficSignBook<'a>
impl<'a> !Send for TrafficSignBook<'a>
impl<'a> !Sync for TrafficSignBook<'a>
impl<'a> Unpin for TrafficSignBook<'a>
impl<'a> UnsafeUnpin for TrafficSignBook<'a>
impl<'a> UnwindSafe for TrafficSignBook<'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