Skip to main content

Module domain

Module domain 

Source
Expand description

Domain newtypes (parse, don’t validate — G-TYPE / G-DOM 4-crates). Domain newtypes — parse, don’t validate (G-TYPE / G-DOM).

Workload: pure local construction (sequential). Parallelism starts only after typed values reach SSH fan-out. Zero-cost: wrappers are #[repr(transparent)] or niche-optimized enums.

Rules: private fields, try_new only, no Deref, no infallible From with invariants. Wire DTOs stay primitives; domain carries the proof.

§Modules

The modules themselves are private; every type below is re-exported here, so the module column is plain text while the type column links to the public item.

Structs§

AcmeOrderUrl
ACME order URL (distinct newtype so it cannot be mixed with generic HTTPS URLs).
BatchRunId
Time-ordered batch run id (UUID v7) for multi-host JSON envelopes.
BindPort
Local bind port: 0 means ephemeral OS assignment; otherwise 1..=65535.
Brl
Brazilian Real.
CorrelationId
Random correlation id (UUID v4).
DomainError
Error constructing a domain value (maps to crate::errors::SshCliError::Domain).
HostTag
Single host tag (1..=MAX_TAG_LEN, no path separators/controls).
HttpsUrl
HTTPS URL with non-empty host (rejects data:, javascript:, non-https).
KeyPath
Non-empty private key path.
Money
Amount of currency C with exact decimal arithmetic.
RemoteCommand
Remote shell command payload (non-empty after trim, no NUL bytes).
Rfc3339Utc
Instant stored as UTC, serialized as RFC 3339.
SshHost
SSH hostname or IP (non-empty after trim, max MAX_FIELD_LEN).
SshPort
SSH TCP port in 1..=65535 (zero is unrepresentable).
SshUser
SSH username (non-empty after trim, max MAX_FIELD_LEN).
TimeoutMs
Timeout in milliseconds (1..=MAX_TIMEOUT_MS).
Usd
US Dollar.
VpsName
Logical VPS registry name (NFC, path-safe, non-empty).

Enums§

CharLimit
Character budget: 0 on the wire means unlimited.

Traits§

Currency
Currency marker (zero-sized). Scale is fixed per currency.

Functions§

domain_err
Maps DomainError into the crate result type via From.
secret_nonempty
True when a SecretString holds a non-empty secret (G-TYPE-12 — single helper).
try_tags
Parses a tag list with cardinality cap (G-TYPE-05 container).

Type Aliases§

AddedAt
Alias: VPS registry inclusion time.
CreatedAt
Alias: ACME / audit creation time.