GRPC C++
1.30.0
|
Defines how to serialize and deserialize some type. More...
#include <serialization_traits.h>
Defines how to serialize and deserialize some type.
Used for hooking different message serialization API's into GRPC. Each SerializationTraits<Message> implementation must provide the following functions:
Serialize is required to convert message to a ByteBuffer, and return that byte buffer through *buffer. *own_buffer should be set to true if the caller owns said byte buffer, or false if ownership is retained elsewhere.
Deserialize is required to convert buffer into the message stored at msg. max_receive_message_size is passed in as a bound on the maximum number of message bytes Deserialize should accept.
Both functions return a Status, allowing them to explain what went wrong if required.