class Promise::ResolvedPromise(Input)
Defined in:
promise/resolved_promise.crConstructors
Instance Method Summary
-
#get : Input
get the value directly if the promise is resolved
- #reject(reason)
-
#resolve(value)
defaults for resolved promises
-
#resolved?
Has the promise value been resolved?
-
#then(&callback : Input -> _)
Callback to be executed once the value is available
Instance methods inherited from class Promise::DeferredPromise(Input)
catch(&errback : Exception -> _)
catch,
finally(&callback : Exception | Nil -> _)
finally,
get : Input
get,
raw_value
raw_value,
reject(reason)
reject,
resolve(value)
resolve,
resolved?
resolved?,
then(callback : Input -> _, errback : Exception -> _)then(&callback : Input -> _)
then : DeferredPromise(Nil) then, type : Class type, type_var type_var
Constructor methods inherited from class Promise::DeferredPromise(Input)
new
new
Instance methods inherited from class Promise
catch(&errback : Exception -> _)
catch,
finally(&callback : Exception | Nil -> _)
finally,
then : DeferredPromise(Nil)
then,
type : Class
type
Class methods inherited from class Promise
all(promises)all(*promises) all, all_common(promises) all_common, defer(&block : -> _) defer, race(promises)
race(*promises) race, race_common(promises) race_common, resolve(value) resolve
Constructor Detail
Instance Method Detail
def resolved?
#
Description copied from class Promise::DeferredPromise(Input)
Has the promise value been resolved?
def then(&callback : Input -> _)
#
Description copied from class Promise::DeferredPromise(Input)
Callback to be executed once the value is available