manta_shared/common/
mod.rs

1//! Behavioural helpers shared by `manta-cli` and `manta-server`.
2//!
3//! The three submodules are intentionally narrow:
4//!
5//! - [`config`] — locates and parses `cli.toml` / `server.toml`,
6//!   honouring `MANTA_CLI_CONFIG` / `MANTA_SERVER_CONFIG` and merging
7//!   `MANTA_*`-prefixed environment overrides. Returns an untyped
8//!   `::config::Config` so each binary owns its own typed schema.
9//! - [`error`] — the [`error::MantaError`] enum returned by every
10//!   fallible helper in this crate; the server bridges it to its
11//!   `BackendError` at call sites.
12//! - [`log_ops`] — single `configure(...)` entry point both binaries
13//!   call once at startup to install the tracing subscriber.
14
15/// Date-time format string used for displaying timestamps
16/// throughout the application (e.g. "04/03/2026 14:30:00").
17pub const DATETIME_FORMAT: &str = "%d/%m/%Y %H:%M:%S";
18
19pub mod config;
20pub mod error;
21pub mod jwt_ops;
22pub mod log_ops;