msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified Han script) (Boost Beast Translation "
"(zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-24 16:52+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Simplified Han script) <https://"
"insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/"
"doc-qbk-07-concepts-bodyreader-qbk/zh_Hans/>\n"
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 2026.5\n"

#. type: section title
#: 10
msgid "BodyReader"
msgstr "消息体读取器"

#. type: paragraph
#: 12
msgid ""
"A [*BodyReader] provides an online algorithm to transfer a series of zero or "
"more buffers containing parsed body octets into a message container. The "
"__parser__ creates an instance of this type when needed, and calls into it "
"zero or more times to transfer buffers. The interface of [*BodyReader] is "
"intended to allow the conversion of buffers into these scenarios for "
"representation:"
msgstr ""
"[*BodyReader] 提供一种在线算法，用于将包含已解析消息体八位字节的零个或多个缓"
"冲区序列传输到消息容器中。__parser__ 在需要时创建该类型的实例，并零次或多次调"
"用它以传输缓冲区。[*BodyReader] 的接口设计用于允许将缓冲区转换为这些表示形式"
"的场景："

#. type: list
#: 19
msgid ""
"* Storing a body in a dynamic buffer\n"
"* Storing a body in a user defined container with a custom allocator\n"
"* Transformation of incoming body data before storage, for example"
msgstr ""
"* 将消息体存储在动态缓冲区中\n"
"* 将消息体存储在使用自定义分配器的用户定义容器中\n"
"* 在存储前对传入的消息体数据进行转换，例如："

#. type: list
#: 23
msgid "* Saving body data to a file"
msgstr "* 将消息体数据保存到文件"

#. type: heading
#: 25
msgid "Associated Types"
msgstr "关联类型"

#. type: list
#: 27
msgid ""
"* [link beast.ref.boost__beast__http__is_body_reader `is_body_reader`]\n"
"* __Body__"
msgstr ""
"* [link beast.ref.boost__beast__http__is_body_reader `is_body_reader`]\n"
"* __Body__"

#. type: heading
#: 30
msgid "Requirements"
msgstr "要求"

#. type: paragraph
#: 33
msgid "These requirements may undergo non-backward compatible"
msgstr "这些要求可能发生不向后兼容的变更"

#. type: paragraph
#: 37
msgid "In this table:"
msgstr "在下表中："

#. type: list
#: 39
msgid ""
"* `R` denotes a type meeting the requirements of [*BodyReader].\n"
"* `B` denotes a __Body__ where"
msgstr ""
"R 表示满足 [*BodyReader] 要求的类型。\n"
"\n"
"B 表示一个 Body 类型，其中"

#. type: list
#: 42
msgid ""
"* `a` denotes a value of type `R`.\n"
"* `b` is an object whose type meets the requirements of "
"__ConstBufferSequence__\n"
"* `h` denotes a value of type `header<isRequest, Fields>&`.\n"
"* `v` denotes a value of type `Body::value_type&`.\n"
"* `n` is a value of type `boost::optional<std::uint64_t>`.\n"
"* `ec` is a value of type [link beast.ref.boost__beast__error_code "
"`error_code&`]."
msgstr ""
"* `a` 表示类型为 `R` 的值。\n"
"* `b` 是一个类型满足 __ConstBufferSequence__ 要求的对象。\n"
"* `h` 表示类型为 `header<isRequest, Fields>&` 的值。\n"
"* `v` 表示类型为 `Body::value_type&` 的值。\n"
"* `n` 表示类型为 `boost::optional<std::uint64_t>` 的值。\n"
"* `ec` 表示类型为 [link beast.ref.boost__beast__error_code `error_code&`] 的"
"值。"

#. type: table title
#: 49
msgid "Valid expressions"
msgstr "有效表达式"

#. type: table cell
#: 49
msgid "Expression"
msgstr "表达式"

#. type: table cell
#: 49
msgid "Type"
msgstr "类型"

#. type: table cell
#: 49
msgid "Semantics, Pre/Post-conditions"
msgstr "语义、前置条件与后置条件"

#. type: table cell
#: 49
msgid "`R{h,v};`"
msgstr "`R{h,v};`"

#. type: table cell
#: 49
msgid ""
"Constructible from `h` and `v`. The lifetime of `h` and `v` is guaranteed to "
"end no earlier than after the `R` is destroyed. The reader shall not access "
"the contents of `h` or `v` before the first call to `init`, permitting lazy "
"construction of the message."
msgstr ""
"可从 `h` 和 `v` 构造。`h` 和 `v` 的生命周期保证不早于 `R` 销毁前结束。读取器"
"在首次调用 `init` 之前不应访问 `h` 或 `v` 的内容，以支持消息的延迟构造。"

#. type: table cell
#: 49
msgid "`a.init(n, ec)`"
msgstr "`a.init(n, ec)`"

#. type: table cell
#: 49
msgid ""
"Called once to fully initialize the object before any calls to `put`. The "
"message body is valid before entering this function, and remains valid until "
"the reader is destroyed. The value of `n` will be set to the content length "
"of the body if known, otherwise `n` will be equal to `boost::none`. "
"Implementations of [*BodyReader] may use this information to optimize "
"allocation.\n"
"\n"
"The function will ensure that `!ec` is `true` if there was no error or set "
"to the appropriate error code if there was one."
msgstr ""
"在调用 put 之前调用一次，以完全初始化对象。消息体在进入该函数前有效，并持续有"
"效直到读取器销毁为止。n 的值在已知时表示消息体的内容长度，否则为 boost::none"
"。[*BodyReader] 的实现可使用此信息优化内存分配。\n"
"\n"
"该函数在无错误时确保 !ec 为 true，否则将 ec 设置为对应的错误码。"

#. type: table cell
#: 49
msgid "`a.put(b,ec)`"
msgstr "`a.put(b,ec)`"

#. type: table cell
#: 49
msgid "`std::size_t`"
msgstr "`std::size_t`"

#. type: table cell
#: 49
msgid ""
"This function is called to append some or all of the buffers specified by "
"`b` into the body representation. The number of bytes inserted from `b` is "
"returned. If the number of bytes inserted is less than the total input, the "
"remainder of the input will be presented in the next call to `put`. The "
"function will ensure that `!ec` is `true` if there was no error or set to "
"the appropriate error code if there was one."
msgstr ""
"调用此函数以将 `b` 指定的部分或全部缓冲区追加到消息体表示中。返回从 `b` 插入"
"的字节数。如果插入的字节数少于输入总量，剩余部分将在下一次调用 `put` 时传入。"
"该函数在无错误时确保 `!ec` 为 `true`，否则将 `ec` 设置为对应的错误码。"

#. type: table cell
#: 49
msgid "`a.finish(ec)`"
msgstr "`a.finish(ec)`"

#. type: table cell
#: 49
msgid ""
"This function is called when no more body octets are remaining. The function "
"will ensure that `!ec` is `true` if there was no error or set to the "
"appropriate error code if there was one."
msgstr ""
"该函数在无更多消息体八位字节时调用。该函数在无错误时确保 `!ec` 为 `true`，否"
"则将 `ec` 设置为对应的错误码。"

#. type: table cell
#: 49
msgid "`is_body_reader<B>`"
msgstr "`is_body_reader<B>`"

#. type: table cell
#: 49
msgid "`std::true_type`"
msgstr "`std::true_type`"

#. type: table cell
#: 49
msgid ""
"An alias for `std::true_type` for `B`, otherwise an alias for "
"`std::false_type`."
msgstr "若 `B` 存在，则为 `std::true_type` 的别名，否则为 `std::false_type` 的别名。"

#. type: heading
#: 105
msgid "Exemplar"
msgstr "示例"

#. type: heading
#: 109
msgid "Models"
msgstr "模型"

#. type: list
#: 111
msgid ""
"* [link beast.ref.boost__beast__http__basic_dynamic_body.reader "
"`basic_dynamic_body::reader`]\n"
"* [link beast.ref.boost__beast__http__basic_file_body__reader "
"`basic_file_body::reader`]\n"
"* [link beast.ref.boost__beast__http__basic_string_body.reader "
"`basic_string_body::reader`]\n"
"* [link beast.ref.boost__beast__http__buffer_body.reader "
"`buffer_body::reader`]\n"
"* [link beast.ref.boost__beast__http__empty_body.reader "
"`empty_body::reader`]\n"
"* [link beast.ref.boost__beast__http__span_body.reader `span_body::reader`]\n"
"* [link beast.ref.boost__beast__http__vector_body.reader "
"`vector_body::reader`]"
msgstr ""
"* [link beast.ref.boost__beast__http__basic_dynamic_body.reader "
"`basic_dynamic_body::reader`]\n"
"* [link beast.ref.boost__beast__http__basic_file_body__reader "
"`basic_file_body::reader`]\n"
"* [link beast.ref.boost__beast__http__basic_string_body.reader "
"`basic_string_body::reader`]\n"
"* [link beast.ref.boost__beast__http__buffer_body.reader "
"`buffer_body::reader`]\n"
"* [link beast.ref.boost__beast__http__empty_body.reader "
"`empty_body::reader`]\n"
"* [link beast.ref.boost__beast__http__span_body.reader `span_body::reader`]\n"
"* [link beast.ref.boost__beast__http__vector_body.reader "
"`vector_body::reader`]"
