pub struct KeyHash(pub [u8; 32]);
Expand description
A hashed key used to index a JellyfishMerkleTree
.
§🚨 Danger 🚨
ics23 non-existence proofs require that all key preimages are non-empty. If you
plan to use ics23 non-existence proofs, you must ensure that keys are non-empty
before creating KeyHash
es.
The JellyfishMerkleTree
only stores key hashes, not full keys.
Tuple Fields§
§0: [u8; 32]
Implementations§
Trait Implementations§
source§impl BorshDeserialize for KeyHash
impl BorshDeserialize for KeyHash
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl<'de> Deserialize<'de> for KeyHash
impl<'de> Deserialize<'de> for KeyHash
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 Ord for KeyHash
impl Ord for KeyHash
source§impl PartialEq for KeyHash
impl PartialEq for KeyHash
source§impl PartialOrd for KeyHash
impl PartialOrd for KeyHash
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 moreimpl Copy for KeyHash
impl Eq for KeyHash
impl StructuralPartialEq for KeyHash
Auto Trait Implementations§
impl Freeze for KeyHash
impl RefUnwindSafe for KeyHash
impl Send for KeyHash
impl Sync for KeyHash
impl Unpin for KeyHash
impl UnwindSafe for KeyHash
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