Skip to main content

Module uuid

Module uuid 

Source
Available on crate features model-mysql or model-postgres or model-sqlite only.
Expand description

Uuid: a 128-bit RFC 9562 UUID for primary keys (18.30.0).

rws has its own rather than the uuid crate: it isn’t in the dependency tree, and a key needs only parsing, formatting and generation — v7 (time-ordered, so new rows land at the end of a B-tree index) and v4 (random), from the operating system’s generator through aws-lc-rs, which every model-* build already links.

Stored as its 36-character lower-case text on every backend: a TEXT / CHAR(36) / VARCHAR(36) column. PostgreSQL UUID columns are read too, but rws binds text, which PostgreSQL won’t compare with or assign to UUID without a cast — use a text column there.

Structs§

Uuid
A UUID, kept as its 16 bytes.