208 lines
73 KiB
HTML
208 lines
73 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 `Visitor` trait in crate `serde`."><meta name="keywords" content="rust, rustlang, rust-lang, Visitor"><title>serde::de::Visitor - 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="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><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/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Trait Visitor</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#associated-types">Associated Types</a><div class="sidebar-links"><a href="#associatedtype.Value">Value</a></div><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.expecting">expecting</a></div><a class="sidebar-title" href="#provided-methods">Provided Methods</a><div class="sidebar-links"><a href="#method.visit_bool">visit_bool</a><a href="#method.visit_i8">visit_i8</a><a href="#method.visit_i64">visit_i64</a><a href="#method.visit_i16">visit_i16</a><a href="#method.visit_i32">visit_i32</a><a href="#method.visit_i128">visit_i128</a><a href="#method.visit_u8">visit_u8</a><a href="#method.visit_u64">visit_u64</a><a href="#method.visit_u16">visit_u16</a><a href="#method.visit_u32">visit_u32</a><a href="#method.visit_u128">visit_u128</a><a href="#method.visit_f32">visit_f32</a><a href="#method.visit_f64">visit_f64</a><a href="#method.visit_char">visit_char</a><a href="#method.visit_str">visit_str</a><a href="#method.visit_borrowed_str">visit_borrowed_str</a><a href="#method.visit_string">visit_string</a><a href="#method.visit_bytes">visit_bytes</a><a href="#method.visit_borrowed_bytes">visit_borrowed_bytes</a><a href="#method.visit_byte_buf">visit_byte_buf</a><a href="#method.visit_none">visit_none</a><a href="#method.visit_some">visit_some</a><a href="#method.visit_unit">visit_unit</a><a href="#method.visit_newtype_struct">visit_newtype_struct</a><a href="#method.visit_seq">visit_seq</a><a href="#method.visit_map">visit_map</a><a href="#method.visit_enum">visit_enum</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class="location"><a href="../index.html">serde</a>::<wbr><a href="index.html">de</a></p><div id="sidebar-vars" data-name="Visitor" data-ty="trait" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||
<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="in-band">Trait <a href="../index.html">serde</a>::<wbr><a href="index.html">de</a>::<wbr><a class="trait" href="">Visitor</a></span><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/de/mod.rs.html#1262-1660" title="goto source code">[src]</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class="rust trait">pub trait Visitor<'de>: <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> {
|
||
type <a href="#associatedtype.Value" class="type">Value</a>;
|
||
fn <a href="#tymethod.expecting" class="fnname">expecting</a>(&self, formatter: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a>;
|
||
|
||
fn <a href="#method.visit_bool" class="fnname">visit_bool</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_i8" class="fnname">visit_i8</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_i16" class="fnname">visit_i16</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_i32" class="fnname">visit_i32</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_i64" class="fnname">visit_i64</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_i128" class="fnname">visit_i128</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_u8" class="fnname">visit_u8</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_u16" class="fnname">visit_u16</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_u32" class="fnname">visit_u32</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_u64" class="fnname">visit_u64</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_u128" class="fnname">visit_u128</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_f32" class="fnname">visit_f32</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_f64" class="fnname">visit_f64</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_char" class="fnname">visit_char</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_str" class="fnname">visit_str</a><E>(self, v: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_borrowed_str" class="fnname">visit_borrowed_str</a><E>(self, v: &'de <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_string" class="fnname">visit_string</a><E>(self, v: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_bytes" class="fnname">visit_bytes</a><E>(self, v: <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>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_borrowed_bytes" class="fnname">visit_borrowed_bytes</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'de [</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>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_byte_buf" class="fnname">visit_byte_buf</a><E>(self, v: <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>>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_none" class="fnname">visit_none</a><E>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_some" class="fnname">visit_some</a><D>(self, deserializer: D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, D::<a class="type" href="../../serde/trait.Deserializer.html#associatedtype.Error" title="type serde::Deserializer::Error">Error</a>><br> <span class="where">where<br> D: <a class="trait" href="../../serde/trait.Deserializer.html" title="trait serde::Deserializer">Deserializer</a><'de></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_unit" class="fnname">visit_unit</a><E>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E><br> <span class="where">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_newtype_struct" class="fnname">visit_newtype_struct</a><D>(<br> self, <br> deserializer: D<br> ) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, D::<a class="type" href="../../serde/trait.Deserializer.html#associatedtype.Error" title="type serde::Deserializer::Error">Error</a>><br> <span class="where">where<br> D: <a class="trait" href="../../serde/trait.Deserializer.html" title="trait serde::Deserializer">Deserializer</a><'de></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_seq" class="fnname">visit_seq</a><A>(self, seq: A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, A::<a class="type" href="../../serde/de/trait.SeqAccess.html#associatedtype.Error" title="type serde::de::SeqAccess::Error">Error</a>><br> <span class="where">where<br> A: <a class="trait" href="../../serde/de/trait.SeqAccess.html" title="trait serde::de::SeqAccess">SeqAccess</a><'de></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_map" class="fnname">visit_map</a><A>(self, map: A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, A::<a class="type" href="../../serde/de/trait.MapAccess.html#associatedtype.Error" title="type serde::de::MapAccess::Error">Error</a>><br> <span class="where">where<br> A: <a class="trait" href="../../serde/de/trait.MapAccess.html" title="trait serde::de::MapAccess">MapAccess</a><'de></span>,
|
||
{ ... }
|
||
<div class="item-spacer"></div> fn <a href="#method.visit_enum" class="fnname">visit_enum</a><A>(self, data: A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, A::<a class="type" href="../../serde/de/trait.EnumAccess.html#associatedtype.Error" title="type serde::de::EnumAccess::Error">Error</a>><br> <span class="where">where<br> A: <a class="trait" href="../../serde/de/trait.EnumAccess.html" title="trait serde::de::EnumAccess">EnumAccess</a><'de></span>,
|
||
{ ... }
|
||
}</pre></div><div class="docblock"><p>This trait represents a visitor that walks through a deserializer.</p>
|
||
<h1 id="lifetime" class="section-header"><a href="#lifetime">Lifetime</a></h1>
|
||
<p>The <code>'de</code> lifetime of this trait is the requirement for lifetime of data
|
||
that may be borrowed by <code>Self::Value</code>. See the page <a href="https://serde.rs/lifetimes.html">Understanding
|
||
deserializer lifetimes</a> for a more detailed explanation of these lifetimes.</p>
|
||
<h1 id="example" class="section-header"><a href="#example">Example</a></h1>
|
||
<div class='information'><div class='tooltip edition' data-edition="2018">ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered edition">
|
||
<span class="doccomment">/// A visitor that deserializes a long string - a string containing at least</span>
|
||
<span class="doccomment">/// some minimum number of bytes.</span>
|
||
<span class="kw">struct</span> <span class="ident">LongString</span> {
|
||
<span class="ident">min</span>: <span class="ident">usize</span>,
|
||
}
|
||
|
||
<span class="kw">impl</span><span class="op"><</span><span class="lifetime">'de</span><span class="op">></span> <span class="ident">Visitor</span><span class="op"><</span><span class="lifetime">'de</span><span class="op">></span> <span class="kw">for</span> <span class="ident">LongString</span> {
|
||
<span class="kw">type</span> <span class="ident">Value</span> <span class="op">=</span> <span class="ident">String</span>;
|
||
|
||
<span class="kw">fn</span> <span class="ident">expecting</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">formatter</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt</span>::<span class="ident">Formatter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">fmt</span>::<span class="prelude-ty">Result</span> {
|
||
<span class="macro">write</span><span class="macro">!</span>(<span class="ident">formatter</span>, <span class="string">"a string containing at least {} bytes"</span>, <span class="self">self</span>.<span class="ident">min</span>)
|
||
}
|
||
|
||
<span class="kw">fn</span> <span class="ident">visit_str</span><span class="op"><</span><span class="ident">E</span><span class="op">></span>(<span class="self">self</span>, <span class="ident">s</span>: <span class="kw-2">&</span><span class="ident">str</span>) <span class="op">-</span><span class="op">></span> <span class="prelude-ty">Result</span><span class="op"><</span><span class="self">Self</span>::<span class="ident">Value</span>, <span class="ident">E</span><span class="op">></span>
|
||
<span class="kw">where</span>
|
||
<span class="ident">E</span>: <span class="ident">de</span>::<span class="ident">Error</span>,
|
||
{
|
||
<span class="kw">if</span> <span class="ident">s</span>.<span class="ident">len</span>() <span class="op">></span><span class="op">=</span> <span class="self">self</span>.<span class="ident">min</span> {
|
||
<span class="prelude-val">Ok</span>(<span class="ident">s</span>.<span class="ident">to_owned</span>())
|
||
} <span class="kw">else</span> {
|
||
<span class="prelude-val">Err</span>(<span class="ident">de</span>::<span class="ident">Error</span>::<span class="ident">invalid_value</span>(<span class="ident">Unexpected</span>::<span class="ident">Str</span>(<span class="ident">s</span>), <span class="kw-2">&</span><span class="self">self</span>))
|
||
}
|
||
}
|
||
}</pre></div>
|
||
</div><h2 id="associated-types" class="small-section-header">Associated Types<a href="#associated-types" class="anchor"></a></h2><div class="methods"><h3 id="associatedtype.Value" class="method"><code>type <a href="#associatedtype.Value" class="type">Value</a></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1264" title="goto source code">[src]</a></h3><div class="docblock"><p>The value produced by this visitor.</p>
|
||
</div></div><span class="loading-content">Loading content...</span><h2 id="required-methods" class="small-section-header">Required methods<a href="#required-methods" class="anchor"></a></h2><div class="methods"><h3 id="tymethod.expecting" class="method"><code>fn <a href="#tymethod.expecting" class="fnname">expecting</a>(&self, formatter: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1288" title="goto source code">[src]</a></h3><div class="docblock"><p>Format a message stating what data this Visitor expects to receive.</p>
|
||
<p>This is used in error messages. The message should complete the sentence
|
||
"This Visitor expects to receive ...", for example the message could be
|
||
"an integer between 0 and 64". The message should not be capitalized and
|
||
should not end with a period.</p>
|
||
|
||
<div class='information'><div class='tooltip edition' data-edition="2018">ⓘ</div></div><div class="example-wrap"><pre class="rust rust-example-rendered edition">
|
||
<span class="kw">fn</span> <span class="ident">expecting</span>(<span class="kw-2">&</span><span class="self">self</span>, <span class="ident">formatter</span>: <span class="kw-2">&</span><span class="kw-2">mut</span> <span class="ident">fmt</span>::<span class="ident">Formatter</span>) <span class="op">-</span><span class="op">></span> <span class="ident">fmt</span>::<span class="prelude-ty">Result</span> {
|
||
<span class="macro">write</span><span class="macro">!</span>(<span class="ident">formatter</span>, <span class="string">"an integer between 0 and {}"</span>, <span class="self">self</span>.<span class="ident">max</span>)
|
||
}</pre></div>
|
||
</div></div><span class="loading-content">Loading content...</span><h2 id="provided-methods" class="small-section-header">Provided methods<a href="#provided-methods" class="anchor"></a></h2><div class="methods"><h3 id="method.visit_bool" class="method"><code>fn <a href="#method.visit_bool" class="fnname">visit_bool</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1293-1298" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a boolean.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_i8" class="method"><code>fn <a href="#method.visit_i8" class="fnname">visit_i8</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i8.html">i8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1305-1310" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains an <code>i8</code>.</p>
|
||
<p>The default implementation forwards to <a href="#method.visit_i64"><code>visit_i64</code></a>.</p>
|
||
</div><h3 id="method.visit_i16" class="method"><code>fn <a href="#method.visit_i16" class="fnname">visit_i16</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i16.html">i16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1317-1322" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains an <code>i16</code>.</p>
|
||
<p>The default implementation forwards to <a href="#method.visit_i64"><code>visit_i64</code></a>.</p>
|
||
</div><h3 id="method.visit_i32" class="method"><code>fn <a href="#method.visit_i32" class="fnname">visit_i32</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1329-1334" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains an <code>i32</code>.</p>
|
||
<p>The default implementation forwards to <a href="#method.visit_i64"><code>visit_i64</code></a>.</p>
|
||
</div><h3 id="method.visit_i64" class="method"><code>fn <a href="#method.visit_i64" class="fnname">visit_i64</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1339-1344" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains an <code>i64</code>.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_i128" class="method"><code>fn <a href="#method.visit_i128" class="fnname">visit_i128</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1351-1357" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a <code>i128</code>.</p>
|
||
<p>This method is available only on Rust compiler versions >=1.26. The
|
||
default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_u8" class="method"><code>fn <a href="#method.visit_u8" class="fnname">visit_u8</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u8.html">u8</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1365-1370" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a <code>u8</code>.</p>
|
||
<p>The default implementation forwards to <a href="#method.visit_u64"><code>visit_u64</code></a>.</p>
|
||
</div><h3 id="method.visit_u16" class="method"><code>fn <a href="#method.visit_u16" class="fnname">visit_u16</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u16.html">u16</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1377-1382" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a <code>u16</code>.</p>
|
||
<p>The default implementation forwards to <a href="#method.visit_u64"><code>visit_u64</code></a>.</p>
|
||
</div><h3 id="method.visit_u32" class="method"><code>fn <a href="#method.visit_u32" class="fnname">visit_u32</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1389-1394" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a <code>u32</code>.</p>
|
||
<p>The default implementation forwards to <a href="#method.visit_u64"><code>visit_u64</code></a>.</p>
|
||
</div><h3 id="method.visit_u64" class="method"><code>fn <a href="#method.visit_u64" class="fnname">visit_u64</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1399-1404" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a <code>u64</code>.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_u128" class="method"><code>fn <a href="#method.visit_u128" class="fnname">visit_u128</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1411-1417" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a <code>u128</code>.</p>
|
||
<p>This method is available only on Rust compiler versions >=1.26. The
|
||
default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_f32" class="method"><code>fn <a href="#method.visit_f32" class="fnname">visit_f32</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f32.html">f32</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1425-1430" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains an <code>f32</code>.</p>
|
||
<p>The default implementation forwards to <a href="#method.visit_f64"><code>visit_f64</code></a>.</p>
|
||
</div><h3 id="method.visit_f64" class="method"><code>fn <a href="#method.visit_f64" class="fnname">visit_f64</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1435-1440" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains an <code>f64</code>.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_char" class="method"><code>fn <a href="#method.visit_char" class="fnname">visit_char</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.char.html">char</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1449-1454" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a <code>char</code>.</p>
|
||
<p>The default implementation forwards to <a href="#method.visit_str"><code>visit_str</code></a> as a one-character
|
||
string.</p>
|
||
</div><h3 id="method.visit_str" class="method"><code>fn <a href="#method.visit_str" class="fnname">visit_str</a><E>(self, v: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1467-1472" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a string. The lifetime of the string is ephemeral and
|
||
it may be destroyed after this method returns.</p>
|
||
<p>This method allows the <code>Deserializer</code> to avoid a copy by retaining
|
||
ownership of any buffered data. <code>Deserialize</code> implementations that do
|
||
not benefit from taking ownership of <code>String</code> data should indicate that
|
||
to the deserializer by using <code>Deserializer::deserialize_str</code> rather than
|
||
<code>Deserializer::deserialize_string</code>.</p>
|
||
<p>It is never correct to implement <code>visit_string</code> without implementing
|
||
<code>visit_str</code>. Implement neither, both, or just <code>visit_str</code>.</p>
|
||
</div><h3 id="method.visit_borrowed_str" class="method"><code>fn <a href="#method.visit_borrowed_str" class="fnname">visit_borrowed_str</a><E>(self, v: &'de <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1484-1489" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a string that lives at least as long as the
|
||
<code>Deserializer</code>.</p>
|
||
<p>This enables zero-copy deserialization of strings in some formats. For
|
||
example JSON input containing the JSON string <code>"borrowed"</code> can be
|
||
deserialized with zero copying into a <code>&'a str</code> as long as the input
|
||
data outlives <code>'a</code>.</p>
|
||
<p>The default implementation forwards to <code>visit_str</code>.</p>
|
||
</div><h3 id="method.visit_string" class="method"><code>fn <a href="#method.visit_string" class="fnname">visit_string</a><E>(self, v: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1508-1513" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a string and ownership of the string is being given
|
||
to the <code>Visitor</code>.</p>
|
||
<p>This method allows the <code>Visitor</code> to avoid a copy by taking ownership of
|
||
a string created by the <code>Deserializer</code>. <code>Deserialize</code> implementations
|
||
that benefit from taking ownership of <code>String</code> data should indicate that
|
||
to the deserializer by using <code>Deserializer::deserialize_string</code> rather
|
||
than <code>Deserializer::deserialize_str</code>, although not every deserializer
|
||
will honor such a request.</p>
|
||
<p>It is never correct to implement <code>visit_string</code> without implementing
|
||
<code>visit_str</code>. Implement neither, both, or just <code>visit_str</code>.</p>
|
||
<p>The default implementation forwards to <code>visit_str</code> and then drops the
|
||
<code>String</code>.</p>
|
||
</div><h3 id="method.visit_bytes" class="method"><code>fn <a href="#method.visit_bytes" class="fnname">visit_bytes</a><E>(self, v: <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>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1526-1532" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a byte array. The lifetime of the byte array is
|
||
ephemeral and it may be destroyed after this method returns.</p>
|
||
<p>This method allows the <code>Deserializer</code> to avoid a copy by retaining
|
||
ownership of any buffered data. <code>Deserialize</code> implementations that do
|
||
not benefit from taking ownership of <code>Vec<u8></code> data should indicate that
|
||
to the deserializer by using <code>Deserializer::deserialize_bytes</code> rather
|
||
than <code>Deserializer::deserialize_byte_buf</code>.</p>
|
||
<p>It is never correct to implement <code>visit_byte_buf</code> without implementing
|
||
<code>visit_bytes</code>. Implement neither, both, or just <code>visit_bytes</code>.</p>
|
||
</div><h3 id="method.visit_borrowed_bytes" class="method"><code>fn <a href="#method.visit_borrowed_bytes" class="fnname">visit_borrowed_bytes</a><E>(self, v: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&'de [</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>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1543-1548" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a byte array that lives at least as long as the
|
||
<code>Deserializer</code>.</p>
|
||
<p>This enables zero-copy deserialization of bytes in some formats. For
|
||
example Bincode data containing bytes can be deserialized with zero
|
||
copying into a <code>&'a [u8]</code> as long as the input data outlives <code>'a</code>.</p>
|
||
<p>The default implementation forwards to <code>visit_bytes</code>.</p>
|
||
</div><h3 id="method.visit_byte_buf" class="method"><code>fn <a href="#method.visit_byte_buf" class="fnname">visit_byte_buf</a><E>(self, v: <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>>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1567-1572" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a byte array and ownership of the byte array is being
|
||
given to the <code>Visitor</code>.</p>
|
||
<p>This method allows the <code>Visitor</code> to avoid a copy by taking ownership of
|
||
a byte buffer created by the <code>Deserializer</code>. <code>Deserialize</code>
|
||
implementations that benefit from taking ownership of <code>Vec<u8></code> data
|
||
should indicate that to the deserializer by using
|
||
<code>Deserializer::deserialize_byte_buf</code> rather than
|
||
<code>Deserializer::deserialize_bytes</code>, although not every deserializer will
|
||
honor such a request.</p>
|
||
<p>It is never correct to implement <code>visit_byte_buf</code> without implementing
|
||
<code>visit_bytes</code>. Implement neither, both, or just <code>visit_bytes</code>.</p>
|
||
<p>The default implementation forwards to <code>visit_bytes</code> and then drops the
|
||
<code>Vec<u8></code>.</p>
|
||
</div><h3 id="method.visit_none" class="method"><code>fn <a href="#method.visit_none" class="fnname">visit_none</a><E>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1577-1582" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains an optional that is absent.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_some" class="method"><code>fn <a href="#method.visit_some" class="fnname">visit_some</a><D>(self, deserializer: D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, D::<a class="type" href="../../serde/trait.Deserializer.html#associatedtype.Error" title="type serde::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> D: <a class="trait" href="../../serde/trait.Deserializer.html" title="trait serde::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1587-1593" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains an optional that is present.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_unit" class="method"><code>fn <a href="#method.visit_unit" class="fnname">visit_unit</a><E>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1598-1603" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a unit <code>()</code>.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_newtype_struct" class="method"><code>fn <a href="#method.visit_newtype_struct" class="fnname">visit_newtype_struct</a><D>(<br> self, <br> deserializer: D<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, D::<a class="type" href="../../serde/trait.Deserializer.html#associatedtype.Error" title="type serde::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> D: <a class="trait" href="../../serde/trait.Deserializer.html" title="trait serde::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1611-1617" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a newtype struct.</p>
|
||
<p>The content of the newtype struct may be read from the given
|
||
<code>Deserializer</code>.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_seq" class="method"><code>fn <a href="#method.visit_seq" class="fnname">visit_seq</a><A>(self, seq: A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, A::<a class="type" href="../../serde/de/trait.SeqAccess.html#associatedtype.Error" title="type serde::de::SeqAccess::Error">Error</a>> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../serde/de/trait.SeqAccess.html" title="trait serde::de::SeqAccess">SeqAccess</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1622-1628" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a sequence of elements.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_map" class="method"><code>fn <a href="#method.visit_map" class="fnname">visit_map</a><A>(self, map: A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, A::<a class="type" href="../../serde/de/trait.MapAccess.html#associatedtype.Error" title="type serde::de::MapAccess::Error">Error</a>> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../serde/de/trait.MapAccess.html" title="trait serde::de::MapAccess">MapAccess</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1633-1639" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains a key-value map.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div><h3 id="method.visit_enum" class="method"><code>fn <a href="#method.visit_enum" class="fnname">visit_enum</a><A>(self, data: A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, A::<a class="type" href="../../serde/de/trait.EnumAccess.html#associatedtype.Error" title="type serde::de::EnumAccess::Error">Error</a>> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../serde/de/trait.EnumAccess.html" title="trait serde::de::EnumAccess">EnumAccess</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/mod.rs.html#1644-1650" title="goto source code">[src]</a></h3><div class="docblock"><p>The input contains an enum.</p>
|
||
<p>The default implementation fails with a type error.</p>
|
||
</div></div><span class="loading-content">Loading content...</span><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-Visitor%3C%27de%3E" class="impl"><code class="in-band">impl<'de> Visitor<'de> for <a class="struct" href="../../serde/de/struct.IgnoredAny.html" title="struct serde::de::IgnoredAny">IgnoredAny</a></code><a href="#impl-Visitor%3C%27de%3E" class="anchor"></a><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#114-233" title="goto source code">[src]</a></h3><div class="impl-items"><h4 id="associatedtype.Value-1" class="type"><code>type <a href="#associatedtype.Value-1" class="type">Value</a> = <a class="struct" href="../../serde/de/struct.IgnoredAny.html" title="struct serde::de::IgnoredAny">IgnoredAny</a></code></h4><h4 id="method.expecting" class="method hidden"><code>fn <a href="#method.expecting" class="fnname">expecting</a>(&self, formatter: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a><'_>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#117-119" title="goto source code">[src]</a></h4><h4 id="method.visit_bool-1" class="method hidden"><code>fn <a href="#method.visit_bool-1" class="fnname">visit_bool</a><E>(self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#122-125" title="goto source code">[src]</a></h4><h4 id="method.visit_i64-1" class="method hidden"><code>fn <a href="#method.visit_i64-1" class="fnname">visit_i64</a><E>(self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i64.html">i64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#128-131" title="goto source code">[src]</a></h4><h4 id="method.visit_i128-1" class="method hidden"><code>fn <a href="#method.visit_i128-1" class="fnname">visit_i128</a><E>(self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i128.html">i128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#135-138" title="goto source code">[src]</a></h4><h4 id="method.visit_u64-1" class="method hidden"><code>fn <a href="#method.visit_u64-1" class="fnname">visit_u64</a><E>(self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#142-145" title="goto source code">[src]</a></h4><h4 id="method.visit_u128-1" class="method hidden"><code>fn <a href="#method.visit_u128-1" class="fnname">visit_u128</a><E>(self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u128.html">u128</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#149-152" title="goto source code">[src]</a></h4><h4 id="method.visit_f64-1" class="method hidden"><code>fn <a href="#method.visit_f64-1" class="fnname">visit_f64</a><E>(self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.f64.html">f64</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#156-159" title="goto source code">[src]</a></h4><h4 id="method.visit_str-1" class="method hidden"><code>fn <a href="#method.visit_str-1" class="fnname">visit_str</a><E>(self, s: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#162-168" title="goto source code">[src]</a></h4><h4 id="method.visit_none-1" class="method hidden"><code>fn <a href="#method.visit_none-1" class="fnname">visit_none</a><E>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#171-173" title="goto source code">[src]</a></h4><h4 id="method.visit_some-1" class="method hidden"><code>fn <a href="#method.visit_some-1" class="fnname">visit_some</a><D>(self, deserializer: D) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, D::<a class="type" href="../../serde/trait.Deserializer.html#associatedtype.Error" title="type serde::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> D: <a class="trait" href="../../serde/trait.Deserializer.html" title="trait serde::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#176-181" title="goto source code">[src]</a></h4><h4 id="method.visit_newtype_struct-1" class="method hidden"><code>fn <a href="#method.visit_newtype_struct-1" class="fnname">visit_newtype_struct</a><D>(<br> self, <br> deserializer: D<br>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, D::<a class="type" href="../../serde/trait.Deserializer.html#associatedtype.Error" title="type serde::Deserializer::Error">Error</a>> <span class="where fmt-newline">where<br> D: <a class="trait" href="../../serde/trait.Deserializer.html" title="trait serde::Deserializer">Deserializer</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#184-189" title="goto source code">[src]</a></h4><h4 id="method.visit_unit-1" class="method hidden"><code>fn <a href="#method.visit_unit-1" class="fnname">visit_unit</a><E>(self) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#192-194" title="goto source code">[src]</a></h4><h4 id="method.visit_seq-1" class="method hidden"><code>fn <a href="#method.visit_seq-1" class="fnname">visit_seq</a><A>(self, seq: A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, A::<a class="type" href="../../serde/de/trait.SeqAccess.html#associatedtype.Error" title="type serde::de::SeqAccess::Error">Error</a>> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../serde/de/trait.SeqAccess.html" title="trait serde::de::SeqAccess">SeqAccess</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#197-205" title="goto source code">[src]</a></h4><h4 id="method.visit_map-1" class="method hidden"><code>fn <a href="#method.visit_map-1" class="fnname">visit_map</a><A>(self, map: A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, A::<a class="type" href="../../serde/de/trait.MapAccess.html#associatedtype.Error" title="type serde::de::MapAccess::Error">Error</a>> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../serde/de/trait.MapAccess.html" title="trait serde::de::MapAccess">MapAccess</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#208-216" title="goto source code">[src]</a></h4><h4 id="method.visit_bytes-1" class="method hidden"><code>fn <a href="#method.visit_bytes-1" class="fnname">visit_bytes</a><E>(self, bytes: <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>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, E> <span class="where fmt-newline">where<br> E: <a class="trait" href="../../serde/de/trait.Error.html" title="trait serde::de::Error">Error</a>, </span></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#219-225" title="goto source code">[src]</a></h4><h4 id="method.visit_enum-1" class="method hidden"><code>fn <a href="#method.visit_enum-1" class="fnname">visit_enum</a><A>(self, data: A) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self::<a class="type" href="../../serde/de/trait.Visitor.html#associatedtype.Value" title="type serde::de::Visitor::Value">Value</a>, A::<a class="type" href="../../serde/de/trait.EnumAccess.html#associatedtype.Error" title="type serde::de::EnumAccess::Error">Error</a>> <span class="where fmt-newline">where<br> A: <a class="trait" href="../../serde/de/trait.EnumAccess.html" title="trait serde::de::EnumAccess">EnumAccess</a><'de>, </span></code><a class="srclink" href="../../src/serde/de/ignored_any.rs.html#227-232" title="goto source code">[src]</a></h4></div></div><span class="loading-content">Loading content...</span><script type="text/javascript" src="../../implementors/serde/de/trait.Visitor.js" async></script></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="serde"></div>
|
||
<script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html> |