[−][src]Struct sp_storage::ChildStorageKey
A wrapper around a child storage key.
This wrapper ensures that the child storage key is correct and properly used. It is
impossible to create an instance of this struct without providing a correct storage_key
.
Methods
impl<'a> ChildStorageKey<'a>
[src]
pub fn from_vec(key: Vec<u8>) -> Option<Self>
[src]
Create a new ChildStorageKey
from a vector.
storage_key
need to start with :child_storage:default:
See is_child_trie_key_valid
for more details.
pub fn from_slice(key: &'a [u8]) -> Option<Self>
[src]
Create a new ChildStorageKey
from a slice.
storage_key
need to start with :child_storage:default:
See is_child_trie_key_valid
for more details.
pub fn as_ref(&self) -> &[u8]
[src]
Get access to the byte representation of the storage key.
This key is guaranteed to be correct.
pub fn into_owned(self) -> Vec<u8>
[src]
Destruct this instance into an owned vector that represents the storage key.
This key is guaranteed to be correct.
Auto Trait Implementations
impl<'a> RefUnwindSafe for ChildStorageKey<'a>
impl<'a> Send for ChildStorageKey<'a>
impl<'a> Sync for ChildStorageKey<'a>
impl<'a> Unpin for ChildStorageKey<'a>
impl<'a> UnwindSafe for ChildStorageKey<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,