Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- class Renderable a where
- render :: a -> ByteString
- class Parseable a where
- parse :: ByteString -> Maybe a
- binary :: (Renderable a, Parseable a) => Prism' ByteString a
Documentation
class Renderable a where Source
Represents something that can be serialized to a ByteString
with the
context of Nero
.
render :: a -> ByteString Source
Renderable MultiMap | Encode a |
Renderable Scheme | |
Renderable Url |
class Parseable a where Source
Represents something that can be deserialized from a ByteString
within
the context of Nero
. Notice that the whole ByteString
has to be
consumed.
parse :: ByteString -> Maybe a Source
binary :: (Renderable a, Parseable a) => Prism' ByteString a Source
A convenient Prism'
to pack serializers/deserializers.