Skip to content

Function encoding::to_bytes

zaun_community_protocol::encoding::to_bytes · Function

pub fn to_bytes<T>(value: &T) -> Result<Vec<u8>, EncodeError>

Encodes a top-level value.

EncodeError when a field breaks its limit or rule.

Full rustdoc page