lookup
What this module knows about the license with SPDX identifier id.
The match ignores case (SPDX identifiers are case-insensitive) and accepts the deprecated
identifiers that are still common (GPL-3.0, LGPL-2.1+, AGPL-3.0, …), answering with the
current one (see normalize). About forty common licenses are known; for
any other identifier the answer is None, which means “not in this list”, not “invalid”.
Import
Section titled “Import”Cargo feature license (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
id | &str | The SPDX identifier, such as "MIT" or "Apache-2.0". |
Returns
Section titled “Returns”Option<LicenseInfo> — The LicenseInfo, or None for an identifier that is not known.
