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>
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 moresource§impl SpacetimeType for Hash
impl SpacetimeType for Hash
fn make_type<S: TypespaceBuilder>(_ts: &mut S) -> AlgebraicType
impl Copy for Hash
impl Eq for Hash
impl StructuralEq for Hash
impl StructuralPartialEq for Hash
Auto Trait Implementations§
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more