pub mod any;
pub mod id;
pub mod mailbox;
pub mod mapping;
pub mod strategies {
pub mod brute_force;
pub mod partitions;
pub mod stateful_tree;
}
pub mod matching {
pub mod case_match;
pub mod matched_ids;
pub mod matched_messages;
}
pub use any::{AnyKey, AnyKeyBox};
pub use id::{CaseId, MessageId, MessageIdFactory};
pub use mailbox::MailBox;
pub use mapping::Mapping;
pub use matching::case_match::CaseMatch;
pub use matching::matched_ids::{MatchedIds, MatchedIdsSorted};
pub use matching::matched_messages::MatchedMessages;
pub type Store<M> = std::collections::HashMap<MessageId, M>;
pub type GuardFn<const C: usize, M> = fn(&[&M; C], &Mapping<C>) -> bool;
pub type AcceptFn<M> = fn(&M) -> bool;
pub type KeyFn<M> = fn(&M) -> Option<AnyKeyBox>;
pub trait CaseHandler<M> {
fn consume(&mut self, id: MessageId, store: &Store<M>) -> Option<MatchedIds>;
fn remove(&mut self, messages: &MatchedIds, store: &Store<M>);
fn is_empty(&self) -> bool;
}
#[cfg(test)]
#[macro_export]
macro_rules! id {
($id:expr) => {
$crate::MessageId::new($id)
};
}