QtRestClient  3.0.0
A library for generic JSON-based REST-APIs, with a mechanism to map JSON to Qt objects
Public Types | Public Member Functions | List of all members
QtRestClient::GenericRestReplyAwaitable< DataClassType, ErrorClassType > Class Template Reference

A helper class to be used with QtCoroutines to await a generic rest reply. More...

#include <restreplyawaitable.h>

Public Types

using type = DataClassType
 Type returned when awaiting this class.
 
using exceptionType = GenericAwaitedException< ErrorClassType >
 Exception type thrown in case of an error.
 

Public Member Functions

 GenericRestReplyAwaitable (GenericRestReply< DataClassType, ErrorClassType > *reply)
 Construction form a generic rest reply.
 
 GenericRestReplyAwaitable (GenericRestReplyAwaitable< DataClassType, ErrorClassType > &&other) noexcept
 Move constructor.
 
GenericRestReplyAwaitableoperator= (GenericRestReplyAwaitable< DataClassType, ErrorClassType > &&other) noexcept
 Move assignment operator.
 
void prepare (const std::function< void()> &resume)
 Prepare the awaitable for resumption.
 
type result ()
 Extract the result from the awaitable.
 

Detailed Description

template<typename DataClassType, typename ErrorClassType = QObject*>
class QtRestClient::GenericRestReplyAwaitable< DataClassType, ErrorClassType >

A helper class to be used with QtCoroutines to await a generic rest reply.

Definition at line 17 of file genericrestreply.h.


The documentation for this class was generated from the following files: