Plain-old-data error descriptor carried by the error arm of Result.
Designed to be trivially copyable so a Result can be moved across
async / FFI boundaries without pulling in the C++ exception machinery.
The message is a fully-formatted human-readable string — for typed
inspection (shapes, dtypes, ...) the caller should re-throw via
Result::value_or_throw and catch the resulting typed
LucidError.
Attributes
codeErrorCodeCategory of the failure. Defaults to
ErrorCode::Internal so a default-constructed payload is always a recognisable error rather than a misleading Ok.msgstd::stringFinal
what()-style text. May be empty when the category alone conveys the information.Examples
`
return Err(ErrorCode::ShapeMismatch, "rhs has incompatible inner dim");
`