license 0.1.0

A license library.
Documentation
use super::License;
use permissions::*;
use conditions::*;
use limitations::*;

/// The [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
pub struct Apache;

impl License for Apache {
    #[inline]
    fn name() -> &'static str {
        "Apache License 2.0"
    }

    #[inline]
    fn license(&self) -> &str {
        include_str!("../licenses/APACHE")
    }

    #[inline]
    fn permissions() -> Permissions {
        COMMERCIAL_USE | DISTRIBUTION | MODIFICATION | PATENT_RIGHTS | PRIVATE_USE
    }

    #[inline]
    fn conditions() -> Conditions {
        LICENSE_AND_COPYRIGHT_NOTICE | DOCUMENT_CHANGES
    }

    #[inline]
    fn limitations() -> Limitations {
        NO_LIABILITY | NO_TRADEMARK_RIGHTS | NO_WARRANTY
    }

    #[inline]
    fn homepage() -> Option<&'static str> {
        Some("https://www.apache.org/licenses/LICENSE-2.0")
    }
}