ctb_formats_pan/
pan.rs

1/* SPDX-License-Identifier: MIT */
2/*
3This file is part of Collective Toolbox, a database and document workspace and utilities.
4Copyright (C) 2026 Collective Toolbox Developers
5Contact: info@collectivetoolbox.com
6
7Permission is hereby granted, free of charge, to any person obtaining a copy of
8this software and associated documentation files (the “Software”), to deal in
9the Software without restriction, including without limitation the rights to
10use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
11the Software, and to permit persons to whom the Software is furnished to do so,
12subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in all
15copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23SOFTWARE.
24*/
25
26//! Pan-format helpers used by formatting functions.
27
28#[allow(
29    unused_imports,
30    clippy::wildcard_imports,
31    reason = "Standard workspace crate prelude"
32)]
33pub(crate) use ctb_utilities::*;
34
35/// CLI helpers for Panorama files.
36pub mod cli;
37
38/// Array-related formatting helpers.
39pub mod array;
40/// Date formatting and parsing helpers.
41pub mod date;
42/// Built-in function dispatcher.
43pub mod function_dispatch;
44/// Miscellaneous helpers.
45pub mod functions;
46/// Math and numeric helpers.
47pub mod math;
48/// Output parsed database to other formats.
49pub mod output;
50/// Parser for .pan files.
51pub mod parser;
52/// Parser and AST for Panorama procedure code.
53pub mod procedure_parser;
54/// Runtime state and partial procedure execution for Panorama databases.
55pub mod runtime;
56/// String manipulation helpers.
57pub mod string;
58/// Time formatting and parsing helpers.
59pub mod time;
60
61#[cfg(test)]
62pub(crate) fn get_pan_data(key: &str) -> Option<Vec<u8>> {
63    ctb_utilities::load_manifest_fixture(env!("CARGO_MANIFEST_DIR"), key)
64}
65
66#[cfg(test)]
67#[allow(
68    clippy::panic,
69    clippy::expect_used,
70    clippy::unwrap_used,
71    clippy::unwrap_in_result,
72    clippy::panic_in_result_fn,
73    clippy::indexing_slicing,
74    clippy::arithmetic_side_effects,
75    reason = "Standard repository test boilerplate"
76)]
77mod tests {}