Struct casper_execution_engine::storage::trie::PointerBlock
source · pub struct PointerBlock(/* private fields */);Expand description
Represents the underlying structure of a node in a Merkle Trie
Implementations§
source§impl PointerBlock
impl PointerBlock
sourcepub fn from_indexed_pointers(indexed_pointers: &[(u8, Pointer)]) -> Self
pub fn from_indexed_pointers(indexed_pointers: &[(u8, Pointer)]) -> Self
Constructs a PointerBlock from a slice of indexed Pointers.
sourcepub fn as_indexed_pointers(&self) -> impl Iterator<Item = (u8, Pointer)> + '_
pub fn as_indexed_pointers(&self) -> impl Iterator<Item = (u8, Pointer)> + '_
Deconstructs a PointerBlock into an iterator of indexed Pointers.
sourcepub fn child_count(&self) -> usize
pub fn child_count(&self) -> usize
Gets the count of children for this PointerBlock.
Trait Implementations§
source§impl Clone for PointerBlock
impl Clone for PointerBlock
source§fn clone(&self) -> PointerBlock
fn clone(&self) -> PointerBlock
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 Debug for PointerBlock
impl Debug for PointerBlock
source§impl Default for PointerBlock
impl Default for PointerBlock
source§impl<'de> Deserialize<'de> for PointerBlock
impl<'de> Deserialize<'de> for PointerBlock
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<[Option<Pointer>; 256]> for PointerBlock
impl From<[Option<Pointer>; 256]> for PointerBlock
source§fn from(src: PointerBlockArray) -> Self
fn from(src: PointerBlockArray) -> Self
Converts to this type from the input type.
source§impl FromBytes for PointerBlock
impl FromBytes for PointerBlock
source§impl Index<RangeFull> for PointerBlock
impl Index<RangeFull> for PointerBlock
source§impl Index<usize> for PointerBlock
impl Index<usize> for PointerBlock
source§impl IndexMut<usize> for PointerBlock
impl IndexMut<usize> for PointerBlock
source§impl PartialEq for PointerBlock
impl PartialEq for PointerBlock
source§fn eq(&self, other: &PointerBlock) -> bool
fn eq(&self, other: &PointerBlock) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for PointerBlock
impl Serialize for PointerBlock
source§impl ToBytes for PointerBlock
impl ToBytes for PointerBlock
source§fn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Returns the length of the
Vec<u8> which would be returned from a successful call to
to_bytes() or into_bytes(). The data is not actually serialized, so this call is
relatively cheap.impl Copy for PointerBlock
impl Eq for PointerBlock
Auto Trait Implementations§
impl RefUnwindSafe for PointerBlock
impl Send for PointerBlock
impl Sync for PointerBlock
impl Unpin for PointerBlock
impl UnwindSafe for PointerBlock
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
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>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.