pub trait IntoEvalResult<'a, T> {
// Required method
fn into_eval_result(self) -> Result<Value<'a, T>, ErrorOutput<'a>>;
}Expand description
Converts type into Value or an error. This is used to convert the return type
of wrapped functions to the result expected by
NativeFn.
Unlike with TryInto trait from the standard library, the erroneous result here does not
mean that the conversion itself is impossible. Rather, it means that the function evaluation
has failed for the provided args.
This trait is implemented for base value types (such as Numbers, Functions, Values),
for two container types: vectors and tuples, and for Results with the error type
convertible to ErrorOutput.
Required Methods§
Sourcefn into_eval_result(self) -> Result<Value<'a, T>, ErrorOutput<'a>>
fn into_eval_result(self) -> Result<Value<'a, T>, ErrorOutput<'a>>
Performs the conversion.