hydra-node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.CBOR.Orphans

Description

Orphan ToCBOR / FromCBOR instances for third-party types that appear on the CBOR-encoded API surface.

Orphan instances

FromCBOR Value Source # 
Instance details

Methods

fromCBOR :: Decoder s Value

label :: Proxy Value -> Text

FromCBOR PortNumber Source # 
Instance details

Methods

fromCBOR :: Decoder s PortNumber

label :: Proxy PortNumber -> Text

ToCBOR Value Source #

Value is CBOR-encoded using the standard JSON-in-CBOR mapping from cborg-json. This is used to serve the pre-rendered configuration document at GET /config; FromCBOR is its client-side decode counterpart.

NOTE: Non-integral JSON numbers round-trip through Double, which may lose precision; integers are exact.

Instance details

Methods

toCBOR :: Value -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy Value -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [Value] -> Size

ToCBOR PortNumber Source # 
Instance details

Methods

toCBOR :: PortNumber -> Encoding

encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy PortNumber -> Size

encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [PortNumber] -> Size