Crate giv

Crate giv 

Source
Expand description

Giv - A library for generating useful values.

This library provides functionality for generating:

  • Random bytes with various encodings
  • Character and emoji conversion
  • Formatted dates and timestamps
  • Cryptographically secure random keys
  • UUID v7 identifiers
  • PI digits with configurable precision
  • Random numbers using dice notation or ranges

Each module corresponds to a feature flag, allowing you to include only the functionality you need. All features are enabled by default.

§Examples

use giv::uuid::generate_uuid;

let uuid = generate_uuid()?;
println!("Generated UUID: {}", uuid.uuid);

§Features

  • bytes - Random byte generation
  • chars - Character and emoji conversion
  • date - Date and time formatting
  • key - Random key generation
  • pi - PI digit calculation
  • rng - Random number generation
  • uuid - UUID v7 generation
  • json - JSON output support
  • full (default) - All features enabled

Re-exports§

pub use error::GivError;

Modules§

build_info
Build information module. Build information module.
bytes
Random byte generation module.
chars
Character and emoji conversion module.
date
Date and time formatting module.
error
Error types for the library.
key
Random key generation module.
output
Output formatting types and traits.
pi
PI digit calculation module.
rng
Random number generation module.
uuid
UUID v7 generation module.