| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=9"/><meta name="generator" content="Doxygen 1.8.17"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>GRPC C++: grpc::SerializationTraits< Message, UnusedButHereForPartialTemplateSpecialization > Class Template Reference</title><link href="tabs.css" rel="stylesheet" type="text/css"/><script type="text/javascript" src="jquery.js"></script><script type="text/javascript" src="dynsections.js"></script><link href="search/search.css" rel="stylesheet" type="text/css"/><script type="text/javascript" src="search/searchdata.js"></script><script type="text/javascript" src="search/search.js"></script><link href="doxygen.css" rel="stylesheet" type="text/css" /></head><body><div id="top"><!-- do not remove this div, it is closed by doxygen! --><div id="titlearea"><table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;">  <td id="projectalign" style="padding-left: 0.5em;">   <div id="projectname">GRPC C++    <span id="projectnumber">1.36.1</span>   </div>  </td> </tr> </tbody></table></div><!-- end header part --><!-- Generated by Doxygen 1.8.17 --><script type="text/javascript">/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */var searchBox = new SearchBox("searchBox", "search",false,'Search');/* @license-end */</script><script type="text/javascript" src="menudata.js"></script><script type="text/javascript" src="menu.js"></script><script type="text/javascript">/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */$(function() {  initMenu('',true,false,'search.php','Search');  $(document).ready(function() { init_search(); });});/* @license-end */</script><div id="main-nav"></div><!-- window showing the filter options --><div id="MSearchSelectWindow"     onmouseover="return searchBox.OnSearchSelectShow()"     onmouseout="return searchBox.OnSearchSelectHide()"     onkeydown="return searchBox.OnSearchSelectKey(event)"></div><!-- iframe showing the search results (closed by default) --><div id="MSearchResultsWindow"><iframe src="javascript:void(0)" frameborder="0"         name="MSearchResults" id="MSearchResults"></iframe></div><div id="nav-path" class="navpath">  <ul><li class="navelem"><a class="el" href="namespacegrpc.html">grpc</a></li><li class="navelem"><a class="el" href="classgrpc_1_1_serialization_traits.html">SerializationTraits</a></li>  </ul></div></div><!-- top --><div class="header">  <div class="headertitle"><div class="title">grpc::SerializationTraits< Message, UnusedButHereForPartialTemplateSpecialization > Class Template Reference</div>  </div></div><!--header--><div class="contents"><p>Defines how to serialize and deserialize some type.   <a href="classgrpc_1_1_serialization_traits.html#details">More...</a></p><p><code>#include <<a class="el" href="grpcpp_2impl_2codegen_2serialization__traits_8h_source.html">serialization_traits.h</a>></code></p><a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2><div class="textblock"><h3>template<class Message, class UnusedButHereForPartialTemplateSpecialization = void><br />class grpc::SerializationTraits< Message, UnusedButHereForPartialTemplateSpecialization ></h3><p>Defines how to serialize and deserialize some type. </p><p>Used for hooking different message serialization API's into GRPC. Each SerializationTraits<Message> implementation must provide the following functions:</p><ol type="1"><li>static <a class="el" href="classgrpc_1_1_status.html" title="Did it work? If it didn't, why?">Status</a> Serialize(const Message& msg, ByteBuffer* buffer, bool* own_buffer); OR static <a class="el" href="classgrpc_1_1_status.html" title="Did it work? If it didn't, why?">Status</a> Serialize(const Message& msg, grpc_byte_buffer** buffer, bool* own_buffer); The former is preferred; the latter is deprecated</li><li>static <a class="el" href="classgrpc_1_1_status.html" title="Did it work? If it didn't, why?">Status</a> Deserialize(ByteBuffer* buffer, Message* msg); OR static <a class="el" href="classgrpc_1_1_status.html" title="Did it work? If it didn't, why?">Status</a> Deserialize(grpc_byte_buffer* buffer, Message* msg); The former is preferred; the latter is deprecated</li></ol><p>Serialize is required to convert message to a <a class="el" href="classgrpc_1_1_byte_buffer.html" title="A sequence of bytes.">ByteBuffer</a>, 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.</p><p>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.</p><p>Both functions return a <a class="el" href="classgrpc_1_1_status.html" title="Did it work? If it didn't, why?">Status</a>, allowing them to explain what went wrong if required. </p></div><hr/>The documentation for this class was generated from the following file:<ul><li>include/grpcpp/impl/codegen/<a class="el" href="grpcpp_2impl_2codegen_2serialization__traits_8h_source.html">serialization_traits.h</a></li></ul></div><!-- contents --><!-- start footer part --><hr class="footer"/><address class="footer"><small>Generated on Wed Mar 3 2021 19:17:24 for GRPC C++ by  <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17</small></address></body></html>
 |