pub struct Segment<'a> { /* private fields */ }
Expand description
A Segment represents a bundle of adjacent Lanes which share a continuously traversable road surface. Every LanePosition on a given Lane of a Segment has a corresponding LanePosition on each other Lane, all with the same height-above-surface h, that all map to the same GeoPoint in 3-space.
Segments are grouped by Junction.
Implementations§
Source§impl<'a> Segment<'a>
impl<'a> Segment<'a>
Sourcepub fn id(&self) -> String
pub fn id(&self) -> String
Returns the id of the Segment. The id is a unique identifier for the Segment within the RoadGeometry.
§Returns
A String
containing the id of the Segment.
Sourcepub fn junction(&self) -> Result<Junction<'_>, MaliputError>
pub fn junction(&self) -> Result<Junction<'_>, MaliputError>
Returns the Junction to which this Segment belongs.
§Returns
An Result<Junction, MaliputError>
containing the Junction to which this Segment belongs.
If the Segment does not belong to a Junction, an error is returned.
Auto Trait Implementations§
impl<'a> Freeze for Segment<'a>
impl<'a> RefUnwindSafe for Segment<'a>
impl<'a> !Send for Segment<'a>
impl<'a> !Sync for Segment<'a>
impl<'a> Unpin for Segment<'a>
impl<'a> UnwindSafe for Segment<'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