Enum sp_storage::ChildType
source · [−]#[repr(u32)]
pub enum ChildType {
ParentKeyId,
}
Expand description
Type of child. It does not strictly define different child type, it can also be related to technical consideration or api variant.
Variants
ParentKeyId
If runtime module ensures that the child key is a unique id that will only be used once, its parent key is used as a child trie unique id.
Implementations
sourceimpl ChildType
impl ChildType
sourcepub fn new(repr: u32) -> Option<ChildType>
pub fn new(repr: u32) -> Option<ChildType>
Try to get a child type from its u32
representation.
sourcepub fn from_prefixed_key<'a>(
storage_key: &'a PrefixedStorageKey
) -> Option<(Self, &'a [u8])>
pub fn from_prefixed_key<'a>(
storage_key: &'a PrefixedStorageKey
) -> Option<(Self, &'a [u8])>
Transform a prefixed key into a tuple of the child type and the unprefixed representation of the key.
Trait Implementations
impl Copy for ChildType
impl StructuralPartialEq for ChildType
Auto Trait Implementations
impl RefUnwindSafe for ChildType
impl Send for ChildType
impl Sync for ChildType
impl Unpin for ChildType
impl UnwindSafe for ChildType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more