-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protocols.clj
54 lines (36 loc) · 884 Bytes
/
protocols.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(ns qbits.auspex.protocols)
(defprotocol Then
(-then [_ f] [_ f executor]))
(defprotocol FMap
(-fmap [_ f] [_ f executor]))
(defprotocol Catch
(-catch [_ f] [_ f pattern]))
(defprotocol Finally
(-finally [_ f] [_ f pattern]))
(defprotocol Success!
(-success! [_ val]))
(defprotocol Complete!
(-complete! [_ f executor]))
(defprotocol Success?
(-success? [_]))
(defprotocol Error!
(-error! [_ val]))
(defprotocol Error?
(-error? [_]))
(defprotocol Cancel!
(-cancel! [_]))
(defprotocol Canceled?
(-canceled? [_]))
(defprotocol Timeout!
(-timeout! [_ timeout-ms] [_ timeout-ms timeout-val]))
(defprotocol Handle
(-handle [_ f] [_ f executor]))
(defprotocol Realized?
(-realized? [_]))
(defprotocol WhenComplete
(-when-complete [_ f] [_ f executor]))
(defprotocol Empty
(-empty [x]))
(defprotocol Wrap
(-wrap [x]))
(defprotocol Future)