alpm_pkginfo::commands

Function format

Source
pub fn format(
    file: Option<PathBuf>,
    output_format: OutputFormat,
    pretty: bool,
) -> Result<(), Error>
Expand description

Formats a file according to a PKGINFO schema.

Validates and prints the parsed file in the specified output format to stdout.

The output will be pretty-printed if the pretty flag is set to true and if the format supports it.

ยงErrors

Returns an error if parsing of file fails or if the output format can not be created.