Expand description
Connection-string parser shared across reddb, reddb-client,
red_client, and every language driver.
Pure function over a string; no I/O, no allocation beyond what the
returned ConnectionTarget needs. The grammar is defined by
docs/clients/connection-strings.md; this module is the canonical
parser and is the single source of truth consumed by the rest of
the workspace.
The parser ports the logic that previously lived in
drivers/rust/src/connect.rs (which keeps a thin re-export layer
for backwards compatibility while drivers migrate over). Cluster
URIs (grpc://primary,replica:port), default ports per scheme,
and the ?route=primary override behave identically to the
original.
Structs§
- Conn
String Limits - DoS guardrails applied by
parsebefore any URI work happens. - Parse
Error - Error returned by
parse.
Enums§
- Connection
Target - Normalised target produced by
parse. - Parse
Error Kind - Stable error code for parser failures.
Constants§
- DEFAULT_
PORT_ GRPC - DEFAULT_
PORT_ RED - Default port per documented scheme. Centralised so other crates (the connector, server-side dispatch) can stay consistent.
Functions§
- parse
- Parse a connection URI into a
ConnectionTargetunder the default DoS limits. - parse_
with_ limits - Same as
parsebut with caller-supplied DoS guardrails. Useful for tests that need tighter limits or for callers (a future admin tool, an offline validator) that need to relax the defaults.