license 0.3.0

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

/// The [Unlicense](http://unlicense.org/).
#[derive(Clone, Copy, Debug, Default, Hash, Eq, PartialEq, Ord, PartialOrd)]
pub struct Unlicense;

impl License for Unlicense {
    #[inline]
    fn name(&self) -> &str {
        "The Unlicense"
    }

    #[inline]
    fn id(&self) -> &str {
        "Unlicense"
    }

    #[inline]
    fn is_osi_approved(&self) -> bool {
        false
    }

    #[inline]
    fn text(&self) -> &str {
        include_str!("../files/UNLICENSE")
    }

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

    #[inline]
    fn conditions(&self) -> Conditions {
        Conditions::empty()
    }

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

    #[inline]
    fn homepage(&self) -> Option<&str> {
        Some("http://unlicense.org/")
    }
}

impl_license!(Unlicense);