pub type ZL_ErrorInfo = ZL_ErrorInfo_u;Expand description
Internally, there are two kinds of error info objects: dynamic and static, which are, like they sound, respectively dynamically allocated (and which must be freed) or statically allocated, but which therefore can’t contain any runtime information.
You should never assign or dereference these pointers directly:
- We pack metadata into the unused bits of the pointers, which needs to be masked out to retrieve the actual pointer.
- You need interact with that metadata to figure out or set which pointer is active.
Instead:
You should use @ref ZL_E_dy or @ref ZL_E_st to check for the presence of and to extract the (possibly NULL) pointers to the sub-types.
You should use @ref ZL_EI_fromDy or @ref ZL_EI_fromSt to construct this object from one of those pointer.
Aliased Type§
#[repr(C)]pub union ZL_ErrorInfo {
pub _dy: *mut ZL_DynamicErrorInfo_s,
pub _st: *const ZL_StaticErrorInfo_s,
}Fields§
§_dy: *mut ZL_DynamicErrorInfo_s§_st: *const ZL_StaticErrorInfo_s