Skip to main content

TrafficSignBook

Struct TrafficSignBook 

Source
pub struct TrafficSignBook<'a> { /* private fields */ }
Expand description

Interface for accessing the TrafficSigns in the super::RoadNetwork.

Implementations§

Source§

impl<'a> TrafficSignBook<'a>

Source

pub fn traffic_signs(&self) -> Vec<TrafficSign<'_>>

Gets all the TrafficSigns in the TrafficSignBook.

§Returns

A vector of TrafficSigns.

Source

pub fn get_traffic_sign(&self, id: &String) -> Option<TrafficSign<'_>>

Gets a TrafficSign by its id.

§Arguments
§Returns

The TrafficSign with the given id, or None if not found.

Source

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.

Source

pub fn find_by_type(&self, sign_type: &TrafficSignType) -> Vec<TrafficSign<'_>>

Gets all TrafficSigns of the given TrafficSignType.

§Arguments
§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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.