[−][src]Trait uuid64rs::Uuid
Core trait for the library.
Associated Constants
Loading content...Required methods
pub fn uuid0(&self) -> u128
[src]
Provides direct access to the internal value of the uuid.
This allows the other trait methods to access the value without knowing how or where it is actual kept.
pub fn set_uuid0(&mut self, v: u128)
[src]
Provides direct access to set the internal value of the uuid.
This allows the other trait methods to write the value without knowing how or where it is actual kept.
Provided methods
pub fn as_base64(&self) -> String
[src]
Generate a custom base 64 encoded UUID v4 (random).
pub fn as_hex_string(&self) -> String
[src]
Generate a hexadecimal encoded UUID v4 (random).
pub fn as_uuid(&self) -> String
[src]
Generate a standard UUID v4 (random).
The original PHP code for the function was found in answer at https://stackoverflow.com/questions/2040240/php-function-to-generate-v4-uuid by Arie which is based on a function found at http://php.net/manual/en/function.com-create-guid.php by pavel.volyntsev(at)gmail.
There have been many other changes since the above code especially with translation to Rust.