Go to the documentation of this file.
19 #ifndef GRPCPP_IMPL_SERIALIZATION_TRAITS_H
20 #define GRPCPP_IMPL_SERIALIZATION_TRAITS_H
24 #include <type_traits>
62 class UnusedButHereForPartialTemplateSpecialization =
void>
68 template <
typename Message,
typename BufferPtr,
typename =
void>
71 template <
typename Message,
typename BufferPtr>
74 std::void_t<decltype(SerializationTraits<Message>::Serialize(
75 std::declval<grpc_event_engine::experimental::MemoryAllocator*>(),
76 std::declval<const Message&>(), std::declval<BufferPtr>(),
77 std::declval<bool*>()))>> : std::true_type {};
79 template <
typename Message,
typename BufferPtr>
84 template <
typename Message,
typename BufferPtr,
85 bool = has_allocator_serialize_v<Message, BufferPtr>>
89 template <
typename Message,
typename BufferPtr>
93 const Message& msg, BufferPtr buffer,
bool* own_buffer) {
100 template <
typename Message,
typename BufferPtr>
104 const Message& msg, BufferPtr buffer,
bool* own_buffer) {
112 template <
typename Message,
typename BufferPtr>
114 const Message& msg, BufferPtr buffer,
bool* own_buffer) {
116 allocator, msg, buffer, own_buffer);
119 template <
typename BufferPtr,
typename Message>
126 #endif // GRPCPP_IMPL_SERIALIZATION_TRAITS_H
Definition: serialization_traits.h:69
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
auto Deserialize(BufferPtr buffer, Message *msg)
Definition: serialization_traits.h:120
auto Serialize(grpc_event_engine::experimental::MemoryAllocator *allocator, const Message &msg, BufferPtr buffer, bool *own_buffer)
Definition: serialization_traits.h:113
static auto Serialize(grpc_event_engine::experimental::MemoryAllocator *, const Message &msg, BufferPtr buffer, bool *own_buffer)
Definition: serialization_traits.h:102
static auto Serialize(grpc_event_engine::experimental::MemoryAllocator *allocator, const Message &msg, BufferPtr buffer, bool *own_buffer)
Definition: serialization_traits.h:91
constexpr bool has_allocator_serialize_v
Definition: serialization_traits.h:80
Definition: serialization_traits.h:86
Defines how to serialize and deserialize some type.
Definition: serialization_traits.h:63
Definition: async_unary_call.h:410
Definition: memory_allocator.h:33
::google::protobuf::Message Message
Definition: config_protobuf.h:89