class NATS::NUID

Defined in:

nuid.cr

Constant Summary

BASE = 62
DIGITS = "#{("0".."9").join}#{("A".."Z").join}#{("a".."z").join}".to_slice
MAX_INCREMENT = 333_i64
MAX_SEQUENCE = 839299365868340224_i64
MIN_INCREMENT = 33_i64
PREFIX_LENGTH = 12
SEQUENCE_LENGTH = 10
TOTAL_LENGTH = PREFIX_LENGTH + SEQUENCE_LENGTH

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.global : self #

[View source]
def self.new(random = Random.new) #

[View source]

Class Method Detail

def self.next #

[View source]

Instance Method Detail

def increment : Int64 #

[View source]
def next #

[View source]
def prefix : Bytes #

[View source]
def sequence : Atomic(Int64) #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]