Skip to content

Commit 30d5149

Browse files
committed
scylla lib: constrain pub deserialize reexports
1 parent 9a3e6e6 commit 30d5149

File tree

2 files changed

+38
-4
lines changed

2 files changed

+38
-4
lines changed

scylla-cql/src/types/deserialize/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ pub mod value;
169169

170170
pub use frame_slice::FrameSlice;
171171

172+
pub use row::DeserializeRow;
173+
pub use value::DeserializeValue;
174+
172175
use std::error::Error;
173176
use std::fmt::Display;
174177
use std::sync::Arc;

scylla/src/lib.rs

+35-4
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,41 @@ pub mod frame {
126126
}
127127
}
128128

129-
// FIXME: finer-grained control over exports
130-
// Some types are `pub` in scylla-cql just for scylla crate,
131-
// and those shouldn't be exposed for users.
132-
pub use scylla_cql::types::{deserialize, serialize};
129+
/// Serializing bound values of a query to be sent to the DB.
130+
pub mod serialize {
131+
pub use scylla_cql::types::serialize::*;
132+
}
133+
134+
/// Deserializing DB response containing CQL query results.
135+
pub mod deserialize {
136+
pub use scylla_cql::types::deserialize::{
137+
DeserializationError, DeserializeRow, DeserializeValue, FrameSlice, TypeCheckError,
138+
};
139+
140+
/// Deserializing the whole query result contents.
141+
pub mod result {
142+
pub use scylla_cql::types::deserialize::result::{RowIterator, TypedRowIterator};
143+
}
144+
145+
/// Deserializing a row of the query result.
146+
pub mod row {
147+
pub use scylla_cql::types::deserialize::row::{
148+
BuiltinDeserializationError, BuiltinDeserializationErrorKind, BuiltinTypeCheckError,
149+
BuiltinTypeCheckErrorKind, ColumnIterator, RawColumn,
150+
};
151+
}
152+
153+
/// Deserializing a single CQL value from a column of the query result row.
154+
pub mod value {
155+
pub use scylla_cql::types::deserialize::value::{
156+
BuiltinDeserializationError, BuiltinDeserializationErrorKind, BuiltinTypeCheckError,
157+
BuiltinTypeCheckErrorKind, Emptiable, ListlikeIterator, MapDeserializationErrorKind,
158+
MapIterator, MapTypeCheckErrorKind, MaybeEmpty, SetOrListDeserializationErrorKind,
159+
SetOrListTypeCheckErrorKind, TupleDeserializationErrorKind, TupleTypeCheckErrorKind,
160+
UdtIterator, UdtTypeCheckErrorKind,
161+
};
162+
}
163+
}
133164

134165
pub mod authentication;
135166
#[cfg(feature = "cloud")]

0 commit comments

Comments
 (0)