bytestring-conversion-0.3.2: Type-classes to convert values to and from ByteString.

Safe Haskell | None
Language | Haskell2010

Data.ByteString.Conversion.To

Synopsis

- class ToByteString a where
  - builder :: a -> Builder
- toByteString :: ToByteString a => a -> ByteString
- toByteString' :: ToByteString a => a -> ByteString
- runBuilder :: Builder -> ByteString

# Documentation

class ToByteString a where Source #

Methods

builder :: a -> Builder Source #

#### Instances

Instances details

ToByteString Builder Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Builder -> Builder Source #
ToByteString ByteString Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: ByteString -> Builder Source #
ToByteString ByteString Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: ByteString -> Builder Source #
ToByteString Int16 Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Int16 -> Builder Source #
ToByteString Int32 Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Int32 -> Builder Source #
ToByteString Int64 Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Int64 -> Builder Source #
ToByteString Int8 Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Int8 -> Builder Source #
ToByteString Word16 Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Word16 -> Builder Source #
ToByteString Word32 Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Word32 -> Builder Source #
ToByteString Word64 Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Word64 -> Builder Source #
ToByteString Word8 Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Word8 -> Builder Source #
ToByteString Text Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Text -> Builder Source #
ToByteString Text Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Text -> Builder Source #
ToByteString Integer Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Integer -> Builder Source #
ToByteString Bool Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Bool -> Builder Source #
ToByteString Char Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Char -> Builder Source #
ToByteString Double Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Double -> Builder Source #
ToByteString Float Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Float -> Builder Source #
ToByteString Int Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Int -> Builder Source #
ToByteString Word Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Word -> Builder Source #
ToByteString (Hex Int16) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Int16 -> Builder Source #
ToByteString (Hex Int32) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Int32 -> Builder Source #
ToByteString (Hex Int64) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Int64 -> Builder Source #
ToByteString (Hex Int8) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Int8 -> Builder Source #
ToByteString (Hex Word16) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Word16 -> Builder Source #
ToByteString (Hex Word32) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Word32 -> Builder Source #
ToByteString (Hex Word64) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Word64 -> Builder Source #
ToByteString (Hex Word8) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Word8 -> Builder Source #
ToByteString (Hex Int) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Int -> Builder Source #
ToByteString (Hex Word) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: Hex Word -> Builder Source #
ToByteString a => ToByteString (List a) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: List a -> Builder Source #
ToByteString a => ToByteString (CI a) Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: CI a -> Builder Source #
ToByteString [Char] Source # |
Instance details Defined in Data.ByteString.Conversion.To Methods builder :: [Char] -> Builder Source #

toByteString :: ToByteString a => a -> ByteString Source #

toByteString' :: ToByteString a => a -> ByteString Source #

Please note that this needs to convert from a lazy `ByteString` to a strict one which involves copying the whole string.

runBuilder :: Builder -> ByteString Source #