Macro cookie_factory::gen_cond
[−]
[src]
macro_rules! gen_cond { (($i:expr, $idx:expr), $cond:expr, $submac:ident!( $($args:tt)* )) => { ... }; (($i:expr, $idx:expr), $cond:expr, $f:expr) => { ... }; }
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.