Skip to content

Commit

Permalink
serialize/row: impl SerializeRow for reference
Browse files Browse the repository at this point in the history
  • Loading branch information
piodul committed Nov 24, 2023
1 parent 11b1fae commit b919a02
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scylla-cql/src/types/serialize/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,18 @@ impl<T: SerializeCql, S: BuildHasher> SerializeRow for HashMap<&str, T, S> {
impl_serialize_row_for_map!();
}

impl<T: ValueList> SerializeRow for &T {
fallback_impl_contents!();
impl<T: SerializeRow> SerializeRow for &T {
fn preliminary_type_check(ctx: &RowSerializationContext<'_>) -> Result<(), SerializationError> {
<T as SerializeRow>::preliminary_type_check(ctx)
}

fn serialize<W: RowWriter>(
&self,
ctx: &RowSerializationContext<'_>,
writer: &mut W,
) -> Result<(), SerializationError> {
<T as SerializeRow>::serialize(self, ctx, writer)
}
}

impl SerializeRow for SerializedValues {
Expand Down

0 comments on commit b919a02

Please sign in to comment.