Maps the container part of the error.
(self, with: impl FnOnce(T) -> U)
| 97 | |
| 98 | /// Maps the container part of the error. |
| 99 | pub fn map<U>(self, with: impl FnOnce(T) -> U) -> LenTooLong<U> { |
| 100 | LenTooLong { |
| 101 | len: self.len, |
| 102 | too_long: with(self.too_long), |
| 103 | } |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | /// Try to convert `x` into `B` and forget the container part of the error if any. |