#[repr(C)]pub enum XRayLogInitStatus {
XRAY_LOG_UNINITIALIZED = 0,
XRAY_LOG_INITIALIZING = 1,
XRAY_LOG_INITIALIZED = 2,
XRAY_LOG_FINALIZING = 3,
XRAY_LOG_FINALIZED = 4,
}Expand description
This enum defines the valid states in which the logging implementation can be at.
Variants§
XRAY_LOG_UNINITIALIZED = 0
The default state is uninitialized, and in case there were errors in the
initialization, the implementation MUST return XRAY_LOG_UNINITIALIZED.
XRAY_LOG_INITIALIZING = 1
Some implementations support multi-stage init (or asynchronous init), and
may return XRAY_LOG_INITIALIZING to signal callers of the API that
there’s an ongoing initialization routine running. This allows
implementations to support concurrent threads attempting to initialize,
while only signalling success in one.
XRAY_LOG_INITIALIZED = 2
When an implementation is done initializing, it MUST return
XRAY_LOG_INITIALIZED. When users call __xray_patch(), they are
guaranteed that the implementation installed with
__xray_set_log_impl() has been initialized.
XRAY_LOG_FINALIZING = 3
Some implementations might support multi-stage finalization (or
asynchronous finalization), and may return XRAY_LOG_FINALIZING to signal
callers of the API that there’s an ongoing finalization routine running.
This allows implementations to support concurrent threads attempting to
finalize, while only signalling success/completion in one.
XRAY_LOG_FINALIZED = 4
When an implementation is done finalizing, it MUST return
XRAY_LOG_FINALIZED. It is up to the implementation to determine what the
semantics of a finalized implementation is. Some implementations might
allow re-initialization once the log is finalized, while some might always
be on (and that finalization is a no-op).
Trait Implementations§
Source§impl Clone for XRayLogInitStatus
impl Clone for XRayLogInitStatus
Source§fn clone(&self) -> XRayLogInitStatus
fn clone(&self) -> XRayLogInitStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more