traitCallback[-T] extends (Try[T]) ⇒ Unit with Serializable
Represents a callback that should be called asynchronously
with the result of a computation. Used by Task to signal
the completion of asynchronous computations on runAsync.
The onSuccess method should be called only once, with the successful
result, whereas onError should be called if the result is an error.
Represents a callback that should be called asynchronously with the result of a computation. Used by Task to signal the completion of asynchronous computations on
runAsync
.The
onSuccess
method should be called only once, with the successful result, whereasonError
should be called if the result is an error.