write_graph

Function write_graph 

Source
pub fn write_graph<N, E, Ix, P>(
    graph: &Graph<N, E, Ix>,
    path: P,
    format: GraphFormat,
    weighted: bool,
) -> Result<()>
where N: Node + Debug + Display + Clone, E: EdgeWeight + Copy + Debug + Default + Display + Clone, Ix: IndexType, P: AsRef<Path>,
Expand description

Writes a graph to a file

§Arguments

  • graph - The graph to write
  • path - Path to the output file
  • format - Format to write the file in
  • weighted - Whether to include edge weights

§Returns

  • Ok(()) - If the graph was written successfully
  • Err(GraphError) - If there was an error writing the file