Safe Haskell | None |
---|---|
Language | Haskell2010 |
Raw binary serialisation
Synopsis
- newtype UsingRawBytes a = UsingRawBytes a
- newtype UsingRawBytesHex a = UsingRawBytesHex a
- newtype UsingBech32 a = UsingBech32 a
Documentation
newtype UsingRawBytes a Source #
For use with deriving via
, to provide ToCBOR
and FromCBOR
instances,
based on the SerialiseAsRawBytes
instance.
deriving (ToCBOR, FromCBOR) via (UsingRawBytes Blah)
Instances
(SerialiseAsRawBytes a, Typeable a) ⇒ FromCBOR (UsingRawBytes a) Source # | |
Defined in Bcc.Api.SerialiseUsing fromCBOR ∷ Decoder s (UsingRawBytes a) # label ∷ Proxy (UsingRawBytes a) → Text # | |
(SerialiseAsRawBytes a, Typeable a) ⇒ ToCBOR (UsingRawBytes a) Source # | |
Defined in Bcc.Api.SerialiseUsing toCBOR ∷ UsingRawBytes a → Encoding # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (UsingRawBytes a) → Size # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [UsingRawBytes a] → Size # |
newtype UsingRawBytesHex a Source #
For use with deriving via
, to provide instances for any/all of Show
,
IsString
, ToJSON
, FromJSON
, ToJSONKey
, FromJSONKey' using a hex
encoding, based on the SerialiseAsRawBytes
instance.
deriving (Show, IsString) via (UsingRawBytesHex Blah) deriving (ToJSON, FromJSON) via (UsingRawBytesHex Blah) deriving (ToJSONKey, FromJSONKey) via (UsingRawBytesHex Blah)
Instances
newtype UsingBech32 a Source #
For use with deriving via
, to provide instances for any/all of Show
,
IsString
, ToJSON
, FromJSON
, ToJSONKey
, FromJSONKey' using a bech32
encoding, based on the SerialiseAsBech32
instance.
deriving (Show, IsString) via (UsingBech32 Blah) deriving (ToJSON, FromJSON) via (UsingBech32 Blah) deriving (ToJSONKey, FromJSONKey) via (UsingBech32 Blah)