Crates.io | license |
lib.rs | license |
version | 3.5.1+3.25.0 |
source | src |
created_at | 2017-06-18 16:34:22.695422 |
updated_at | 2024-09-15 09:47:40.253427 |
description | Embedded license information from SPDX. |
homepage | |
repository | https://github.com/evenorog/license |
max_upload_size | |
id | 19435 |
size | 20,104,036 |
Embedded license information from SPDX.
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.
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.