pub struct ExecutionProofBuilder { /* private fields */ }Expand description
Builder for constructing execution proofs during function execution.
Implementations§
Source§impl ExecutionProofBuilder
impl ExecutionProofBuilder
Sourcepub fn new(function_hash: [u8; 32]) -> Self
pub fn new(function_hash: [u8; 32]) -> Self
Create a new builder for the given function content hash.
Sourcepub fn with_trace(self) -> Self
pub fn with_trace(self) -> Self
Enable trace capture. When enabled, record_trace_step appends entries.
Sourcepub fn set_args_hash(&mut self, hash: [u8; 32])
pub fn set_args_hash(&mut self, hash: [u8; 32])
Record the hash of the serialized arguments.
Sourcepub fn record_trace_step(&mut self, state_hash: [u8; 32])
pub fn record_trace_step(&mut self, state_hash: [u8; 32])
Record an intermediate state hash in the execution trace.
This is a no-op if trace capture was not enabled via with_trace.
Sourcepub fn finalize(self, result_hash: [u8; 32]) -> ExecutionProof
pub fn finalize(self, result_hash: [u8; 32]) -> ExecutionProof
Finalize the proof with the result hash. Computes the proof hash and
returns the completed ExecutionProof.
Auto Trait Implementations§
impl Freeze for ExecutionProofBuilder
impl RefUnwindSafe for ExecutionProofBuilder
impl Send for ExecutionProofBuilder
impl Sync for ExecutionProofBuilder
impl Unpin for ExecutionProofBuilder
impl UnsafeUnpin for ExecutionProofBuilder
impl UnwindSafe for ExecutionProofBuilder
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