dnsbase
Copyright(c) Viktor Dukhovni 2026
LicenseBSD-3-Clause
Maintainerietf-dane@dukhovni.org
Stabilityunstable
Safe HaskellNone
LanguageGHC2024

Net.DNSBase.Bytes

Description

Three identical ShortByteString wrappers that differ only in their Presentable instance: Bytes16 renders as hex, Bytes32 as base32, Bytes64 as base64. Used inside RR data types to tag a field with the encoding the zone-file syntax expects, so that a single present call produces the conventional representation without each call site having to pick the encoder.

Synopsis

Short ByteStrings elements that are presented encoded

newtype Bytes16 Source #

ByteStrings with a hexadecimal presentation form

Constructors

Bytes16 

Instances

Instances details
Presentable Bytes16 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Monoid Bytes16 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Semigroup Bytes16 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

IsString Bytes16 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Methods

fromString :: String -> Bytes16 #

Show Bytes16 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Eq Bytes16 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Methods

(==) :: Bytes16 -> Bytes16 -> Bool #

(/=) :: Bytes16 -> Bytes16 -> Bool #

Ord Bytes16 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

newtype Bytes32 Source #

ByteStrings with a base32 presentation form

Constructors

Bytes32 

Instances

Instances details
Presentable Bytes32 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Monoid Bytes32 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Semigroup Bytes32 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

IsString Bytes32 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Methods

fromString :: String -> Bytes32 #

Show Bytes32 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Eq Bytes32 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Methods

(==) :: Bytes32 -> Bytes32 -> Bool #

(/=) :: Bytes32 -> Bytes32 -> Bool #

Ord Bytes32 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

newtype Bytes64 Source #

ByteStrings with a base64 presentation form

Constructors

Bytes64 

Instances

Instances details
Presentable Bytes64 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Monoid Bytes64 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Semigroup Bytes64 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

IsString Bytes64 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Methods

fromString :: String -> Bytes64 #

Show Bytes64 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Eq Bytes64 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes

Methods

(==) :: Bytes64 -> Bytes64 -> Bool #

(/=) :: Bytes64 -> Bytes64 -> Bool #

Ord Bytes64 Source # 
Instance details

Defined in Net.DNSBase.Internal.Bytes