unwrap_node

Macro unwrap_node 

Source
macro_rules! unwrap_node {
    ($n:expr, $( $ty:tt ),+) => { ... };
}
Expand description

Extracts the first matching variant from an iterator of RefNode values.

This macro takes an iterator ($n) and a list of RefNode variant types ($ty), returning the first occurrence of any specified variant as Some(RefNode::<$ty>). If no matching variant is found, it returns None.

§Arguments

  • $n: An iterator over RefNode values.
  • $ty: One or more RefNode variant names to search for.

§Returns

  • Some(RefNode::<$ty>) if a matching variant is found.
  • None if no matching variant is found.