[][src]Struct sp_storage::ChildStorageKey

pub struct ChildStorageKey<'a> { /* fields omitted */ }

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.