Applies a fallible transforming `f` to the data of this [`Transformed`] object. The returned `Transformed` object has the `transformed` flag set if either `self` or the return value of `f` have the `transformed` flag set.
(
self,
f: F,
)
| 709 | /// The returned `Transformed` object has the `transformed` flag set if either |
| 710 | /// `self` or the return value of `f` have the `transformed` flag set. |
| 711 | pub fn transform_data<U, F: FnOnce(T) -> Result<Transformed<U>>>( |
| 712 | self, |
| 713 | f: F, |
| 714 | ) -> Result<Transformed<U>> { |
| 715 | f(self.data).map(|mut t| { |
| 716 | t.transformed |= self.transformed; |
| 717 | t |
| 718 | }) |
| 719 | } |
| 720 | |
| 721 | /// Maps the [`Transformed`] object to the result of the given `f` depending on the |
| 722 | /// current [`TreeNodeRecursion`] value and the fact that `f` is changing the current |
no test coverage detected