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
//! Shared table substrate: path validation and the table operation protocol.
//!
//! Table backends (`sim-table-db`, `sim-table-remote`, ...) independently grew
//! the same path-segment validation predicate and an ad-hoc `table/<op>` call
//! protocol on the wire. This crate is the one home for both:
//!
//! - [`path`]: the legal-segment predicate ([`is_legal_table_segment`]) and a
//! small [`TablePath`] accumulator that validates as it grows;
//! - [`op`]: the [`TableOp`] model plus [`encode_table_op`]/[`decode_table_op`],
//! which round-trip through the kernel `Expr` graph using the exact wire
//! spellings that `sim-table-remote` already speaks.
//!
//! It depends only on `sim-kernel` and `sim-value`, adding data ergonomics and
//! protocol shape rather than runtime behavior, so it does not touch the kernel
//! boundary.
//!
//! # Example
//!
//! ```
//! use sim_table_core::is_legal_table_segment;
//!
//! assert!(is_legal_table_segment("nodes"));
//! assert!(!is_legal_table_segment("")); // empty
//! assert!(!is_legal_table_segment("..")); // parent escape
//! assert!(!is_legal_table_segment("a/b")); // path separator
//! ```
pub use ;
pub use ;