Skip to main content

ssh_cli/domain/
mod.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2//! Domain newtypes — **parse, don't validate** (G-TYPE / G-DOM).
3//!
4//! Workload: pure local construction (sequential). Parallelism starts only after
5//! typed values reach SSH fan-out. Zero-cost: wrappers are `#[repr(transparent)]`
6//! or niche-optimized enums.
7//!
8//! Rules: private fields, `try_new` only, no `Deref`, no infallible `From` with
9//! invariants. Wire DTOs stay primitives; domain carries the proof.
10//!
11//! ## Modules
12//!
13//! The modules themselves are private; every type below is re-exported here, so
14//! the module column is plain text while the type column links to the public item.
15//!
16//! | Module | Types |
17//! |--------|--------|
18//! | `error` | [`crate::domain::DomainError`], [`crate::domain::secret_nonempty`] |
19//! | `names` | [`crate::domain::VpsName`], [`crate::domain::SshHost`], [`crate::domain::SshUser`], [`crate::domain::HostTag`] |
20//! | `ports` | [`crate::domain::SshPort`], [`crate::domain::BindPort`] |
21//! | `limits` | [`crate::domain::TimeoutMs`], [`crate::domain::CharLimit`] |
22//! | `command` | [`crate::domain::RemoteCommand`], [`crate::domain::KeyPath`] |
23//! | `time` | [`crate::domain::Rfc3339Utc`], [`crate::domain::AddedAt`], [`crate::domain::CreatedAt`] |
24//! | `ids` | [`crate::domain::CorrelationId`] (v4), [`crate::domain::BatchRunId`] (v7) |
25//! | `http_url` | [`crate::domain::HttpsUrl`], [`crate::domain::AcmeOrderUrl`] |
26//! | `money` | [`crate::domain::Money`] (**library-only**; no SSH/VPS CLI surface — G-E2E-14) |
27#![forbid(unsafe_code)]
28
29mod command;
30mod error;
31mod http_url;
32mod ids;
33mod limits;
34mod money;
35mod names;
36mod ports;
37mod time;
38
39pub use command::{KeyPath, RemoteCommand};
40pub use error::{domain_err, secret_nonempty, DomainError};
41pub use http_url::{AcmeOrderUrl, HttpsUrl};
42pub use ids::{BatchRunId, CorrelationId};
43pub use limits::{CharLimit, TimeoutMs};
44pub use money::{Brl, Currency, Money, Usd};
45pub use names::{try_tags, HostTag, SshHost, SshUser, VpsName};
46pub use ports::{BindPort, SshPort};
47pub use time::{AddedAt, CreatedAt, Rfc3339Utc};