Struct sp_state_machine::LayoutV1
pub struct LayoutV1<H>(_);
Expand description
substrate trie layout, with external value nodes.
Trait Implementations
impl<H> TrieConfiguration for LayoutV1<H>where
H: Hasher,
impl<H> TrieConfiguration for LayoutV1<H>where
H: Hasher,
fn trie_root<I, A, B>(
input: I
) -> <<LayoutV1<H> as TrieLayout>::Hash as Hasher>::Outwhere
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
fn trie_root<I, A, B>(
input: I
) -> <<LayoutV1<H> as TrieLayout>::Hash as Hasher>::Outwhere
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
Determines a trie root given its ordered contents, closed form.
fn trie_root_unhashed<I, A, B>(input: I) -> Vec<u8, Global> ⓘwhere
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
fn trie_root_unhashed<I, A, B>(input: I) -> Vec<u8, Global> ⓘwhere
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
Determines a trie root node’s data given its ordered contents, closed form.
fn encode_index(input: u32) -> Vec<u8, Global> ⓘ
fn encode_index(input: u32) -> Vec<u8, Global> ⓘ
Encoding of index as a key (when reusing general trie for
indexed trie). Read more
fn trie_build<DB, I, A, B>(db: &mut DB, input: I) -> <Self::Hash as Hasher>::Outwhere
DB: HashDB<Self::Hash, Vec<u8, Global>>,
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
fn trie_build<DB, I, A, B>(db: &mut DB, input: I) -> <Self::Hash as Hasher>::Outwhere
DB: HashDB<Self::Hash, Vec<u8, Global>>,
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
Operation to build a trie db from its ordered iterator over its key/values.
fn ordered_trie_root<I, A>(input: I) -> <Self::Hash as Hasher>::Outwhere
I: IntoIterator<Item = A>,
A: AsRef<[u8]>,
fn ordered_trie_root<I, A>(input: I) -> <Self::Hash as Hasher>::Outwhere
I: IntoIterator<Item = A>,
A: AsRef<[u8]>,
A trie root formed from the items, with keys attached according to their
compact-encoded index (using
parity-codec
crate). Read moreimpl<H> TrieLayout for LayoutV1<H>where
H: Hasher,
impl<H> TrieLayout for LayoutV1<H>where
H: Hasher,
const USE_EXTENSION: bool = false
const USE_EXTENSION: bool = false
If true, the trie will use extension nodes and
no partial in branch, if false the trie will only
use branch and node with partials in both. Read more
const ALLOW_EMPTY: bool = true
const ALLOW_EMPTY: bool = true
If true, the trie will allow empty values into
TrieDBMut
const MAX_INLINE_VALUE: Option<u32> = Some(sp_core::storage::TRIE_VALUE_NODE_THRESHOLD)
const MAX_INLINE_VALUE: Option<u32> = Some(sp_core::storage::TRIE_VALUE_NODE_THRESHOLD)
Threshold above which an external node should be
use to store a node value. Read more
type Hash = H
type Hash = H
Hasher to use for this trie.
Auto Trait Implementations
impl<H> RefUnwindSafe for LayoutV1<H>where
H: RefUnwindSafe,
impl<H> Send for LayoutV1<H>where
H: Send,
impl<H> Sync for LayoutV1<H>where
H: Sync,
impl<H> Unpin for LayoutV1<H>where
H: Unpin,
impl<H> UnwindSafe for LayoutV1<H>where
H: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for Twhere
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
sourcefn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.