Skip to main content

sim_lib_expr_tree_server/
lib.rs

1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Authoritative expression-tree sessions over SIM's standard server surfaces.
4//!
5//! [`ExpressionTreeServer`] is both a [`sim_lib_server::EvalSite`] and a
6//! [`sim_kernel::EvalFabric`]. It owns bounded live tree sessions, evaluates
7//! expression-tree operations with the caller's context and capabilities,
8//! accepts checked [`sim_lib_view::SurfaceCodec`] operations, and exposes
9//! bounded revisioned snapshots and watches. Optional server wall-clock
10//! observations accompany mandatory logical ticks but never decide freshness,
11//! expiry, or optimistic concurrency.
12
13mod error;
14mod model;
15mod protocol;
16mod server;
17mod session;
18mod site;
19mod web;
20
21pub use error::ExpressionTreeServerError;
22pub use model::{ChangeEvent, ExpressionTreeServerLimits, SessionId, WatchBatch, WatchId};
23pub use server::ExpressionTreeServer;
24pub use site::{
25    ExpressionTreeServerLib, expr_tree_server_lib_symbol, expr_tree_server_site_symbol,
26    install_expr_tree_server_lib,
27};
28pub use web::{ExpressionTreeWebSurface, ExpressionTreeWebSurfaceFactory};
29
30/// Returns the crate's public server-library identity.
31pub const fn crate_identity() -> &'static str {
32    "sim-lib-expr-tree-server"
33}
34
35/// Returns the runtime and surface identities composed by this server.
36pub fn component_identities() -> [&'static str; 2] {
37    [
38        sim_lib_expr_tree::crate_identity(),
39        sim_lib_view_expr_tree::crate_identity(),
40    ]
41}
42
43#[cfg(test)]
44mod tests;