diff --git a/scylla-cql/src/frame/value.rs b/scylla-cql/src/frame/value.rs index 0db6f503a..a2ee409f9 100644 --- a/scylla-cql/src/frame/value.rs +++ b/scylla-cql/src/frame/value.rs @@ -25,6 +25,10 @@ pub struct ValueTooBig; pub struct ValueOverflow; #[allow(deprecated)] +#[deprecated( + since = "0.15.1", + note = "Legacy serialization API is not type-safe and is going to be removed soon" +)] #[derive(Debug, Error, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum SerializeValuesError { #[error("Too many values to add, max 65,535 values can be sent in a request")] diff --git a/scylla/src/transport/errors.rs b/scylla/src/transport/errors.rs index 7d835f269..fdd5b9aa0 100644 --- a/scylla/src/transport/errors.rs +++ b/scylla/src/transport/errors.rs @@ -12,6 +12,7 @@ use std::{ sync::Arc, }; +#[allow(deprecated)] use scylla_cql::{ frame::{ frame_errors::{ @@ -124,6 +125,7 @@ pub enum QueryError { IntoLegacyQueryResultError(#[from] IntoLegacyQueryResultError), } +#[allow(deprecated)] impl From for QueryError { fn from(serialized_err: SerializeValuesError) -> QueryError { QueryError::BadQuery(BadQuery::SerializeValuesError(serialized_err)) @@ -573,7 +575,12 @@ pub enum ViewsMetadataError { #[non_exhaustive] pub enum BadQuery { /// Failed to serialize values passed to a query - values too big + #[deprecated( + since = "0.15.1", + note = "Legacy serialization API is not type-safe and is going to be removed soon" + )] #[error("Serializing values failed: {0} ")] + #[allow(deprecated)] SerializeValuesError(#[from] SerializeValuesError), #[error("Serializing values failed: {0} ")]