MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / available

Method available

nodedb-mem/src/budget.rs:179–183  ·  view source on GitHub ↗

Remaining bytes available.

(&self)

Source from the content-addressed store, hash-verified

177
178 /// Remaining bytes available.
179 pub fn available(&self) -> usize {
180 let limit = self.limit();
181 let allocated = self.allocated();
182 limit.saturating_sub(allocated)
183 }
184
185 /// Utilization as a percentage (0-100).
186 ///

Callers 1

reserveMethod · 0.45

Calls 2

allocatedMethod · 0.80
limitMethod · 0.45

Tested by

no test coverage detected