Skip to main content

Pod

Trait Pod 

Source
pub unsafe trait Pod:
    Default
    + Copy
    + CElement
    + CDataMut
    + Send
    + 'static {
    const C_DATA_TYPE: CDataType;
}
Expand description

A plain old data type. With an associated C Type. Must be completely stack allocated without any external references. In addition to that the buffer size must be known to ODBC in advance.

§Safety

A type implementing this trait, must be a fixed sized type. The information in the C_DATA_TYPE constant must be enough to determine both the size and the buffer length of an Instance.

Required Associated Constants§

Source

const C_DATA_TYPE: CDataType

ODBC C Data type used to bind instances to a statement.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Pod for f32

Source§

const C_DATA_TYPE: CDataType = CDataType::Float

Source§

impl Pod for f64

Source§

const C_DATA_TYPE: CDataType = CDataType::Double

Source§

impl Pod for i8

Source§

const C_DATA_TYPE: CDataType = CDataType::STinyInt

Source§

impl Pod for i16

Source§

const C_DATA_TYPE: CDataType = CDataType::SShort

Source§

impl Pod for i32

Source§

const C_DATA_TYPE: CDataType = CDataType::SLong

Source§

impl Pod for i64

Source§

const C_DATA_TYPE: CDataType = CDataType::SBigInt

Source§

impl Pod for u8

Source§

const C_DATA_TYPE: CDataType = CDataType::UTinyInt

Source§

impl Pod for u16

Source§

const C_DATA_TYPE: CDataType = CDataType::UShort

Source§

impl Pod for u32

Source§

const C_DATA_TYPE: CDataType = CDataType::ULong

Source§

impl Pod for u64

Source§

const C_DATA_TYPE: CDataType = CDataType::UBigInt

Source§

impl Pod for Date

Source§

const C_DATA_TYPE: CDataType = CDataType::TypeDate

Source§

impl Pod for Numeric

Source§

const C_DATA_TYPE: CDataType = CDataType::Numeric

Source§

impl Pod for Time

Source§

const C_DATA_TYPE: CDataType = CDataType::TypeTime

Source§

impl Pod for Timestamp

Source§

const C_DATA_TYPE: CDataType = CDataType::TypeTimestamp

Implementors§

Source§

impl Pod for Bit

Source§

const C_DATA_TYPE: CDataType = CDataType::Bit