1
1
/// #[derive(FromRow)] derives FromRow for struct
2
+ ///
2
3
/// Works only on simple structs without generics etc
3
- pub use scylla_macros:: FromRow ;
4
+ ///
5
+ /// ---
6
+ ///
7
+ pub use scylla_cql:: macros:: FromRow ;
4
8
5
9
/// #[derive(FromUserType)] allows to parse struct as a User Defined Type
10
+ ///
6
11
/// Works only on simple structs without generics etc
7
- pub use scylla_macros:: FromUserType ;
12
+ ///
13
+ /// ---
14
+ ///
15
+ pub use scylla_cql:: macros:: FromUserType ;
8
16
9
17
/// #[derive(IntoUserType)] allows to pass struct a User Defined Type Value in queries
18
+ ///
10
19
/// Works only on simple structs without generics etc
11
- pub use scylla_macros :: IntoUserType ;
12
-
13
- /// #[derive(ValueList)] allows to pass struct as a list of values for a query
14
- pub use scylla_macros :: ValueList ;
20
+ ///
21
+ /// ---
22
+ ///
23
+ pub use scylla_cql :: macros :: IntoUserType ;
15
24
16
- /// Derive macro for the [`SerializeCql`](crate::types:: serialize::value::SerializeCql) trait
25
+ /// Derive macro for the [`SerializeCql`](crate::serialize::value::SerializeCql) trait
17
26
/// which serializes given Rust structure as a User Defined Type (UDT).
18
27
///
19
28
/// At the moment, only structs with named fields are supported.
@@ -31,8 +40,8 @@ pub use scylla_macros::ValueList;
31
40
/// This behavior is the default to support ALTERing UDTs by adding new fields.
32
41
/// You can require exact match of fields using `force_exact_match` attribute.
33
42
///
34
- /// In case of failure, either [`BuiltinTypeCheckError`](crate::types:: serialize::value::BuiltinTypeCheckError)
35
- /// or [`BuiltinSerializationError`](crate::types:: serialize::value::BuiltinSerializationError)
43
+ /// In case of failure, either [`BuiltinTypeCheckError`](crate::serialize::value::BuiltinTypeCheckError)
44
+ /// or [`BuiltinSerializationError`](crate::serialize::value::BuiltinSerializationError)
36
45
/// will be returned.
37
46
///
38
47
/// # Example
@@ -46,9 +55,8 @@ pub use scylla_macros::ValueList;
46
55
/// ...can be serialized using the following struct:
47
56
///
48
57
/// ```rust
49
- /// # use scylla_cql::macros ::SerializeCql;
58
+ /// # use scylla ::SerializeCql;
50
59
/// #[derive(SerializeCql)]
51
- /// # #[scylla(crate = scylla_cql)]
52
60
/// struct MyUdt {
53
61
/// a: i32,
54
62
/// b: Option<String>,
@@ -77,7 +85,7 @@ pub use scylla_macros::ValueList;
77
85
///
78
86
/// By default, the code generated by the derive macro will refer to the items
79
87
/// defined by the driver (types, traits, etc.) via the `::scylla` path.
80
- /// For example, it will refer to the [`SerializeCql`](crate::types:: serialize::value::SerializeCql) trait
88
+ /// For example, it will refer to the [`SerializeCql`](crate::serialize::value::SerializeCql) trait
81
89
/// using the following path:
82
90
///
83
91
/// ```rust,ignore
@@ -121,18 +129,21 @@ pub use scylla_macros::ValueList;
121
129
/// `#[scylla(skip)]`
122
130
///
123
131
/// Don't use the field during serialization.
124
- pub use scylla_macros:: SerializeCql ;
132
+ ///
133
+ /// ---
134
+ ///
135
+ pub use scylla_cql:: macros:: SerializeCql ;
125
136
126
- /// Derive macro for the [`SerializeRow`](crate::types:: serialize::row::SerializeRow) trait
137
+ /// Derive macro for the [`SerializeRow`](crate::serialize::row::SerializeRow) trait
127
138
/// which serializes given Rust structure into bind markers for a CQL statement.
128
139
///
129
140
/// At the moment, only structs with named fields are supported.
130
141
///
131
142
/// Serialization will fail if there are some bind markers/columns in the statement
132
143
/// that don't match to any of the Rust struct fields, _or vice versa_.
133
144
///
134
- /// In case of failure, either [`BuiltinTypeCheckError`](crate::types:: serialize::row::BuiltinTypeCheckError)
135
- /// or [`BuiltinSerializationError`](crate::types:: serialize::row::BuiltinSerializationError)
145
+ /// In case of failure, either [`BuiltinTypeCheckError`](crate::serialize::row::BuiltinTypeCheckError)
146
+ /// or [`BuiltinSerializationError`](crate::serialize::row::BuiltinSerializationError)
136
147
/// will be returned.
137
148
///
138
149
/// # Example
@@ -148,9 +159,8 @@ pub use scylla_macros::SerializeCql;
148
159
/// ...the values for the query can be serialized using the following struct:
149
160
///
150
161
/// ```rust
151
- /// # use scylla_cql::macros ::SerializeRow;
162
+ /// # use scylla ::SerializeRow;
152
163
/// #[derive(SerializeRow)]
153
- /// # #[scylla(crate = scylla_cql)]
154
164
/// struct MyValues {
155
165
/// a: i32,
156
166
/// b: Option<String>,
@@ -179,7 +189,7 @@ pub use scylla_macros::SerializeCql;
179
189
///
180
190
/// By default, the code generated by the derive macro will refer to the items
181
191
/// defined by the driver (types, traits, etc.) via the `::scylla` path.
182
- /// For example, it will refer to the [`SerializeRow`](crate::types:: serialize::row::SerializeRow) trait
192
+ /// For example, it will refer to the [`SerializeRow`](crate::serialize::row::SerializeRow) trait
183
193
/// using the following path:
184
194
///
185
195
/// ```rust,ignore
@@ -219,9 +229,18 @@ pub use scylla_macros::SerializeCql;
219
229
/// `#[scylla(skip)]`
220
230
///
221
231
/// Don't use the field during serialization.
222
- pub use scylla_macros:: SerializeRow ;
232
+ ///
233
+ /// ---
234
+ ///
235
+ pub use scylla_cql:: macros:: SerializeRow ;
236
+
237
+ /// #[derive(ValueList)] allows to pass struct as a list of values for a query
238
+ ///
239
+ /// ---
240
+ ///
241
+ pub use scylla_cql:: macros:: ValueList ;
242
+
243
+ pub use scylla_cql:: macros:: impl_from_cql_value_from_method;
223
244
224
245
// Reexports for derive(IntoUserType)
225
246
pub use bytes:: { BufMut , Bytes , BytesMut } ;
226
-
227
- pub use crate :: impl_from_cql_value_from_method;
0 commit comments