|
proxygen
|
#include <Try.h>
Public Types | |
| typedef T | element_type |
Public Member Functions | |
| Try () noexcept | |
| Try (const T &v) noexcept(std::is_nothrow_copy_constructible< T >::value) | |
| Try (T &&v) noexcept(std::is_nothrow_move_constructible< T >::value) | |
| template<typename... Args> | |
| Try (in_place_t, Args &&...args) noexcept(std::is_nothrow_constructible< T, Args &&... >::value) | |
| template<class T2 = T> | |
| Try (typename std::enable_if< std::is_same< Unit, T2 >::value, Try< void > const & >::type t) noexcept | |
| Implicit conversion from Try<void> to Try<Unit> More... | |
| Try (exception_wrapper e) noexcept | |
| Try (Try< T > &&t) noexcept(std::is_nothrow_move_constructible< T >::value) | |
| Try & | operator= (Try< T > &&t) noexcept(std::is_nothrow_move_constructible< T >::value) |
| Try (const Try &t) noexcept(std::is_nothrow_copy_constructible< T >::value) | |
| Try & | operator= (const Try &t) noexcept(std::is_nothrow_copy_constructible< T >::value) |
| ~Try () | |
| template<typename... Args> | |
| T & | emplace (Args &&...args) noexcept(std::is_nothrow_constructible< T, Args &&... >::value) |
| template<typename... Args> | |
| exception_wrapper & | emplaceException (Args &&...args) noexcept(std::is_nothrow_constructible< exception_wrapper, Args &&... >::value) |
| T & | value ()& |
| T && | value ()&& |
| const T & | value () const & |
| const T && | value () const && |
| void | throwIfFailed () const |
| const T & | operator* () const & |
| T & | operator* ()& |
| T && | operator* ()&& |
| const T && | operator* () const && |
| const T * | operator-> () const |
| T * | operator-> () |
| bool | hasValue () const |
| bool | hasException () const |
| template<class Ex > | |
| bool | hasException () const |
| exception_wrapper & | exception ()& |
| exception_wrapper && | exception ()&& |
| const exception_wrapper & | exception () const & |
| const exception_wrapper && | exception () const && |
| std::exception * | tryGetExceptionObject () |
| std::exception const * | tryGetExceptionObject () const |
| template<class E > | |
| E * | tryGetExceptionObject () |
| template<class E > | |
| E const * | tryGetExceptionObject () const |
| template<class Ex , class F > | |
| bool | withException (F func) |
| template<class Ex , class F > | |
| bool | withException (F func) const |
| template<class F > | |
| bool | withException (F func) |
| template<class F > | |
| bool | withException (F func) const |
| template<bool isTry, typename R > | |
| std::enable_if< isTry, R >::type | get () |
| template<bool isTry, typename R > | |
| std::enable_if<!isTry, R >::type | get () |
Private Types | |
| enum | Contains { Contains::VALUE, Contains::EXCEPTION, Contains::NOTHING } |
Private Member Functions | |
| void | destroy () noexcept |
Private Attributes | |
| Contains | contains_ |
| union { | |
| T value_ | |
| exception_wrapper e_ | |
| }; | |
| typedef T folly::Try< T >::element_type |
|
strongprivate |
| Enumerator | |
|---|---|
| VALUE | |
| EXCEPTION | |
| NOTHING | |
Definition at line 56 of file Try.h.
|
inlinenoexcept |
|
inlineexplicitnoexcept |
Definition at line 78 of file Try.h.
|
inlineexplicitnoexcept |
Definition at line 87 of file Try.h.
|
inlineexplicitnoexcept |
|
noexcept |
Implicit conversion from Try<void> to Try<Unit>
Definition at line 39 of file Try-inl.h.
References cpp.keywords::EXCEPTION, folly::pushmi::detail::t, and folly::T.
|
inlineexplicitnoexcept |
|
noexcept |
Definition at line 28 of file Try-inl.h.
References cpp.keywords::EXCEPTION, folly::gen::move, folly::pushmi::detail::t, and folly::T.
|
noexcept |
Definition at line 73 of file Try-inl.h.
References cpp.keywords::EXCEPTION, folly::pushmi::detail::t, folly::T, and value.
| folly::Try< T >::~Try | ( | ) |
Definition at line 111 of file Try-inl.h.
References testing::Args(), cpp.keywords::EXCEPTION, LIKELY, and UNLIKELY.
|
privatenoexcept |
Definition at line 176 of file Try-inl.h.
References cpp.keywords::EXCEPTION, folly::exchange(), LIKELY, NOTHING, and UNLIKELY.
|
noexcept |
Definition at line 121 of file Try-inl.h.
References testing::Args(), destroy(), and folly::T.
Referenced by TEST(), folly::tryEmplace(), and folly::tryEmplaceWith().
|
noexcept |
Definition at line 131 of file Try-inl.h.
References destroy(), and cpp.keywords::EXCEPTION.
Referenced by folly::tryEmplace(), and folly::tryEmplaceWith().
|
inline |
Definition at line 260 of file Try.h.
Referenced by folly::Future< T >::onTimeout(), and folly::futures::detail::retryingImpl().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 248 of file Try.h.
Referenced by folly::Try< void >::emplaceException(), folly::Future< T >::onTimeout(), TEST(), and folly::Try< void >::throwIfFailed().
Definition at line 256 of file Try.h.
|
inline |
Definition at line 242 of file Try.h.
Referenced by folly::futures::detail::retryingImpl(), and TEST().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 53 of file Try-inl.h.
References destroy(), cpp.keywords::EXCEPTION, folly::gen::move, folly::pushmi::detail::t, and folly::T.
Definition at line 87 of file Try-inl.h.
References destroy(), cpp.keywords::EXCEPTION, folly::pushmi::detail::t, folly::T, and value.
| void folly::Try< T >::throwIfFailed | ( | ) | const |
Definition at line 164 of file Try-inl.h.
References cpp.keywords::EXCEPTION.
|
inline |
Definition at line 292 of file Try.h.
Referenced by TEST().
|
inline |
Definition at line 295 of file Try.h.
Definition at line 305 of file Try.h.
|
inline |
Definition at line 309 of file Try.h.
| T && folly::Try< T >::value | ( | ) |
Definition at line 140 of file Try-inl.h.
References folly::gen::move, and folly::T.
Referenced by folly::futures::detail::TryEquals< T >::equals(), folly::makeTryWith(), folly::futures::detail::retryingImpl(), TEST(), folly::Try< void >::throwIfFailed(), folly::tryEmplaceWith(), and folly::Try< T >::value().
| T&& folly::Try< T >::value | ( | ) |
| const T && folly::Try< T >::value | ( | ) | const |
Definition at line 152 of file Try-inl.h.
References folly::gen::move, folly::T, and folly::Try< T >::value().
| const T&& folly::Try< T >::value | ( | ) | const |
|
inline |
Definition at line 321 of file Try.h.
|
inline |
Definition at line 328 of file Try.h.
Definition at line 344 of file Try.h.
Definition at line 351 of file Try.h.
| union { ... } |
|
private |
| exception_wrapper folly::Try< T >::e_ |
Definition at line 374 of file Try.h.
Referenced by folly::Try< void >::emplaceException(), and folly::Try< void >::throwIfFailed().
| T folly::Try< T >::value_ |