write_digraph

Function write_digraph 

Source
pub fn write_digraph<N, E, Ix, P>(
    graph: &DiGraph<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 directed graph to a file

§Arguments

  • graph - The directed 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