1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
use crate::rr::{
    AFSDBSubtype, AddressNumber, Class, EDNSOptionCode, SSHFPAlgorithm, SSHFPType, Type,
};
use crate::{QClass, QType};

#[derive(Debug, PartialEq)]
pub enum EncodeError {
    StringError(usize),
    OffsetError(usize),
    TooMuchData(usize),
    NotEnoughData,
    QTypeError(QType),
    QClassError(QClass),
    TypeError(Type),
    ClassError(Class),
    OpcodeError,
    RCodeError,
    NotYetImplemented,
    CompressionError(u16),
    MaxRecursionError(usize),
    AFSDBSubtypeError(AFSDBSubtype),
    SSHFPAlgorithmError(SSHFPAlgorithm),
    SSHFPTypeError(SSHFPType),
    AddressNumberError,
    EDNSOptionCodeError(EDNSOptionCode),
    ECSSourcePrefixLengthError(u8),
    ECSAddressNumberError(AddressNumber),
    CookieServerLengthError(usize),
}