use crate::feature::Feature;
#[derive(Debug, Clone)]
pub struct Require {
pub(crate) optional: bool,
pub(crate) feature: Feature,
}
impl Require {
pub fn feature(&self) -> &Feature {
&self.feature
}
pub fn optional(&self) -> bool {
self.optional
}
}
impl From<Feature> for Require {
fn from(feature: Feature) -> Self {
Self {
optional: false,
feature,
}
}
}