Function encode_with_constraints

Source
pub fn encode_with_constraints<T: Encode>(
    constraints: Constraints<'_>,
    value: &T,
) -> Result<Vec<u8>, EncodeError>
Expand description

Attempts to encode value to COER with constraints.

ยงErrors

Returns EncodeError if value cannot be encoded as COER, while setting specific constraints.