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//! | Module | Types |
14//! |--------|--------|
15//! | [`error`] | [`DomainError`], [`secret_nonempty`] |
16//! | [`names`] | [`VpsName`], [`SshHost`], [`SshUser`], [`HostTag`] |
17//! | [`ports`] | [`SshPort`], [`BindPort`] |
18//! | [`limits`] | [`TimeoutMs`], [`CharLimit`] |
19//! | [`command`] | [`RemoteCommand`], [`KeyPath`] |
20//! | [`time`] | [`Rfc3339Utc`], [`AddedAt`], [`CreatedAt`] |
21//! | [`ids`] | [`CorrelationId`] (v4), [`BatchRunId`] (v7) |
22//! | [`http_url`] | [`HttpsUrl`], [`AcmeOrderUrl`] |
23//! | [`money`] | [`Money`] (**library-only**; no SSH/VPS CLI surface — G-E2E-14) |
24#![forbid(unsafe_code)]
25
26mod command;
27mod error;
28mod http_url;
29mod ids;
30mod limits;
31mod money;
32mod names;
33mod ports;
34mod time;
35
36pub use command::{KeyPath, RemoteCommand};
37pub use error::{domain_err, secret_nonempty, DomainError};
38pub use http_url::{AcmeOrderUrl, HttpsUrl};
39pub use ids::{BatchRunId, CorrelationId};
40pub use limits::{CharLimit, TimeoutMs};
41pub use money::{Brl, Currency, Money, Usd};
42pub use names::{try_tags, HostTag, SshHost, SshUser, VpsName};
43pub use ports::{BindPort, SshPort};
44pub use time::{AddedAt, CreatedAt, Rfc3339Utc};