pub struct TransportLinkMetadata {
pub edge_id: EdgeId,
pub from_node: NodeId,
pub to_node: NodeId,
pub link_class: LinkClass,
pub allowed_modes: AllowedModes,
pub traffic_control: Option<TrafficControlType>,
pub turn_type: Option<TurnType>,
pub speed_limit_kph: Option<f64>,
}Expand description
Minimal reusable transport metadata for a link or edge.
Fields§
§edge_id: EdgeIdStable edge identifier.
from_node: NodeIdSource topology node.
to_node: NodeIdDestination topology node.
link_class: LinkClassCoarse link classification.
allowed_modes: AllowedModesWhich modes may use this link.
traffic_control: Option<TrafficControlType>Optional traffic control semantics.
turn_type: Option<TurnType>Optional turn semantics.
speed_limit_kph: Option<f64>Optional speed limit in km/h.
Implementations§
Source§impl TransportLinkMetadata
impl TransportLinkMetadata
Sourcepub fn new(
edge_id: EdgeId,
from_node: NodeId,
to_node: NodeId,
link_class: LinkClass,
allowed_modes: AllowedModes,
) -> Self
pub fn new( edge_id: EdgeId, from_node: NodeId, to_node: NodeId, link_class: LinkClass, allowed_modes: AllowedModes, ) -> Self
Create link metadata with a required topology and mode definition.
Sourcepub fn with_traffic_control(self, traffic_control: TrafficControlType) -> Self
pub fn with_traffic_control(self, traffic_control: TrafficControlType) -> Self
Attach traffic control semantics.
Sourcepub fn with_turn_type(self, turn_type: TurnType) -> Self
pub fn with_turn_type(self, turn_type: TurnType) -> Self
Attach turning movement semantics.
Sourcepub fn with_speed_limit_kph(self, speed_limit_kph: f64) -> Self
pub fn with_speed_limit_kph(self, speed_limit_kph: f64) -> Self
Attach a speed limit in km/h.
Trait Implementations§
Source§impl Clone for TransportLinkMetadata
impl Clone for TransportLinkMetadata
Source§fn clone(&self) -> TransportLinkMetadata
fn clone(&self) -> TransportLinkMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransportLinkMetadata
impl Debug for TransportLinkMetadata
Source§impl PartialEq for TransportLinkMetadata
impl PartialEq for TransportLinkMetadata
impl Copy for TransportLinkMetadata
impl StructuralPartialEq for TransportLinkMetadata
Auto Trait Implementations§
impl Freeze for TransportLinkMetadata
impl RefUnwindSafe for TransportLinkMetadata
impl Send for TransportLinkMetadata
impl Sync for TransportLinkMetadata
impl Unpin for TransportLinkMetadata
impl UnsafeUnpin for TransportLinkMetadata
impl UnwindSafe for TransportLinkMetadata
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