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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! Implementation and types required to bind arguments to ODBC parameters.
use CDataType;
use c_void;
use crateDataType;
/// Provides description of C type layout and pointers to it. Used to bind and buffers to ODBC
/// statements.
///
/// # Safety
///
/// In case of variable sized types [`Self::indicator_ptr`] must not exceed the value pointed to by
/// [`Self::value_ptr`]. This requirement is a bit tricky since, if the same indicator buffer is
/// used in an output paramater the indicator value may be larger in case of truncation.
pub unsafe
/// A type which can be bound mutably to ODBC.
///
/// # Safety
///
/// Care must be taken to only implement this for types which can maintain their invariants then
/// ODBC writes into them.
pub unsafe
/// Stream which can be bound as in input parameter to a statement in order to provide the actual
/// data at statement execution time, rather than preallocated buffers.
///
/// # Safety
///
/// [`Self::stream_ptr`] must return a valid pointer to a reference of a dynamic Blob trait object
/// `(*mut &mut dyn Blob)` which must at least be valid for the lifetime of the instance. The
/// indicator pointer and C data type must describe that instance truthfully.
pub unsafe
/// Can be bound to a single placeholder in an SQL statement.
///
/// Users usually will not utilize this trait directly.