pub use self::{appellation::*, classify::*, ext::*};
pub mod appellation;
pub mod classify;
pub mod ext {
pub use self::{slice::*, string::StringExt};
pub mod slice;
pub mod string;
}
pub trait Contain<T>
where
T: PartialEq,
{
fn contains(&self, elem: &T) -> bool;
fn contains_all(&self, iter: impl IntoIterator<Item = T>) -> bool {
iter.into_iter().all(|i| self.contains(&i))
}
fn contains_some(&self, iter: impl IntoIterator<Item = T>) -> bool {
iter.into_iter().any(|i| self.contains(&i))
}
}
pub trait IntoInner {
type Inner;
fn into_inner(self) -> Self::Inner;
}
pub trait Name {
fn name(&self) -> String;
fn slug(&self) -> String {
self.name().to_lowercase().replace(" ", "-")
}
}
pub(crate) mod prelude {
pub use super::appellation::*;
pub use super::classify::*;
pub use super::ext::*;
pub use super::{Contain, Name};
}