Function concordium_std::to_bytes

source ·
pub fn to_bytes<S>(x: &S) -> Vec<u8, Global> where
S: Serial,
Expand description

Serialize the given value to a freshly allocated vector of bytes using the provided Serial instance.

This should only be used as a helper function at the top-level, and not in implementations of Serial.