Skip to main content

Crate sigid_flexible

Crate sigid_flexible 

Source
Expand description

§SigID Flexible

Configurable ID generator with custom:

  • Length (12-64 characters)
  • Alphabet (Crockford32, Base64, custom)
  • Prefixes (compile-time or runtime)
  • Checksum (optional)

§Example

use sigid_flexible::{Generator, Alphabet};

let mut gen = Generator::new()
    .length(24)
    .alphabet(Alphabet::Crockford32)
    .build();

let id = gen.generate(1234567890).unwrap();
println!("{}", id);

Modules§

prefix
Prefix handling (std only)

Structs§

Generator
Flexible ID generator builder with persistent state
SigId26
Re-export core types 26-character identifier in Crockford Base32 format

Enums§

Alphabet
Supported alphabets for ID generation
Error
Re-export core types Error types

Constants§

COUNTER_MAX
Re-export core types Maximum counter value (2^14 - 1) = 16383
EPOCH
Re-export core types Epoch: 2020-01-01 00:00:00 UTC (milliseconds)

Functions§

add_checksum
Add checksum to ID (alloc version for no_std)
verify_checksum
Verify checksum

Type Aliases§

Result
Re-export core types Result type for no_std compatibility