[−][src]Function packs::utils::encode_property
pub fn encode_property<T: Write, V: Pack>(
key: &str,
value: &V,
writer: &mut T
) -> Result<usize, EncodeError>
Encodes a given key and value as a property as used by Dictionary
. This can be used as a flat
shortcut to encode any key-value pair using PackStream. Keys are strings and encoded values can
be anything which implements Pack
. Returns the number of bytes written
to the stream.