pub trait MultipleTargets: RailwayObject {
    // Required methods
    fn targets(&self) -> &VecDeque<NodeId>;
    fn add_target(&mut self, target: NodeId);
    fn remove_target(&mut self) -> Option<NodeId>;
}Expand description
The MultipleTargets trait provides methods for managing a list of targets for a railway object.
Required Methods§
sourcefn add_target(&mut self, target: NodeId)
 
fn add_target(&mut self, target: NodeId)
Adds a target to the list of targets for the railway object.
sourcefn remove_target(&mut self) -> Option<NodeId>
 
fn remove_target(&mut self) -> Option<NodeId>
Removes and returns the first target from the list of targets for the railway object, if any.
Implementors§
impl MultipleTargets for Train
Implements the MultipleTargets trait for the Train struct.