Provides embedded license information from SPDX.
Use the licenses directly.
```rust use license::License; use license::licenses::Bsd3Clause;
let bsd3 = Bsd3Clause; assert!(bsd3.isosiapproved()); assert_eq!(bsd3.name(), r#"BSD 3-Clause "New" or "Revised" License"#); ```
Get the license by parsing the license id.
```rust use license::License;
let apache2 = "Apache-2.0".parse::<&dyn License>().unwrap(); assert_eq!(apache2.name(), "Apache License 2.0"); ```
License exceptions are also supported.
```rust use license::Exception;
let gcc = "GCC-exception-3.1".parse::<&dyn Exception>().unwrap(); assert_eq!(gcc.name(), "GCC Runtime Library exception 3.1"); ```
By default, this library downloads the latest licenses from
github.com/spdx.
If you want to build it offline instead, you can enable the offline
feature.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.