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
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Kind {
    Array(crate::Oid),
    Boolean,
    Composite,
    DateTime,
    Enum,
    Geometric,
    Network,
    Numeric,
    Pseudo,
    Range(crate::Oid),
    String,
    Timestamp,
    UserDefined,
    BitString,
    Unknow,
}

#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Type {
    pub oid: crate::Oid,
    pub descr: &'static str,
    pub name: &'static str,
    pub kind: Kind,
}

include!("gen.rs");

impl From<Type> for crate::Oid {
    fn from(ty: Type) -> crate::Oid {
        ty.oid
    }
}