pub fn encode_with_constraints<T: Encode>(
constraints: Constraints<'_>,
value: &T,
) -> Result<Vec<u8>, EncodeError>
Expand description
Attempts to encode value
of type T
into COER with constraints.
ยงErrors
Returns EncodeError
if value
cannot be encoded as COER, while setting specific constraints.