pub struct DataKeyHash(/* private fields */);
Expand description
A compact hash of a DataKey
. Useful for keys in maps.
The hash will be stable over time within major releases.
Implementations§
Trait Implementations§
Source§impl AsULE for DataKeyHash
impl AsULE for DataKeyHash
Source§type ULE = DataKeyHash
type ULE = DataKeyHash
The ULE type corresponding to
Self
. Read moreSource§fn to_unaligned(self) -> Self::ULE
fn to_unaligned(self) -> Self::ULE
Source§fn from_unaligned(unaligned: Self::ULE) -> Self
fn from_unaligned(unaligned: Self::ULE) -> Self
Source§impl Clone for DataKeyHash
impl Clone for DataKeyHash
Source§fn clone(&self) -> DataKeyHash
fn clone(&self) -> DataKeyHash
Returns a copy 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 DataKeyHash
impl Debug for DataKeyHash
Source§impl Hash for DataKeyHash
impl Hash for DataKeyHash
Source§impl Ord for DataKeyHash
impl Ord for DataKeyHash
Source§fn cmp(&self, other: &DataKeyHash) -> Ordering
fn cmp(&self, other: &DataKeyHash) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for DataKeyHash
impl PartialEq for DataKeyHash
Source§impl PartialOrd for DataKeyHash
impl PartialOrd for DataKeyHash
Source§impl ULE for DataKeyHash
impl ULE for DataKeyHash
Source§fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
fn validate_byte_slice(bytes: &[u8]) -> Result<(), ZeroVecError>
Validates a byte slice,
&[u8]
. Read moreSource§fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
fn parse_byte_slice(bytes: &[u8]) -> Result<&[Self], ZeroVecError>
Source§unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]
unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &[Self]
Takes a byte slice,
&[u8]
, and return it as &[Self]
with the same lifetime, assuming
that this byte slice has previously been run through Self::parse_byte_slice()
with
success. Read moreSource§fn as_byte_slice(slice: &[Self]) -> &[u8]
fn as_byte_slice(slice: &[Self]) -> &[u8]
Source§impl<'a> ZeroMapKV<'a> for DataKeyHash
impl<'a> ZeroMapKV<'a> for DataKeyHash
Source§type Container = ZeroVec<'a, DataKeyHash>
type Container = ZeroVec<'a, DataKeyHash>
The container that can be used with this type:
ZeroVec
or VarZeroVec
.type Slice = ZeroSlice<DataKeyHash>
Source§type OwnedType = DataKeyHash
type OwnedType = DataKeyHash
The type produced by
Container::replace()
and Container::remove()
,
also used during deserialization. If Self
is human readable serialized,
deserializing to Self::OwnedType
should produce the same value once
passed through Self::owned_as_self()
Read moreimpl Copy for DataKeyHash
impl Eq for DataKeyHash
impl EqULE for DataKeyHash
impl StructuralPartialEq for DataKeyHash
Auto Trait Implementations§
impl Freeze for DataKeyHash
impl RefUnwindSafe for DataKeyHash
impl Send for DataKeyHash
impl Sync for DataKeyHash
impl Unpin for DataKeyHash
impl UnwindSafe for DataKeyHash
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)