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

Function from_bytes_does_not_cache

crates/ixon/src/lazy.rs:280–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

278 ConstantInfo::CONST_DEFN => Ok(ConstVariantTag::Defn),
279 ConstantInfo::CONST_RECR => Ok(ConstVariantTag::Recr),
280 ConstantInfo::CONST_AXIO => Ok(ConstVariantTag::Axio),
281 ConstantInfo::CONST_QUOT => Ok(ConstVariantTag::Quot),
282 ConstantInfo::CONST_CPRJ => Ok(ConstVariantTag::CPrj),
283 ConstantInfo::CONST_RPRJ => Ok(ConstVariantTag::RPrj),
284 ConstantInfo::CONST_IPRJ => Ok(ConstVariantTag::IPrj),
285 ConstantInfo::CONST_DPRJ => Ok(ConstVariantTag::DPrj),
286 n => Err(format!(
287 "LazyConstant::peek_variant: unknown variant index {n}"
288 )),
289 }
290 },
291 _ => Err(format!(
292 "LazyConstant::peek_variant: unexpected Tag4 flag 0x{flag:X} (expected 0xC or 0xD)"
293 )),
294 }
295 }
296
297 /// Raw serialized bytes (the Tag4 constant body, no length prefix).
298 pub fn raw_bytes(&self) -> &[u8] {

Callers

nothing calls this directly

Calls 4

defn_constantFunction · 0.85
from_bytesFunction · 0.85
commitMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected