Debian Codegraph @

src/de/mod.rs

raw symbols SCIP
1 /// Deserialization module.
2 use allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::{
3 borrowrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/::ToOwnedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/ToOwned#,
4 stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/::{Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#, ToStringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/ToString#},
5 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/::Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#,
6 };
7 use corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/;
8
9 use serderust-analyzer cargo serde 1.0.228 crate/::{
10 derust-analyzer cargo serde_core 1.0.228 de/::{selfrust-analyzer cargo serde_core 1.0.228 de/, DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#, Deserializerrust-analyzer cargo serde_core 1.0.228 de/Deserializer# as _, Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#},
11 Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#,
12 };
13
14 pub use craterust-analyzer cargo ron 0.12.0 crate/::errorrust-analyzer cargo ron 0.12.0 error/::{Errorrust-analyzer cargo ron 0.12.0 error/Error#, Positionrust-analyzer cargo ron 0.12.0 error/Position#, Spanrust-analyzer cargo ron 0.12.0 error/Span#, SpannedErrorrust-analyzer cargo ron 0.12.0 error/SpannedError#};
15 use craterust-analyzer cargo ron 0.12.0 crate/::{
16 errorrust-analyzer cargo ron 0.12.0 error/::{Resultrust-analyzer cargo ron 0.12.0 error/Result#, SpannedResultrust-analyzer cargo ron 0.12.0 error/SpannedResult#},
17 extensionsrust-analyzer cargo ron 0.12.0 extensions/::Extensionsrust-analyzer cargo ron 0.12.0 extensions/Extensions#,
18 optionsrust-analyzer cargo ron 0.12.0 options/::Optionsrust-analyzer cargo ron 0.12.0 options/Options#,
19 parserust-analyzer cargo ron 0.12.0 parse/::{NewtypeModerust-analyzer cargo ron 0.12.0 parse/NewtypeMode#, ParsedByteStrrust-analyzer cargo ron 0.12.0 parse/ParsedByteStr#, ParsedStrrust-analyzer cargo ron 0.12.0 parse/ParsedStr#, Parserrust-analyzer cargo ron 0.12.0 parse/Parser#, StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#, TupleModerust-analyzer cargo ron 0.12.0 parse/TupleMode#},
20 };
21
22 #[cfg(feature = "std")]
23 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/;
24
25 mod idrust-analyzer cargo ron 0.12.0 de/id/;
26 mod tagrust-analyzer cargo ron 0.12.0 de/tag/;
27 #[cfg(test)]
28 mod testsrust-analyzer cargo ron 0.12.0 de/tests/;
29 mod valuerust-analyzer cargo ron 0.12.0 de/value/;
30
31 /// The RON deserializer.
32 ///
33 /// If you just want to simply deserialize a value,
34 /// you can use the [`from_str`] convenience function.
35 pub struct Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer#<'de> {
36 pub(craterust-analyzer cargo ron 0.12.0 crate/) parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser.: Parserrust-analyzer cargo ron 0.12.0 parse/Parser#<'de>,
37 newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant.: bool,
38 serde_content_newtyperust-analyzer cargo ron 0.12.0 de/Deserializer#serde_content_newtype.: bool,
39 last_identifierrust-analyzer cargo ron 0.12.0 de/Deserializer#last_identifier.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'de str>,
40 recursion_limitrust-analyzer cargo ron 0.12.0 de/Deserializer#recursion_limit.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<usize>,
41 }
42
43 impl<'de> Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer#<'de> {
44 // Cannot implement trait here since output is tied to input lifetime 'de.
45 #[allow(clippy::should_implement_trait)]
46 pub fn from_strrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]from_str().(input: &'de str) -> SpannedResultrust-analyzer cargo ron 0.12.0 error/SpannedResult#<Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]> {
47 Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]::from_str_with_optionsrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]from_str_with_options().(input, &Optionsrust-analyzer cargo ron 0.12.0 options/Options#::defaultrust-analyzer cargo ron 0.12.0 options/impl#[Options][Default]default().())
48 }
49
50 pub fn from_bytesrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]from_bytes().(input: &'de [u8]) -> SpannedResultrust-analyzer cargo ron 0.12.0 error/SpannedResult#<Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]> {
51 Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]::from_bytes_with_optionsrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]from_bytes_with_options().(input, &Optionsrust-analyzer cargo ron 0.12.0 options/Options#::defaultrust-analyzer cargo ron 0.12.0 options/impl#[Options][Default]default().())
52 }
53
54 pub fn from_str_with_optionsrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]from_str_with_options().(input: &'de str, options: &Optionsrust-analyzer cargo ron 0.12.0 options/Options#) -> SpannedResultrust-analyzer cargo ron 0.12.0 error/SpannedResult#<Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]> {
55 let mut deserializer = Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer# {
56 parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser.: Parserrust-analyzer cargo ron 0.12.0 parse/Parser#::newrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]new().(input)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().,
57 newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant.: false,
58 serde_content_newtyperust-analyzer cargo ron 0.12.0 de/Deserializer#serde_content_newtype.: false,
59 last_identifierrust-analyzer cargo ron 0.12.0 de/Deserializer#last_identifier.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
60 recursion_limitrust-analyzer cargo ron 0.12.0 de/Deserializer#recursion_limit.: options.recursion_limitrust-analyzer cargo ron 0.12.0 options/Options#recursion_limit.,
61 };
62
63 deserializer.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..extsrust-analyzer cargo ron 0.12.0 parse/Parser#exts. rust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions][`BitOrAssign<Self>`]bitor_assign().|=rust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions][`BitOrAssign<Self>`]bitor_assign(). rust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions][`BitOrAssign<Self>`]bitor_assign().options.default_extensionsrust-analyzer cargo ron 0.12.0 options/Options#default_extensions.;
64
65 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(deserializer)
66 }
67
68 // FIXME: panic is not actually possible, remove once utf8_chunks is stabilized
69 #[allow(clippy::missing_panics_doc)]
70 pub fn from_bytes_with_optionsrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]from_bytes_with_options().(input: &'de [u8], options: &Optionsrust-analyzer cargo ron 0.12.0 options/Options#) -> SpannedResultrust-analyzer cargo ron 0.12.0 error/SpannedResult#<Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]> {
71 let err = match strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/::from_utf8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/converts/from_utf8().(input) {
72 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(input) => return Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]::from_str_with_optionsrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]from_str_with_options().(input, options),
73 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(err) => err,
74 };
75
76 // FIXME: use [`utf8_chunks`](https://github.com/rust-lang/rust/issues/99543) once stabilised
77 #[allow(clippy::expect_used)]
78 let valid_input =
79 strrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/::from_utf8rust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/converts/from_utf8().(&input[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#err.valid_up_torust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/error/impl#[Utf8Error]valid_up_to().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().).expectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]expect().("source is valid up to error");
80
81 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(SpannedErrorrust-analyzer cargo ron 0.12.0 error/SpannedError# {
82 coderust-analyzer cargo ron 0.12.0 error/SpannedError#code.: err.intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(),
83 spanrust-analyzer cargo ron 0.12.0 error/SpannedError#span.: Spanrust-analyzer cargo ron 0.12.0 error/Span# {
84 startrust-analyzer cargo ron 0.12.0 error/Span#start.: Positionrust-analyzer cargo ron 0.12.0 error/Position# { linerust-analyzer cargo ron 0.12.0 error/Position#line.: 1, colrust-analyzer cargo ron 0.12.0 error/Position#col.: 1 },
85 endrust-analyzer cargo ron 0.12.0 error/Span#end.: Positionrust-analyzer cargo ron 0.12.0 error/Position#::from_src_endrust-analyzer cargo ron 0.12.0 error/impl#[Position]from_src_end().(valid_input),
86 },
87 })
88 }
89
90 #[must_use]
91 pub fn remainderrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]remainder().(&self) -> &'de str {
92 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..srcrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]src().()
93 }
94
95 #[must_use]
96 pub fn span_errorrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]span_error().(&self, code: Errorrust-analyzer cargo ron 0.12.0 error/Error#) -> SpannedErrorrust-analyzer cargo ron 0.12.0 error/SpannedError# {
97 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..span_errorrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]span_error().(code)
98 }
99
100 #[must_use]
101 pub fn extensionsrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]extensions().(&self) -> Extensionsrust-analyzer cargo ron 0.12.0 extensions/Extensions# {
102 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..extsrust-analyzer cargo ron 0.12.0 parse/Parser#exts.
103 }
104 }
105
106 /// A convenience function for building a deserializer
107 /// and deserializing a value of type `T` from a reader.
108 #[cfg(feature = "std")]
109 pub fn from_readerrust-analyzer cargo ron 0.12.0 de/from_reader().<R, T>(rdr: R) -> SpannedResultrust-analyzer cargo ron 0.12.0 error/SpannedResult#<T>
110 where
111 R: iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Readrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/Read#,
112 T: derust-analyzer cargo serde_core 1.0.228 de/::DeserializeOwnedrust-analyzer cargo serde_core 1.0.228 de/DeserializeOwned#,
113 {
114 Optionsrust-analyzer cargo ron 0.12.0 options/Options#::defaultrust-analyzer cargo ron 0.12.0 options/impl#[Options][Default]default().().from_readerrust-analyzer cargo ron 0.12.0 options/impl#[Options]from_reader().(rdr)
115 }
116
117 /// A convenience function for building a deserializer
118 /// and deserializing a value of type `T` from a string.
119 pub fn from_strrust-analyzer cargo ron 0.12.0 de/from_str().<'a, T>(s: &'a str) -> SpannedResultrust-analyzer cargo ron 0.12.0 error/SpannedResult#<T>
120 where
121 T: derust-analyzer cargo serde_core 1.0.228 de/::Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#<'a>,
122 {
123 Optionsrust-analyzer cargo ron 0.12.0 options/Options#::defaultrust-analyzer cargo ron 0.12.0 options/impl#[Options][Default]default().().from_strrust-analyzer cargo ron 0.12.0 options/impl#[Options]from_str().(s)
124 }
125
126 /// A convenience function for building a deserializer
127 /// and deserializing a value of type `T` from bytes.
128 pub fn from_bytesrust-analyzer cargo ron 0.12.0 de/from_bytes().<'a, T>(s: &'a [u8]) -> SpannedResultrust-analyzer cargo ron 0.12.0 error/SpannedResult#<T>
129 where
130 T: derust-analyzer cargo serde_core 1.0.228 de/::Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#<'a>,
131 {
132 Optionsrust-analyzer cargo ron 0.12.0 options/Options#::defaultrust-analyzer cargo ron 0.12.0 options/impl#[Options][Default]default().().from_bytesrust-analyzer cargo ron 0.12.0 options/impl#[Options]from_bytes().(s)
133 }
134
135 macro_rules! guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion! {
136 ($self:expr => $expr:expr) => {{
137 if let Some(limit) = &mut $self.recursion_limit {
138 if let Some(new_limit) = limit.checked_sub(1) {
139 *limit = new_limit;
140 } else {
141 return Err(Error::ExceededRecursionLimit);
142 }
143 }
144
145 let result = $expr;
146
147 if let Some(limit) = &mut $self.recursion_limit {
148 *limit = limit.saturating_add(1);
149 }
150
151 result
152 }};
153 }
154
155 impl<'de> Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer#<'de> {
156 /// Check if the remaining bytes are whitespace only,
157 /// otherwise return an error.
158 pub fn endrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]end().(&mut self) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
159 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
160
161 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..srcrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]src().().is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]is_empty().() {
162 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
163 } else {
164 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::TrailingCharactersrust-analyzer cargo ron 0.12.0 error/Error#TrailingCharacters#)
165 }
166 }
167
168 /// Called from [`deserialize_any`][serde::Deserializer::deserialize_any]
169 /// when a struct was detected. Decides if there is a unit, tuple or usual
170 /// struct and deserializes it accordingly.
171 ///
172 /// This method assumes there is no identifier left.
173 fn handle_any_structrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]handle_any_struct().<V>(&mut self, visitor: V, ident: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str>) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
174 where
175 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
176 {
177 // HACK: switch to JSON enum semantics for JSON content
178 // Robust impl blocked on https://github.com/serde-rs/serde/issues/1183
179 let is_serde_content =
180 is_serde_contentrust-analyzer cargo ron 0.12.0 de/is_serde_content().::<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>() || is_serde_tag_or_contentrust-analyzer cargo ron 0.12.0 de/is_serde_tag_or_content().::<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>();
181
182 let old_serde_content_newtype = self.serde_content_newtyperust-analyzer cargo ron 0.12.0 de/Deserializer#serde_content_newtype.;
183 self.serde_content_newtyperust-analyzer cargo ron 0.12.0 de/Deserializer#serde_content_newtype. = false;
184
185 match (
186 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..check_struct_typerust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]check_struct_type().(
187 NewtypeModerust-analyzer cargo ron 0.12.0 parse/NewtypeMode#::NoParensMeanUnitrust-analyzer cargo ron 0.12.0 parse/NewtypeMode#NoParensMeanUnit#,
188 if old_serde_content_newtype {
189 TupleModerust-analyzer cargo ron 0.12.0 parse/TupleMode#::DifferentiateNewtyperust-analyzer cargo ron 0.12.0 parse/TupleMode#DifferentiateNewtype# // separate match on NewtypeOrTuple below
190 } else {
191 TupleModerust-analyzer cargo ron 0.12.0 parse/TupleMode#::ImpreciseTupleOrNewtyperust-analyzer cargo ron 0.12.0 parse/TupleMode#ImpreciseTupleOrNewtype# // Tuple and NewtypeOrTuple match equally
192 },
193 )?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().,
194 ident,
195 ) {
196 (StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::Unitrust-analyzer cargo ron 0.12.0 parse/StructType#Unit#, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ident)) if is_serde_content => {
197 // serde's Content type needs the ident for unit variants
198 visitor.visit_strrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_str().(ident)
199 }
200 (StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::Unitrust-analyzer cargo ron 0.12.0 parse/StructType#Unit#, _) => visitor.visit_unitrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_unit().(),
201 (_, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ident)) if is_serde_content => {
202 // serde's Content type uses a singleton map encoding for enums
203 visitor.visit_maprust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_map().(SerdeEnumContentrust-analyzer cargo ron 0.12.0 de/SerdeEnumContent# {
204 derust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#de.: self,
205 identrust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#ident.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ident),
206 })
207 }
208 (StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::Namedrust-analyzer cargo ron 0.12.0 parse/StructType#Named#, _) => {
209 // giving no name results in worse errors but is necessary here
210 self.handle_struct_after_namerust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]handle_struct_after_name().("", visitor)
211 }
212 (StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::NewtypeTuplerust-analyzer cargo ron 0.12.0 parse/StructType#NewtypeTuple#, _) if old_serde_content_newtype => {
213 // deserialize a newtype struct or variant
214 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().('(');
215 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
216 let result = self.deserialize_anyrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_any().(visitor);
217 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
218 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().(')');
219
220 result
221 }
222 (
223 StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::AnyTuplerust-analyzer cargo ron 0.12.0 parse/StructType#AnyTuple#
224 | StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::EmptyTuplerust-analyzer cargo ron 0.12.0 parse/StructType#EmptyTuple#
225 | StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::NewtypeTuplerust-analyzer cargo ron 0.12.0 parse/StructType#NewtypeTuple#
226 | StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::NonNewtypeTuplerust-analyzer cargo ron 0.12.0 parse/StructType#NonNewtypeTuple#,
227 _,
228 ) => {
229 // first argument is technically incorrect, but ignored anyway
230 self.deserialize_tuplerust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_tuple().(0, visitor)
231 }
232 }
233 }
234
235 /// Called from
236 /// [`deserialize_struct`][serde::Deserializer::deserialize_struct],
237 /// [`struct_variant`][serde::de::VariantAccess::struct_variant], and
238 /// [`handle_any_struct`][Self::handle_any_struct]. Handles
239 /// deserialising the enclosing parentheses and everything in between.
240 ///
241 /// This method assumes there is no struct name identifier left.
242 fn handle_struct_after_namerust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]handle_struct_after_name().<V>(
243 &mut self,
244 name_for_pretty_errors_only: &'static str,
245 visitor: V,
246 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
247 where
248 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
249 {
250 if self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. || self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().('(') {
251 let old_newtype_variant = self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant.;
252 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
253
254 let value = guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self =>
255 visitor
256 .visit_maprust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_map().(CommaSeparatedrust-analyzer cargo ron 0.12.0 de/CommaSeparated#::newrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`]new().(Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::Structrust-analyzer cargo ron 0.12.0 de/Terminator#Struct#, self))
257 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|err| {
258 struct_error_namerust-analyzer cargo ron 0.12.0 de/struct_error_name().(
259 err,
260 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().old_newtype_variant && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().name_for_pretty_errors_only.is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]is_empty().() {
261 Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(name_for_pretty_errors_only)
262 } else {
263 Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#
264 },
265 )
266 })?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
267 };
268
269 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
270
271 if old_newtype_variant || self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().(')') {
272 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(value)
273 } else {
274 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedStructLikeEndrust-analyzer cargo ron 0.12.0 error/Error#ExpectedStructLikeEnd#)
275 }
276 } else if name_for_pretty_errors_only.is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]is_empty().() {
277 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedStructLikerust-analyzer cargo ron 0.12.0 error/Error#ExpectedStructLike#)
278 } else {
279 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedNamedStructLikerust-analyzer cargo ron 0.12.0 error/Error#ExpectedNamedStructLike#(name_for_pretty_errors_only))
280 }
281 }
282 }
283
284 impl<'de, 'a> derust-analyzer cargo serde_core 1.0.228 de/::Deserializerrust-analyzer cargo serde_core 1.0.228 de/Deserializer#<'de> for &'a mut Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer#<'de> {
285 type Errorrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]Error# = Errorrust-analyzer cargo ron 0.12.0 error/Error#;
286
287 fn deserialize_anyrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_any().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
288 where
289 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
290 {
291 if self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. {
292 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..check_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]check_char().(')') {
293 // newtype variant wraps the unit type / a unit struct without name
294 return self.deserialize_unitrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_unit().(visitor);
295 }
296
297 #[allow(clippy::wildcard_in_or_patterns)]
298 match self
299 .parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser.
300 .check_struct_typerust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]check_struct_type().(NewtypeModerust-analyzer cargo ron 0.12.0 parse/NewtypeMode#::InsideNewtyperust-analyzer cargo ron 0.12.0 parse/NewtypeMode#InsideNewtype#, TupleModerust-analyzer cargo ron 0.12.0 parse/TupleMode#::DifferentiateNewtyperust-analyzer cargo ron 0.12.0 parse/TupleMode#DifferentiateNewtype#)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
301 {
302 StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::Namedrust-analyzer cargo ron 0.12.0 parse/StructType#Named# => {
303 // newtype variant wraps a named struct
304 // giving no name results in worse errors but is necessary here
305 return self.handle_struct_after_namerust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]handle_struct_after_name().("", visitor);
306 }
307 StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::EmptyTuplerust-analyzer cargo ron 0.12.0 parse/StructType#EmptyTuple# | StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::NonNewtypeTuplerust-analyzer cargo ron 0.12.0 parse/StructType#NonNewtypeTuple# => {
308 // newtype variant wraps a tuple (struct)
309 // first argument is technically incorrect, but ignored anyway
310 return self.deserialize_tuplerust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_tuple().(0, visitor);
311 }
312 // StructType::Unit is impossible with NewtypeMode::InsideNewtype
313 // StructType::AnyTuple is impossible with TupleMode::DifferentiateNewtype
314 StructTyperust-analyzer cargo ron 0.12.0 parse/StructType#::NewtypeTuplerust-analyzer cargo ron 0.12.0 parse/StructType#NewtypeTuple# | _ => {
315 // continue as usual with the inner content of the newtype variant
316 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
317 }
318 }
319 }
320
321 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("true") {
322 return visitor.visit_boolrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_bool().(true);
323 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("false") {
324 return visitor.visit_boolrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_bool().(false);
325 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..check_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]check_ident().("Some") {
326 return self.deserialize_optionrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_option().(visitor);
327 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("None") {
328 return visitor.visit_nonerust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_none().();
329 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_strrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_str().("()") {
330 return visitor.visit_unitrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_unit().();
331 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("inf") || self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("inff32") {
332 return visitor.visit_f32rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_f32().(corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::f32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/::INFINITYrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/INFINITY.);
333 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("inff64") {
334 return visitor.visit_f64rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_f64().(corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::f64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/::INFINITYrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/INFINITY.);
335 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("NaN") || self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("NaNf32") {
336 return visitor.visit_f32rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_f32().(corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::f32rust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f32/NAN.);
337 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("NaNf64") {
338 return visitor.visit_f64rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_f64().(corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::f64rust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/::NANrust-analyzer cargo core https://github.com/rust-lang/rust/library/core f64/NAN.);
339 }
340
341 // `skip_identifier` does not change state if it fails
342 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ident) = self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_identifierrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_identifier().() {
343 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
344
345 return self.handle_any_structrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]handle_any_struct().(visitor, Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ident));
346 }
347
348 match self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..peek_char_or_eofrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]peek_char_or_eof().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). {
349 '(' => self.handle_any_structrust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]handle_any_struct().(visitor, Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#),
350 '[' => self.deserialize_seqrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_seq().(visitor),
351 '{' => self.deserialize_maprust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_map().(visitor),
352 '0'..=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeInclusive#'9' | '+' | '-' | '.' => self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..any_numberrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]any_number().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..visitrust-analyzer cargo ron 0.12.0 value/number/impl#[Number]visit().(visitor),
353 '"' | 'r' => self.deserialize_stringrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_string().(visitor),
354 'b' if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..srcrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]src().().starts_withrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]starts_with().("b'") => self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..any_numberrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]any_number().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..visitrust-analyzer cargo ron 0.12.0 value/number/impl#[Number]visit().(visitor),
355 'b' => self.deserialize_byte_bufrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_byte_buf().(visitor),
356 '\'' => self.deserialize_charrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_char().(visitor),
357 other => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::UnexpectedCharrust-analyzer cargo ron 0.12.0 error/Error#UnexpectedChar#(other)),
358 }
359 }
360
361 fn deserialize_boolrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_bool().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
362 where
363 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
364 {
365 visitor.visit_boolrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_bool().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..boolrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]bool().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
366 }
367
368 fn deserialize_i8rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_i8().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
369 where
370 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
371 {
372 visitor.visit_i8rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_i8().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
373 }
374
375 fn deserialize_i16rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_i16().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
376 where
377 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
378 {
379 visitor.visit_i16rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_i16().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
380 }
381
382 fn deserialize_i32rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_i32().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
383 where
384 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
385 {
386 visitor.visit_i32rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_i32().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
387 }
388
389 fn deserialize_i64rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_i64().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
390 where
391 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
392 {
393 visitor.visit_i64rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_i64().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
394 }
395
396 #[cfg(feature = "integer128")]
397 fn deserialize_i128rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_i128().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
398 where
399 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
400 {
401 visitor.visit_i128rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_i128().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
402 }
403
404 fn deserialize_u8rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_u8().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
405 where
406 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
407 {
408 visitor.visit_u8rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_u8().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
409 }
410
411 fn deserialize_u16rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_u16().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
412 where
413 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
414 {
415 visitor.visit_u16rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_u16().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
416 }
417
418 fn deserialize_u32rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_u32().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
419 where
420 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
421 {
422 visitor.visit_u32rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_u32().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
423 }
424
425 fn deserialize_u64rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_u64().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
426 where
427 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
428 {
429 visitor.visit_u64rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_u64().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
430 }
431
432 #[cfg(feature = "integer128")]
433 fn deserialize_u128rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_u128().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
434 where
435 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
436 {
437 visitor.visit_u128rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_u128().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..integerrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]integer().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
438 }
439
440 fn deserialize_f32rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_f32().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
441 where
442 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
443 {
444 visitor.visit_f32rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_f32().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..floatrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]float().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
445 }
446
447 fn deserialize_f64rust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_f64().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
448 where
449 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
450 {
451 visitor.visit_f64rust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_f64().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..floatrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]float().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
452 }
453
454 fn deserialize_charrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_char().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
455 where
456 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
457 {
458 visitor.visit_charrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_char().(self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]char().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().)
459 }
460
461 fn deserialize_strrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_str().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
462 where
463 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
464 {
465 match self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..stringrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]string().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). {
466 ParsedStrrust-analyzer cargo ron 0.12.0 parse/ParsedStr#::Allocatedrust-analyzer cargo ron 0.12.0 parse/ParsedStr#Allocated#(s) => visitor.visit_stringrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_string().(s),
467 ParsedStrrust-analyzer cargo ron 0.12.0 parse/ParsedStr#::Slicerust-analyzer cargo ron 0.12.0 parse/ParsedStr#Slice#(s) => visitor.visit_borrowed_strrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_borrowed_str().(s),
468 }
469 }
470
471 fn deserialize_stringrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_string().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
472 where
473 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
474 {
475 self.deserialize_strrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_str().(visitor)
476 }
477
478 fn deserialize_bytesrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_bytes().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
479 where
480 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
481 {
482 self.deserialize_byte_bufrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_byte_buf().(visitor)
483 }
484
485 fn deserialize_byte_bufrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_byte_buf().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
486 where
487 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
488 {
489 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..check_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]check_char().('[') {
490 let bytes = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::<u8>::deserializerust-analyzer cargo serde_core 1.0.228 de/impls/impl#[`Vec<T>`][`Deserialize<'de>`]deserialize().(self)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
491 return visitor.visit_byte_bufrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_byte_buf().(bytes);
492 }
493
494 match self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..byte_stringrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]byte_string().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). {
495 ParsedByteStrrust-analyzer cargo ron 0.12.0 parse/ParsedByteStr#::Allocatedrust-analyzer cargo ron 0.12.0 parse/ParsedByteStr#Allocated#(byte_buf) => visitor.visit_byte_bufrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_byte_buf().(byte_buf),
496 ParsedByteStrrust-analyzer cargo ron 0.12.0 parse/ParsedByteStr#::Slicerust-analyzer cargo ron 0.12.0 parse/ParsedByteStr#Slice#(bytes) => visitor.visit_borrowed_bytesrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_borrowed_bytes().(bytes),
497 }
498 }
499
500 fn deserialize_optionrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_option().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
501 where
502 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
503 {
504 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("None") {
505 visitor.visit_nonerust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_none().()
506 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_identrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_ident().("Some") && {
507 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
508 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().('(')
509 } {
510 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
511
512 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = self
513 .parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser.
514 .extsrust-analyzer cargo ron 0.12.0 parse/Parser#exts.
515 .containsrust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions]contains().(Extensionsrust-analyzer cargo ron 0.12.0 extensions/Extensions#::UNWRAP_VARIANT_NEWTYPESrust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions]UNWRAP_VARIANT_NEWTYPES.);
516
517 let v = guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self => visitor.visit_somerust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_some().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). };
518
519 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
520
521 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..commarust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]comma().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
522
523 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().(')') {
524 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(v)
525 } else {
526 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedOptionEndrust-analyzer cargo ron 0.12.0 error/Error#ExpectedOptionEnd#)
527 }
528 } else if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..extsrust-analyzer cargo ron 0.12.0 parse/Parser#exts..containsrust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions]contains().(Extensionsrust-analyzer cargo ron 0.12.0 extensions/Extensions#::IMPLICIT_SOMErust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions]IMPLICIT_SOME.) {
529 guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self => visitor.visit_somerust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_some().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self) }
530 } else {
531 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedOptionrust-analyzer cargo ron 0.12.0 error/Error#ExpectedOption#)
532 }
533 }
534
535 // In Serde, unit means an anonymous value containing no data.
536 fn deserialize_unitrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_unit().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
537 where
538 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
539 {
540 if self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. || self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_strrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_str().("()") {
541 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
542
543 visitor.visit_unitrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_unit().()
544 } else {
545 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedUnitrust-analyzer cargo ron 0.12.0 error/Error#ExpectedUnit#)
546 }
547 }
548
549 fn deserialize_unit_structrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_unit_struct().<V>(self, name: &'static str, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
550 where
551 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
552 {
553 if self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. || self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_struct_namerust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_struct_name().(name)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). {
554 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
555
556 visitor.visit_unitrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_unit().()
557 } else {
558 self.deserialize_unitrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_unit().(visitor)
559 }
560 }
561
562 fn deserialize_newtype_structrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_newtype_struct().<V>(self, name: &'static str, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
563 where
564 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
565 {
566 if name rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[`&A`][`PartialEq<&B>`]eq().craterust-analyzer cargo ron 0.12.0 crate/::valuerust-analyzer cargo ron 0.12.0 value/::rawrust-analyzer cargo ron 0.12.0 value/raw/::RAW_VALUE_TOKENrust-analyzer cargo ron 0.12.0 value/raw/RAW_VALUE_TOKEN. {
567 let src_before = self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..pre_ws_srcrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]pre_ws_src().();
568 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
569 let _ignored = self.deserialize_ignored_anyrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_ignored_any().(derust-analyzer cargo serde_core 1.0.228 de/::IgnoredAnyrust-analyzer cargo serde_core 1.0.228 de/ignored_any/IgnoredAny#)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
570 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
571 let src_after = self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..srcrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]src().();
572
573 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..has_unclosed_line_commentrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]has_unclosed_line_comment().() {
574 return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::UnclosedLineCommentrust-analyzer cargo ron 0.12.0 error/Error#UnclosedLineComment#);
575 }
576
577 let ron_str = &src_before[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#src_before.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().src_after.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]len().()]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().;
578
579 return visitor
580 .visit_borrowed_strrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_borrowed_str().::<Errorrust-analyzer cargo ron 0.12.0 error/Error#>(ron_str)
581 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedRawValuerust-analyzer cargo ron 0.12.0 error/Error#ExpectedRawValue#);
582 }
583
584 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..extsrust-analyzer cargo ron 0.12.0 parse/Parser#exts..containsrust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions]contains().(Extensionsrust-analyzer cargo ron 0.12.0 extensions/Extensions#::UNWRAP_NEWTYPESrust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions]UNWRAP_NEWTYPES.) || self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. {
585 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
586
587 return guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self => visitor.visit_newtype_structrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_newtype_struct().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self) };
588 }
589
590 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_struct_namerust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_struct_name().(name)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
591
592 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
593
594 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().('(') {
595 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
596 let value = guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self => visitor.visit_newtype_structrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_newtype_struct().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). };
597 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..commarust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]comma().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
598
599 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().(')') {
600 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(value)
601 } else {
602 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedStructLikeEndrust-analyzer cargo ron 0.12.0 error/Error#ExpectedStructLikeEnd#)
603 }
604 } else if name.is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]is_empty().() {
605 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedStructLikerust-analyzer cargo ron 0.12.0 error/Error#ExpectedStructLike#)
606 } else {
607 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedNamedStructLikerust-analyzer cargo ron 0.12.0 error/Error#ExpectedNamedStructLike#(name))
608 }
609 }
610
611 fn deserialize_seqrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_seq().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
612 where
613 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
614 {
615 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
616
617 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().('[') {
618 let value = guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self =>
619 visitor.visit_seqrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_seq().(CommaSeparatedrust-analyzer cargo ron 0.12.0 de/CommaSeparated#::newrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`]new().(Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::Seqrust-analyzer cargo ron 0.12.0 de/Terminator#Seq#, self))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
620 };
621 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
622
623 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().(']') {
624 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(value)
625 } else {
626 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedArrayEndrust-analyzer cargo ron 0.12.0 error/Error#ExpectedArrayEnd#)
627 }
628 } else {
629 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedArrayrust-analyzer cargo ron 0.12.0 error/Error#ExpectedArray#)
630 }
631 }
632
633 fn deserialize_tuplerust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_tuple().<V>(self, _len: usize, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
634 where
635 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
636 {
637 if self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. || self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().('(') {
638 let old_newtype_variant = self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant.;
639 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
640
641 let value = guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self =>
642 visitor.visit_seqrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_seq().(CommaSeparatedrust-analyzer cargo ron 0.12.0 de/CommaSeparated#::newrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`]new().(Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::Tuplerust-analyzer cargo ron 0.12.0 de/Terminator#Tuple#, self))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
643 };
644 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
645
646 if old_newtype_variant || self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().(')') {
647 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(value)
648 } else {
649 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedStructLikeEndrust-analyzer cargo ron 0.12.0 error/Error#ExpectedStructLikeEnd#)
650 }
651 } else {
652 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedStructLikerust-analyzer cargo ron 0.12.0 error/Error#ExpectedStructLike#)
653 }
654 }
655
656 fn deserialize_tuple_structrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_tuple_struct().<V>(
657 self,
658 name: &'static str,
659 len: usize,
660 visitor: V,
661 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
662 where
663 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
664 {
665 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. {
666 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_struct_namerust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_struct_name().(name)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
667 }
668
669 self.deserialize_tuplerust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_tuple().(len, visitor).map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|e| match e {
670 Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedStructLikerust-analyzer cargo ron 0.12.0 error/Error#ExpectedStructLike# if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().name.is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]is_empty().() => Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedNamedStructLikerust-analyzer cargo ron 0.12.0 error/Error#ExpectedNamedStructLike#(name),
671 e => e,
672 })
673 }
674
675 fn deserialize_maprust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_map().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
676 where
677 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
678 {
679 struct VisitorExpectingrust-analyzer cargo ron 0.12.0 de/VisitorExpecting#<V>(V);
680 impl<'de, V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for VisitorExpectingrust-analyzer cargo ron 0.12.0 de/VisitorExpecting#<&'_ V> {
681 fn fmtrust-analyzer cargo ron 0.12.0 de/impl#[`VisitorExpecting<&V>`][Display]fmt().(&self, fmt: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
682 self.0rust-analyzer cargo ron 0.12.0 de/VisitorExpecting#0..expectingrust-analyzer cargo serde_core 1.0.228 de/Visitor#expecting().(fmt)
683 }
684 }
685
686 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
687
688 // TODO: Avoid allocating to perform this check.
689 let serde_flatten_canary = VisitorExpectingrust-analyzer cargo ron 0.12.0 de/VisitorExpecting#(&visitor)
690 .to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().()
691 .starts_withrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]starts_with().("struct ");
692
693 let terminator = if serde_flatten_canary {
694 Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::MapAsStructrust-analyzer cargo ron 0.12.0 de/Terminator#MapAsStruct#
695 } else {
696 Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::Maprust-analyzer cargo ron 0.12.0 de/Terminator#Map#
697 };
698
699 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().('{') {
700 let value = guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self =>
701 visitor.visit_maprust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_map().(CommaSeparatedrust-analyzer cargo ron 0.12.0 de/CommaSeparated#::newrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`]new().(terminator, self))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
702 };
703 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
704
705 if self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().('}') {
706 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(value)
707 } else {
708 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedMapEndrust-analyzer cargo ron 0.12.0 error/Error#ExpectedMapEnd#)
709 }
710 } else {
711 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedMaprust-analyzer cargo ron 0.12.0 error/Error#ExpectedMap#)
712 }
713 }
714
715 fn deserialize_structrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_struct().<V>(
716 self,
717 name: &'static str,
718 _fields: &'static [&'static str],
719 visitor: V,
720 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
721 where
722 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
723 {
724 if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. {
725 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_struct_namerust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_struct_name().(name)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
726 }
727
728 self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
729
730 self.handle_struct_after_namerust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]handle_struct_after_name().(name, visitor)
731 }
732
733 fn deserialize_enumrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_enum().<V>(
734 self,
735 name: &'static str,
736 _variants: &'static [&'static str],
737 visitor: V,
738 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
739 where
740 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
741 {
742 self.newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
743
744 match guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self => visitor.visit_enumrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_enum().(Enumrust-analyzer cargo ron 0.12.0 de/Enum#::newrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`]new().(self)) } {
745 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(value) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(value),
746 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::NoSuchEnumVariantrust-analyzer cargo ron 0.12.0 error/Error#NoSuchEnumVariant# {
747 expectedrust-analyzer cargo ron 0.12.0 error/Error#NoSuchEnumVariant#expected.,
748 foundrust-analyzer cargo ron 0.12.0 error/Error#NoSuchEnumVariant#found.,
749 outerrust-analyzer cargo ron 0.12.0 error/Error#NoSuchEnumVariant#outer.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
750 }) if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().name.is_emptyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/impl#[str]is_empty().() => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::NoSuchEnumVariantrust-analyzer cargo ron 0.12.0 error/Error#NoSuchEnumVariant# {
751 expectedrust-analyzer cargo ron 0.12.0 error/Error#NoSuchEnumVariant#expected.,
752 foundrust-analyzer cargo ron 0.12.0 error/Error#NoSuchEnumVariant#found.,
753 outerrust-analyzer cargo ron 0.12.0 error/Error#NoSuchEnumVariant#outer.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#::fromrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String][`From<&str>`]from().(name)),
754 }),
755 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(e) => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(e),
756 }
757 }
758
759 fn deserialize_identifierrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_identifier().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
760 where
761 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
762 {
763 let identifier = self.parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..identifierrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]identifier().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
764
765 self.last_identifierrust-analyzer cargo ron 0.12.0 de/Deserializer#last_identifier. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(identifier);
766
767 visitor.visit_borrowed_strrust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_borrowed_str().(identifier)
768 }
769
770 fn deserialize_ignored_anyrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_ignored_any().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
771 where
772 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
773 {
774 self.deserialize_anyrust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_any().(visitor)
775 }
776 }
777
778 enum Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator# {
779 Maprust-analyzer cargo ron 0.12.0 de/Terminator#Map#,
780 MapAsStructrust-analyzer cargo ron 0.12.0 de/Terminator#MapAsStruct#,
781 Tuplerust-analyzer cargo ron 0.12.0 de/Terminator#Tuple#,
782 Structrust-analyzer cargo ron 0.12.0 de/Terminator#Struct#,
783 Seqrust-analyzer cargo ron 0.12.0 de/Terminator#Seq#,
784 }
785
786 impl Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator# {
787 fn as_charrust-analyzer cargo ron 0.12.0 de/impl#[Terminator]as_char().(&self) -> char {
788 match self {
789 Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::Maprust-analyzer cargo ron 0.12.0 de/Terminator#Map# | Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::MapAsStructrust-analyzer cargo ron 0.12.0 de/Terminator#MapAsStruct# => '}',
790 Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::Tuplerust-analyzer cargo ron 0.12.0 de/Terminator#Tuple# | Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::Structrust-analyzer cargo ron 0.12.0 de/Terminator#Struct# => ')',
791 Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::Seqrust-analyzer cargo ron 0.12.0 de/Terminator#Seq# => ']',
792 }
793 }
794 }
795
796 struct CommaSeparatedrust-analyzer cargo ron 0.12.0 de/CommaSeparated#<'a, 'de: 'a> {
797 derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de.: &'a mut Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer#<'de>,
798 terminatorrust-analyzer cargo ron 0.12.0 de/CommaSeparated#terminator.: Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#,
799 had_commarust-analyzer cargo ron 0.12.0 de/CommaSeparated#had_comma.: bool,
800 inside_internally_tagged_enumrust-analyzer cargo ron 0.12.0 de/CommaSeparated#inside_internally_tagged_enum.: bool,
801 }
802
803 impl<'a, 'de> CommaSeparatedrust-analyzer cargo ron 0.12.0 de/CommaSeparated#<'a, 'de> {
804 fn newrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`]new().(terminator: Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#, de: &'a mut Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer#<'de>) -> Selfrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`] {
805 CommaSeparatedrust-analyzer cargo ron 0.12.0 de/CommaSeparated# {
806 derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de.,
807 terminatorrust-analyzer cargo ron 0.12.0 de/CommaSeparated#terminator.,
808 had_commarust-analyzer cargo ron 0.12.0 de/CommaSeparated#had_comma.: true,
809 inside_internally_tagged_enumrust-analyzer cargo ron 0.12.0 de/CommaSeparated#inside_internally_tagged_enum.: false,
810 }
811 }
812
813 fn has_elementrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`]has_element().(&mut self) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<bool> {
814 self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
815
816 match (
817 self.had_commarust-analyzer cargo ron 0.12.0 de/CommaSeparated#had_comma.,
818 !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..check_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]check_char().(self.terminatorrust-analyzer cargo ron 0.12.0 de/CommaSeparated#terminator..as_charrust-analyzer cargo ron 0.12.0 de/impl#[Terminator]as_char().()),
819 ) {
820 // Trailing comma, maybe has a next element
821 (true, has_element) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(has_element),
822 // No trailing comma but terminator
823 (false, false) => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(false),
824 // No trailing comma or terminator
825 (false, true) => Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedCommarust-analyzer cargo ron 0.12.0 error/Error#ExpectedComma#),
826 }
827 }
828 }
829
830 impl<'de, 'a> derust-analyzer cargo serde_core 1.0.228 de/::SeqAccessrust-analyzer cargo serde_core 1.0.228 de/SeqAccess#<'de> for CommaSeparatedrust-analyzer cargo ron 0.12.0 de/CommaSeparated#<'a, 'de> {
831 type Errorrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`][`SeqAccess<'de>`]Error# = Errorrust-analyzer cargo ron 0.12.0 error/Error#;
832
833 fn next_element_seedrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`][`SeqAccess<'de>`]next_element_seed().<T>(&mut self, seed: T) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<T::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>>
834 where
835 T: DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#<'de>,
836 {
837 if self.has_elementrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`]has_element().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). {
838 let res = guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de. => seed.deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). };
839
840 self.had_commarust-analyzer cargo ron 0.12.0 de/CommaSeparated#had_comma. = self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..commarust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]comma().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
841
842 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(res))
843 } else {
844 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#)
845 }
846 }
847 }
848
849 impl<'de, 'a> derust-analyzer cargo serde_core 1.0.228 de/::MapAccessrust-analyzer cargo serde_core 1.0.228 de/MapAccess#<'de> for CommaSeparatedrust-analyzer cargo ron 0.12.0 de/CommaSeparated#<'a, 'de> {
850 type Errorrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`][`MapAccess<'de>`]Error# = Errorrust-analyzer cargo ron 0.12.0 error/Error#;
851
852 fn next_key_seedrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`][`MapAccess<'de>`]next_key_seed().<K>(&mut self, seed: K) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<K::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>>
853 where
854 K: DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#<'de>,
855 {
856 if self.has_elementrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`]has_element().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). {
857 self.inside_internally_tagged_enumrust-analyzer cargo ron 0.12.0 de/CommaSeparated#inside_internally_tagged_enum. = is_serde_tag_or_contentrust-analyzer cargo ron 0.12.0 de/is_serde_tag_or_content().::<K::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>();
858
859 match self.terminatorrust-analyzer cargo ron 0.12.0 de/CommaSeparated#terminator. {
860 Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::Structrust-analyzer cargo ron 0.12.0 de/Terminator#Struct# => guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de. =>
861 seed.deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(&mut idrust-analyzer cargo ron 0.12.0 de/id/::Deserializerrust-analyzer cargo ron 0.12.0 de/id/Deserializer#::newrust-analyzer cargo ron 0.12.0 de/id/impl#[`Deserializer<'a, 'b>`]new().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de., false)).maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#)
862 },
863 Terminatorrust-analyzer cargo ron 0.12.0 de/Terminator#::MapAsStructrust-analyzer cargo ron 0.12.0 de/Terminator#MapAsStruct# => guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de. =>
864 seed.deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(&mut idrust-analyzer cargo ron 0.12.0 de/id/::Deserializerrust-analyzer cargo ron 0.12.0 de/id/Deserializer#::newrust-analyzer cargo ron 0.12.0 de/id/impl#[`Deserializer<'a, 'b>`]new().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de., true)).maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#)
865 },
866 _ => guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de. => seed.deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de.).maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#) },
867 }
868 } else {
869 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#)
870 }
871 }
872
873 fn next_value_seedrust-analyzer cargo ron 0.12.0 de/impl#[`CommaSeparated<'a, 'de>`][`MapAccess<'de>`]next_value_seed().<V>(&mut self, seed: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>
874 where
875 V: DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#<'de>,
876 {
877 self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
878
879 if self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().(':') {
880 self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
881
882 let res = if self.inside_internally_tagged_enumrust-analyzer cargo ron 0.12.0 de/CommaSeparated#inside_internally_tagged_enum. && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().is_serde_contentrust-analyzer cargo ron 0.12.0 de/is_serde_content().::<V::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>() {
883 guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de. =>
884 seed.deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(&mut tagrust-analyzer cargo ron 0.12.0 de/tag/::Deserializerrust-analyzer cargo ron 0.12.0 de/tag/Deserializer#::newrust-analyzer cargo ron 0.12.0 de/tag/impl#[`Deserializer<'a, 'b>`]new().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de.))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
885 }
886 } else {
887 guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de. =>
888 seed.deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
889 }
890 };
891
892 self.had_commarust-analyzer cargo ron 0.12.0 de/CommaSeparated#had_comma. = self.derust-analyzer cargo ron 0.12.0 de/CommaSeparated#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..commarust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]comma().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
893
894 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(res)
895 } else {
896 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedMapColonrust-analyzer cargo ron 0.12.0 error/Error#ExpectedMapColon#)
897 }
898 }
899 }
900
901 struct Enumrust-analyzer cargo ron 0.12.0 de/Enum#<'a, 'de: 'a> {
902 derust-analyzer cargo ron 0.12.0 de/Enum#de.: &'a mut Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer#<'de>,
903 }
904
905 impl<'a, 'de> Enumrust-analyzer cargo ron 0.12.0 de/Enum#<'a, 'de> {
906 fn newrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`]new().(de: &'a mut Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer#<'de>) -> Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`] {
907 Enumrust-analyzer cargo ron 0.12.0 de/Enum# { derust-analyzer cargo ron 0.12.0 de/Enum#de. }
908 }
909 }
910
911 impl<'de, 'a> derust-analyzer cargo serde_core 1.0.228 de/::EnumAccessrust-analyzer cargo serde_core 1.0.228 de/EnumAccess#<'de> for Enumrust-analyzer cargo ron 0.12.0 de/Enum#<'a, 'de> {
912 type Errorrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`EnumAccess<'de>`]Error# = Errorrust-analyzer cargo ron 0.12.0 error/Error#;
913 type Variantrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`EnumAccess<'de>`]Variant# = Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`EnumAccess<'de>`];
914
915 fn variant_seedrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`EnumAccess<'de>`]variant_seed().<V>(self, seed: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<(V::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#, Selfrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`EnumAccess<'de>`]::Variantrust-analyzer cargo serde_core 1.0.228 de/EnumAccess#Variant#)>
916 where
917 V: DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#<'de>,
918 {
919 self.derust-analyzer cargo ron 0.12.0 de/Enum#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
920
921 let value = guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self.derust-analyzer cargo ron 0.12.0 de/Enum#de. => seed.deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.derust-analyzer cargo ron 0.12.0 de/Enum#de.)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch(). };
922
923 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#((value, self))
924 }
925 }
926
927 impl<'de, 'a> derust-analyzer cargo serde_core 1.0.228 de/::VariantAccessrust-analyzer cargo serde_core 1.0.228 de/VariantAccess#<'de> for Enumrust-analyzer cargo ron 0.12.0 de/Enum#<'a, 'de> {
928 type Errorrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`VariantAccess<'de>`]Error# = Errorrust-analyzer cargo ron 0.12.0 error/Error#;
929
930 fn unit_variantrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`VariantAccess<'de>`]unit_variant().(self) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<()> {
931 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
932 }
933
934 fn newtype_variant_seedrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`VariantAccess<'de>`]newtype_variant_seed().<T>(self, seed: T) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<T::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>
935 where
936 T: DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#<'de>,
937 {
938 let newtype_variant = self.derust-analyzer cargo ron 0.12.0 de/Enum#de..last_identifierrust-analyzer cargo ron 0.12.0 de/Deserializer#last_identifier.;
939
940 self.derust-analyzer cargo ron 0.12.0 de/Enum#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
941
942 if self.derust-analyzer cargo ron 0.12.0 de/Enum#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().('(') {
943 self.derust-analyzer cargo ron 0.12.0 de/Enum#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
944
945 self.derust-analyzer cargo ron 0.12.0 de/Enum#de..newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = self
946 .derust-analyzer cargo ron 0.12.0 de/Enum#de.
947 .parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser.
948 .extsrust-analyzer cargo ron 0.12.0 parse/Parser#exts.
949 .containsrust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions]contains().(Extensionsrust-analyzer cargo ron 0.12.0 extensions/Extensions#::UNWRAP_VARIANT_NEWTYPESrust-analyzer cargo ron 0.12.0 extensions/impl#[Extensions]UNWRAP_VARIANT_NEWTYPES.);
950
951 let val = guard_recursionrust-analyzer cargo ron 0.12.0 de/guard_recursion!! { self.derust-analyzer cargo ron 0.12.0 de/Enum#de. =>
952 seed
953 .deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.derust-analyzer cargo ron 0.12.0 de/Enum#de.)
954 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|err| struct_error_namerust-analyzer cargo ron 0.12.0 de/struct_error_name().(err, newtype_variant))?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
955 };
956
957 self.derust-analyzer cargo ron 0.12.0 de/Enum#de..newtype_variantrust-analyzer cargo ron 0.12.0 de/Deserializer#newtype_variant. = false;
958
959 self.derust-analyzer cargo ron 0.12.0 de/Enum#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..commarust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]comma().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
960
961 if self.derust-analyzer cargo ron 0.12.0 de/Enum#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..consume_charrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]consume_char().(')') {
962 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(val)
963 } else {
964 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedStructLikeEndrust-analyzer cargo ron 0.12.0 error/Error#ExpectedStructLikeEnd#)
965 }
966 } else {
967 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(Errorrust-analyzer cargo ron 0.12.0 error/Error#::ExpectedStructLikerust-analyzer cargo ron 0.12.0 error/Error#ExpectedStructLike#)
968 }
969 }
970
971 fn tuple_variantrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`VariantAccess<'de>`]tuple_variant().<V>(self, len: usize, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
972 where
973 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
974 {
975 self.derust-analyzer cargo ron 0.12.0 de/Enum#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
976
977 self.derust-analyzer cargo ron 0.12.0 de/Enum#de..deserialize_tuplerust-analyzer cargo ron 0.12.0 de/impl#[`&'a mut Deserializer<'de>`][`Deserializer<'de>`]deserialize_tuple().(len, visitor)
978 }
979
980 fn struct_variantrust-analyzer cargo ron 0.12.0 de/impl#[`Enum<'a, 'de>`][`VariantAccess<'de>`]struct_variant().<V>(self, _fields: &'static [&'static str], visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>
981 where
982 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
983 {
984 let struct_variant = self.derust-analyzer cargo ron 0.12.0 de/Enum#de..last_identifierrust-analyzer cargo ron 0.12.0 de/Deserializer#last_identifier.;
985
986 self.derust-analyzer cargo ron 0.12.0 de/Enum#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
987
988 self.derust-analyzer cargo ron 0.12.0 de/Enum#de.
989 .handle_struct_after_namerust-analyzer cargo ron 0.12.0 de/impl#[`Deserializer<'de>`]handle_struct_after_name().("", visitor)
990 .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|err| struct_error_namerust-analyzer cargo ron 0.12.0 de/struct_error_name().(err, struct_variant))
991 }
992 }
993
994 fn struct_error_namerust-analyzer cargo ron 0.12.0 de/struct_error_name().(error: Errorrust-analyzer cargo ron 0.12.0 error/Error#, name: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&str>) -> Errorrust-analyzer cargo ron 0.12.0 error/Error# {
995 match error {
996 Errorrust-analyzer cargo ron 0.12.0 error/Error#::NoSuchStructFieldrust-analyzer cargo ron 0.12.0 error/Error#NoSuchStructField# {
997 expectedrust-analyzer cargo ron 0.12.0 error/Error#NoSuchStructField#expected.,
998 foundrust-analyzer cargo ron 0.12.0 error/Error#NoSuchStructField#found.,
999 outerrust-analyzer cargo ron 0.12.0 error/Error#NoSuchStructField#outer.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
1000 } => Errorrust-analyzer cargo ron 0.12.0 error/Error#::NoSuchStructFieldrust-analyzer cargo ron 0.12.0 error/Error#NoSuchStructField# {
1001 expectedrust-analyzer cargo ron 0.12.0 error/Error#NoSuchStructField#expected.,
1002 foundrust-analyzer cargo ron 0.12.0 error/Error#NoSuchStructField#found.,
1003 outerrust-analyzer cargo ron 0.12.0 error/Error#NoSuchStructField#outer.: name.maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(ToOwnedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/ToOwned#::to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().),
1004 },
1005 Errorrust-analyzer cargo ron 0.12.0 error/Error#::MissingStructFieldrust-analyzer cargo ron 0.12.0 error/Error#MissingStructField# { fieldrust-analyzer cargo ron 0.12.0 error/Error#MissingStructField#field., outerrust-analyzer cargo ron 0.12.0 error/Error#MissingStructField#outer.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# } => Errorrust-analyzer cargo ron 0.12.0 error/Error#::MissingStructFieldrust-analyzer cargo ron 0.12.0 error/Error#MissingStructField# {
1006 fieldrust-analyzer cargo ron 0.12.0 error/Error#MissingStructField#field.,
1007 outerrust-analyzer cargo ron 0.12.0 error/Error#MissingStructField#outer.: name.maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(ToOwnedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/ToOwned#::to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().),
1008 },
1009 Errorrust-analyzer cargo ron 0.12.0 error/Error#::DuplicateStructFieldrust-analyzer cargo ron 0.12.0 error/Error#DuplicateStructField# { fieldrust-analyzer cargo ron 0.12.0 error/Error#DuplicateStructField#field., outerrust-analyzer cargo ron 0.12.0 error/Error#DuplicateStructField#outer.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# } => Errorrust-analyzer cargo ron 0.12.0 error/Error#::DuplicateStructFieldrust-analyzer cargo ron 0.12.0 error/Error#DuplicateStructField# {
1010 fieldrust-analyzer cargo ron 0.12.0 error/Error#DuplicateStructField#field.,
1011 outerrust-analyzer cargo ron 0.12.0 error/Error#DuplicateStructField#outer.: name.maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(ToOwnedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc borrow/ToOwned#::to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().),
1012 },
1013 e => e,
1014 }
1015 }
1016
1017 struct SerdeEnumContentrust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#<'a, 'de: 'a> {
1018 derust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#de.: &'a mut Deserializerrust-analyzer cargo ron 0.12.0 de/Deserializer#<'de>,
1019 identrust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#ident.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&'a str>,
1020 }
1021
1022 impl<'de, 'a> derust-analyzer cargo serde_core 1.0.228 de/::MapAccessrust-analyzer cargo serde_core 1.0.228 de/MapAccess#<'de> for SerdeEnumContentrust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#<'a, 'de> {
1023 type Errorrust-analyzer cargo ron 0.12.0 de/impl#[`SerdeEnumContent<'a, 'de>`][`MapAccess<'de>`]Error# = Errorrust-analyzer cargo ron 0.12.0 error/Error#;
1024
1025 fn next_key_seedrust-analyzer cargo ron 0.12.0 de/impl#[`SerdeEnumContent<'a, 'de>`][`MapAccess<'de>`]next_key_seed().<K>(&mut self, seed: K) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<K::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>>
1026 where
1027 K: DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#<'de>,
1028 {
1029 self.identrust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#ident.
1030 .takerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]take().()
1031 .maprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]map().(|ident| seed.deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(derust-analyzer cargo serde_core 1.0.228 de/::valuerust-analyzer cargo serde_core 1.0.228 de/value/::StrDeserializerrust-analyzer cargo serde_core 1.0.228 de/value/StrDeserializer#::newrust-analyzer cargo serde_core 1.0.228 de/value/impl#[`StrDeserializer<'a, E>`]new().(ident)))
1032 .transposerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<Result<T, E>>`]transpose().()
1033 }
1034
1035 fn next_value_seedrust-analyzer cargo ron 0.12.0 de/impl#[`SerdeEnumContent<'a, 'de>`][`MapAccess<'de>`]next_value_seed().<V>(&mut self, seed: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>
1036 where
1037 V: DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#<'de>,
1038 {
1039 self.derust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#de..parserrust-analyzer cargo ron 0.12.0 de/Deserializer#parser..skip_wsrust-analyzer cargo ron 0.12.0 parse/impl#[`Parser<'a>`]skip_ws().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().;
1040
1041 let old_serde_content_newtype = self.derust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#de..serde_content_newtyperust-analyzer cargo ron 0.12.0 de/Deserializer#serde_content_newtype.;
1042 self.derust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#de..serde_content_newtyperust-analyzer cargo ron 0.12.0 de/Deserializer#serde_content_newtype. = true;
1043 let result = seed.deserializerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#deserialize().(&mut *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.derust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#de.);
1044 self.derust-analyzer cargo ron 0.12.0 de/SerdeEnumContent#de..serde_content_newtyperust-analyzer cargo ron 0.12.0 de/Deserializer#serde_content_newtype. = old_serde_content_newtype;
1045
1046 result
1047 }
1048 }
1049
1050 fn is_serde_contentrust-analyzer cargo ron 0.12.0 de/is_serde_content().<T>() -> bool {
1051 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(serde_deriverust-analyzer cargo serde_derive 1.0.228 crate/::Deserializerust-analyzer cargo serde_derive 1.0.228 Deserialize:)]
1052 enum Arust-analyzer cargo ron 0.12.0 de/A# {}
1053 type Brust-analyzer cargo ron 0.12.0 de/B# = Arust-analyzer cargo ron 0.12.0 de/A#;
1054
1055 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(serde_deriverust-analyzer cargo serde_derive 1.0.228 crate/::Deserializerust-analyzer cargo serde_derive 1.0.228 Deserialize:)]
1056 #[serde(untagged)]
1057 enum UntaggedEnumrust-analyzer cargo ron 0.12.0 de/UntaggedEnum# {
1058 Arust-analyzer cargo ron 0.12.0 de/UntaggedEnum#A#(Arust-analyzer cargo ron 0.12.0 de/A#),
1059 Brust-analyzer cargo ron 0.12.0 de/UntaggedEnum#B#(Brust-analyzer cargo ron 0.12.0 de/B#),
1060 }
1061
1062 struct TypeIdDeserializerrust-analyzer cargo ron 0.12.0 de/TypeIdDeserializer#;
1063
1064 impl<'de> derust-analyzer cargo serde_core 1.0.228 de/::Deserializerrust-analyzer cargo serde_core 1.0.228 de/Deserializer#<'de> for TypeIdDeserializerrust-analyzer cargo ron 0.12.0 de/TypeIdDeserializer# {
1065 type Errorrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`Deserializer<'de>`]Error# = TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError#;
1066
1067 fn deserialize_anyrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`Deserializer<'de>`]deserialize_any().<V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>>(self, _visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#, Selfrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`Deserializer<'de>`]::Errorrust-analyzer cargo serde_core 1.0.228 de/Deserializer#Error#> {
1068 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError#(typeidrust-analyzer cargo typeid 1.0.3 crate/::ofrust-analyzer cargo typeid 1.0.3 of().::<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#>()))
1069 }
1070
1071 serderust-analyzer cargo serde 1.0.228 crate/::forward_to_deserialize_anyrust-analyzer cargo serde_core 1.0.228 macros/forward_to_deserialize_any!! {
1072 bool i8 i16 i32 i64 i128 u8 u16 u32 u64 u128 f32 f64 char str string
1073 bytes byte_buf option unit unit_struct newtype_struct seq tuple
1074 tuple_struct map struct enum identifier ignored_any
1075 }
1076 }
1077
1078 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
1079 struct TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError#(corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/::TypeIdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/TypeId#);
1080
1081 impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError# {
1082 fn fmtrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdError][Display]fmt().(&self, _fmt: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
1083 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
1084 }
1085 }
1086
1087 impl derust-analyzer cargo serde_core 1.0.228 de/::Errorrust-analyzer cargo serde_core 1.0.228 de/Error# for TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError# {
1088 #[allow(clippy::unreachable)]
1089 fn customrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdError][Error]custom().<T: corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#>(_msg: T) -> Selfrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdError][Error] {
1090 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!()
1091 }
1092 }
1093
1094 impl derust-analyzer cargo serde_core 1.0.228 de/::StdErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# for TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError# {}
1095
1096 fn type_id_of_untagged_enum_default_bufferrust-analyzer cargo ron 0.12.0 de/type_id_of_untagged_enum_default_buffer().() -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/::TypeIdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/TypeId# {
1097 static TYPE_IDrust-analyzer cargo ron 0.12.0 de/TYPE_ID.: once_cellrust-analyzer cargo once_cell 1.20.3 crate/::racerust-analyzer cargo once_cell 1.20.3 race/::OnceBoxrust-analyzer cargo once_cell 1.20.3 race/once_box/OnceBox#<corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/::TypeIdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/TypeId#> =
1098 once_cellrust-analyzer cargo once_cell 1.20.3 crate/::racerust-analyzer cargo once_cell 1.20.3 race/::OnceBoxrust-analyzer cargo once_cell 1.20.3 race/once_box/OnceBox#::newrust-analyzer cargo once_cell 1.20.3 race/once_box/impl#[`OnceBox<T>`]new().();
1099
1100 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().TYPE_IDrust-analyzer cargo ron 0.12.0 de/TYPE_ID..get_or_initrust-analyzer cargo once_cell 1.20.3 race/once_box/impl#[`OnceBox<T>`]get_or_init().(|| match Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#::deserializerust-analyzer cargo ron 0.12.0 de/impl#[UntaggedEnum][`Deserialize<'de>`]deserialize().(TypeIdDeserializerrust-analyzer cargo ron 0.12.0 de/TypeIdDeserializer#) {
1101 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(UntaggedEnumrust-analyzer cargo ron 0.12.0 de/UntaggedEnum#::Arust-analyzer cargo ron 0.12.0 de/UntaggedEnum#A#(void) | UntaggedEnumrust-analyzer cargo ron 0.12.0 de/UntaggedEnum#::Brust-analyzer cargo ron 0.12.0 de/UntaggedEnum#B#(void)) => match void {},
1102 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError#(typeid)) => allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::boxedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/::Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(typeid),
1103 })
1104 }
1105
1106 typeidrust-analyzer cargo typeid 1.0.3 crate/::ofrust-analyzer cargo typeid 1.0.3 of().::<T>() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/impl#[TypeId][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/impl#[TypeId][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/impl#[TypeId][`PartialEq<Self>`]eq().type_id_of_untagged_enum_default_bufferrust-analyzer cargo ron 0.12.0 de/type_id_of_untagged_enum_default_buffer().()
1107 }
1108
1109 fn is_serde_tag_or_contentrust-analyzer cargo ron 0.12.0 de/is_serde_tag_or_content().<T>() -> bool {
1110 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(serde_deriverust-analyzer cargo serde_derive 1.0.228 crate/::Deserializerust-analyzer cargo serde_derive 1.0.228 Deserialize:)]
1111 enum Arust-analyzer cargo ron 0.12.0 de/A# {}
1112
1113 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(serde_deriverust-analyzer cargo serde_derive 1.0.228 crate/::Deserializerust-analyzer cargo serde_derive 1.0.228 Deserialize:)]
1114 #[serde(tag = "tag")]
1115 enum InternallyTaggedEnumrust-analyzer cargo ron 0.12.0 de/InternallyTaggedEnum# {
1116 Arust-analyzer cargo ron 0.12.0 de/InternallyTaggedEnum#A# { arust-analyzer cargo ron 0.12.0 de/InternallyTaggedEnum#A#a.: Arust-analyzer cargo ron 0.12.0 de/A# },
1117 }
1118
1119 struct TypeIdDeserializerrust-analyzer cargo ron 0.12.0 de/TypeIdDeserializer#;
1120
1121 impl<'de> derust-analyzer cargo serde_core 1.0.228 de/::Deserializerrust-analyzer cargo serde_core 1.0.228 de/Deserializer#<'de> for TypeIdDeserializerrust-analyzer cargo ron 0.12.0 de/TypeIdDeserializer# {
1122 type Errorrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`Deserializer<'de>`]Error# = TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError#;
1123
1124 fn deserialize_anyrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`Deserializer<'de>`]deserialize_any().<V>(self, visitor: V) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/Visitor#Value#, Selfrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`Deserializer<'de>`]::Errorrust-analyzer cargo serde_core 1.0.228 de/Deserializer#Error#>
1125 where
1126 V: Visitorrust-analyzer cargo serde_core 1.0.228 de/Visitor#<'de>,
1127 {
1128 visitor.visit_maprust-analyzer cargo serde_core 1.0.228 de/Visitor#visit_map().(self)
1129 }
1130
1131 serderust-analyzer cargo serde 1.0.228 crate/::forward_to_deserialize_anyrust-analyzer cargo serde_core 1.0.228 macros/forward_to_deserialize_any!! {
1132 bool i8 i16 i32 i64 i128 u8 u16 u32 u64 u128 f32 f64 char str string
1133 bytes byte_buf option unit unit_struct newtype_struct seq tuple
1134 tuple_struct map struct enum identifier ignored_any
1135 }
1136 }
1137
1138 impl<'de> derust-analyzer cargo serde_core 1.0.228 de/::MapAccessrust-analyzer cargo serde_core 1.0.228 de/MapAccess#<'de> for TypeIdDeserializerrust-analyzer cargo ron 0.12.0 de/TypeIdDeserializer# {
1139 type Errorrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`MapAccess<'de>`]Error# = TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError#;
1140
1141 fn next_key_seedrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`MapAccess<'de>`]next_key_seed().<K: DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#<'de>>(
1142 &mut self,
1143 _seed: K,
1144 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<K::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>, Selfrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`MapAccess<'de>`]::Errorrust-analyzer cargo serde_core 1.0.228 de/MapAccess#Error#> {
1145 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError#(typeidrust-analyzer cargo typeid 1.0.3 crate/::ofrust-analyzer cargo typeid 1.0.3 of().::<K::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#>()))
1146 }
1147
1148 #[allow(clippy::unreachable)]
1149 fn next_value_seedrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`MapAccess<'de>`]next_value_seed().<V: DeserializeSeedrust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#<'de>>(
1150 &mut self,
1151 _seed: V,
1152 ) -> Resultrust-analyzer cargo ron 0.12.0 error/Result#<V::Valuerust-analyzer cargo serde_core 1.0.228 de/DeserializeSeed#Value#, Selfrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdDeserializer][`MapAccess<'de>`]::Errorrust-analyzer cargo serde_core 1.0.228 de/MapAccess#Error#> {
1153 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!()
1154 }
1155 }
1156
1157 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
1158 struct TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError#(corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/::TypeIdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/TypeId#);
1159
1160 impl corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display# for TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError# {
1161 fn fmtrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdError][Display]fmt().(&self, _fmt: &mut corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Formatterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Formatter#) -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Result# {
1162 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(())
1163 }
1164 }
1165
1166 impl derust-analyzer cargo serde_core 1.0.228 de/::Errorrust-analyzer cargo serde_core 1.0.228 de/Error# for TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError# {
1167 #[allow(clippy::unreachable)]
1168 fn customrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdError][Error]custom().<T: corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::fmtrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/::Displayrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/Display#>(_msg: T) -> Selfrust-analyzer cargo ron 0.12.0 de/impl#[TypeIdError][Error] {
1169 unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!()
1170 }
1171 }
1172
1173 impl derust-analyzer cargo serde_core 1.0.228 de/::StdErrorrust-analyzer cargo core https://github.com/rust-lang/rust/library/core error/Error# for TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError# {}
1174
1175 fn type_id_of_internally_tagged_enum_default_tag_or_bufferrust-analyzer cargo ron 0.12.0 de/type_id_of_internally_tagged_enum_default_tag_or_buffer().() -> corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/::TypeIdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/TypeId# {
1176 static TYPE_IDrust-analyzer cargo ron 0.12.0 de/TYPE_ID.: once_cellrust-analyzer cargo once_cell 1.20.3 crate/::racerust-analyzer cargo once_cell 1.20.3 race/::OnceBoxrust-analyzer cargo once_cell 1.20.3 race/once_box/OnceBox#<corerust-analyzer cargo core https://github.com/rust-lang/rust/library/core crate/::anyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/::TypeIdrust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/TypeId#> =
1177 once_cellrust-analyzer cargo once_cell 1.20.3 crate/::racerust-analyzer cargo once_cell 1.20.3 race/::OnceBoxrust-analyzer cargo once_cell 1.20.3 race/once_box/OnceBox#::newrust-analyzer cargo once_cell 1.20.3 race/once_box/impl#[`OnceBox<T>`]new().();
1178
1179 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().TYPE_IDrust-analyzer cargo ron 0.12.0 de/TYPE_ID..get_or_initrust-analyzer cargo once_cell 1.20.3 race/once_box/impl#[`OnceBox<T>`]get_or_init().(|| match Deserializerust-analyzer cargo serde_core 1.0.228 de/Deserialize#::deserializerust-analyzer cargo ron 0.12.0 de/impl#[InternallyTaggedEnum][`Deserialize<'de>`]deserialize().(TypeIdDeserializerrust-analyzer cargo ron 0.12.0 de/TypeIdDeserializer#) {
1180 Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(InternallyTaggedEnumrust-analyzer cargo ron 0.12.0 de/InternallyTaggedEnum#::Arust-analyzer cargo ron 0.12.0 de/InternallyTaggedEnum#A# { arust-analyzer cargo ron 0.12.0 de/InternallyTaggedEnum#A#a.: void }) => match void {},
1181 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(TypeIdErrorrust-analyzer cargo ron 0.12.0 de/TypeIdError#(typeid)) => allocrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc crate/::boxedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/::Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(typeid),
1182 })
1183 }
1184
1185 typeidrust-analyzer cargo typeid 1.0.3 crate/::ofrust-analyzer cargo typeid 1.0.3 of().::<T>() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/impl#[TypeId][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/impl#[TypeId][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core any/impl#[TypeId][`PartialEq<Self>`]eq().type_id_of_internally_tagged_enum_default_tag_or_bufferrust-analyzer cargo ron 0.12.0 de/type_id_of_internally_tagged_enum_default_tag_or_buffer().()
1186 }