Skip to main content

output_format

Function output_format 

Source
pub fn output_format(
    task: Task,
    output: Option<&Path>,
    to: Option<Format>,
) -> Result<Option<Format>, String>
Expand description

The format a task writes. -o’s extension decides; --to decides when the extension is missing or unknown; a known extension that disagrees with --to is an error. -o with neither → the task’s usual format (convert’s depends on its input: None). No -o and no --to → None: the task prints, or convert picks by input. Pure.