pub trait License {
// Required method
fn license(&self) -> Option<String>;
}Expand description
Programmatic access to a declared license, from either a parsed package.json
(PackageJson) or a parsed lockfile entry (lock::LockedPackage). Lets a consumer source
a package’s license from whichever it has — the lockfile when it records one, the manifest
otherwise.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".