macro_rules! downcast {
    (($id:ident : $type:ty = $val:expr) -> $main:block else $other:block) => { ... };
    (($id:ident : $type:ty = $val:expr) -> $main:block) => { ... };
}
Expand description

Conditionally execute code depending on if an ObjectRef contains an inner object of a certain type or not. This helps greatly improve readability in internal code