<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      style="function"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/experimental/ui/"
      id="bson_reader_new_from_data">
  <info>
    <link type="guide" xref="bson_reader_t" group="function"/>
  </info>
  <title>bson_reader_new_from_data()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[bson_reader_t *
bson_reader_new_from_data (const uint8_t *data,
                           size_t         length);
]]></code></synopsis>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p><code>data</code></p></td><td><p>A uint8_t.</p></td></tr>
      <tr><td><p><code>length</code></p></td><td><p>A size_t.</p></td></tr>
    </table>
  </section>

  <section id="description">
    <title>Description</title>
    <p>The <code xref="bson_reader_new_from_data">bson_reader_new_from_data()</code> function shall create a new <code xref="bson_reader_t">bson_reader_t</code> using the buffer supplied. <code>data</code> is not copied and <em>MUST</em> be valid for the lifetime of the resulting <code xref="bson_reader_t">bson_reader_t</code>.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>A newly allocated <code xref="bson_reader_t">bson_reader_t</code>.</p>
  </section>

</page>
