pub unsafe trait OciAttr {
type HandleType: HandleType;
type Mode: Mode;
type DataType: DataType + ?Sized;
const ATTR_NUM: u32;
}
Expand description
Required Associated Types§
sourcetype HandleType: HandleType
type HandleType: HandleType
sourcetype DataType: DataType + ?Sized
type DataType: DataType + ?Sized
Attribute data type
The following table is the mapping between basic data types. If incorrect types are specified, the behavior is undefined.
Types in Oracle manual | Rust type |
---|---|
ub1* /ub1 | u8 |
ub2* /ub2 | u16 |
ub4* /ub4 | u32 |
ub8* /ub8 | u64 |
boolean* /boolean | bool |
pointer types such as OCISession** /OCISession* | *mut c_void |
oratext** /oratext* | str 1 |
ub1* (with length; value is copied; is really a ub1 array) | [u8] 2 |
The following table is the mapping of predefined types based on basic data types. They are designed for specific attributes.
Types in Oracle manual | Rust type |
---|---|
ub8* | DurationUsecU64 which gets u64 values representing microsecods as Duration |
ub1* | MaxStringSize which gets ub1 values as variants of MaxStringSize |
Look at the source code of DurationUsecU64
and MaxStringSize
as samples
when you need to implement your own data types.