b45054c8b3d8968b394c89773655597ff2f45d87
[folly.git] / folly / python / __init__.pxd
1 from libcpp cimport bool as cbool
2
3 cdef extern from "folly/ExceptionWrapper.h" namespace "folly":
4     cdef cppclass cFollyExceptionWrapper "folly::exception_wrapper":
5         void throwException() except +
6
7 cdef extern from "folly/Try.h" namespace "folly" nogil:
8     cdef cppclass cFollyTry "folly::Try"[T]:
9         T value()
10         cbool hasException[T]()
11         cbool hasException()
12         cFollyExceptionWrapper exception()
13
14 cdef extern from "folly/futures/Future.h" namespace "folly" nogil:
15     cdef cppclass cFollyFuture "folly::Future"[T]:
16         pass
17         #TODO add via and then
18
19 cdef extern from "folly/Unit.h" namespace "folly":
20     struct cFollyUnit "folly::Unit":
21         pass
22
23     cFollyUnit c_unit "folly::unit"
24
25 cdef extern from "folly/futures/Promise.h" namespace "folly":
26     cdef cppclass cFollyPromise "folly::Promise"[T]:
27         void setValue[M](M& value)
28         void setException[E](E& value)
29
30 cdef extern from "folly/Executor.h" namespace "folly":
31     cdef cppclass cFollyExecutor "folly::Executor":
32         pass