memory-hexstring-1.0.0.0: Hex-string type for Haskell Web3 library.
CopyrightAleksandr Krupenkin 2016-2021
LicenseApache-2.0
Maintainermail@akru.me
Stabilityexperimental
Portabilityunportable
Safe HaskellNone
LanguageHaskell2010

Data.ByteArray.HexString.Internal

Description

Hex string data type.

Synopsis

Documentation

newtype HexString Source #

Represents a Hex string. Guarantees that all characters it contains are valid hex characters.

Constructors

HexString 

Instances

Instances details
Eq HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

Ord HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

Show HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

IsString HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

Semigroup HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

Monoid HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

ToJSON HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Convert

FromJSON HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Convert

ByteArrayAccess HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

Methods

length :: HexString -> Int #

withByteArray :: HexString -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: HexString -> Ptr p -> IO () #

ByteArray HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

Methods

allocRet :: Int -> (Ptr p -> IO a) -> IO (a, HexString) #

Encode HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

Methods

put :: Putter HexString #

Decode HexString Source # 
Instance details

Defined in Data.ByteArray.HexString.Internal

Methods

get :: Get HexString #

hexString :: ByteArray ba => ba -> Either String HexString Source #

Smart constructor which trims '0x' and validates length is even.