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§

source

fn targets(&self) -> &VecDeque<NodeId>

Returns the list of targets for the railway object.

source

fn add_target(&mut self, target: NodeId)

Adds a target to the list of targets for the railway object.

source

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§

source§

impl MultipleTargets for Train

Implements the MultipleTargets trait for the Train struct.