MCPcopy Create free account
hub / github.com/aleph-zero-foundation/AlephBFT / decode

Method decode

crypto/src/node.rs:24–29  ·  view source on GitHub ↗
(value: &mut I)

Source from the content-addressed store, hash-verified

22
23impl Decode for NodeIndex {
24 fn decode<I: Input>(value: &mut I) -> Result<Self, Error> {
25 let mut arr = [0u8; 8];
26 value.read(&mut arr)?;
27 let val: u64 = u64::from_le_bytes(arr);
28 Ok(NodeIndex(val as usize))
29 }
30}
31
32/// Indicates that an implementor has been assigned some index.

Callers

nothing calls this directly

Calls 3

NodeIndexClass · 0.85
NodeSubsetClass · 0.85
lenMethod · 0.80

Tested by

no test coverage detected