Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
crate_authors in clap - Rust
[go: Go Back, main page]

Macro crate_authors

Source
macro_rules! crate_authors {
    ($sep:expr) => { ... };
    () => { ... };
}
Expand description

Allows you to pull the authors for the command from your Cargo.toml at compile time in the form: "author1 lastname <author1@example.com>:author2 lastname <author2@example.com>"

You can replace the colons with a custom separator by supplying a replacement string, so, for example, crate_authors!(",\n") would become "author1 lastname <author1@example.com>,\nauthor2 lastname <author2@example.com>,\nauthor3 lastname <author3@example.com>"

ยงExamples

let m = Command::new("cmd")
            .author(crate_authors!("\n"))
            .get_matches();