A step in a promise pipeline.
class ref _Then[A: Any #share, B: Any #share]
A step is represented by a fulfill function and a reject function.
new iso create( fulfill: Fulfill[A, B] iso, rejected: Reject[B] iso) : _Then[A, B] iso^
Returns the next promise in the chain.
fun box promise() : Promise[B] tag
Called with the result of the previous promise when it is fulfilled.
fun ref apply( value: A) : None val
Called when the previous promise is rejected.
fun ref reject() : None val
© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/promises-_Then