Skip to content

Commit d518c14

Browse files
committed
treewide: impl_serialize_cql_via_value -> impl_serialize_value_via_value
1 parent 030da9a commit d518c14

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/source/migration-guides/0.11-serialization.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Conversion in the other direction is not possible.
100100

101101
It is possible to directly generate an `impl` of `SerializeRow` and `SerializeValue` on a type which implements, respectively, `ValueList` or `Value`, without using the wrappers from the previous section. The following macros are provided:
102102

103-
- `impl_serialize_cql_via_value` - implements `SerializeValue` if the type wrapped over implements `Value`,
103+
- `impl_serialize_value_via_value` - implements `SerializeValue` if the type wrapped over implements `Value`,
104104
- `impl_serialize_row_via_value_list` - implements `SerializeRow` if the type wrapped over implements `ValueList`,
105105

106106
The implementations are practically as those generated by the wrappers described in the previous section.

scylla-cql/src/types/serialize/value.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -906,14 +906,14 @@ fn serialize_mapping<'t, 'b, K: SerializeValue + 't, V: SerializeValue + 't>(
906906
///
907907
/// ```rust
908908
/// # use scylla_cql::frame::value::{Value, ValueTooBig};
909-
/// # use scylla_cql::impl_serialize_cql_via_value;
909+
/// # use scylla_cql::impl_serialize_value_via_value;
910910
/// struct NoGenerics {}
911911
/// impl Value for NoGenerics {
912912
/// fn serialize<'b>(&self, _buf: &mut Vec<u8>) -> Result<(), ValueTooBig> {
913913
/// Ok(())
914914
/// }
915915
/// }
916-
/// impl_serialize_cql_via_value!(NoGenerics);
916+
/// impl_serialize_value_via_value!(NoGenerics);
917917
///
918918
/// // Generic types are also supported. You must specify the bounds if the
919919
/// // struct/enum contains any.
@@ -925,10 +925,10 @@ fn serialize_mapping<'t, 'b, K: SerializeValue + 't, V: SerializeValue + 't>(
925925
/// Ok(())
926926
/// }
927927
/// }
928-
/// impl_serialize_cql_via_value!(WithGenerics<T, U: Clone>);
928+
/// impl_serialize_value_via_value!(WithGenerics<T, U: Clone>);
929929
/// ```
930930
#[macro_export]
931-
macro_rules! impl_serialize_cql_via_value {
931+
macro_rules! impl_serialize_value_via_value {
932932
($t:ident$(<$($targ:tt $(: $tbound:tt)?),*>)?) => {
933933
impl $(<$($targ $(: $tbound)?),*>)? $crate::types::serialize::value::SerializeValue
934934
for $t$(<$($targ),*>)?
@@ -951,7 +951,7 @@ macro_rules! impl_serialize_cql_via_value {
951951

952952
/// Implements [`SerializeValue`] if the type wrapped over implements [`Value`].
953953
///
954-
/// See the [`impl_serialize_cql_via_value`] macro on information about
954+
/// See the [`impl_serialize_value_via_value`] macro on information about
955955
/// the properties of the [`SerializeValue`] implementation.
956956
pub struct ValueAdapter<T>(pub T);
957957

@@ -980,7 +980,7 @@ where
980980
/// Returns an error if the result of the `Value::serialize` call was not
981981
/// a properly encoded `[value]` as defined in the CQL protocol spec.
982982
///
983-
/// See [`impl_serialize_cql_via_value`] which generates a boilerplate
983+
/// See [`impl_serialize_value_via_value`] which generates a boilerplate
984984
/// [`SerializeValue`] implementation that uses this function.
985985
pub fn serialize_legacy_value<'b, T: Value>(
986986
v: &T,

0 commit comments

Comments
 (0)