pub fn count_node_elements(elements: &[RailwayElement]) -> usize
Expand description

Counts the number of Node elements in a given vector of RailwayElements.

This function iterates over the input RailwayElements and filters the elements with the type ElementType::Node. It returns the count of such elements.

Arguments

  • elements - A vector of RailwayElements to count the node elements in.

Returns

An usize representing the count of node elements found in the input vector.