typed_use_cases 0.1.2

Formalize use cases at the type level. Zero runtime overhead. Experimental proof-of-concept.
Documentation
/// Verifies at compile time (within test builds) that the given system type
/// implements all declared use case traits.
///
/// Zero runtime overhead — expands to a #[cfg(test)] block only.
///
/// # Example
/// ```rust,no_run
/// use typed_use_cases::implement_all_use_cases;
/// 
/// # struct System;
/// # trait AddItemToCart {}
/// # trait BrowseCatalog {}
/// # trait Login {}
/// # trait Checkout {}
/// implement_all_use_cases!(System: [
///     AddItemToCart,
///     BrowseCatalog,
///     Login,
///     Checkout,
/// ]);
/// ```
#[macro_export]
macro_rules! implement_all_use_cases {
    ($system:ty : [$($use_case:ty),* $(,)?]) => {
        #[cfg(test)]
        mod __use_cases_verification {
            use super::*;
            $(
                static_assertions::assert_impl_all!($system: $use_case);
            )*
        }
    };
}