feophantlib/constants/pg_error_codes.rs
1//! Constant error codes found from here: https://www.postgresql.org/docs/current/errcodes-appendix.html
2
3use bytes::Bytes;
4
5//https://stackoverflow.com/a/62759252/160208
6pub enum PgErrorCodes {
7 SystemError,
8}
9
10impl PgErrorCodes {
11 pub const fn value(self) -> Bytes {
12 use PgErrorCodes::*;
13 match self {
14 SystemError => Bytes::from_static(b"58000"),
15 }
16 }
17}