MCPcopy Create free account
hub / github.com/argumentcomputer/ix / get_bool

Function get_bool

crates/ixon/src/serialize.rs:55–61  ·  view source on GitHub ↗
(buf: &mut &[u8])

Source from the content-addressed store, hash-verified

53}
54
55fn get_bool(buf: &mut &[u8]) -> Result<bool, String> {
56 match get_u8(buf)? {
57 0 => Ok(false),
58 1 => Ok(true),
59 x => Err(format!("get_bool: invalid {x}")),
60 }
61}
62
63fn put_u64(x: u64, buf: &mut Vec<u8>) {
64 Tag0::new(x).put(buf);

Callers 1

getMethod · 0.70

Calls 1

get_u8Function · 0.70

Tested by

no test coverage detected