pub enum NodeOrTree<T, N> {
Node(N),
Tree(T),
}Expand description
Allows different node and tree types in WalkMut.
Variants§
Implementations§
Source§impl<T, N> NodeOrTree<T, N>
impl<T, N> NodeOrTree<T, N>
Source§impl<N> NodeOrTree<N, N>
impl<N> NodeOrTree<N, N>
Source§impl<N> NodeOrTree<Option<N>, N>
impl<N> NodeOrTree<Option<N>, N>
Sourcepub fn flatten_optional(self) -> Option<N>
pub fn flatten_optional(self) -> Option<N>
If tree and node type are equivalent extract inner type.