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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Copyright (C) 2018 Project Tsukurou!
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//! The `Table` is a dynamic, compound data type that is designed to be able to
//! represent any kind of structured data. This is especially useful in cases
//! where the structure of data can't be precisely known at compile-time.
//!
//! `Table`s contain `Value`s that are indexed by `Key`s, both being enums that
//! define the types that are valid for each use case. `Key` tends to be a
//! limited subset of `Value`: some types represented by `Value` aren't
//! hashable, but there aren't many `Key` types that wouldn't also make sense
//! as a `Value` type.
//!
//! The second, maybe-equally-important data type is the `List`, an ordered,
//! contiguous sequence of values that may be indexed similar to `Table` but is
//! limited to nonnegative integer keys. `List`s are always indexed starting at
//! zero (0); since they are also contiguous, the range of indices of a `List`
//! with length `n` is `0..n`.
//!
//! While the crate is named after its `Table` data type, `Values` are just as
//! useful, if not more, since they can be tables themselves along with any of
//! the primitive types. The `Value` type is also fully compatible with serde;
//! it acts as both a (de)serializable and a (de)serializer, meaning it is an
//! intermediate data format that can be converted to/from other data formats
//! and to/from other (de)serializables. This makes it useful as a format for
//! storing arbitrary data from any other format like JSON, YAML, or TOML.
//!
//! # License
//!
//! Copyright (C) 2018 Project Tsukurou!
//!
//! This program is free software: you can redistribute it and/or modify
//! it under the terms of the GNU General Public License as published by
//! the Free Software Foundation, either version 3 of the License, or
//! (at your option) any later version.
//!
//! This program is distributed in the hope that it will be useful,
//! but WITHOUT ANY WARRANTY; without even the implied warranty of
//! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//! GNU General Public License for more details.
//!
//! You should have received a copy of the GNU General Public License
//! along with this program. If not, see <https://www.gnu.org/licenses/>.
extern crate serde;
extern crate serde_test;
extern crate serde_bytes;
pub use Key;
pub use Value;
pub use List;
pub use Table;
pub use Error;