Skip to main content

Module util

Module util 

Source

Modules§

timestamp
Canonical timestamp form for every temporal column (§4.1).

Structs§

FakeClock
Fake clock for deterministic unit and scenario testing.
SystemClock
Production system clock maintaining a monotonic timestamp floor.

Enums§

FutureStampPolicy
What crate::Database::open_tuned does about a recorded_at in the future (0.13.5, W7.4, [D-178]).

Constants§

DEFAULT_FUTURE_STAMP_TOLERANCE
How far ahead of the wall clock a stored recorded_at may be before the floor computed at open refuses it. Twenty-four hours.
HYDRATE_CHUNK
How many ids go into one IN (…) list when hydrating attributes (T3.1).
RESERVED_ID_CHARS
Bytes an identifier may not contain, and where each is load-bearing.
SQLITE_MAX_VARIABLE_NUMBER
The ceiling HYDRATE_CHUNK exists to stay under, on a stock SQLite build.

Traits§

Clock
Trait defining the clock interface for timestamp generation. CONTRACT: successive calls return strictly increasing values, even across application restarts and NTP corrections.

Functions§

format_iso8601_utc
Format a SystemTime in the canonical form YYYY-MM-DDTHH:MM:SS.ffffffZ.
generate_id
Generate a new Crockford base32 26-character ULID string.
is_ulid
Whether id is a ULID. Not a requirement — see generate_id.
parse_iso8601_utc
Strict parser for the canonical timestamp form (§4.1), accepting the legacy second-precision form for rows written by older crate versions.
validate_id
Refuse an identifier the crate’s own encodings cannot represent (D-061).