Function encode

Source
pub fn encode<T: Encode>(value: &T) -> Result<Vec<u8>, EncodeError>
Expand description

Attempts to encode value of type T to OER.

ยงErrors

Returns EncodeError if value cannot be encoded as COER, usually meaning that constraints are not met.