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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
//! The value encoding at the host boundary (`docs/runtime/spec/abi.md`).
//!
//! Every Flow data value that crosses to a Tool process, and every value
//! history stores, is written in one binary encoding, and both sides know the
//! declared type, so the bytes carry no names and no type tags. Every data
//! value also has a JSON form, the conversion at the edges: `json.encode`
//! and `json.decode`, a run's input and output, a supplied reply, an
//! adapter's exchange, and what a viewer shows. This crate is both:
//!
//! - [`encode_bytes`] and [`write_value`] write a value at its type in the
//! binary encoding, and [`decode_bytes`] and [`read_value`] read the one
//! value its bytes encode, refusing any other bytes, with where and why
//! ([`DecodeError`]), in a [`Mode`] and within [`Limits`];
//! - [`primitives`] are the numbers, texts and instants every binary form
//! is built from, and the text forms of a few scalars, for a crate that
//! writes a form of its own on them, and [`crc32c`] is the check history's
//! commits carry;
//! - [`form`] says what a value of a type is made of, declarations looked up
//! and arguments in place, for any walker of values by type, and
//! [`write_scalar`] and [`read_scalar`] write and read the [`Scalar`] parts
//! history keeps out of its slots;
//! - [`encode`] writes a value's JSON form, and [`canonical`] gives the one
//! text every equal value shares ([`Digest`] hashes it);
//! - [`decode`] and [`decode_text`] build a value of a declared type from
//! JSON by the decoding table;
//! - [`rebuild_by_name`] rebuilds a value another program made as a value
//! of this one's type, its fields and constructors matched by name;
//! - [`encode_naming_tasks`] writes a value's JSON form where a task is the
//! id of the call it is parked on, and [`encode_for_reading`] where bytes
//! holding UTF-8 are their text, for a person to read;
//! - [`flow_types::normal_path`], [`Url`] and [`MediaType`] are the normal forms of std's
//! `path.Path`, `url.Url` and `media.MediaType`, which decoding holds a
//! value of each to ([`StdForm`]);
//! - [`schema`] writes a type's JSON Schema;
//! - [`wire!`] declares a binary message once, as its type, its
//! [`wire::Wire`] codec over [`primitives`] and its [`wire::Shape`],
//! whose projection is the message's Flow type;
//! - [`description`] declares the type descriptions' own types that way;
//! [`TypeSpec`] is a Tool's description, read and validated in
//! first-reach order, which validates a generic call's `CallTypes` too;
//! [`call_views`] writes those, and [`write_listing`] and
//! [`read_listing`] the `--contract` file;
//! - [`comparable`] is the bytes two signatures are compared by: an
//! implementation fits a declaration when they are equal;
//! - [`Outcome`] and [`Ack`] are the answers the dispatch seam
//! passes, each with its binary form, which the Tool process protocol's
//! frames carry;
//! - [`UnixMillis`] is a time on a host's wall clock, which host notes,
//! the daemon and a host's views keep, with the one rule from an offset
//! from the epoch, an `Instant` or text into it;
//! - [`contract`] is a generated contract module as data, and the one
//! printer every generator writes it with;
//! - [`DATA_VERSION`] is the [`DataVersion`] all of this is written in,
//! and [`Versioned`] is bytes written in one.
//!
//! # The types it reads
//!
//! The encoding is a function of declarations, not of checking, so this
//! crate does not depend on the checker. It reads a [`flow_types::Type`] —
//! the checker's types cut down to what crosses — whose declared records,
//! enums and host types live in a [`Catalog`] that holds the same
//! `flow-types` shapes the evaluator builds values with. Whoever holds a checked program builds the
//! catalog from it once; a history reader or a host needs only the catalog.
//!
//! # JSON
//!
//! The JSON reader and writer are this crate's own ([`Json`], [`parse`]): numbers
//! are exact at any size, an object naming a key twice and a lone surrogate
//! escape are refused, nesting is bounded, and the writer is the canonical
//! form. No dynamic tree from a general-purpose library stands beside the
//! type-directed one.
//!
//! # Not here
//!
//! The Tool process protocol's frames are `flow-tool-protocol`'s, and the
//! value notation, read and written, is `flow-notation`'s. What a host does with the
//! protocol's messages — processes, binding, `flow.toml` and adapters — is
//! the host's, and serving them from native functions is a toolkit's; all of
//! them are built on this crate.
pub use ;
pub use ;
pub use rebuild_by_name;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use Limits;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;