pub struct ProofRegistry { /* private fields */ }Expand description
Registry of execution proofs, indexed by function hash.
Implementations§
Source§impl ProofRegistry
impl ProofRegistry
Sourcepub fn register(&mut self, proof: ExecutionProof) -> usize
pub fn register(&mut self, proof: ExecutionProof) -> usize
Register a proof. Returns the index of the newly registered proof.
Sourcepub fn lookup(&self, function_hash: &[u8; 32]) -> &[ExecutionProof]
pub fn lookup(&self, function_hash: &[u8; 32]) -> &[ExecutionProof]
Look up all proofs for a given function content hash.
Sourcepub fn lookup_iter<'a>(
&'a self,
function_hash: &[u8; 32],
) -> impl Iterator<Item = &'a ExecutionProof>
pub fn lookup_iter<'a>( &'a self, function_hash: &[u8; 32], ) -> impl Iterator<Item = &'a ExecutionProof>
Iterate over all proofs for a given function hash.
Sourcepub fn verify_all(&self) -> Vec<(usize, VerificationResult)>
pub fn verify_all(&self) -> Vec<(usize, VerificationResult)>
Verify integrity of all registered proofs.
Returns a list of (proof_index, VerificationResult) for every proof
that fails integrity verification.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProofRegistry
impl RefUnwindSafe for ProofRegistry
impl Send for ProofRegistry
impl Sync for ProofRegistry
impl Unpin for ProofRegistry
impl UnsafeUnpin for ProofRegistry
impl UnwindSafe for ProofRegistry
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 more