[go: up one dir, main page]

license 0.3.0

A license library.
Documentation
use std::fmt::{self, Display, Formatter};
use std::error::Error;

/// An unknown license.
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq, Hash, Ord, PartialOrd)]
pub struct Unknown;

impl Display for Unknown {
    #[inline]
    fn fmt(&self, f: &mut Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}

impl Error for Unknown {
    #[inline]
    fn description(&self) -> &str {
        "unable to recognize a matching license"
    }
}