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

Function get_address_raw

crates/ixon/src/metadata.rs:533–541  ·  view source on GitHub ↗

Deserialize a raw 32-byte address.

(buf: &mut &[u8])

Source from the content-addressed store, hash-verified

531 let (&x, rest) = buf.split_first()?;
532 *buf = rest;
533 Some(x)
534}
535
536fn deser_tag0(buf: &mut &[u8]) -> Option<u64> {
537 Tag0::get(buf).ok().map(|t| t.size)
538}
539
540fn deser_addr(buf: &mut &[u8]) -> Option<Address> {
541 if buf.len() < 32 {
542 return None;
543 }
544 let (bytes, rest) = buf.split_at(32);

Callers 1

get_indexedMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected