pub trait TransformedResult<T> {
// Required methods
fn data(self) -> Result<T>;
fn transformed(self) -> Result<bool>;
fn tnr(self) -> Result<TreeNodeRecursion>;
}
Expand description
Transformation helper to access Transformed
fields in a Result
easily.
§Example
Access the internal data of a Result<Transformed<T>>
as a Result<T>
using the data
method:
let transformed: Result<Transformed<_>> = Ok(Transformed::yes(update_expr()));
// access the internal data of the transformed result, or return the error
let transformed_expr = transformed.data()?;