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

Method write

atomic-repository/src/patch_evidence.rs:184–190  ·  view source on GitHub ↗
(&mut self, bytes: &[u8])

Source from the content-addressed store, hash-verified

182struct ByteBudget(usize);
183impl Write for ByteBudget {
184 fn write(&mut self, bytes: &[u8]) -> io::Result<usize> {
185 if bytes.len() > self.0 {
186 return Err(io::Error::other("operation byte budget exhausted"));
187 }
188 self.0 -= bytes.len();
189 Ok(bytes.len())
190 }
191 fn flush(&mut self) -> io::Result<()> {
192 Ok(())
193 }

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected