alpm_srcinfo::commands

Function parse

Source
pub fn parse(file: Option<&PathBuf>) -> Result<SourceInfoResult, Error>
Expand description

Parses and interprets a SRCINFO file from a path or stdin.

§Note

If a command is piped to this process, the input is read from stdin. See IsTerminal for more information about how terminal detection works.

§Errors

Returns an error if the input can not be parsed and validated, or if the output can not be formatted in the selected output format.

Furthermore, returns an error array with potentially un/-recoverable (linting-)errors, which needs to be explicitly handled by the caller.