diff --git a/scylla/src/lib.rs b/scylla/src/lib.rs index 3adce0fc0..c0a59c538 100644 --- a/scylla/src/lib.rs +++ b/scylla/src/lib.rs @@ -131,8 +131,89 @@ pub mod frame { } /// Serializing bound values of a query to be sent to the DB. +// I don't know any other way to tell rustfmt to not reorder +// imports here. +#[rustfmt::skip] pub mod serialize { - pub use scylla_cql::types::serialize::*; + pub use scylla_cql::types::serialize::SerializationError; + pub mod batch { + pub use scylla_cql::types::serialize::batch::{ + BatchValues, + BatchValuesIterator, + TupleValuesIter, + BatchValuesFromIterator, + BatchValuesIteratorFromIterator, + + // Legacy migration types - to be removed when removing legacy framework + LegacyBatchValuesAdapter, + LegacyBatchValuesIteratorAdapter, + }; + } + + pub mod raw_batch { + pub use scylla_cql::types::serialize::raw_batch::{ + RawBatchValues, + RawBatchValuesIterator, + RawBatchValuesAdapter, + RawBatchValuesIteratorAdapter, + }; + } + + pub mod row { + pub use scylla_cql::types::serialize::row::{ + // Main types + SerializeRow, + RowSerializationContext, + + // Errors + BuiltinTypeCheckError, + BuiltinTypeCheckErrorKind, + + // Legacy migration types - to be removed when removing legacy framework + serialize_legacy_row, + BuiltinSerializationError, + BuiltinSerializationErrorKind, + + // Not part of the old framework, but something that we should + // still aim to remove. + SerializedValues, + SerializedValuesIterator, + ValueListAdapter, + ValueListToSerializeRowAdapterError, + }; + } + + pub mod value { + pub use scylla_cql::types::serialize::value::{ + // Main types + SerializeValue, + + // Errors + BuiltinSerializationError, + BuiltinSerializationErrorKind, + BuiltinTypeCheckError, + BuiltinTypeCheckErrorKind, + MapSerializationErrorKind, + MapTypeCheckErrorKind, + SetOrListSerializationErrorKind, + SetOrListTypeCheckErrorKind, + TupleSerializationErrorKind, + TupleTypeCheckErrorKind, + UdtSerializationErrorKind, + UdtTypeCheckErrorKind, + + // Legacy migration types - to be removed when removing legacy framework + serialize_legacy_value, + ValueAdapter, + ValueToSerializeValueAdapterError, + }; + } + + pub mod writers { + pub use scylla_cql::types::serialize::writers::{ + CellOverflowError, CellValueBuilder, CellWriter, RowWriter, WrittenCellProof, + }; + } } /// Deserializing DB response containing CQL query results.