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.
Auto Trait Implementations§
impl<T, N> Freeze for NodeOrTree<T, N>
impl<T, N> RefUnwindSafe for NodeOrTree<T, N>where
N: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, N> Send for NodeOrTree<T, N>
impl<T, N> Sync for NodeOrTree<T, N>
impl<T, N> Unpin for NodeOrTree<T, N>
impl<T, N> UnwindSafe for NodeOrTree<T, N>where
N: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more