mirror of
https://github.com/fluencelabs/wasmer
synced 2025-05-17 21:01:19 +00:00
9 lines
22 KiB
HTML
9 lines
22 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `Read` trait in crate `serde_json`."><meta name="keywords" content="rust, rustlang, rust-lang, Read"><title>serde_json::de::Read - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">☰</div><a href='../../serde_json/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Trait Read</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>serde_json</a>::<wbr><a href='index.html'>de</a></p><script>window.sidebarCurrent = {name: 'Read', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>−</span>]</a></span><a class='srclink' href='../../src/serde_json/read.rs.html#20-97' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>serde_json</a>::<wbr><a href='index.html'>de</a>::<wbr><a class="trait" href=''>Read</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait Read<'de>: Sealed { }</pre></div><div class='docblock'><p>Trait used by the deserializer for iterating over input. This is manually
|
||
"specialized" for iterating over &<a href="https://doc.rust-lang.org/nightly/std/primitive.u8.html" title="u8">u8</a>. Once feature(specialization) is
|
||
stable we can use actual specialization.</p>
|
||
<p>This trait is sealed and cannot be implemented for types outside of
|
||
<code>serde_json</code>.</p>
|
||
</div>
|
||
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'><h3 id='impl-Read%3C%27a%3E' class='impl'><code class='in-band'>impl<'a> Read<'a> for <a class="struct" href="../../serde_json/de/struct.SliceRead.html" title="struct serde_json::de::SliceRead">SliceRead</a><'a></code><a href='#impl-Read%3C%27a%3E' class='anchor'></a><a class='srclink' href='../../src/serde_json/read.rs.html#464-579' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next' class="method hidden"><code id='next.v'>fn <a href='#method.next' class='fnname'>next</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#466-476' title='goto source code'>[src]</a></h4><h4 id='method.peek' class="method hidden"><code id='peek.v'>fn <a href='#method.peek' class='fnname'>peek</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#479-487' title='goto source code'>[src]</a></h4><h4 id='method.discard' class="method hidden"><code id='discard.v'>fn <a href='#method.discard' class='fnname'>discard</a>(&mut self)</code><a class='srclink' href='../../src/serde_json/read.rs.html#490-492' title='goto source code'>[src]</a></h4><h4 id='method.position' class="method hidden"><code id='position.v'>fn <a href='#method.position' class='fnname'>position</a>(&self) -> Position</code><a class='srclink' href='../../src/serde_json/read.rs.html#494-496' title='goto source code'>[src]</a></h4><h4 id='method.peek_position' class="method hidden"><code id='peek_position.v'>fn <a href='#method.peek_position' class='fnname'>peek_position</a>(&self) -> Position</code><a class='srclink' href='../../src/serde_json/read.rs.html#498-502' title='goto source code'>[src]</a></h4><h4 id='method.byte_offset' class="method hidden"><code id='byte_offset.v'>fn <a href='#method.byte_offset' class='fnname'>byte_offset</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/serde_json/read.rs.html#504-506' title='goto source code'>[src]</a></h4><h4 id='method.parse_str' class="method hidden"><code id='parse_str.v'>fn <a href='#method.parse_str' class='fnname'>parse_str</a><'s>(<br> &'s mut self, <br> scratch: &'s mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>><br>) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><Reference<'a, 's, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#508-510' title='goto source code'>[src]</a></h4><h4 id='method.parse_str_raw' class="method hidden"><code id='parse_str_raw.v'>fn <a href='#method.parse_str_raw' class='fnname'>parse_str_raw</a><'s>(<br> &'s mut self, <br> scratch: &'s mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>><br>) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><Reference<'a, 's, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#512-517' title='goto source code'>[src]</a></h4><h4 id='method.ignore_str' class="method hidden"><code id='ignore_str.v'>fn <a href='#method.ignore_str' class='fnname'>ignore_str</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code><a class='srclink' href='../../src/serde_json/read.rs.html#519-541' title='goto source code'>[src]</a></h4><h4 id='method.decode_hex_escape' class="method hidden"><code id='decode_hex_escape.v'>fn <a href='#method.decode_hex_escape' class='fnname'>decode_hex_escape</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>></code><a class='srclink' href='../../src/serde_json/read.rs.html#543-561' title='goto source code'>[src]</a></h4></div><h3 id='impl-Read%3C%27a%3E-1' class='impl'><code class='in-band'>impl<'a> Read<'a> for <a class="struct" href="../../serde_json/de/struct.StrRead.html" title="struct serde_json::de::StrRead">StrRead</a><'a></code><a href='#impl-Read%3C%27a%3E-1' class='anchor'></a><a class='srclink' href='../../src/serde_json/read.rs.html#604-670' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next-1' class="method hidden"><code id='next.v-1'>fn <a href='#method.next-1' class='fnname'>next</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#606-608' title='goto source code'>[src]</a></h4><h4 id='method.peek-1' class="method hidden"><code id='peek.v-1'>fn <a href='#method.peek-1' class='fnname'>peek</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#611-613' title='goto source code'>[src]</a></h4><h4 id='method.discard-1' class="method hidden"><code id='discard.v-1'>fn <a href='#method.discard-1' class='fnname'>discard</a>(&mut self)</code><a class='srclink' href='../../src/serde_json/read.rs.html#616-618' title='goto source code'>[src]</a></h4><h4 id='method.position-1' class="method hidden"><code id='position.v-1'>fn <a href='#method.position-1' class='fnname'>position</a>(&self) -> Position</code><a class='srclink' href='../../src/serde_json/read.rs.html#620-622' title='goto source code'>[src]</a></h4><h4 id='method.peek_position-1' class="method hidden"><code id='peek_position.v-1'>fn <a href='#method.peek_position-1' class='fnname'>peek_position</a>(&self) -> Position</code><a class='srclink' href='../../src/serde_json/read.rs.html#624-626' title='goto source code'>[src]</a></h4><h4 id='method.byte_offset-1' class="method hidden"><code id='byte_offset.v-1'>fn <a href='#method.byte_offset-1' class='fnname'>byte_offset</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/serde_json/read.rs.html#628-630' title='goto source code'>[src]</a></h4><h4 id='method.parse_str-1' class="method hidden"><code id='parse_str.v-1'>fn <a href='#method.parse_str-1' class='fnname'>parse_str</a><'s>(<br> &'s mut self, <br> scratch: &'s mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>><br>) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><Reference<'a, 's, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#632-638' title='goto source code'>[src]</a></h4><h4 id='method.parse_str_raw-1' class="method hidden"><code id='parse_str_raw.v-1'>fn <a href='#method.parse_str_raw-1' class='fnname'>parse_str_raw</a><'s>(<br> &'s mut self, <br> scratch: &'s mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>><br>) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><Reference<'a, 's, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#640-645' title='goto source code'>[src]</a></h4><h4 id='method.ignore_str-1' class="method hidden"><code id='ignore_str.v-1'>fn <a href='#method.ignore_str-1' class='fnname'>ignore_str</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code><a class='srclink' href='../../src/serde_json/read.rs.html#647-649' title='goto source code'>[src]</a></h4><h4 id='method.decode_hex_escape-1' class="method hidden"><code id='decode_hex_escape.v-1'>fn <a href='#method.decode_hex_escape-1' class='fnname'>decode_hex_escape</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>></code><a class='srclink' href='../../src/serde_json/read.rs.html#651-653' title='goto source code'>[src]</a></h4></div><h3 id='impl-Read%3C%27de%3E' class='impl'><code class='in-band'>impl<'de, R> Read<'de> for <a class="struct" href="../../serde_json/de/struct.IoRead.html" title="struct serde_json::de::IoRead">IoRead</a><R> <span class="where fmt-newline">where<br> R: <a class="trait" href="https://doc.rust-lang.org/nightly/std/io/trait.Read.html" title="trait std::io::Read">Read</a>, </span></code><a href='#impl-Read%3C%27de%3E' class='anchor'></a><a class='srclink' href='../../src/serde_json/read.rs.html#224-368' title='goto source code'>[src]</a></h3><div class='impl-items'><h4 id='method.next-2' class="method hidden"><code id='next.v-2'>fn <a href='#method.next-2' class='fnname'>next</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#229-254' title='goto source code'>[src]</a></h4><h4 id='method.peek-2' class="method hidden"><code id='peek.v-2'>fn <a href='#method.peek-2' class='fnname'>peek</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#257-269' title='goto source code'>[src]</a></h4><h4 id='method.discard-2' class="method hidden"><code id='discard.v-2'>fn <a href='#method.discard-2' class='fnname'>discard</a>(&mut self)</code><a class='srclink' href='../../src/serde_json/read.rs.html#273-275' title='goto source code'>[src]</a></h4><h4 id='method.position-2' class="method hidden"><code id='position.v-2'>fn <a href='#method.position-2' class='fnname'>position</a>(&self) -> Position</code><a class='srclink' href='../../src/serde_json/read.rs.html#286-291' title='goto source code'>[src]</a></h4><h4 id='method.peek_position-2' class="method hidden"><code id='peek_position.v-2'>fn <a href='#method.peek_position-2' class='fnname'>peek_position</a>(&self) -> Position</code><a class='srclink' href='../../src/serde_json/read.rs.html#293-297' title='goto source code'>[src]</a></h4><h4 id='method.byte_offset-2' class="method hidden"><code id='byte_offset.v-2'>fn <a href='#method.byte_offset-2' class='fnname'>byte_offset</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.usize.html">usize</a></code><a class='srclink' href='../../src/serde_json/read.rs.html#299-304' title='goto source code'>[src]</a></h4><h4 id='method.parse_str-2' class="method hidden"><code id='parse_str.v-2'>fn <a href='#method.parse_str-2' class='fnname'>parse_str</a><'s>(<br> &'s mut self, <br> scratch: &'s mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>><br>) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><Reference<'de, 's, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#306-309' title='goto source code'>[src]</a></h4><h4 id='method.parse_str_raw-2' class="method hidden"><code id='parse_str_raw.v-2'>fn <a href='#method.parse_str_raw-2' class='fnname'>parse_str_raw</a><'s>(<br> &'s mut self, <br> scratch: &'s mut <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>><br>) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><Reference<'de, 's, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>>></code><a class='srclink' href='../../src/serde_json/read.rs.html#311-317' title='goto source code'>[src]</a></h4><h4 id='method.ignore_str-2' class="method hidden"><code id='ignore_str.v-2'>fn <a href='#method.ignore_str-2' class='fnname'>ignore_str</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>></code><a class='srclink' href='../../src/serde_json/read.rs.html#319-337' title='goto source code'>[src]</a></h4><h4 id='method.decode_hex_escape-2' class="method hidden"><code id='decode_hex_escape.v-2'>fn <a href='#method.decode_hex_escape-2' class='fnname'>decode_hex_escape</a>(&mut self) -> <a class="type" href="../../serde_json/type.Result.html" title="type serde_json::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>></code><a class='srclink' href='../../src/serde_json/read.rs.html#339-350' title='goto source code'>[src]</a></h4></div></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
|
||
src="../../implementors/serde_json/de/trait.Read.js">
|
||
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "serde_json";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |