Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class Decode ct a where
- decode :: ByteString -> Either LinnetError a
- class DecodePath a where
- decodePath :: Text -> Maybe a
- class DecodeEntity a where
- decodeEntity :: Entity -> ByteString -> Either LinnetError a
Documentation
class Decode ct a where Source #
Decoding of HTTP request payload into some type a
.
Phantom type ct
guarantees that compiler checks support of decoding some a
from content of given Content-Type
by looking for specific Decode
instance.
decode :: ByteString -> Either LinnetError a Source #
Instances
Decode TextPlain ByteString Source # | |
Defined in Linnet.Decode | |
Decode TextPlain ByteString Source # | |
Defined in Linnet.Decode |
class DecodePath a where Source #
decodePath :: Text -> Maybe a Source #
Instances
DecodePath Double Source # | |
Defined in Linnet.Decode | |
DecodePath Float Source # | |
Defined in Linnet.Decode | |
DecodePath Int Source # | |
Defined in Linnet.Decode | |
DecodePath Integer Source # | |
Defined in Linnet.Decode | |
DecodePath ByteString Source # | |
Defined in Linnet.Decode decodePath :: Text -> Maybe ByteString Source # | |
DecodePath Text Source # | |
Defined in Linnet.Decode |
class DecodeEntity a where Source #
Nothing
decodeEntity :: Entity -> ByteString -> Either LinnetError a Source #
decodeEntity :: FromByteString a => Entity -> ByteString -> Either LinnetError a Source #
Instances
DecodeEntity Double Source # | |
Defined in Linnet.Decode decodeEntity :: Entity -> ByteString -> Either LinnetError Double Source # | |
DecodeEntity Float Source # | |
Defined in Linnet.Decode decodeEntity :: Entity -> ByteString -> Either LinnetError Float Source # | |
DecodeEntity Int Source # | |
Defined in Linnet.Decode decodeEntity :: Entity -> ByteString -> Either LinnetError Int Source # | |
DecodeEntity Integer Source # | |
Defined in Linnet.Decode decodeEntity :: Entity -> ByteString -> Either LinnetError Integer Source # | |
DecodeEntity ByteString Source # | |
Defined in Linnet.Decode decodeEntity :: Entity -> ByteString -> Either LinnetError ByteString Source # | |
DecodeEntity Text Source # | |
Defined in Linnet.Decode decodeEntity :: Entity -> ByteString -> Either LinnetError Text Source # |