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
38
39
40
41
42
43
44
use crate::;
///
/// The result of a flexpiler Deserializer type.
///
/// flexpiler's deserialization algorithm is based on the idea of a uni-directional iterator through
/// the data, and to keep the logic on-the-fly as minimal as possible. That means we can never "go
/// back" to data we just parsed.
///
/// The deserialization is usually broken up into blocks of data separated by a certain ContextType
/// and randomly being accompanied by any number of pretty formatting. An example of this would be:
/// ```'TestStruct' -> '\t' -> '{' -> '\n' -> 'field:' -> ' ' -> '"somestring"' -> ',' -> '\n' -> '}'```
/// The algorithm counts on being able to call other deserialization::Trait<...> implementations to
/// deserialize sub types, and thereby a ContextType is shipped with the return type to determine if
/// a crucial struct-ending context like '}' was parsed during sub-deserialization.
///
/// To accomodate types of variable element size like vec![(any number of elements,)*] we need the
/// return type NoDataFound that is sometimes recoverable.
///
///
/// The trait to be implemented by a flexpiler Deserializer type.
///
/// A deserializer type also has to impl context::Trait to account for common errors constructed
/// from outside like a flexpiler::error::Common::UnexpectedNoContent
///