Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempt to address following issues:
Brief overview:
Result : Result<Result>
(looks a little tricky but this way no Unit class is needed, inspired by FluentResults)Result
class has a set of static factory methods for creatingResult
instances almost equivalent to such inResult<T>
.Result
also has static generic factory methods for creatingResult<T>
success-instancesResult<T>
has an implicit cast fromResult
Result<T>
creation in consumer code:Request<T>
that will not cause any casting.Also, there seem to be no braking changes, at least I didn't have to change any existing tests.
If this PR has any potential, but you want me to refactor something, please let me know.