Expand description
Proc-macro for embedding licensing information about a crate.
It also exposes its internal functions that allow
either collecting licensing information at runtime (with collect()),
when in the directory of the manifest,
or collecting licensing information from a specific manifest file (with
collect_from_manifest).
However, the recommended way to use this crate is the macro collect!:
let licensing = embed_licensing::collect!();
for package in licensing.packages {
if let embed_licensing::CrateLicense::SpdxExpression(expr) = package.license {
println!("{} {} ({})", package.name, package.version, expr);
} else {
println!("{} {} uses custom license", package.name, package.version);
}
}Macros§
- collect
macros - Collect licensing information at build-time.
Structs§
- Collect
Config - Configuration options for the collection process.
- Crate
- Information about a crate.
- Licensing
- Licensing information returned by
collect.
Enums§
- Collect
Platform - Crate
License - Represents the license of a
Crate. - Error
- Error type.
Functions§
- collect
- Collect licensing information at runtime.
- collect_
from_ manifest - Collect licensing information from given manifest path.