Safe Haskell | None |
---|---|
Language | Haskell2010 |
MIME content transfer encodings.
Synopsis
- class HasTransferEncoding a where
- type TransferDecoded a
- transferEncodingName :: Getter a TransferEncodingName
- transferEncodedData :: Getter a ByteString
- transferDecoded :: AsTransferEncodingError e => Getter a (Either e (TransferDecoded a))
- type TransferEncodingName = CI ByteString
- transferDecodedBytes :: (HasTransferEncoding a, AsTransferEncodingError e) => Getter a (Either e ByteString)
- transferEncodings :: [(CI ByteString, TransferEncoding)]
- transferEncodeData :: Encoding -> ByteString -> ByteString
- data TransferEncodingError
- class AsTransferEncodingError s where
- type TransferEncoding = APrism' ByteString ByteString
Documentation
class HasTransferEncoding a where Source #
type TransferDecoded a Source #
transferEncodingName :: Getter a TransferEncodingName Source #
Get the declared or default transfer encoding name.
transferEncodedData :: Getter a ByteString Source #
Return the encoded data in the structure.
transferDecoded :: AsTransferEncodingError e => Getter a (Either e (TransferDecoded a)) Source #
Perform content transfer decoding.
Instances
HasTransferEncoding WireEntity Source # | |
Defined in Data.MIME type TransferDecoded WireEntity :: Type Source # |
type TransferEncodingName = CI ByteString Source #
transferDecodedBytes :: (HasTransferEncoding a, AsTransferEncodingError e) => Getter a (Either e ByteString) Source #
Decode the object according to the declared content transfer encoding.
transferEncodings :: [(CI ByteString, TransferEncoding)] Source #
Get the Content-Transfer-Encoding for an entity.
Defaults to 7bit
(RFC 2045 §6.1) if the header is
not present. Fails on unrecognised values.
transferEncodeData :: Encoding -> ByteString -> ByteString Source #
data TransferEncodingError Source #
Instances
class AsTransferEncodingError s where Source #
_TransferEncodingError :: Prism' s TransferEncodingError Source #
_TransferEncodingUnsupported :: Prism' s TransferEncodingName Source #
_TransferDecodeError :: Prism' s TransferEncodingName Source #