[go: up one dir, main page]

license 0.3.0

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

/// The [GNU General Public License v3.0](http://www.gnu.org/licenses/gpl-3.0).
#[derive(Clone, Copy, Debug, Default, Hash, Eq, PartialEq, Ord, PartialOrd)]
pub struct Gpl3;

impl License for Gpl3 {
    #[inline]
    fn name(&self) -> &str {
        "GNU General Public License v3.0 only"
    }

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

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

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

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

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

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

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

impl_license!(Gpl3);