MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / next_id

Method next_id

crates/core/src/slab.rs:373–376  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

371 /// Get the `Id` that will be returned for the next allocation in this slab.
372 #[inline]
373 pub fn next_id(&self) -> Id {
374 let index = self.free.unwrap_or_else(|| EntryIndex::new(self.len()));
375 Id(index)
376 }
377
378 #[inline(never)]
379 #[cold]

Callers

nothing calls this directly

Calls 3

IdClass · 0.70
newFunction · 0.50
lenMethod · 0.45

Tested by

no test coverage detected