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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/// PostgreSQL error
#[derive(Debug)]
pub enum PostgresError {
/// Not-A-Number is not supported
DecimalCanNotBeConvertedFromNaN,
/// There are no sufficient bytes to decoding an element
DecodingError,
/// There are no bytes left to build a `DbError`
InsufficientDbErrorBytes,
/// Invalid array
InvalidArray,
/// Invalid IP format
InvalidIpFormat,
/// JSONB is the only supported JSON format
InvalidJsonFormat,
/// Postgres does not support large unsigned integers. For example, `u8` can only be stored
/// and read with numbers up to 127.
InvalidPostgresUint,
/// Received bytes don't compose a valid record.
InvalidPostgresRecord,
/// Unknown range type
InvalidRangeTy,
/// The iterator that composed a `RecordValues` does not contain a corresponding length.
InvalidRecordValuesIterator,
/// It is required to connect using a TLS channel but the server didn't provide any. Probably
/// because the connection is unencrypted.
MissingChannel,
/// It is required to connect without using a TLS channel but the server only provided a way to
/// connect using channels. Probably because the connection is encrypted.
RequiredChannel,
/// Server does not support encryption
ServerDoesNotSupportEncryption,
/// The passed time structure contains a duration that is out of bounds
TimeStructureOverflow,
/// The passed time structure can not have a precision greater than microseconds
TimeStructureWithGreaterPrecision,
/// Received an unexpected message type.
UnexpectedDatabaseMessage {
/// Received
received: u8,
},
/// Received an expected message type but the related bytes are in an unexpected state.
UnexpectedDatabaseMessageBytes,
/// The system does not support a requested authentication method.
UnknownAuthenticationMethod,
/// The system does not support a provided parameter.
UnknownConfigurationParameter,
/// The system only supports decimals with 64 digits.
VeryLargeDecimal,
}