56 releases (25 stable)

new 3.3.1 Apr 15, 2024
3.2.0 Sep 16, 2023
3.1.1 Apr 9, 2023
3.0.0 Dec 14, 2022
0.2.12 Jul 14, 2017

#223 in Parser implementations

Download history 640/week @ 2023-12-23 335/week @ 2023-12-30 651/week @ 2024-01-06 903/week @ 2024-01-13 1005/week @ 2024-01-20 1108/week @ 2024-01-27 982/week @ 2024-02-03 746/week @ 2024-02-10 1175/week @ 2024-02-17 565/week @ 2024-02-24 696/week @ 2024-03-02 635/week @ 2024-03-09 529/week @ 2024-03-16 565/week @ 2024-03-23 894/week @ 2024-03-30 491/week @ 2024-04-06

2,578 downloads per month
Used in 43 crates (11 directly)

MIT/Apache

2.5MB
289 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