#![doc = include_str!("../README.md")]
#![no_std]
pub use matched_enums_macro::*;
pub use matched_enums_types::*;
extern crate alloc;
#[cfg(feature = "runtime_configurable")]
mod runtime_configurable_extras {
use alloc::boxed::Box;
#[macro_export]
macro_rules! match_when {
( $pattern: pat ) => {
alloc::boxed::Box::new(move |&value| matches!(value, $pattern))
};
}
pub fn match_never<T>() -> Box<dyn Fn(&T) -> bool> {
Box::new(|_| false)
}
}
#[cfg(feature = "runtime_configurable")]
pub use runtime_configurable_extras::*;
#[cfg(test)]
mod tests;