Macro hrpc::balanced_or_tree[][src]

macro_rules! balanced_or_tree {
    ($x : expr $(,) ?) => { ... };
    ($($x : expr), + $(,) ?) => { ... };
    (@ internal $($left : expr), * ; $head : expr, $($tail : expr), + ; $a : expr
 $(, $b : expr) ?) => { ... };
    (@ internal $($left : expr), * ; $head : expr, $($tail : expr), + ; $a : expr,
 $b : expr, $($more : expr), +) => { ... };
}
Expand description

Takes a list of handler expressions and ors them together in a balanced tree. That is, instead of a.or(b).or(c).or(d), it produces (a.or(b)).or(c.or(d)), thus nesting the types less deeply, which provides improvements in compile time.

It also applies ::warp::Filter::boxed to each handler expression when in debug_assertions mode, improving compile time further.