Implemented by error codes in order to construct them from status codes.
A status code is returned by calling an ink! chain extension method.
It is the
u32 return value.
The purpose of an
ErrorCode type that implements this trait is to provide
more context information about the status of an ink! chain extension method call.
Ok if the status code for the called chain extension method is valid.
Ok will query the output buffer of the call if the chain extension
method definition has a return value.
The convention is to use
0 as the only
raw value that yields
every other value represents one error code. By convention this mapping should
never panic and therefore every
raw value must map to either
Ok or to a proper