Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overload for passing object when Result is Failure #491

Open
pantonis opened this issue Mar 9, 2023 · 1 comment
Open

Add overload for passing object when Result is Failure #491

pantonis opened this issue Mar 9, 2023 · 1 comment

Comments

@pantonis
Copy link

pantonis commented Mar 9, 2023

Sometimes during the Result.Failure check we need to have the resulting object for further processing in addition to the error. Is it possible to add it as an overload?

@vkhorikov
Copy link
Owner

The concept for Result is that it should either be successful and contain a value, or unsuccessful and not contain a value. For your case, I recommend introducing a custom class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants