nero-0.3.1: Lens-based HTTP toolkit

Safe HaskellSafe-Inferred
LanguageHaskell2010

Nero.Binary

Synopsis

Documentation

class Renderable a where Source

Represents something that can be serialized to a ByteString with the context of Nero.

Methods

render :: a -> ByteString Source

Instances

Renderable MultiMap

Encode a MultiMap with the typical query string format.

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.

Methods

parse :: ByteString -> Maybe a Source

Instances

binary :: (Renderable a, Parseable a) => Prism' ByteString a Source

A convenient Prism' to pack serializers/deserializers.