[][src]Trait uuid64rs::Uuid

pub trait Uuid {
    pub const BASE64: [(&'static str, char); 64];

    pub fn uuid0(&self) -> u128;
pub fn set_uuid0(&mut self, v: u128); pub fn as_base64(&self) -> String { ... }
pub fn as_hex_string(&self) -> String { ... }
pub fn as_uuid(&self) -> String { ... } }

Core trait for the library.

Associated Constants

pub const BASE64: [(&'static str, char); 64][src]

An array use when decoding/encoding base64.

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.

Loading content...

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.

Loading content...

Implementors

impl Uuid for Uuid4[src]

Loading content...