#[non_exhaustive]pub enum GlobalPresence {
Present,
Absent,
Unknown,
}Expand description
Compile-time availability of a global object member in the active target profile.
The current target is a deterministic non-DOM, Node-compatible environment
(the default generated Rust test profile from the global-objects plan). A
feature probe such as "X" in globalThis may only fold to a literal when the
answer is known for that profile; an Unknown
member must keep its runtime check so erased and runtime answers never
disagree.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Present
The member is a recognized builtin that exists in the non-DOM profile, so
"X" in globalThis is statically true.
Absent
The member is a recognized builtin that is intentionally absent from the
non-DOM profile (browser/DOM-only surfaces), so "X" in globalThis is
statically false.
Unknown
The member is not in any recognition registry, so its presence cannot be decided at compile time and the probe must stay a runtime check.