Skip to main content

RoadObject

Struct RoadObject 

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

Models a physical road object in the road network.

A RoadObject has a type, position, orientation, bounding box, and optional outlines and properties.

Implementations§

Source§

impl<'a> RoadObject<'a>

Source

pub fn id(&self) -> String

Returns the unique identifier of this road object.

Source

pub fn name(&self) -> Option<String>

Returns the optional human-readable name of this road object.

Source

pub fn object_type(&self) -> RoadObjectType

Returns the RoadObjectType of this road object.

Source

pub fn subtype(&self) -> Option<String>

Returns the optional subtype string of this road object.

Source

pub fn position(&self) -> RoadObjectPosition

Returns the RoadObjectPosition of this road object.

Source

pub fn orientation(&self) -> Rotation

Returns the orientation of this road object in the inertial frame.

Source

pub fn bounding_box(&self) -> BoundingBox

Returns the bounding box of this road object.

Source

pub fn is_dynamic(&self) -> bool

Returns whether this road object is dynamic (i.e., may change position or state).

Source

pub fn related_lanes(&self) -> Vec<String>

Returns the IDs of lanes related to this road object.

Source

pub fn num_outlines(&self) -> i32

Returns the number of outlines of this road object.

Source

pub fn outlines(&self) -> Vec<Outline<'_>>

Returns the outlines of this road object.

Source

pub fn properties(&self) -> HashMap<String, String>

Returns the key-value properties of this road object.

Auto Trait Implementations§

§

impl<'a> Freeze for RoadObject<'a>

§

impl<'a> RefUnwindSafe for RoadObject<'a>

§

impl<'a> !Send for RoadObject<'a>

§

impl<'a> !Sync for RoadObject<'a>

§

impl<'a> Unpin for RoadObject<'a>

§

impl<'a> UnsafeUnpin for RoadObject<'a>

§

impl<'a> UnwindSafe for RoadObject<'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.