#include <request.h>
Public Member Functions | |
Response (const Request *rq, T v) | |
Public Attributes | |
const Request * | request |
T | value |
Response<T> is a struct to be returned from Request to user's callbacks. It's a type safe way to indicate which "return value" Request has and user awaits.
It just keeps a Request pointer together with some T value (which might be a pointer, a reference or a plain type (copied by value)).
To make it more convenient, typedefs are used. For example, Response<void *> is called DataResponse and corresponding callback pointer is DataCallback.