cfg_match

Macro cfg_match 

Source
macro_rules! cfg_match {
    ( other => {$($tt:tt)*} ) => { ... };
    ( $cfg:meta => $expansion:tt $(, $($rest:tt)+)? ) => { ... };
}
Expand description

A macro that conditionally runs code depending on the feature that is enabled. This is useful when you want to “duck-type” one struct with another for testing purposes

https://stackoverflow.com/a/72744251/10521417