<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" version="1.1">
  <file original="NoName" source-language="en" datatype="plaintext" target-language="zh_Hans">
    <body>
      <trans-unit xml:space="preserve" approved="no" id="12586daef80d59db">
        <source>BodyWriter</source>
        <target state="translated">消息体写入器</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">10</context>
        </context-group>
        <note from="developer">type: section title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="813acf05b30c26dd">
        <source>A [*BodyWriter] provides an [@https://en.wikipedia.org/wiki/Online_algorithm online algorithm] to obtain a sequence of zero or more buffers from a body during serialization. The implementation creates an instance of this type when needed, and calls into it one or more times to retrieve buffers holding body octets. The interface of [*BodyWriter] is intended to obtain buffers for these scenarios:</source>
        <target state="translated">[*BodyWriter] 提供一种 [@https://en.wikipedia.org/wiki/Online_algorithm 在线算法]，用于在序列化过程中从消息体获取零个或多个缓冲区序列。实现会在需要时创建该类型的实例，并调用一次或多次以检索包含消息体八位字节的缓冲区。[BodyWriter] 的接口设计用于获取以下场景的缓冲区：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">12</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d725df9b3b9e3e8b">
        <source>* A body that does not entirely fit in memory.
* A body produced incrementally from coroutine output.
* A body represented by zero or more buffers already in memory.
* A body whose size is not known ahead of time.
* Body data generated dynamically from other threads.
* Body data computed algorithmically.</source>
        <target state="translated">* 无法完整存入内存的消息体。
* 由协程输出逐步生成的消息体。
* 由已在内存中的零个或多个缓冲区表示的消息体。
* 大小无法预先确定的消息体。
* 由其他线程动态生成的消息体数据。
* 通过算法计算得到的消息体数据。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">20</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f3a497a2277c8436">
        <source>Associated Types</source>
        <target state="translated">关联类型</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">27</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e16db469b2100d7c">
        <source>* [link beast.ref.boost__beast__http__is_body_writer `is_body_writer`]
* __Body__</source>
        <target state="translated">* [link beast.ref.boost__beast__http__is_body_writer `is_body_writer`]
* __Body__</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8b11f6ce20c469c2">
        <source>Requirements</source>
        <target state="translated">要求</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">32</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="9dbb5aa5deff0697">
        <source>These requirements may undergo non-backward compatible</source>
        <target state="translated">这些要求可能发生不向后兼容的变更</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">35</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3d4704df21a8f596">
        <source>In this table:</source>
        <target state="translated">在下表中：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">39</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7abc1003f857c825">
        <source>* `W` denotes a type meeting the requirements of [*BodyWriter].
* `B` denotes a __Body__ where</source>
        <target state="translated">W 表示满足 [*BodyWriter] 要求的类型。

B 表示一个 Body 类型，其中</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">41</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="6cb7148462b1e24f">
        <source>* `a` denotes a value of type `W`.
* `h` denotes a const value of type `header&lt;isRequest, Fields&gt; const&amp;`.
* `v` denotes a possibly const value of type `Body::value_type&amp;`.
* `ec` is a value of type [link beast.ref.boost__beast__error_code `error_code&amp;`].
* `W&lt;T&gt;` is the type `boost::optional&lt;std::pair&lt;T, bool&gt;&gt;`.</source>
        <target state="translated">* `a` 表示类型为 `W` 的值。  
* `h` 表示类型为 `header&lt;isRequest, Fields&gt; const&amp;` 的常量值。  
* `v` 表示类型可能为常量的 `Body::value_type&amp;` 值。  
* `ec` 表示类型为 [link beast.ref.boost__beast__error_code `error_code&amp;`] 的值。  
* `W&lt;T&gt;` 表示类型 `boost::optional&lt;std::pair&lt;T, bool&gt;&gt;`。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f2992975a033cf9f">
        <source>Valid expressions</source>
        <target state="translated">有效表达式</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8d4d85b75b66a390">
        <source>Expression</source>
        <target state="translated">表达式</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4260caf7dbb163c2">
        <source>Type</source>
        <target state="translated">类型</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e9c35981ac872e45">
        <source>Semantics, Pre/Post-conditions</source>
        <target state="translated">语义、前置条件与后置条件</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2bf430ae2ffa90d7">
        <source>`W::const_buffers_type`</source>
        <target state="translated">`W::const_buffers_type`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="6b0dad0a516486a3">
        <source>A type which meets the requirements of __ConstBufferSequence__. This is the type of buffer returned by `W::get`.</source>
        <target state="translated">该类型满足 ConstBufferSequence 的要求，为 W::get 返回的缓冲区类型。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ef31b4faa219b8ff">
        <source>`W{h,v};`</source>
        <target state="translated">`W{h,v};`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5441ec3e51857fa4">
        <source>Constructible from `h` and `v`. The lifetime of `h` and `v` are guaranteed to end no earlier than after the `W` is destroyed. The writer shall not access the contents of `h` or `v` before the first call to `init`, permitting lazy construction of the message.

The constructor may optionally require that `h` and `v` are `const` references, with these consequences:

* If `W` requires that `h` and `v` are const references, then the corresponding serializer constructors for messages with this body type will will accept a const reference to a message, otherwise:

* If `W` requires that `h` and `v` are non-const references, then the corresponding serializer constructors for messages with this body type will require a non-const reference to a message.</source>
        <target state="translated">可从 `h` 和 `v` 构造。`h` 和 `v` 的生命周期保证不早于 `W` 销毁前结束。写入器在首次调用 `init` 之前不应访问 `h` 或 `v` 的内容，以支持消息的延迟构造。

构造函数可选择要求 `h` 和 `v` 为 const 引用，其影响如下：

* 若 `W` 要求 `h` 和 `v` 为 const 引用，则对应消息体类型的序列化器构造函数将接受对消息的 const 引用。
* 否则，若 `W` 要求 `h` 和 `v` 为非 const 引用，则对应消息体类型的序列化器构造函数将要求对消息的非 const 引用。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3acc83e35f72010c">
        <source>`a.init(ec)`</source>
        <target state="translated">`a.init(ec)`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="00091bc3d6f22fc1">
        <source>Called once to fully initialize the object before any calls to `get`. The message body becomes valid before entering this function, and remains valid until the writer is destroyed. The function will ensure that `!ec` is `true` if there was no error or set to the appropriate error code if there was one.</source>
        <target state="translated">最终译文：在调用 get 之前调用一次，以完全初始化对象。消息体在进入该函数前有效，并持续有效直到写入器销毁。该函数在无错误时确保 !ec 为 true，否则将 ec 设置为对应的错误码。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7b83cc4b000785af">
        <source>`a.get(ec)`</source>
        <target state="translated">`a.get(ec)`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4d30275fbd9a7b27">
        <source>`W&lt;W::const_buffers_type&gt;`</source>
        <target state="translated">`W&lt;W::const_buffers_type&gt;`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b3b83107fd65a517">
        <source>Called one or more times after `init` succeeds. This function returns `boost::none` if all buffers representing the body have been returned in previous calls or if it sets `ec` to indicate an error. Otherwise, if there are buffers remaining the function should return a pair with the first element containing a non-zero length buffer sequence representing the next set of octets in the body, while the second element is a `bool` meaning `true` if there may be additional buffers returned on a subsequent call, or `false` if the buffer returned on this call is the last buffer representing the body. The function will ensure that `!ec` is `true` if there was no error or set to the appropriate error code if there was one.</source>
        <target state="translated">`init` 成功后，该函数被调用一次或多次。若之前调用已返回代表该主体的所有缓冲区，或该函数设置 `ec` 用于指示错误，则该函数返回 `boost::none`。若仍存在剩余缓冲区，则该函数应返回一个 pair，其第一元素包含一个长度非零的缓冲区序列，用于表示该主体中下一组八位字节；其第二元素为 `bool` 类型，`true` 用于表示后续调用可能返回更多缓冲区，`false` 用于表示本次调用所返回的缓冲区为该主体最后一部分。该函数确保：若无错误，则 `!ec` 为 `true`；若存在错误，则将 `ec` 设为对应的错误码。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="224a3e920796d4a5">
        <source>Exemplar</source>
        <target state="translated">示例</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">110</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="fa69553690b47eb3">
        <source>Models</source>
        <target state="translated">模型</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">114</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8ce05a17c42c9aa7">
        <source>* [link beast.ref.boost__beast__http__basic_dynamic_body.writer `basic_dynamic_body::writer`]
* [link beast.ref.boost__beast__http__basic_file_body__writer `basic_file_body::writer`]
* [link beast.ref.boost__beast__http__basic_string_body.writer `basic_string_body::writer`]
* [link beast.ref.boost__beast__http__buffer_body.writer `buffer_body::writer`]
* [link beast.ref.boost__beast__http__empty_body.writer `empty_body::writer`]
* [link beast.ref.boost__beast__http__span_body.writer `span_body::writer`]
* [link beast.ref.boost__beast__http__vector_body.writer `vector_body::writer`]</source>
        <target state="translated">* [link beast.ref.boost__beast__http__basic_dynamic_body.writer `basic_dynamic_body::writer`]
* [link beast.ref.boost__beast__http__basic_file_body__writer `basic_file_body::writer`]
* [link beast.ref.boost__beast__http__basic_string_body.writer `basic_string_body::writer`]
* [link beast.ref.boost__beast__http__buffer_body.writer `buffer_body::writer`]
* [link beast.ref.boost__beast__http__empty_body.writer `empty_body::writer`]
* [link beast.ref.boost__beast__http__span_body.writer `span_body::writer`]
* [link beast.ref.boost__beast__http__vector_body.writer `vector_body::writer`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">116</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
    </body>
  </file>
</xliff>
