pub struct StableHash(pub u64);Expand description
Stable hash helper used for goldens; simple FNV-1a for determinism.
use daedalus_planner::StableHash;
let hash = StableHash::from_bytes(b"demo");
assert_ne!(hash.0, 0);Tuple Fields§
§0: u64Implementations§
Source§impl StableHash
impl StableHash
pub fn from_bytes(bytes: &[u8]) -> Self
Trait Implementations§
Source§impl Clone for StableHash
impl Clone for StableHash
Source§fn clone(&self) -> StableHash
fn clone(&self) -> StableHash
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StableHash
impl Debug for StableHash
Source§impl Default for StableHash
impl Default for StableHash
Source§fn default() -> StableHash
fn default() -> StableHash
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StableHash
impl<'de> Deserialize<'de> for StableHash
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 PartialEq for StableHash
impl PartialEq for StableHash
Source§impl Serialize for StableHash
impl Serialize for StableHash
impl Eq for StableHash
impl StructuralPartialEq for StableHash
Auto Trait Implementations§
impl Freeze for StableHash
impl RefUnwindSafe for StableHash
impl Send for StableHash
impl Sync for StableHash
impl Unpin for StableHash
impl UnwindSafe for StableHash
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