Struct sp_trie::TrieStream
source · [−]pub struct TrieStream { /* private fields */ }
Expand description
Codec-flavored TrieStream.
Implementations
sourceimpl TrieStream
impl TrieStream
Trait Implementations
sourceimpl Clone for TrieStream
impl Clone for TrieStream
sourcefn clone(&self) -> TrieStream
fn clone(&self) -> TrieStream
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for TrieStream
impl Default for TrieStream
sourcefn default() -> TrieStream
fn default() -> TrieStream
Returns the “default value” for a type. Read more
sourceimpl TrieStream for TrieStream
impl TrieStream for TrieStream
sourcefn append_empty_data(&mut self)
fn append_empty_data(&mut self)
Append an Empty node
sourcefn begin_branch(
&mut self,
maybe_partial: Option<&[u8]>,
maybe_value: Option<&[u8]>,
has_children: impl Iterator<Item = bool>
)
fn begin_branch(
&mut self,
maybe_partial: Option<&[u8]>,
maybe_value: Option<&[u8]>,
has_children: impl Iterator<Item = bool>
)
Start a new Branch node, possibly with a value; takes a list indicating which slots in the Branch node has further child nodes. Read more
sourcefn append_extension(&mut self, _key: &[u8])
fn append_extension(&mut self, _key: &[u8])
Append an Extension node
sourcefn append_substream<H: Hasher>(&mut self, other: Self)
fn append_substream<H: Hasher>(&mut self, other: Self)
Append a Branch of Extension substream
sourcefn out(self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn out(self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Return the finished TrieStream
as a vector of bytes.
sourcefn append_empty_child(&mut self)
fn append_empty_child(&mut self)
Append an empty child node. Optional.
Auto Trait Implementations
impl RefUnwindSafe for TrieStream
impl Send for TrieStream
impl Sync for TrieStream
impl Unpin for TrieStream
impl UnwindSafe for TrieStream
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<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
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
.