Struct spacetimedb_lib::hash::Hash
source · pub struct Hash {
pub data: [u8; 32],
}Fields§
§data: [u8; 32]Implementations§
source§impl Hash
impl Hash
pub fn from_arr(arr: &[u8; 32]) -> Self
pub fn from_slice(slice: &[u8]) -> Self
pub fn to_vec(&self) -> Vec<u8>
pub fn to_hex(&self) -> String
pub fn to_abbreviated_hex(&self) -> String
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn from_hex(hex: impl AsRef<[u8]>) -> Result<Self, FromHexError>
pub fn from_hashing_bytes(bytes: impl AsRef<[u8]>) -> Hash
Trait Implementations§
source§impl<'de> Deserialize<'de> for Hash
impl<'de> Deserialize<'de> for Hash
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'de> Deserialize<'de> for Hash
impl<'de> Deserialize<'de> for Hash
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
source§impl Ord for Hash
impl Ord for Hash
source§impl PartialEq<Hash> for Hash
impl PartialEq<Hash> for Hash
source§impl PartialOrd<Hash> for Hash
impl PartialOrd<Hash> for Hash
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more