MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / from_byte_array

Method from_byte_array

crates/sats/src/hash.rs:28–30  ·  view source on GitHub ↗
(data: [u8; HASH_SIZE])

Source from the content-addressed store, hash-verified

26 pub const ZERO: Self = Self::from_byte_array([0; HASH_SIZE]);
27
28 pub const fn from_byte_array(data: [u8; HASH_SIZE]) -> Self {
29 Self { data }
30 }
31
32 pub fn from_u256(val: u256) -> Self {
33 Self::from_byte_array(val.to_le_bytes())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected