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
// Copyright (c) 2026 Erik Lening (hollowpointer) and Contributors
//
// This file is part of Zond Engine, licensed under the GNU Affero General
// Public License, version 3 or later. See the LICENSE file for details, or
// <https://www.gnu.org/licenses/agpl-3.0.html>.
//
// SPDX-License-Identifier: AGPL-3.0-or-later
//! The shape of this engine's CSV: which columns there are and what order they
//! come in.
//!
//! Both directions read this list rather than each keeping their own. The writer
//! emits it as the header row and fills a field per entry; the reader matches an
//! incoming header against it to decide whether the table is one this engine
//! wrote, then maps each column it recognises by name.
/// The column names, in order. Host columns first, then the port columns that
/// are empty on a host with no ports.
pub const COLUMNS: = ;
/// The characters that make a spreadsheet read a cell as a formula, which the
/// writer hides behind an apostrophe and the reader takes back off.
///
/// A character one side guards and the other does not know to unguard reads back
/// with a stray apostrophe in it, and nothing errors, so the list is shared for
/// the same reason [`COLUMNS`] is.
///
/// The carriage return is not a formula character. It is guarded by the same
/// apostrophe because a cell beginning with one is a cell a spreadsheet
/// mangles.
pub const FORMULA_LEADERS: = ;
/// How many of [`COLUMNS`] describe the port rather than the host.
///
/// The port columns are the last `PORT_COLUMNS` entries and the host columns are
/// everything before them, so the boundary sits at
/// `COLUMNS.len() - PORT_COLUMNS`.
pub const PORT_COLUMNS: usize = 12;