Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- data GYSlot
- slotToApi ∷ GYSlot → SlotNo
- slotFromApi ∷ SlotNo → GYSlot
- advanceSlot ∷ GYSlot → Natural → Maybe GYSlot
- unsafeAdvanceSlot ∷ GYSlot → Natural → GYSlot
- slotToInteger ∷ GYSlot → Integer
- slotFromInteger ∷ Integer → Maybe GYSlot
- slotFromWord64 ∷ Word64 → GYSlot
- unsafeSlotFromInteger ∷ Integer → GYSlot
Documentation
Instances
FromJSON GYSlot # | |
Defined in GeniusYield.Types.Slot | |
ToJSON GYSlot # | |
Read GYSlot # | |
Show GYSlot # | |
PrintfArg GYSlot # | |
Defined in GeniusYield.Types.Slot | |
Eq GYSlot # | |
Ord GYSlot # | |
FromHttpApiData GYSlot # | |
Defined in GeniusYield.Types.Slot parseUrlPiece ∷ Text → Either Text GYSlot # | |
ToHttpApiData GYSlot # | |
Defined in GeniusYield.Types.Slot toUrlPiece ∷ GYSlot → Text # toEncodedUrlPiece ∷ GYSlot → Builder # toHeader ∷ GYSlot → ByteString # toQueryParam ∷ GYSlot → Text # | |
ToParamSchema GYSlot # | |
Defined in GeniusYield.Types.Slot toParamSchema ∷ ∀ (t ∷ SwaggerKind Type). Proxy GYSlot → ParamSchema t # | |
ToSchema GYSlot # | |
Defined in GeniusYield.Types.Slot |
slotFromApi ∷ SlotNo → GYSlot #
unsafeAdvanceSlot ∷ GYSlot → Natural → GYSlot #
Unsafe advance GYSlot
. Doesn't check for the overflow.
slotToInteger ∷ GYSlot → Integer #
slotFromWord64 ∷ Word64 → GYSlot #
unsafeSlotFromInteger ∷ Integer → GYSlot #
Convert from regular integer, which might under or overflow.