use super::License;
use permissions::*;
use conditions::*;
use limitations::*;
#[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
pub struct Mit(String);
impl Mit {
#[inline]
pub fn new(year: i32, name: &str) -> Mit {
Mit(format!(include_str!("../licenses/MIT"), year, name))
}
}
impl License for Mit {
#[inline]
fn name() -> &'static str {
"MIT License"
}
#[inline]
fn license(&self) -> &str {
&self.0
}
#[inline]
fn permissions() -> Permissions {
COMMERCIAL_USE | DISTRIBUTION | MODIFICATION | PRIVATE_USE
}
#[inline]
fn conditions() -> Conditions {
LICENSE_AND_COPYRIGHT_NOTICE
}
#[inline]
fn limitations() -> Limitations {
NO_LIABILITY | NO_WARRANTY
}
#[inline]
fn homepage() -> Option<&'static str> {
Some("https://opensource.org/licenses/MIT")
}
}