MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / new

Method new

crates/data-structures/src/object_pool.rs:83–86  ·  view source on GitHub ↗

Returns a new pool with a maximum capacity of `cap`. This capacity is fixed over the lifetime of the pool.

(cap: usize)

Source from the content-addressed store, hash-verified

81 /// Returns a new pool with a maximum capacity of `cap`.
82 /// This capacity is fixed over the lifetime of the pool.
83 pub fn new(cap: usize) -> Self {
84 let inner = Arc::new(Inner::new(cap));
85 Self { inner }
86 }
87
88 /// Puts back an object into the pool.
89 pub fn put(&self, object: T) {

Callers

nothing calls this directly

Calls 1

newFunction · 0.70

Tested by

no test coverage detected