Struct sp_trie::TrieStream
source · pub struct TrieStream { /* private fields */ }
Expand description
The Substrate format implementation of TrieStream
.
The Substrate format implementation of TrieStream
.
Codec-flavored TrieStream.
Implementations§
Trait Implementations§
source§impl Clone for TrieStream
impl Clone for TrieStream
source§fn clone(&self) -> TrieStream
fn clone(&self) -> TrieStream
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for TrieStream
impl Default for TrieStream
source§fn default() -> TrieStream
fn default() -> TrieStream
Returns the “default value” for a type. Read more
source§impl TrieStream for TrieStream
impl TrieStream for TrieStream
source§fn append_empty_data(&mut self)
fn append_empty_data(&mut self)
Append an Empty node
source§fn append_leaf(&mut self, key: &[u8], value: TrieStreamValue<'_>)
fn append_leaf(&mut self, key: &[u8], value: TrieStreamValue<'_>)
Append a Leaf node
source§fn begin_branch(
&mut self,
maybe_partial: Option<&[u8]>,
maybe_value: Option<TrieStreamValue<'_>>,
has_children: impl Iterator<Item = bool>
)
fn begin_branch( &mut self, maybe_partial: Option<&[u8]>, maybe_value: Option<TrieStreamValue<'_>>, 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.
source§fn append_extension(&mut self, _key: &[u8])
fn append_extension(&mut self, _key: &[u8])
Append an Extension node
source§fn append_substream<H: Hasher>(&mut self, other: Self)
fn append_substream<H: Hasher>(&mut self, other: Self)
Append a Branch of Extension substream
source§fn append_empty_child(&mut self)
fn append_empty_child(&mut self)
Append an empty child node. Optional.
source§fn end_branch(&mut self, _value: Option<Value<'_>>)
fn end_branch(&mut self, _value: Option<Value<'_>>)
Wrap up a Branch node portion of a
TrieStream
and append the value
stored on the Branch (if any).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§
§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
.§fn 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
.§fn 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.§fn 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.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<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>,
source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere T: UncheckedFrom<S>,
source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.