Skip to main content

local_global

Function local_global 

Source
pub fn local_global<T: Zeroable + Sync + 'static>() -> &'static T
Available on crate feature std or x86-64 or AArch64 or ARM or x86 only.
Expand description

Like global, but the symbol identifying the storage will not be exported.

This means different binaries linked together may not share the same instance of this global variable, but the binary may be smaller (if many such globals are exposed).

Globals defined with global and local_global are separate from each other.