| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.MIME.TransferEncoding
Description
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 #
Associated Types
type TransferDecoded a Source #
Methods
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 Associated Types 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 #
Constructors
| TransferEncodingUnsupported TransferEncodingName | |
| TransferDecodeError TransferEncodingName |
Instances
| Show TransferEncodingError Source # | |
Defined in Data.MIME.TransferEncoding Methods showsPrec :: Int -> TransferEncodingError -> ShowS # show :: TransferEncodingError -> String # showList :: [TransferEncodingError] -> ShowS # | |
| AsTransferEncodingError TransferEncodingError Source # | |
Defined in Data.MIME.TransferEncoding | |
class AsTransferEncodingError s where Source #
Minimal complete definition
Methods
_TransferEncodingError :: Prism' s TransferEncodingError Source #
_TransferEncodingUnsupported :: Prism' s TransferEncodingName Source #
_TransferDecodeError :: Prism' s TransferEncodingName Source #