_Then[A: Any #share, B: Any #share]

A step in a promise pipeline.

class ref _Then[A: Any #share, B: Any #share]

Constructors

create

new iso create(
  fulfill: Fulfill[A, B] iso,
  rejected: Reject[B] iso)
: _Then[A, B] iso^

Parameters

Returns


Public Functions

promise

Returns the next promise in the chain.

fun box promise()
: Promise[B] tag

Returns


apply

Called with the result of the previous promise when it is fulfilled.

fun ref apply(
  value: A)
: None val

Parameters

  • value: A

Returns


reject

Called when the previous promise is rejected.

fun ref reject()
: None val

Returns