pub struct IntersectionBook<'a> { /* private fields */ }Expand description
A book of Intersections.
Implementations§
Source§impl<'a> IntersectionBook<'a>
impl<'a> IntersectionBook<'a>
Sourcepub fn get_intersections(&self) -> Vec<Intersection<'_>>
pub fn get_intersections(&self) -> Vec<Intersection<'_>>
Returns all Intersections in the book.
§Returns
A vector of Intersections containing all Intersections in the book.
Sourcepub fn get_intersection(&self, id: &str) -> Option<Intersection<'_>>
pub fn get_intersection(&self, id: &str) -> Option<Intersection<'_>>
Sourcepub fn find_intersection_with_traffic_light(
&self,
traffic_light_id: &str,
) -> Option<Intersection<'_>>
pub fn find_intersection_with_traffic_light( &self, traffic_light_id: &str, ) -> Option<Intersection<'_>>
Finds the Intersection which contains the traffic_light_id.
§Arguments
traffic_light_id- A String with the ID of a rules::TrafficLight.
§Returns
The Intersection which contains the traffic_light_id.
Sourcepub fn find_intersection_with_discrete_value_rule(
&self,
rule_id: &str,
) -> Option<Intersection<'_>>
pub fn find_intersection_with_discrete_value_rule( &self, rule_id: &str, ) -> Option<Intersection<'_>>
Finds the Intersection which contains the rule_id.
§Arguments
rule_id- A String with the ID of a rules::DiscreteValueRule.
§Returns
The Intersection which contains the rule_id.
Sourcepub fn find_intersection_with_inertial_position(
&self,
inertial_position: &InertialPosition,
) -> Option<Intersection<'_>>
pub fn find_intersection_with_inertial_position( &self, inertial_position: &InertialPosition, ) -> Option<Intersection<'_>>
Finds the Intersection which contains the inertial_position.
§Arguments
inertial_position- An InertialPosition to find the Intersection for.
§Returns
The Intersection which contains the inertial_position.
Auto Trait Implementations§
impl<'a> Freeze for IntersectionBook<'a>
impl<'a> RefUnwindSafe for IntersectionBook<'a>
impl<'a> !Send for IntersectionBook<'a>
impl<'a> !Sync for IntersectionBook<'a>
impl<'a> Unpin for IntersectionBook<'a>
impl<'a> UnwindSafe for IntersectionBook<'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