use std::collections::HashSet;
use ustr::{Ustr, UstrSet};
#[derive(Debug, Clone, Default)]
pub struct BounceOptions {
pub(crate) games: Option<UstrSet>,
pub(crate) slots: Option<HashSet<u32>>,
pub(crate) tags: Option<UstrSet>,
}
impl BounceOptions {
pub fn new() -> Self {
Default::default()
}
pub fn games(mut self, games: impl IntoIterator<Item = impl Into<Ustr>>) -> Self {
self.games = Some(games.into_iter().map(|u| u.into()).collect());
self
}
pub fn slots(mut self, slots: impl IntoIterator<Item = u32>) -> Self {
self.slots = Some(slots.into_iter().collect());
self
}
pub fn tags(mut self, tags: impl IntoIterator<Item = impl Into<Ustr>>) -> Self {
self.tags = Some(tags.into_iter().map(|u| u.into()).collect());
self
}
}