Skip to main content

write_network

Function write_network 

Source
pub fn write_network(path: &Path, network: &Network) -> Result<()>
Expand description

Writes network to the .net.xml file at path, creating or truncating it.

let network = sumo_types::read_network(std::path::Path::new("city.net.xml"))?;
sumo_types::write_network(std::path::Path::new("city-copy.net.xml"), &network)?;

§Errors

Returns an error if path can’t be created, or if writing to it fails.