Skip to main content

convert_file

Function convert_file 

Source
pub fn convert_file(
    path: impl AsRef<Path>,
    to: TargetFormat,
    from: Option<&str>,
) -> Result<Conversion, Error>
Expand description

Convert a case file to to, optionally forcing the source format with from.

This is the canonical file-conversion helper shared by the bindings. It parses path once, writes the resulting Network to to, and returns the converted text plus any fidelity warnings, read side first. An echo (writing back to the source format) returns the retained text with no warnings.

ยงErrors

As parse_file.