Struct sp_state_machine::StorageProof [−][src]
A proof that some set of key-value pairs are included in the storage trie. The proof contains the storage values so that the partial storage backend can be reconstructed by a verifier that does not already have access to the key-value pairs.
The proof consists of the set of serialized nodes in the storage trie accessed when looking up the keys covered by the proof. Verifying the proof requires constructing the partial trie from the serialized nodes and performing the key lookups.
Implementations
impl StorageProof
[src]
pub fn new(trie_nodes: Vec<Vec<u8, Global>, Global>) -> StorageProof
[src]
Constructs a storage proof from a subset of encoded trie nodes in a storage backend.
pub fn empty() -> StorageProof
[src]
Returns a new empty proof.
An empty proof is capable of only proving trivial statements (ie. that an empty set of key-value pairs exist in storage).
pub fn is_empty(&self) -> bool
[src]
Returns whether this is an empty proof.
pub fn iter_nodes(self) -> StorageProofNodeIterator
[src]
Create an iterator over trie nodes constructed from the proof. The nodes are not guaranteed to be traversed in any particular order.
pub fn into_memory_db<H>(
self
) -> MemoryDB<H, HashKey<H>, Vec<u8, Global>, NoopTracker<Vec<u8, Global>>> where
H: Hasher,
[src]
self
) -> MemoryDB<H, HashKey<H>, Vec<u8, Global>, NoopTracker<Vec<u8, Global>>> where
H: Hasher,
Creates a MemoryDB
from Self
.
pub fn merge<I>(proofs: I) -> StorageProof where
I: IntoIterator<Item = StorageProof>,
[src]
I: IntoIterator<Item = StorageProof>,
Merges multiple storage proofs covering potentially different sets of keys into one proof covering all keys. The merged proof output may be smaller than the aggregate size of the input proofs due to deduplication of trie nodes.
Trait Implementations
impl Clone for StorageProof
[src]
pub fn clone(&self) -> StorageProof
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for StorageProof
[src]
impl Decode for StorageProof
[src]
pub fn decode<__CodecInputEdqy>(
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<StorageProof, Error> where
__CodecInputEdqy: Input,
[src]
__codec_input_edqy: &mut __CodecInputEdqy
) -> Result<StorageProof, Error> where
__CodecInputEdqy: Input,
pub fn skip<I>(input: &mut I) -> Result<(), Error> where
I: Input,
[src]
I: Input,
pub fn encoded_fixed_size() -> Option<usize>
[src]
impl Encode for StorageProof
[src]
pub fn encode_to<__CodecOutputEdqy>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
) where
__CodecOutputEdqy: Output + ?Sized,
[src]
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy
) where
__CodecOutputEdqy: Output + ?Sized,
pub fn encode(&self) -> Vec<u8, Global>
[src]
pub fn using_encoded<R, F>(&self, f: F) -> R where
F: FnOnce(&[u8]) -> R,
[src]
F: FnOnce(&[u8]) -> R,
pub fn size_hint(&self) -> usize
[src]
pub fn encoded_size(&self) -> usize
[src]
impl EncodeLike<StorageProof> for StorageProof
[src]
impl Eq for StorageProof
[src]
impl PartialEq<StorageProof> for StorageProof
[src]
pub fn eq(&self, other: &StorageProof) -> bool
[src]
pub fn ne(&self, other: &StorageProof) -> bool
[src]
impl StructuralEq for StorageProof
[src]
impl StructuralPartialEq for StorageProof
[src]
Auto Trait Implementations
impl RefUnwindSafe for StorageProof
[src]
impl Send for StorageProof
[src]
impl Sync for StorageProof
[src]
impl Unpin for StorageProof
[src]
impl UnwindSafe for StorageProof
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<S> Codec for S where
S: Encode + Decode,
[src]
S: Encode + Decode,
impl<T> DecodeAll for T where
T: Decode,
[src]
T: Decode,
impl<T> DecodeLimit for T where
T: Decode,
[src]
T: Decode,
pub fn decode_all_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
[src]
pub fn decode_with_depth_limit(limit: u32, input: &[u8]) -> Result<T, Error>
[src]
impl<T> DynClone for T where
T: Clone,
[src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()
[src]
impl<'_, '_, T> EncodeLike<&'_ &'_ T> for T where
T: Encode,
[src]
T: Encode,
impl<'_, T> EncodeLike<&'_ T> for T where
T: Encode,
[src]
T: Encode,
impl<'_, T> EncodeLike<&'_ mut T> for T where
T: Encode,
[src]
T: Encode,
impl<T> EncodeLike<Arc<T>> for T where
T: Encode,
[src]
T: Encode,
impl<T> EncodeLike<Box<T, Global>> for T where
T: Encode,
[src]
T: Encode,
impl<'a, T> EncodeLike<Cow<'a, T>> for T where
T: Encode + ToOwned,
[src]
T: Encode + ToOwned,
impl<T> EncodeLike<Rc<T>> for T where
T: Encode,
[src]
T: Encode,
impl<T> From<T> for T
[src]
impl<S> FullCodec for S where
S: Decode + FullEncode,
[src]
S: Decode + FullEncode,
impl<S> FullEncode for S where
S: Encode + EncodeLike<S>,
[src]
S: Encode + EncodeLike<S>,
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Outer> IsWrappedBy<Outer> for T where
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
[src]
T: From<Outer>,
Outer: AsRef<T> + AsMut<T> + From<T>,
pub fn from_ref(outer: &Outer) -> &T
[src]
Get a reference to the inner from the outer.
pub fn from_mut(outer: &mut Outer) -> &mut T
[src]
Get a mutable reference to the inner from the outer.
impl<T> KeyedVec for T where
T: Codec,
[src]
T: Codec,
impl<T> MaybeDebug for T where
T: Debug,
[src]
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeRefUnwindSafe for T where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<S, T> UncheckedInto<T> for S where
T: UncheckedFrom<S>,
[src]
T: UncheckedFrom<S>,
pub fn unchecked_into(self) -> T
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,