Function sn_protocol::storage::try_serialize_record
source · pub fn try_serialize_record<T: Serialize>(
data: &T,
record_kind: RecordKind
) -> Result<Bytes, Error>
Expand description
Utility to serialize the provided data along with the RecordKind to be stored as Record::value Returns Bytes to avoid accidental clone allocations