#uuid #unique #rand #global

uuid-rs

A Simple Universally Unique IDentifier (UUID)

20 releases

0.6.3 Apr 1, 2022
0.6.2 Jul 29, 2020
0.5.0 Jun 26, 2020
0.4.1 Jun 12, 2020
0.1.5 May 27, 2020

#82 in #rand

MIT license

21KB
441 lines

UUID

A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. The term globally unique identifier (GUID) is also used.

This crate generates and inspects UUIDs based on

Install

[dependencies]
uuid-rs = { version = "0.6.2", features = ["random"] }

Usage

use uuid_rs::v4;

println!("{}", v4!())

Security

Do not assume that UUIDs are hard to guess; they should not be used as security capabilities.


lib.rs:

This crate defines a uniform resource name namespace for UUIDs (Universally Unique IDentifier), also known as GUIDs (Globally Unique Identifier). A UUID is 128 bits long, and can guarantee uniqueness across space and time.

[dependencies]
uuid = { version = "0.6.0", features = ["random"] }
use uuid_rs::v4;

fn main() {
    println!("{}", v4!());
}

Dependencies

~0–540KB