MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / ByteBudget

Class ByteBudget

atomic-repository/src/patch_evidence.rs:182–182  ·  view source on GitHub ↗

Count serialization through a bounded sink rather than allocating an unbounded JSON string for a single potentially enormous FileOps/GraphOp.

Source from the content-addressed store, hash-verified

180// Count serialization through a bounded sink rather than allocating an unbounded
181// JSON string for a single potentially enormous FileOps/GraphOp.
182struct ByteBudget(usize);
183impl Write for ByteBudget {
184 fn write(&mut self, bytes: &[u8]) -> io::Result<usize> {
185 if bytes.len() > self.0 {

Callers 1

bounded_operationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected