Maps the [`Transformed`] object to the result of the given `f` depending on the current [`TreeNodeRecursion`] value and the fact that `f` is changing the current node's sibling.
(
self,
f: F,
)
| 744 | /// current [`TreeNodeRecursion`] value and the fact that `f` is changing the current |
| 745 | /// node's sibling. |
| 746 | pub fn transform_sibling<F: FnOnce(T) -> Result<Transformed<T>>>( |
| 747 | self, |
| 748 | f: F, |
| 749 | ) -> Result<Transformed<T>> { |
| 750 | match self.tnr { |
| 751 | TreeNodeRecursion::Continue | TreeNodeRecursion::Jump => { |
| 752 | f(self.data).map(|mut t| { |
| 753 | t.transformed |= self.transformed; |
| 754 | t |
| 755 | }) |
| 756 | } |
| 757 | TreeNodeRecursion::Stop => Ok(self), |
| 758 | } |
| 759 | } |
| 760 | |
| 761 | /// Maps the [`Transformed`] object to the result of the given `f` depending on the |
| 762 | /// current [`TreeNodeRecursion`] value and the fact that `f` is changing the current |
no test coverage detected