pub struct Layout<H>(_);
Expand description
substrate trie layout
Trait Implementations
sourceimpl<H: Hasher> TrieConfiguration for Layout<H>
impl<H: Hasher> TrieConfiguration for Layout<H>
sourcefn trie_root<I, A, B>(input: I) -> <Self::Hash as Hasher>::Out where
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
fn trie_root<I, A, B>(input: I) -> <Self::Hash as Hasher>::Out where
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
Determines a trie root given its ordered contents, closed form.
sourcefn trie_root_unhashed<I, A, B>(input: I) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
where
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
fn trie_root_unhashed<I, A, B>(input: I) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
where
I: IntoIterator<Item = (A, B)>,
A: AsRef<[u8]> + Ord,
B: AsRef<[u8]>,
A: Allocator,
Determines a trie root node’s data given its ordered contents, closed form.
sourcefn encode_index(input: u32) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode_index(input: u32) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Encoding of index as a key (when reusing general trie for indexed trie). Read more
sourceimpl<H: Hasher> TrieLayout for Layout<H>
impl<H: Hasher> TrieLayout for Layout<H>
sourceconst USE_EXTENSION: bool
const USE_EXTENSION: bool
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
sourceconst ALLOW_EMPTY: bool
const ALLOW_EMPTY: bool
If true, the trie will allow empty values into TrieDBMut
type Hash = H
type Hash = H
Hasher to use for this trie.
Auto Trait Implementations
impl<H> RefUnwindSafe for Layout<H> where
H: RefUnwindSafe,
impl<H> Send for Layout<H> where
H: Send,
impl<H> Sync for Layout<H> where
H: Sync,
impl<H> Unpin for Layout<H> where
H: Unpin,
impl<H> UnwindSafe for Layout<H> where
H: UnwindSafe,
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> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
impl<T, Outer> IsWrappedBy<Outer> for T where
Outer: AsRef<T> + AsMut<T> + From<T>,
T: From<Outer>,
sourceimpl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
sourcepub fn unchecked_into(self) -> T
pub fn unchecked_into(self) -> T
The counterpart to unchecked_from
.