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
//! A borrowed catalog entry: a track's name paired with the config describing it.
use Deref;
/// One entry in a catalog section: the track's name and the config describing it.
///
/// A catalog section is a map, so reading one out hands you a key and a value that have to be kept
/// together: the name says what to subscribe to, the config says how to read it. Pairing them means
/// a caller can't accidentally subscribe to one track with another's config, and it only has to
/// name the track once.
///
/// Create one from a catalog section's map entry with [`Entry::new`]. It derefs to the config, so
/// the config's fields are reachable directly (`entry.mode`, `entry.compression`).
///
/// The entry is what a consumer is built from: see
/// [`json::Consumer`](crate::json::Consumer) and [`binary::Consumer`](crate::binary::Consumer),
/// each of which adds a `subscribe` to the entry types it can read.