We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Where we currently use void onDone(@Nullable java.lang.Throwable e, @Nullable T result).
void onDone(@Nullable java.lang.Throwable e, @Nullable T result)
Similar to Result type we use in our Swift SDK. Or similar to kotlin.Result.
In Java it may be sth like this:
public class Result<T> { private T result; private Throwable error; private Result(T result, Throwable error) { this.result = result; this.error = error; } public static <T> Result<T> success(T result) { return new Result<>(result, null); } public static <T> Result<T> error(Throwable error) { return new Result<>(null, error); } public T getResult() { return result; } public Throwable getError() { return error; } public boolean isSuccess() { return error == null; } public boolean isError() { return error != null; } }
For now opened to collect opinions, unfortunately this will break API.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Where we currently use
void onDone(@Nullable java.lang.Throwable e, @Nullable T result)
.Similar to Result type we use in our Swift SDK. Or similar to kotlin.Result.
In Java it may be sth like this:
For now opened to collect opinions, unfortunately this will break API.
The text was updated successfully, but these errors were encountered: