Puid.Info (puid v2.7.0)
View SourceInformation regarding Puid module parameterization
The Puid.Info struct has the following fields:
| Field | Description | 
|---|---|
| char_set | pre-defined Puid.Chars atom or :custom | 
| characters | source characters | 
| entropy_bits | entropy bits for generated puid | 
| entropy_bits_per_char | entropy bits per character for generated puids | 
| ere | puid entropy string representation efficiency | 
| ete | puid entropy transform efficiency | 
| length | puid string length | 
| rand_bytes | entropy source function | 
iex> defmodule(CustomId, do: use(Puid, total: 1.0e04, risk: 1.0e12, chars: "thequickbrownfxjmpsvlazydg"))
iex> CustomId.info()
%Puid.Info{
  char_set: :custom,
  characters: "thequickbrownfxjmpsvlazydg",
  entropy_bits: 65.81,
  entropy_bits_per_char: 4.7,
  ere: 0.59,
  ete: 0.81,
  length: 14,
  rand_bytes: &:crypto.strong_rand_bytes/1
}
    Summary
Types
@type t() :: %Puid.Info{ char_set: atom() | :custom, characters: String.t(), entropy_bits: number(), entropy_bits_per_char: number(), ere: number(), ete: number(), length: non_neg_integer(), rand_bytes: (non_neg_integer() -> binary()) | nil }