Liking cljdoc? Tell your friends :D

promesa.protocols

A generic promise abstraction and related protocols.

A generic promise abstraction and related protocols.

ICancellableprotocol

A cancellation abstraction.

A cancellation abstraction.
-cancel!
(-cancel! _)
-cancelled?
(-cancelled? _)
sourceraw docstring

ICompletableprotocol

-reject!
(-reject! _ e)

Deliver an error to empty promise.

Deliver an error to empty promise.

-resolve!
(-resolve! _ v)

Deliver a value to empty promise.

Deliver a value to empty promise.

source

IExecutorprotocol

-run!
(-run! _ task)

Run a task and return a promise.

Run a task and return a promise.

-submit!
(-submit! _ task)

Submit a task and return a promise.

Submit a task and return a promise.

source

IPromiseprotocol

A promise abstraction.

A promise abstraction.
-bind
(-bind _ f)
(-bind _ f executor)

Apply function to a computation and flatten.

Apply function to a computation and flatten.

-finally
(-finally _ f)
(-finally _ f executor)

Apply function to a computation identpendently if is failed or successful; the return value is ignored.

Apply function to a computation identpendently if is failed or
successful; the return value is ignored.

-handle
(-handle _ f)
(-handle _ f executor)

Apply function to a computation identpendently if is failed or successful and flatten if promise found.

Apply function to a computation identpendently if is failed or
successful and flatten if promise found.

-map
(-map _ f)
(-map _ f executor)

Apply function to a computation

Apply function to a computation

-mapErr
(-mapErr _ f)
(-mapErr _ f executor)

Apply function to a failed computation.

Apply function to a failed computation.

-then
(-then _ f)
(-then _ f executor)

Apply function to a computation and flatten if promise found.

Apply function to a computation and flatten if promise found.

-thenErr
(-thenErr _ f)
(-thenErr _ f executor)

Apply function to a failed computation. and flatten if promise found.

Apply function to a failed computation. and flatten if promise found.

sourceraw docstring

IPromiseFactoryprotocol

A promise constructor abstraction.

A promise constructor abstraction.
-promise
(-promise _)

Create a promise instance from other types

Create a promise instance from other types

sourceraw docstring

ISchedulerprotocol

A generic abstraction for scheduler facilities.

A generic abstraction for scheduler facilities.
-schedule!
(-schedule! _ ms func)

Schedule a function to be executed in future.

Schedule a function to be executed in future.

sourceraw docstring

IStateprotocol

Additional state/introspection abstraction.

Additional state/introspection abstraction.
-extract
(-extract _)

Extract the current value.

Extract the current value.

-pending?
(-pending? _)

Retutns true if a promise is pending.

Retutns true if a promise is pending.

-rejected?
(-rejected? _)

Returns true if a promise is rejected.

Returns true if a promise is rejected.

-resolved?
(-resolved? _)

Returns true if a promise is resolved.

Returns true if a promise is resolved.

sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close