[][src]Enum sp_storage::ChildInfo

pub enum ChildInfo<'a> {
    Default(ChildTrie<'a>),
}

Information related to a child state.

Variants

Default(ChildTrie<'a>)

Methods

impl<'a> ChildInfo<'a>[src]

pub const fn new_default(unique_id: &'a [u8]) -> Self[src]

Instantiates information for a default child trie.

pub fn to_owned(&self) -> OwnedChildInfo[src]

Instantiates a owned version of this child info.

pub fn resolve_child_info(child_type: u32, data: &'a [u8]) -> Option<Self>[src]

Create child info from a linear byte packed value and a given type.

pub fn info(&self) -> (&[u8], u32)[src]

Return a single byte vector containing packed child info content and its child info type. This can be use as input for resolve_child_info.

pub fn keyspace(&self) -> &[u8][src]

Return byte sequence (keyspace) that can be use by underlying db to isolate keys. This is a unique id of the child trie. The collision resistance of this value depends on the type of child info use. For ChildInfo::Default it is and need to be.

Trait Implementations

impl<'a> Clone for ChildInfo<'a>[src]

impl<'a> Copy for ChildInfo<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ChildInfo<'a>

impl<'a> Send for ChildInfo<'a>

impl<'a> Sync for ChildInfo<'a>

impl<'a> Unpin for ChildInfo<'a>

impl<'a> UnwindSafe for ChildInfo<'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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.