[][src]Struct ratsio::nuid::NUID

pub struct NUID { /* fields omitted */ }

NUID needs to be very fast to generate and truly unique, all while being entropy pool friendly. We will use 12 bytes of crypto generated data (entropy draining), and 10 bytes of sequential data that is started at a pseudo random number and increments with a pseudo-random increment. Total is 22 bytes of base 62 ascii text :)

Methods

impl NUID
[src]

pub fn new() -> NUID
[src]

generate a new NUID and properly initialize the prefix, sequential start, and sequential increment.

pub fn randomize_prefix(&mut self)
[src]

pub fn next(&mut self) -> String
[src]

Generate the next NUID string.

Auto Trait Implementations

impl Send for NUID

impl Sync for NUID

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> Same for T

type Output = T

Should always be Self