1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
use Deserializer;
use crateLexicon;
/// Deserialize a value while interning its [`Sym`](crate::Sym) fields.
///
/// Unlike [`serde::Deserialize`], this trait receives the [`Lexicon`] that
/// backs [`Sym`](crate::Sym) fields. Implementations use
/// [`DeserializeInSeed`](super::DeserializeInSeed) when recursively
/// deserializing nested values.
/// Most applications derive this trait and call [`LocalLexicon::deserialize_in`] or
/// [`ThreadedLexicon::deserialize_in`] rather than invoke [`deserialize_in`]
/// directly.
///
/// The trait is generic over the interner `I`, so a derived implementation
/// works with any [`Lexicon`], including both [`LocalLexicon`] and
/// [`ThreadedLexicon`].
///
/// [`Lexicon`]: crate::Lexicon
/// [`LocalLexicon`]: crate::LocalLexicon
/// [`LocalLexicon::deserialize_in`]: crate::LocalLexicon::deserialize_in
/// [`ThreadedLexicon`]: crate::ThreadedLexicon
/// [`ThreadedLexicon::deserialize_in`]: crate::ThreadedLexicon::deserialize_in
/// [`deserialize_in`]: DeserializeIn::deserialize_in