pub struct StorageKeyPart<TypeId> { /* private fields */ }
Expand description
The decoded representation of a storage key.
Implementations§
Source§impl<TypeId> StorageKeyPart<TypeId>
impl<TypeId> StorageKeyPart<TypeId>
Sourcepub fn hash_range(&self) -> Range<usize>
pub fn hash_range(&self) -> Range<usize>
The byte range of the hash for this storage key part.
Sourcepub fn hasher(&self) -> StorageHasher
pub fn hasher(&self) -> StorageHasher
The hasher used for this storage key part.
Sourcepub fn value(&self) -> Option<&StorageKeyPartValue<TypeId>>
pub fn value(&self) -> Option<&StorageKeyPartValue<TypeId>>
If applicable (ie this part uses a concat or ident hasher), return information about the value encoded into this hash.
Sourcepub fn map_type_id<NewTypeId, F>(self, f: F) -> StorageKeyPart<NewTypeId>where
F: FnMut(TypeId) -> NewTypeId,
pub fn map_type_id<NewTypeId, F>(self, f: F) -> StorageKeyPart<NewTypeId>where
F: FnMut(TypeId) -> NewTypeId,
Map the storage part type ID to something else.
Trait Implementations§
Source§impl<TypeId: Clone> Clone for StorageKeyPart<TypeId>
impl<TypeId: Clone> Clone for StorageKeyPart<TypeId>
Source§fn clone(&self) -> StorageKeyPart<TypeId>
fn clone(&self) -> StorageKeyPart<TypeId>
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 moreAuto Trait Implementations§
impl<TypeId> Freeze for StorageKeyPart<TypeId>where
TypeId: Freeze,
impl<TypeId> RefUnwindSafe for StorageKeyPart<TypeId>where
TypeId: RefUnwindSafe,
impl<TypeId> Send for StorageKeyPart<TypeId>where
TypeId: Send,
impl<TypeId> Sync for StorageKeyPart<TypeId>where
TypeId: Sync,
impl<TypeId> Unpin for StorageKeyPart<TypeId>where
TypeId: Unpin,
impl<TypeId> UnwindSafe for StorageKeyPart<TypeId>where
TypeId: UnwindSafe,
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§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more