Class of results of methods.
More...
#include <msgpack_rpc/messages/call_result.h>
|
|
| CallResult (CallResult &&) noexcept=default |
| | Move constructor.
|
|
| CallResult (const CallResult &)=default |
| | Copy constructor.
|
|
| ~CallResult ()=default |
| | Destructor.
|
| template<typename T> |
| T | error_as () const |
| | Get the error.
|
| bool | is_error () const noexcept |
| | Check whether this object has an error.
|
| bool | is_success () const noexcept |
| | Check whether this object has a successful result.
|
| msgpack::object | object () const noexcept |
| | Get the internal object in msgpack library.
|
| CallResult & | operator= (CallResult &&) noexcept=default |
| | Move assignment operator.
|
| CallResult & | operator= (const CallResult &)=default |
| | Copy assignment operator.
|
| template<typename T> |
| T | result_as () const |
| | Get the result.
|
| std::shared_ptr< msgpack::zone > | zone () const noexcept |
| | Get the internal zone in msgpack library.
|
|
| bool | is_error_ |
| | Whether this is an error.
|
| msgpack::object | object_ |
| | Object in msgpack library.
|
| std::shared_ptr< msgpack::zone > | zone_ |
| | Zone in msgpack library.
|
Class of results of methods.
Definition at line 35 of file call_result.h.
◆ CallResult()
| msgpack_rpc::messages::CallResult::CallResult |
( |
bool | is_error, |
|
|
msgpack::object | object, |
|
|
std::shared_ptr< msgpack::zone > | zone ) |
|
inlineprivate |
Constructor.
- Parameters
-
| [in] | is_error | Whether this is an error. |
| [in] | object | Object in msgpack library. |
| [in] | zone | Zone in msgpack library. |
Definition at line 170 of file call_result.h.
◆ create_error()
| CallResult msgpack_rpc::messages::CallResult::create_error |
( |
msgpack::object | object, |
|
|
std::shared_ptr< msgpack::zone > | zone ) |
|
inlinestaticnodiscard |
Create an error result.
- Parameters
-
| [in] | object | Object in msgpack library. |
| [in] | zone | Zone in msgpack library. |
- Returns
- Result.
Definition at line 57 of file call_result.h.
◆ create_result()
| CallResult msgpack_rpc::messages::CallResult::create_result |
( |
msgpack::object | object, |
|
|
std::shared_ptr< msgpack::zone > | zone ) |
|
inlinestaticnodiscard |
Create an successful result.
- Parameters
-
| [in] | object | Object in msgpack library. |
| [in] | zone | Zone in msgpack library. |
- Returns
- Result.
Definition at line 44 of file call_result.h.
◆ error_as()
template<typename T>
| T msgpack_rpc::messages::CallResult::error_as |
( |
| ) |
const |
|
inlinenodiscard |
Get the error.
- Template Parameters
-
- Returns
- Error.
Definition at line 84 of file call_result.h.
◆ is_error()
| bool msgpack_rpc::messages::CallResult::is_error |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Check whether this object has an error.
- Returns
- Whether this object has an error.
Definition at line 68 of file call_result.h.
◆ is_success()
| bool msgpack_rpc::messages::CallResult::is_success |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Check whether this object has a successful result.
- Returns
- Whether this object has an successful result.
Definition at line 75 of file call_result.h.
◆ object()
| msgpack::object msgpack_rpc::messages::CallResult::object |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the internal object in msgpack library.
- Returns
- Object.
Definition at line 122 of file call_result.h.
◆ operator=() [1/2]
Move assignment operator.
- Returns
- This.
◆ operator=() [2/2]
Copy assignment operator.
- Returns
- This.
◆ result_as()
template<typename T>
| T msgpack_rpc::messages::CallResult::result_as |
( |
| ) |
const |
|
inlinenodiscard |
Get the result.
- Template Parameters
-
- Returns
- Result.
Definition at line 104 of file call_result.h.
◆ zone()
| std::shared_ptr< msgpack::zone > msgpack_rpc::messages::CallResult::zone |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the internal zone in msgpack library.
- Returns
- Zone.
Definition at line 129 of file call_result.h.
◆ is_error_
| bool msgpack_rpc::messages::CallResult::is_error_ |
|
private |
◆ object_
| msgpack::object msgpack_rpc::messages::CallResult::object_ |
|
private |
◆ zone_
| std::shared_ptr<msgpack::zone> msgpack_rpc::messages::CallResult::zone_ |
|
private |
The documentation for this class was generated from the following file: