Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Raw binary serialisation
Synopsis
- newtype UsingRawBytes a = UsingRawBytes a
- newtype UsingRawBytesHex a = UsingRawBytesHex a
Documentation
newtype UsingRawBytes a Source #
For use with deriving via
, to provide ToCBOR
and FromCBOR
instances,
based on the SerialiseAsRawBytes
instance. Eg:
deriving (ToCBOR, FromCBOR) via (UsingRawBytes Blah)
Instances
(SerialiseAsRawBytes a, Typeable a) ⇒ FromCBOR (UsingRawBytes a) Source # | |
Defined in Cardano.Api.SerialiseUsing | |
(SerialiseAsRawBytes a, Typeable a) ⇒ ToCBOR (UsingRawBytes a) Source # | |
Defined in Cardano.Api.SerialiseUsing toCBOR ∷ UsingRawBytes a → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy (UsingRawBytes a) → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [UsingRawBytes a] → Size Source # | |
(SerialiseAsRawBytes a, Typeable a) ⇒ DecCBOR (UsingRawBytes a) Source # | |
Defined in Cardano.Api.SerialiseUsing | |
(SerialiseAsRawBytes a, Typeable a) ⇒ EncCBOR (UsingRawBytes a) Source # | |
Defined in Cardano.Api.SerialiseUsing encCBOR ∷ UsingRawBytes a → Encoding Source # encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy (UsingRawBytes a) → Size Source # encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [UsingRawBytes a] → Size Source # |
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)