pub fn gather_to(filename: &str, structname: &str, public: bool)Expand description
Gather build-time information for the current crate (custom output)
Gathers a limited set of build-time information for the current crate and writes it to a file.
The file is always written to the OUT_DIR directory, as per Cargo conventions. It contains a
zero-size struct with a bunch of associated constants containing the gathered information, and a
long_version_with function (when the std feature is enabled) that takes a slice of extra
key-value pairs to append in the same format.
public controls whether the struct is pub (true) or pub(crate) (false).
The generated code is entirely documented, and will appear in your documentation (in docs.rs, it only will if visibility is public).
See Info for a list of gathered data.
The constants include all the information from Info, as well as the following:
LONG_VERSION: A clap-ready long version string, including the crate version, features, build date, and git information when available.CRATE_FEATURE_STRING: A string containing the crate features, in the format+feat1 +feat2.
We also instruct rustc to rerun the build script if the environment changes, as necessary.