MCPcopy Create free account
hub / github.com/SoftbearStudios/bitcode / consume_byte

Function consume_byte

src/consume.rs:15–17  ·  view source on GitHub ↗

Attempts to claim one byte out of `input`.

(input: &mut &[u8])

Source from the content-addressed store, hash-verified

13
14/// Attempts to claim one byte out of `input`.
15pub fn consume_byte(input: &mut &[u8]) -> Result<u8> {
16 Ok(consume_bytes(input, 1)?[0])
17}
18
19/// Like `consume_bytes` but consumes `[u8; N]` instead of `u8`.
20pub fn consume_byte_arrays<'a, const N: usize>(

Callers 3

readMethod · 0.85
unpack_bytes_unsignedFunction · 0.85
readMethod · 0.85

Calls 1

consume_bytesFunction · 0.85

Tested by

no test coverage detected