2 releases
Uses new Rust 2024
new 0.1.2 | Apr 2, 2025 |
---|---|
0.1.0 | Apr 2, 2025 |
#15 in #binary-format
92 downloads per month
Used in 177 crates
(via aloe-container)
41KB
291 lines
Aloe UUID
aloe-uuid
is a Rust crate epitomizing the generation and manipulation of universally unique 128-bit identifiers (UUIDs) with compliance to the RFC 4122 version 4 standard. This library is designed for applications necessitating highly unique identifiers, with the assurance of randomness at a molecular level, ensuring virtual impossibility of duplication through chance.
Overview
At its core, aloe-uuid
provides functionality to generate, compare, and transform UUIDs into various formats, including raw binary and string representations, with or without dashes. It leverages a 16-byte structure to manage UUID data.
Features
- RFC 4122 Version 4 Compliance: Guarantees unique generation using random numbers and bit manipulations.
- Versatile Conversions: Convert to strings, dashed strings, and raw bytes, with support to revert back.
- Equality and Ordering: Implements partial and full comparisons along with orderings to enable sorting and equivalence testing.
- Section Extraction: Extract integral parts of the UUID such as time, clock sequence, and node.
- Hashing: Provides a method to hash the UUID for storage or indexing.
Example Usage
use aloe_uuid::Uuid;
let uuid1 = Uuid::default();
let uuid2 = Uuid::from(&"12345678-1234-1234-1234-123456789abc".to_string());
if uuid1 != uuid2 {
println!("UUIDs are unique!");
}
let raw_data = uuid1.get_raw_data();
let identical_uuid = Uuid::from(raw_data);
assert_eq!(uuid1, identical_uuid);
Installation
Add this line to your Cargo.toml
under [dependencies]
:
aloe-uuid = "0.1.0"
Author
Developed by klebs, actively maintained with a repository available at GitHub.
This README.md file was generated by an AI model and may not be 100% accurate, however, it should be pretty good.
This crate is a translation of the JUCE module.
JUCE is a c++ software framework for developing high performance audio applications.
Usage falls under the GPLv3 as well as the JUCE commercial license.
See github.com/juce-framework/JUCE and the JUCE license page for details.
This crate is in the process of being translated from c++ to rust. For progress updates, please see the workspacer rust project. designed specifically for rust projects.
Dependencies
~13–27MB
~376K SLoC