pub struct PrefixScan { /* private fields */ }Expand description
Scan of a prefix in progress.
Implementations§
Source§impl PrefixScan
impl PrefixScan
Sourcepub fn requested_keys(
&self,
) -> impl Iterator<Item = impl Iterator<Item = Nibble>>
pub fn requested_keys( &self, ) -> impl Iterator<Item = impl Iterator<Item = Nibble>>
Returns the list of keys whose storage proof must be queried.
Sourcepub fn request_storage_values(&self) -> bool
pub fn request_storage_values(&self) -> bool
Returns whether the storage proof must include the storage values of the requested keys.
Note: This is always equal to
Config::full_storage_values_required.
Sourcepub fn resume_all_keys(
self,
proof: &[u8],
) -> Result<ResumeOutcome, (Self, Error)>
pub fn resume_all_keys( self, proof: &[u8], ) -> Result<ResumeOutcome, (Self, Error)>
Injects the proof presumably containing the keys returned by PrefixScan::requested_keys.
Returns an error if the proof is invalid. In that case, self isn’t modified.
Contrary to PrefixScan::resume_partial, a proof is considered valid only if it
fulfills all the keys found in the list returned by PrefixScan::requested_keys.
Sourcepub fn resume_partial(
self,
proof: &[u8],
) -> Result<ResumeOutcome, (Self, Error)>
pub fn resume_partial( self, proof: &[u8], ) -> Result<ResumeOutcome, (Self, Error)>
Injects the proof presumably containing the keys returned by PrefixScan::requested_keys.
Returns an error if the proof is invalid. In that case, self isn’t modified.
Contrary to PrefixScan::resume_all_keys, a proof is considered valid if it advances
the request in any way.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrefixScan
impl RefUnwindSafe for PrefixScan
impl Send for PrefixScan
impl Sync for PrefixScan
impl Unpin for PrefixScan
impl UnwindSafe for PrefixScan
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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> DowncastSync for T
impl<T> DowncastSync for T
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 more