Function scylla::serialize::value::serialize_legacy_value
source ยท pub fn serialize_legacy_value<'b, T>(
v: &T,
writer: CellWriter<'b>,
) -> Result<WrittenCellProof<'b>, SerializationError>where
T: Value,
๐Deprecated since 0.15.1: Legacy serialization API is not type-safe and is going to be removed soon
Expand description
Serializes a value implementing Value
by using the CellWriter
interface.
The function first serializes the value with Value::serialize
, then
parses the result and serializes it again with given CellWriter
. It is
a lazy and inefficient way to implement CellWriter
via an existing Value
impl.
Returns an error if the result of the Value::serialize
call was not
a properly encoded [value]
as defined in the CQL protocol spec.
See impl_serialize_value_via_value
which generates a boilerplate
SerializeValue
implementation that uses this function.