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

Function pack_bools

crates/ixon/src/serialize.rs:110–121  ·  view source on GitHub ↗

Pack up to 8 bools into a u8.

(bools: I)

Source from the content-addressed store, hash-verified

108 let tag = Tag4::get(buf)?;
109 if tag.flag != Env::FLAG {
110 return Err(format!(
111 "{ctx}: expected flag 0x{:X}, got 0x{:X}",
112 Env::FLAG,
113 tag.flag
114 ));
115 }
116 if tag.size != 0 {
117 return Err(format!("{ctx}: expected Env variant 0, got {}", tag.size));
118 }
119 let stored_root = get_address(buf)?;
120 // A pre-bundle-format `.ixe` has the §1 blob count here, so this
121 // byte is that count's Tag0 head — flag the likely cause when it
122 // isn't a valid opt tag. (.ixe files are regenerated artifacts.)
123 let main = get_opt_addr(buf).map_err(|e| {
124 format!(

Callers 2

putMethod · 0.85

Calls 1

takeMethod · 0.45

Tested by

no test coverage detected