![]() |
v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
|
#include <v8-maybe.h>
Public Member Functions | |
V8_INLINE bool | IsNothing () const |
V8_INLINE bool | IsJust () const |
V8_INLINE bool | operator== (const Maybe &other) const |
V8_INLINE bool | operator!= (const Maybe &other) const |
V8_INLINE bool | IsNothing () const |
V8_INLINE bool | IsJust () const |
V8_INLINE void | ToChecked () const |
V8_INLINE void | Check () const |
V8_WARN_UNUSED_RESULT V8_INLINE bool | To (void *out) const |
V8_INLINE void | FromJust () const & |
V8_INLINE void | FromJust () && |
V8_INLINE void | FromMaybe (const void &default_value) const |
V8_INLINE bool | operator== (const Maybe &other) const |
V8_INLINE bool | operator!= (const Maybe &other) const |
Friends | |
template<class U> | |
Maybe< U > | Nothing () |
Maybe< void > | JustVoid () |
Maybe< U > | Nothing () |
Maybe< U > | Just (const U &u) |
Maybe< U > | Just (U &&u) |
Definition at line 131 of file v8-maybe.h.
|
inline |
Short-hand for ToChecked(), which doesn't return a value. To be used, where the actual value of the Maybe is not needed like Object::Set.
Definition at line 47 of file v8-maybe.h.
|
inline |
Converts this Maybe<> to a value of type T. If this Maybe<> is nothing (empty), V8 will crash the process.
Definition at line 73 of file v8-maybe.h.
|
inline |
Converts this Maybe<> to a value of type T. If this Maybe<> is nothing (empty), V8 will crash the process.
Definition at line 64 of file v8-maybe.h.
|
inline |
Converts this Maybe<> to a value of type T, using a default value if this Maybe<> is nothing (empty).
Definition at line 82 of file v8-maybe.h.
|
inline |
Definition at line 36 of file v8-maybe.h.
|
inline |
Definition at line 134 of file v8-maybe.h.
References V8_INLINE.
|
inline |
Definition at line 35 of file v8-maybe.h.
|
inline |
Definition at line 133 of file v8-maybe.h.
References V8_INLINE.
Definition at line 91 of file v8-maybe.h.
Definition at line 140 of file v8-maybe.h.
References Maybe< T >::operator==(), and V8_INLINE.
Definition at line 86 of file v8-maybe.h.
Definition at line 136 of file v8-maybe.h.
References Maybe< T >::IsJust(), and V8_INLINE.
|
inline |
Converts this Maybe<> to a value of type T. If this Maybe<> is nothing (empty), |false| is returned and |out| is left untouched.
Definition at line 55 of file v8-maybe.h.
|
inline |
An alias for |FromJust|. Will crash if the Maybe<> is nothing.
Definition at line 41 of file v8-maybe.h.
|
friend |
|
friend |
|
friend |
Definition at line 157 of file v8-maybe.h.
|
friend |
Definition at line 104 of file v8-maybe.h.
|
friend |
Definition at line 112 of file v8-maybe.h.