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_name in clap - Rust
[go: Go Back, main page]

Macro crate_name

Source
macro_rules! crate_name {
    () => { ... };
}
Expand description

Allows you to pull the name from your Cargo.toml at compile time.

NOTE: This macro extracts the name from an environment variable CARGO_PKG_NAME. When the crate name is set to something different from the package name, use environment variables CARGO_CRATE_NAME or CARGO_BIN_NAME. See the Cargo Book for more information.

ยงExamples

let m = Command::new(crate_name!())
            .get_matches();