license 0.1.1

A license library.
Documentation
//! A license library.

#[macro_use]
extern crate bitflags;

mod apache;
pub mod conditions;
pub mod limitations;
mod mit;
pub mod permissions;

pub use apache::Apache;
pub use mit::Mit;

use conditions::Conditions;
use limitations::Limitations;
use permissions::Permissions;

/// Trait implemented by all licenses.
pub trait License {
    /// The name of the license.
    fn name() -> &'static str;

    /// The license.
    fn license(&self) -> &str;

    /// The permissions of the license.
    fn permissions() -> Permissions;

    /// The conditions of the license.
    fn conditions() -> Conditions;

    /// The limitations of the license.
    fn limitations() -> Limitations;

    /// The homepage of the license.
    #[inline]
    fn homepage() -> Option<&'static str> {
        None
    }
}