class Promise::Deferred(Input)

Defined in:

promise/deferred.cr

Constructors

Instance Method Summary

Instance methods inherited from class Object

__check_for_promise__ __check_for_promise__

Macros inherited from class Object

__check_if_promise__ __check_if_promise__

Constructor Detail

def self.new(promise : DeferredPromise(Input) | ResolvedPromise(Input) | RejectedPromise(Input)) #

[View source]

Instance Method Detail

def inspect(io : IO) : Nil #

We need to implement this as @reference could be uninitialized


[View source]
def pending(resolution : Proc(Input, Nil), rejection : Proc(Exception, Exception)) : Nil #

[View source]
def ref(value : Input | DeferredPromise(Input) | RejectedPromise(Input) | ResolvedPromise(Input)) : DeferredPromise(Input) | RejectedPromise(Input) | ResolvedPromise(Input) #

[View source]
def reject(reason : String | Exception) #

[View source]
def resolve(value) #

[View source]
def resolved? #

[View source]