toResult
Converts the current EncodableResult instance into a Kotlin Result type. If the EncodableResult represents a success, a successful Result is returned containing the value. If the EncodableResult represents a failure, a failed Result is returned containing the exception.
Return
A Result instance containing the success value or the failure exception.