License | Apache 2.0 |
---|---|
Maintainer | smokejumperit@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
This module is internal, subject to breaking changes without a major version increment, and therefore should only be imported by Data.Snowchecked.
Synopsis
- data Flake = Flake {}
- newtype SnowcheckedGen = SnowcheckedGen {}
- data SnowcheckedConfig = SnowcheckedConfig {}
Documentation
The state of a given generated instance. Note that the actual value is calculated on demand.
Flake | |
|
Instances
Eq Flake Source # | |
Show Flake Source # | |
Generic Flake Source # | |
NFData Flake Source # | |
Defined in Data.Snowchecked.Types | |
type Rep Flake Source # | |
Defined in Data.Snowchecked.Types type Rep Flake = D1 ('MetaData "Flake" "Data.Snowchecked.Types" "snowchecked-0.0.0.1-1XcYrHn4yNqBegYObj5FEb" 'False) (C1 ('MetaCons "Flake" 'PrefixI 'True) ((S1 ('MetaSel ('Just "flakeTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word256) :*: S1 ('MetaSel ('Just "flakeCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word256)) :*: (S1 ('MetaSel ('Just "flakeNodeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word256) :*: S1 ('MetaSel ('Just "flakeConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SnowcheckedConfig)))) |
newtype SnowcheckedGen Source #
The state that needs to be communicated between flake generation calls. - This should not be accessed or created directly by consumers of this library: - doing so may cause your code to hang indefinitely.
data SnowcheckedConfig Source #
Configuration that specifies how much bits are used for each part of the id. These values are not validated and may be any legal value for the type.
The default value provided by def
is 64 bits in total length, just like
the original Snowflake algorithm. However, 4 bits are taken from the count
bits and used for check bits. Note that specifying 0 check bits results in
the normal snowflake generation.
SnowcheckedConfig | |
|