60 releases (29 stable)

3.6.0+3.26.0 Dec 31, 2024
3.5.1+3.25.0 Sep 15, 2024
3.5.0+3.25.0 Aug 20, 2024
3.4.0+3.24.0 Jun 3, 2024
0.2.12 Jul 14, 2017

#201 in Parser implementations

Download history 617/week @ 2024-09-18 1171/week @ 2024-09-25 414/week @ 2024-10-02 466/week @ 2024-10-09 565/week @ 2024-10-16 535/week @ 2024-10-23 638/week @ 2024-10-30 801/week @ 2024-11-06 817/week @ 2024-11-13 981/week @ 2024-11-20 714/week @ 2024-11-27 1451/week @ 2024-12-04 1174/week @ 2024-12-11 1051/week @ 2024-12-18 541/week @ 2024-12-25 919/week @ 2025-01-01

4,106 downloads per month
Used in 43 crates (11 directly)

MIT/Apache

3MB
291 lines

license

Embedded license information from SPDX.

Rust Crates.io Docs

Use the licenses directly.

use license::License;
use license::licenses::Bsd3Clause;

let bsd3 = Bsd3Clause;
assert!(bsd3.is_osi_approved());
assert_eq!(bsd3.name(), r#"BSD 3-Clause "New" or "Revised" License"#);

Get the license by parsing the license id.

use license::License;

let apache2: & dyn License = "Apache-2.0".parse().unwrap();
assert_eq!(apache2.name(), "Apache License 2.0");

License exceptions are also supported.

use license::Exception;

let gcc: & dyn Exception = "GCC-exception-3.1".parse().unwrap();
assert_eq!(gcc.name(), "GCC Runtime Library exception 3.1");

Serde is supported with the serde feature.

License

Licensed under either of

at your option.

Contribution

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.

Dependencies