Function encode

Source
pub fn encode<T>(error: &T) -> SerializableError
where T: ErrorType + Serialize,
Expand description

Encodes a Conjure error into its serialized form.

The error’s instance ID will be randomly generated if not provided by the error.

§Panics

Panics if the error type does not serialize as a struct.