[][src]Constant dia_args::DIA_ARGS_FILE_FORMAT

pub const DIA_ARGS_FILE_FORMAT: &str

Description of argument file format, in English

This constant can be useful if you want to include in your program's documentation. It has a title and its own content. So you don't have to prefix with any message/description.

Examples

use std::borrow::Cow;
use dia_args::{
    DIA_ARGS_FILE_FORMAT, DIA_ARGS_FILE_NAME,
    docs::{Cfg, Docs, I18n},
};

let docs = format!(
    concat!(
        // Here is program documentation.
        "This program does something.\n\n",
        "Options can be set via either command line or from {:?} file at root",
        " directory of the program. Options set via command line will",
        " override the ones from file.\n\n",

        // Here is description of argument file format. Note that we don't need
        // a title for it.
        "{}",
    ),
    DIA_ARGS_FILE_NAME, DIA_ARGS_FILE_FORMAT,
);
Docs::new(Cow::Borrowed("Some Program"), Cow::Owned(docs)).print();