MCPcopy Create free account
hub / github.com/bitdriftlabs/pulse / default

Method default

pulse-common/src/singleton.rs:19–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18impl Default for SingletonHandle {
19 fn default() -> Self {
20 static NEXT_SLOT: OnceLock<AtomicUsize> = OnceLock::new();
21
22 Self {
23 slot: NEXT_SLOT
24 .get_or_init(AtomicUsize::default)
25 .fetch_add(1, Ordering::SeqCst),
26 }
27 }
28}
29
30#[derive(Default)]

Callers

nothing calls this directly

Calls 2

newFunction · 0.85
get_or_initMethod · 0.45

Tested by

no test coverage detected