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
use sys::*; /// Type indicates an ODBC Version pub unsafe trait Version { /// The `SQL_ATTR_ODBC_VERSION` used with `SQLSetEnvAttr` fn constant() -> OdbcVersion; } /// Used to indicate that the ODBC environments version is not yet declared #[derive(Debug, Clone, Copy)] pub struct NoVersion; /// Used to declare ODBC 3 specifications. #[derive(Debug, Clone, Copy)] pub struct Odbc3; /// Used to declare ODBC 3.8 specifications. #[derive(Debug, Clone, Copy)] pub struct Odbc3m8; unsafe impl Version for Odbc3 { fn constant() -> OdbcVersion { SQL_OV_ODBC3 } } unsafe impl Version for Odbc3m8 { fn constant() -> OdbcVersion { SQL_OV_ODBC3_80 } }