pub struct BranchNodeV2 {
pub key: Nibbles,
pub stack: Vec<RlpNode>,
pub state_mask: TrieMask,
pub branch_rlp_node: Option<RlpNode>,
}Expand description
A branch node in an Ethereum Merkle Patricia Trie.
Branch node is a 17-element array consisting of 16 slots that correspond to each hexadecimal character and an additional slot for a value. We do exclude the node value since all paths have a fixed size.
This node also encompasses the possible parent extension node of a branch via the key field.
Fields§
§key: NibblesThe key for the branch’s parent extension. if key is empty then the branch does not have a parent extension.
stack: Vec<RlpNode>The collection of RLP encoded children.
state_mask: TrieMaskThe bitmask indicating the presence of children at the respective nibble positions
branch_rlp_node: Option<RlpNode>RlpNode encoding of the branch node. Always provided when key is not empty (i.e this
is an extension node).
Implementations§
Trait Implementations§
Source§impl Clone for BranchNodeV2
impl Clone for BranchNodeV2
Source§impl Debug for BranchNodeV2
impl Debug for BranchNodeV2
Source§impl Default for BranchNodeV2
impl Default for BranchNodeV2
Source§impl<'de> Deserialize<'de> for BranchNodeV2
Available on crate feature serde only.
impl<'de> Deserialize<'de> for BranchNodeV2
serde only.Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Encodable for BranchNodeV2
impl Encodable for BranchNodeV2
impl Eq for BranchNodeV2
Source§impl PartialEq for BranchNodeV2
impl PartialEq for BranchNodeV2
Source§impl Serialize for BranchNodeV2
Available on crate feature serde only.
impl Serialize for BranchNodeV2
serde only.impl StructuralPartialEq for BranchNodeV2
Auto Trait Implementations§
impl Freeze for BranchNodeV2
impl RefUnwindSafe for BranchNodeV2
impl Send for BranchNodeV2
impl Sync for BranchNodeV2
impl Unpin for BranchNodeV2
impl UnsafeUnpin for BranchNodeV2
impl UnwindSafe for BranchNodeV2
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeDebug for Twhere
T: Debug,
impl<T> MaybeSerde for Twhere
T: Serialize + for<'de> Deserialize<'de>,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes