Crate euui

Crate euui 

Source
Expand description

This crate provides the Euui struct.

This type represents a unique identifier which is 4 times bigger than UUIDs and GUIDs.
So, an EUUI is 512 bits or 64 bytes. It can be read as 4xu128, 8xu64 or 64xu8.

A raw hexadecimal string representing an EUUI is 128 characters wide.
A formatted hexadecimal string representing an EUUI is 131 characters wide (two “-” and one “\n”).

You can create :

Then, use :

§Example

use euui::Euui;

// Generate a zero-initialized Euui
let zero_euui = Euui::default(); // or Euui::zero()
println!("Zero Euui: {}", zero_euui);

// Generate a random Euui
#[cfg(feature = "random")]
fn test_random() {
    let random_euui = Euui::random();
    println!("Random Euui: {}", random_euui);

    // Format a Euui
    let formatted = random_euui.format();
    println!("Formatted Euui:\n{}", formatted);

    // Access specific parts of the Euui
    if let Some(first_u128) = random_euui.u128(0) {
        println!("First u128 of random Euui: {:032x}", first_u128);
    }
}

§Features

The features of this crate add methods to the type Euui.

§With the feature random
§With the feature uuid
§With the feature random_uuid

Structs§

Euui
Extended Universal Unique Identifier