4 releases

0.9.3 Jul 26, 2024
0.9.2 Jul 21, 2024
0.9.1 Jul 20, 2024
0.9.0 Jul 20, 2024

#763 in Encoding

Download history 236/week @ 2024-07-16 97/week @ 2024-07-23 11/week @ 2024-07-30 3/week @ 2024-09-10 3/week @ 2024-09-17 16/week @ 2024-09-24 2/week @ 2024-10-01

148 downloads per month

MIT license

8KB
76 lines

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 :

  • a zero Euui with Euui::default,
  • or, a random one with Euui::random.

Then, use :

  • Euui::format to display it as 4 u128s or Euui::.to_string to get the whole hexadecimal string,
  • or, Euui::u128 or Euui::to_be_guids to reach for individual u128s,
  • or, Euui::u64 to reach for individual u64s,
  • or, Euui::u8 or Euui::to_be_bytes to reach for individual u8s.

An example

::format()

2f8596cc2f3b3da9adf20cf9413104ab-1f8de1116aef039d12c80587e7551080
d43ed7632e94801a395a5454a382dff1-23decf62d51eafee3ec0bb98b1b90d15

::to_string()

2f8596cc2f3b3da9adf20cf9413104ab1f8de1116aef039d12c80587e7551080d43ed7632e94801a395a5454a382dff123decf62d51eafee3ec0bb98b1b90d15

Dependencies

~310KB