pub fn count_node_elements(elements: &[RailwayElement]) -> usize
Expand description
Counts the number of Node
elements in a given vector of RailwayElement
s.
This function iterates over the input RailwayElement
s and filters the elements
with the type ElementType::Node
. It returns the count of such elements.
Arguments
elements
- A vector ofRailwayElement
s to count the node elements in.
Returns
An usize
representing the count of node elements found in the input vector.