Macro cookie_factory::gen_cond
source · macro_rules! gen_cond { (($i:expr, $idx:expr), $cond:expr, $submac:ident!( $($args:tt)* )) => { ... }; (($i:expr, $idx:expr), $cond:expr, $f:expr) => { ... }; }
Expand description
gen_cond!(bool, I -> Result<I,E>) => I -> Result<I,E>
Conditional combinator
Wraps another generator and calls it if the condition is met. This combinator returns the return value of the child generator.