Skip to main content

LaneMarking

Struct LaneMarking 

Source
pub struct LaneMarking { /* private fields */ }
Expand description

Describes the complete lane marking at a lane boundary.

A LaneMarking describes all properties of the road marking at a lane’s boundary. The marking can vary along the lane’s s-coordinate, so this structure represents the marking for a specific s-range.

Simple markings: For single-line markings (e.g., a solid white edge line), the type, color, width, and weight fields are sufficient. The lines vector can be left empty.

Complex markings: For compound markings (e.g., double lines with different patterns like kSolidBroken), the lines vector provides detailed information about each component line. When lines is non-empty, the individual line definitions take precedence for geometry and per-line colors. The top-level type, color, and width fields remain useful as summary/fallback values.

Implementations§

Source§

impl LaneMarking

Source

pub fn width(&self) -> f64

Returns the total width of the marking.

Source

pub fn height(&self) -> f64

Returns the total height of the marking.

Source

pub fn material(&self) -> String

Returns the marking material.

§Returns

A String describing the marking material.

Source

pub fn get_type(&self) -> LaneMarkingType

Returns the type of marking.

§Returns

A LaneMarkingType representing the pattern or type of marking.

Source

pub fn weight(&self) -> LaneMarkingWeight

Returns the visual weight or thickness type of the marking.

§Returns

A LaneMarkingWeight that indicates the type of visual weight of the marking.

Source

pub fn color(&self) -> LaneMarkingColor

Source

pub fn lane_change(&self) -> LaneChangePermission

Returns the type of lane change the marking allows.

§Returns

A LaneChangePermission that indicates the type of lane change that is allowed.

Source

pub fn lines(&self) -> Vec<LaneMarkingLine>

Returns all lines in the LaneMarking.

§Returns

A vector of LaneMarkingLines.

Auto Trait Implementations§

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.