use serde::{Deserialize, Serialize};
use std::collections::BTreeSet;
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct LetterGroup {
pub letters: BTreeSet<char>,
pub required: bool,
}
impl LetterGroup {
pub fn vowels() -> Self {
Self {
letters: BTreeSet::from(['a', 'e', 'i', 'o', 'u']),
required: true,
}
}
pub fn consonants() -> Self {
Self {
letters: BTreeSet::from([
'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't',
'v', 'w', 'x', 'y', 'z',
]),
required: false,
}
}
}