pub enum Yes {}
pub enum Maybe {}
pub enum No {}
pub trait YesNo {
fn is_yes() -> bool {
false
}
fn is_no() -> bool {
false
}
}
impl YesNo for Yes {
fn is_yes() -> bool {
true
}
}
impl YesNo for No {
fn is_no() -> bool {
true
}
}
pub trait YesMaybe {
fn is_yes() -> bool {
false
}
fn is_maybe() -> bool {
false
}
}
impl YesMaybe for Yes {
fn is_yes() -> bool {
true
}
}
impl YesMaybe for Maybe {
fn is_maybe() -> bool {
true
}
}
pub trait NoMaybe {
fn is_no() -> bool {
false
}
fn is_maybe() -> bool {
false
}
}
impl NoMaybe for No {
fn is_no() -> bool {
true
}
}
impl NoMaybe for Maybe {
fn is_maybe() -> bool {
true
}
}