Skip to main content

Crate readable_code_core

Crate readable_code_core 

Source
Expand description

Language-agnostic core for readable share codes.

Mirrors the @readable-code/core TypeScript package conceptually: a small chainable string composer plus numeric and random helpers. Language-specific generation lives in the readable-code-english / readable-code-korean crates, never here.

Structs§

CodeBuilder
Chainable string composer. It only joins string fragments; it has no uniqueness, retry, persistence, or denylist policy.
OsRandom
Cryptographically secure default random source, backed by the operating system CSPRNG via the getrandom crate.
SplitMix64
SplitMix64 PRNG for seeded, deterministic generation.

Traits§

RandomSource
A source of bounded random integers in 0..max_exclusive.

Functions§

code
Start a low-level builder with the given random source.
digits
Generate a string of length random decimal digits.
pick
Pick an element from a slice using the given random source.