MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / write_be_bytes

Method write_be_bytes

src/protocol/buffer_writer.rs:41–46  ·  view source on GitHub ↗
(&mut self, bytes: &[u8])

Source from the content-addressed store, hash-verified

39 }
40
41 fn write_be_bytes(&mut self, bytes: &[u8]) {
42 let len = bytes.len();
43 self.ensure_capacity(len);
44 self.buffer[self.offset..self.offset + len].copy_from_slice(bytes);
45 self.offset += len;
46 }
47
48 pub fn add_int32(&mut self, value: i32) -> &mut Self {
49 self.write_be_bytes(&value.to_be_bytes());

Callers 3

add_int32Method · 0.80
add_int16Method · 0.80
add_bytesMethod · 0.80

Calls 2

lenMethod · 0.80
ensure_capacityMethod · 0.80

Tested by

no test coverage detected