pub struct AccessedNodesTracker<H: Hash> { /* private fields */ }
Expand description
Helper struct used to ensure that a storage proof doesn’t contain duplicate or unused nodes.
The struct needs to be used as a TrieRecorder
and ensure_no_unused_nodes()
has to be called
to actually perform the check.
Implementations§
Trait Implementations§
source§impl<H: Hash + Ord> TrieRecorder<H> for AccessedNodesTracker<H>
impl<H: Hash + Ord> TrieRecorder<H> for AccessedNodesTracker<H>
source§fn record(&mut self, access: TrieAccess<'_, H>)
fn record(&mut self, access: TrieAccess<'_, H>)
Record the given
TrieAccess
. Read moresource§fn trie_nodes_recorded_for_key(&self, _key: &[u8]) -> RecordedForKey
fn trie_nodes_recorded_for_key(&self, _key: &[u8]) -> RecordedForKey
Check if we have recorded any trie nodes for the given
key
. Read moreAuto Trait Implementations§
impl<H> Freeze for AccessedNodesTracker<H>
impl<H> RefUnwindSafe for AccessedNodesTracker<H>where
H: RefUnwindSafe,
impl<H> Send for AccessedNodesTracker<H>where
H: Send,
impl<H> Sync for AccessedNodesTracker<H>where
H: Sync,
impl<H> Unpin for AccessedNodesTracker<H>
impl<H> UnwindSafe for AccessedNodesTracker<H>where
H: RefUnwindSafe,
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
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> 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>
Converts
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>
Converts
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 moresource§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
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
.