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

Safe HaskellNone
LanguageHaskell2010

Data.ByteString.Conversion.To

Synopsis

Documentation

class ToByteString a where Source #

Minimal complete definition

builder

Methods

builder :: a -> Builder Source #

Instances

ToByteString Bool Source # 

Methods

builder :: Bool -> Builder Source #

ToByteString Char Source # 

Methods

builder :: Char -> Builder Source #

ToByteString Double Source # 
ToByteString Float Source # 
ToByteString Int Source # 

Methods

builder :: Int -> Builder Source #

ToByteString Int8 Source # 

Methods

builder :: Int8 -> Builder Source #

ToByteString Int16 Source # 
ToByteString Int32 Source # 
ToByteString Int64 Source # 
ToByteString Integer Source # 
ToByteString Word Source # 

Methods

builder :: Word -> Builder Source #

ToByteString Word8 Source # 
ToByteString Word16 Source # 
ToByteString Word32 Source # 
ToByteString Word64 Source # 
ToByteString ByteString Source # 
ToByteString ByteString Source # 
ToByteString Text Source # 

Methods

builder :: Text -> Builder Source #

ToByteString Text Source # 

Methods

builder :: Text -> Builder Source #

ToByteString Builder Source # 
ToByteString [Char] Source # 

Methods

builder :: [Char] -> Builder Source #

ToByteString a => ToByteString (CI a) Source # 

Methods

builder :: CI a -> Builder Source #

ToByteString a => ToByteString (List a) Source # 

Methods

builder :: List a -> Builder Source #

ToByteString (Hex Int) Source # 

Methods

builder :: Hex Int -> Builder Source #

ToByteString (Hex Int8) Source # 
ToByteString (Hex Int16) Source # 
ToByteString (Hex Int32) Source # 
ToByteString (Hex Int64) Source # 
ToByteString (Hex Word) Source # 
ToByteString (Hex Word8) Source # 
ToByteString (Hex Word16) Source # 
ToByteString (Hex Word32) Source # 
ToByteString (Hex Word64) 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.